/* * $Id$ */ /* * Harbour Project source code: * Compile help & info related functions * * Copyright 1999-2001 Viktor Szakats * www - http://www.harbour-project.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). * * As a special exception, the Harbour Project gives permission for * additional uses of the text contained in its release of Harbour. * * The exception is that, if you link the Harbour libraries with other * files to produce an executable, this does not by itself cause the * resulting executable to be covered by the GNU General Public License. * Your use of that executable is in no way restricted on account of * linking the Harbour library code into it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the GNU General Public License. * * This exception applies only to the code released by the Harbour * Project under the name Harbour. If you copy code from other * Harbour Project or Free Software Foundation releases into a copy of * Harbour, as the General Public License permits, the exception does * not apply to the code that you add in this way. To avoid misleading * anyone as to the status of such modified files, you must delete * this exception notice from them. * * If you write modifications of your own for Harbour, it is your choice * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * */ #include "hbcomp.h" /* * Prints available options */ void hb_compPrintUsage( HB_COMP_DECL, char * szSelf ) { static const char * szOptions [] = { "\nOptions: %ca automatic memvar declaration", "\n %cb debug info", "\n %cbuild display detailed version info", "\n %ccredits display credits", "\n %cd[=] #define ", "\n %ces[] set exit severity", "\n %cfn[:[l|u]|-] set filename casing (l=lower u=upper)", "\n %cfd[:[l|u]|-] set directory casing (l=lower u=upper)", "\n %cfp[:] set path separator", "\n %cfs[-] turn filename space trimming on or off (default)", "\n %cg output type generated is (see below)", "\n %cgc[] output type: C source (.c) (default)", "\n : 0=compact 1=normal 2=verbose (default)", "\n 3=generate real C code", "\n %cgo output type: Platform dependant object module", "\n %cgw output type: Windows/DOS OBJ32 (.obj)", "\n %cgh output type: Harbour Portable Object (.hrb)", "\n %ci #include file search path", "\n %cj[] generate i18n gettex file (.pot)", "\n %ck compilation mode (type -k? for more data)", "\n %cl suppress line number information", "\n %cm compile module only", "\n %cn[] no implicit starting procedure (default)", "\n : 0=no implicit starting procedure", "\n 1=no starting procedure at all", "\n %co object file drive and/or path", "\n %cp[] generate pre-processed output (.ppo) file", "\n %cp+ generate pre-processor trace (.ppt) file", "\n %cq quiet", "\n %cq0 quiet and don't display program header", "\n %cr: set maximum number of preprocessor iterations", /* TODO: "\n %cr[] request linker to search (or none)", */ "\n %cs syntax check only", /* TODO: "\n %ct path for temp file creation", */ "\n %cu[] use command def set in (or none)", "\n %cundef: #undef ", "\n %cv variables are assumed M->", "\n %cw[] set warning level number (0..3, default 1)", "\n %cx[] set symbol init function name prefix (for .c only)", #ifdef YYDEBUG "\n %cy trace lex & yacc activity", #endif "\n %cz suppress shortcutting (.and. & .or.)", "\n @ compile list of modules in ", "\n" }; char buffer[ 256 ]; int iLine; snprintf( buffer, sizeof( buffer ), "\nSyntax: %s [options]\n", szSelf ); hb_compOutStd( HB_COMP_PARAM, buffer ); for( iLine = 0; iLine < ( int ) ( sizeof( szOptions ) / sizeof( char * ) ); iLine++ ) { snprintf( buffer, sizeof( buffer ), szOptions[ iLine ], OS_OPT_DELIMITER_LIST[ 0 ] ); hb_compOutStd( HB_COMP_PARAM, buffer ); } } /* * List of compatibility/features modes */ void hb_compPrintModes( HB_COMP_DECL ) { static const char * szOptions [] = { "\nOptions: c clear all flags (strict Clipper mode)", "\n h Harbour mode", "\n i enable support for HB_INLINE", "\n r runtime settings enabled", "\n s allow indexed assignment on all types", "\n x extended Xbase++ mode", "\n J turn off jump optimization in pcode", "\n M turn off macrotext substitution", "\n ? this info", "\n" }; static const int flags[] = { 0, HB_COMPFLAG_HARBOUR, HB_COMPFLAG_HB_INLINE, HB_COMPFLAG_RT_MACRO, HB_COMPFLAG_ARRSTR, HB_COMPFLAG_XBASE, ~HB_COMPFLAG_OPTJUMP, ~HB_COMPFLAG_MACROTEXT, }; int iLine; hb_compOutStd( HB_COMP_PARAM, "\nCompatibility flags (lowercase/uppercase significant): -k[options]\n" ); for( iLine = 0; iLine < ( int ) ( sizeof( szOptions ) / sizeof( char * ) ); iLine++ ) { hb_compOutStd( HB_COMP_PARAM, szOptions[ iLine ] ); if( iLine < ( int ) ( sizeof( flags ) / sizeof( int ) ) && ( flags[ iLine ] < 0 ? HB_COMP_ISSUPPORTED( ~flags[ iLine ] ) == 0 : HB_COMP_ISSUPPORTED( flags[ iLine ] ) != 0 ) ) hb_compOutStd( HB_COMP_PARAM, " (default)" ); } } /* * Prints credits */ void hb_compPrintCredits( HB_COMP_DECL ) { hb_compOutStd( HB_COMP_PARAM, "\n" "Credits: The Harbour Team at www.harbour-project.org\n" " (replace space with @ in e-mail addresses)\n" "\n" "April White \n" "Alejandro de Garate \n" "Alexander S. Kresin \n" "Andi Jahja \n" "Antonio Carlos Pantaglione \n" "Antonio Linares \n" "Bil Simser \n" "Brian Hays \n" "Bruno Cantero \n" "Chen Kedem \n" "Dave Pearson \n" "David Arturo Macias Corona \n" "David G. Holm \n" "Davor Siklic \n" "Dmitry V. Korzhov \n" "Eddie Runia \n" "Enrico Maria Giordano \n" "Felipe G. Coury \n" "Francesco Saverio Giudice \n" "Giancarlo Niccolai \n" "Gonzalo A. Diethelm \n" "Hannes Ziegler \n" "Horacio D. Roldan Kasimatis \n" "Ignacio Ortiz de Zuniga \n" "Janica Lubos \n" "Jean-Francois Lefebvre (mafact) \n" "Jose Lalin \n" "Leslee Griffith \n" "Lorenzo Fiorini \n" "Luis Krause Mantilla \n" "Luiz Rafael Culik \n" "Manuel Ruiz \n" "Marek Paliwoda \n" "Martin Vogel \n" "Matteo Baccan \n" "Matthew Hamilton \n" "Mauricio Abre \n" "Maurilio Longo \n" "Miguel Angel Marchuet Frutos \n" "Mindaugas Kavaliauskas \n" "Nicolas del Pozo \n" "Patrick Mast \n" "Paul Tucker \n" "Pavel Tsarenko \n" "Peter Rees \n" "Peter Townsend \n" "Phil Barnett \n" "Phil Krylov \n" "Przemyslaw Czerpak \n" "Ron Pinkas \n" "Ryszard Glab \n" "Tim Stone \n" "Tomaž Zupan \n" "Viktor Szakats \n" "Vladimir Kazimirchik \n" "Walter Negro \n" ); } /* * Prints logo */ void hb_compPrintLogo( HB_COMP_DECL ) { char * szVer = hb_verHarbour(); hb_compOutStd( HB_COMP_PARAM, szVer ); hb_compOutStd( HB_COMP_PARAM, "\nCopyright (c) 1999-2008, http://www.harbour-project.org/\n" ); hb_xfree( szVer ); }