Пример #1
0
static void hb_notSupportedInfo( HB_COMP_DECL, const char * szSwitch )
{
   char buffer[ 512 ];

   hb_snprintf( buffer, sizeof( buffer ),
                "Not yet supported command line option: %s\n", szSwitch );

   hb_compOutStd( HB_COMP_PARAM, buffer );
}
Пример #2
0
void hb_compGenPortObj( HB_COMP_DECL, PHB_FNAME pFileName )
{
   char szFileName[ HB_PATH_MAX ];
   HB_SIZE nSize;
   HB_BYTE * pHrbBody;
   FILE * yyc;

   if( ! pFileName->szExtension )
      pFileName->szExtension = ".hrb";
   hb_fsFNameMerge( szFileName, pFileName );

   yyc = hb_fopen( szFileName, "wb" );
   if( ! yyc )
   {
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_CREATE_OUTPUT, szFileName, NULL );
      return;
   }

   if( ! HB_COMP_PARAM->fQuiet )
   {
      char buffer[ 80 + HB_PATH_MAX - 1 ];
      hb_snprintf( buffer, sizeof( buffer ),
                   "Generating Harbour Portable Object output to \'%s\'... ", szFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }

   hb_compGenBufPortObj( HB_COMP_PARAM, &pHrbBody, &nSize );

   if( fwrite( pHrbBody, nSize, 1, yyc ) != 1 )
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_FILE_WRITE, szFileName, NULL );

   hb_xfree( pHrbBody );

   fclose( yyc );

   if( ! HB_COMP_PARAM->fQuiet )
      hb_compOutStd( HB_COMP_PARAM, "Done.\n" );
}
Пример #3
0
void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[],
                    PHB_PP_OPEN_FUNC pOpenFunc )
{
   HB_TRACE( HB_TR_DEBUG, ( "hb_compInitPP()" ) );

   if( HB_COMP_PARAM->pLex->pPP )
   {
      hb_pp_init( HB_COMP_PARAM->pLex->pPP, HB_COMP_PARAM->fQuiet,
                  HB_COMP_PARAM->iMaxTransCycles,
                  HB_COMP_PARAM, pOpenFunc, NULL,
                  hb_pp_ErrorGen, hb_pp_Disp, hb_pp_PragmaDump,
                  HB_COMP_ISSUPPORTED( HB_COMPFLAG_HB_INLINE ) ?
                  hb_pp_hb_inLine : NULL, hb_pp_CompilerSwitch );

      if( HB_COMP_PARAM->iTraceInclude )
         hb_pp_setIncFunc( HB_COMP_PARAM->pLex->pPP, hb_pp_fileIncluded );

      if( ! HB_COMP_PARAM->szStdCh )
         hb_pp_setStdRules( HB_COMP_PARAM->pLex->pPP );
      else if( HB_COMP_PARAM->szStdCh[ 0 ] > ' ' )
         hb_pp_readRules( HB_COMP_PARAM->pLex->pPP, HB_COMP_PARAM->szStdCh );
      else if( ! HB_COMP_PARAM->fQuiet )
         hb_compOutStd( HB_COMP_PARAM, "Standard command definitions excluded.\n" );

      hb_pp_initDynDefines( HB_COMP_PARAM->pLex->pPP, ! HB_COMP_PARAM->fNoArchDefs );

      /* Add /D and /undef: command line or envvar defines */
      hb_compChkDefines( HB_COMP_PARAM, argc, argv );

      /* add extended definitions files (-u+<file>) */
      if( HB_COMP_PARAM->iStdChExt > 0 )
      {
         int i = 0;

         while( i < HB_COMP_PARAM->iStdChExt )
            hb_pp_readRules( HB_COMP_PARAM->pLex->pPP,
                             HB_COMP_PARAM->szStdChExt[ i++ ] );
      }

      /* mark current rules as standard ones */
      hb_pp_setStdBase( HB_COMP_PARAM->pLex->pPP );
   }
}
Пример #4
0
void hb_compPrintUsage( HB_COMP_DECL, const char * szSelf )
{
   static const char * s_szOptions[] =
   {
      "\nOptions:  -a               automatic memvar declaration",
      "\n          -b               debug info",
      "\n          -build           display detailed version info",
      "\n          -credits         display credits",
      "\n          -d<id>[=<val>]   #define <id>",
      "\n          -es[<level>]     set exit severity",
      "\n          -fn[:[l|u]|-]    set filename casing (l=lower u=upper)",
      "\n          -fd[:[l|u]|-]    set directory casing (l=lower u=upper)",
      "\n          -fp[:<char>]     set path separator",
      "\n          -fs[-]           turn filename space trimming on or off (default)",
      "\n          -g<type>         output type generated is <type> (see below)",
      "\n          -gc[<type>]      output type: C source (.c) (default)",
      "\n                           <type>: 0=compact (default) 1=normal 2=verbose",
      "\n                                   3=generate real C code",
      "\n          -gh              output type: Harbour Portable Object (.hrb)",
      "\n          -gd[.<destext>]  generate dependencies list into (.d) file",
      "\n          -ge[<mode>]      error output <mode>: 0=Clipper (default)",
      "\n                                                1=IDE friendly",
      "\n          -i<path>         #include file search path",
      "\n          -i[-|+]          disable/enable support for INCLUDE envvar",
      "\n          -j[<file>]       generate i18n gettext file (.pot)",
      "\n          -k               compilation mode (type -k? for more data)",
      "\n          -l               suppress line number information",
      "\n          -m               compile module only",
      "\n          -n[<type>]       no implicit starting procedure",
      "\n                           <type>: 0=no implicit starting procedure",
      "\n                                   1=no starting procedure at all",
      "\n                                   2=add starting procedure if necessary",
      "\n          -o<path>         object file drive and/or path",
      "\n          -p[<path>]       generate pre-processed output (.ppo) file",
      "\n          -p+              generate pre-processor trace (.ppt) file",
      "\n          -q               quiet",
      "\n          -q0              quiet and don't display program header",
      "\n          -q2              disable all output messages",
      "\n          -ql              hide line counter gauge",
      "\n          -r:<max>         set maximum number of preprocessor iterations",
/* TODO:   "\n          -r[<lib>]        request linker to search <lib> (or none)", */
      "\n          -s[m]            syntax check only [minimal for dependencies list]",
/* TODO:   "\n          -t<path>         path for temp file creation", */
      "\n          -u[<file>]       use command def set in <file> (or none)",
      "\n          -u+<file>        add command def set from <file>",
      "\n          -undef:<id>      #undef <id>",
      "\n          -v               variables are assumed M->",
      "\n          -w[<level>]      set warning level number (0..3, default 1)",
#ifdef YYDEBUG
      "\n          -y               trace lex & yacc activity",
#endif
      "\n          -z               suppress shortcutting (.and. & .or.)",
      "\n          @<file>          compile list of modules in <file>",
      "\n"
   };
   char buffer[ 256 ];
   int iLine;

   hb_snprintf( buffer, sizeof( buffer ),
                "\nSyntax:  %s <file[s][.prg]|@file> [options]\n", szSelf );
   hb_compOutStd( HB_COMP_PARAM, buffer );

   for( iLine = 0; iLine < ( int ) HB_SIZEOFARRAY( s_szOptions ); iLine++ )
      hb_compOutStd( HB_COMP_PARAM, s_szOptions[ iLine ] );
}
Пример #5
0
void hb_compPrintCredits( HB_COMP_DECL )
{
   hb_compOutStd( HB_COMP_PARAM,
         "\n"
         "Credits:  The Harbour Team\n"
         "          (replace space with @ in email addresses)\n"
         "\n"
         "Alejandro de Garate (alex_degarate hotmail com)\n"
         "Aleksander Czajczynski <hb fki.pl>\n"
         "Alex Shashkov (shashkov ostu.ru)\n"
         "Alexander S. Kresin (alex belacy.belgorod.su)\n"
         "Alexey Myronenko (m.oleksa ukr.net)\n"
         "Andi Jahja (xharbour cbn.net.id)\n"
         "Antonio Carlos Pantaglione (toninho fwi.com.br)\n"
         "Antonio Linares (alinares fivetechsoft.com)\n"
         "April White (bright.tigra gmail.com)\n"
         "Bil Simser (bsimser home.com)\n"
         "Bill Robertson (arcadia2 sbcglobal.net)\n"
         "Brian Hays (bhays abacuslaw.com)\n"
         "Bruno Cantero (bruno issnet.net)\n"
         "Carlos Bacco (carlosbacco gmail com)\n"
         "Chen Kedem (niki synel.co.il)\n"
         "Dave Pearson (davep davep.org)\n"
         "David Arturo Macias Corona (dmacias mail.udg.mx)\n"
         "David G. Holm (dholm jsd-llc.com)\n"
         "Davor Siklic (siki msoft.cz)\n"
         "Dmitry V. Korzhov (dk april26.spb.ru)\n"
         "Eddie Runia (eddie runia.com)\n"
         "Enrico Maria Giordano (e.m.giordano emagsoftware.it)\n"
         "Felipe G. Coury (fcoury creation.com.br)\n"
         "Fernando Mancera (fmancera viaopen.com)\n"
         "Francesco Perillo (fperillo gmail com)\n"
         "Francesco Saverio Giudice (info fsgiudice.com)\n"
         "Giancarlo Niccolai (gc niccolai.ws)\n"
         "Gonzalo A. Diethelm (gonzalo.diethelm iname.com)\n"
         "Gustavo Junior Alves (alves coslinux.com.br)\n"
         "Hannes Ziegler (hz knowleXbase.com)\n"
         "Horacio D. Roldan Kasimatis (harbour_ar yahoo com.ar)\n"
         "Ignacio Ortiz de Zuniga (ignacio fivetech.com)\n"
         "Ilias Lazaridis (ilias lazaridis.com)\n"
         "Istvan Bisz (istvan.bisz t-online.hu)\n"
         "Jacek Kubica (kubica wssk.wroc.pl)\n"
         "Janica Lubos (janica fornax.elf.stuba.sk)\n"
         "Jean-Francois Lefebvre (mafact) (jfl mafact.com)\n"
         "Jon Berg (jmberg pnh10.med.navy.mil)\n"
         "Jorge A. Giraldo (jorgeagiraldo emtelsa.multi.net.co)\n"
         "Jose Lalin (dezac corevia.com)\n"
         "Klas Engwall (harbour engwall.com)\n"
         "Kwon, Oh-Chul (ohchul fivetech.net)\n"
         "Leslee Griffith (les.griffith vantagesystems.ca)\n"
         "Lorenzo Fiorini (lorenzo.fiorini gmail com)\n"
         "Luis Krause Mantilla (lkrausem shaw.ca)\n"
         "Luiz Rafael Culik (culik sl.conex.net)\n"
         "Manuel Ruiz (mrt joca.es)\n"
         "Marek Paliwoda (paliwoda inetia.pl)\n"
         "Martin Vogel (vogel inttec.de)\n"
         "Mark W. Schumann (catfood underflap.com)\n"
         "Massimo Belgrano (mbelgrano deltain.it)\n"
         "Matteo Baccan (baccan isanet.it)\n"
         "Matthew Hamilton (mhamilton bunge.com.au)\n"
         "Mauricio Abre (maurifull datafull.com)\n"
         "Maurilio Longo (maurilio.longo libero.it)\n"
         "Maurizio la Cecilia (m.lacecilia gmail com)\n"
         "Miguel Angel Marchuet Frutos (miguelangel marchuet.net)\n"
         "Mindaugas Kavaliauskas (dbtopas dbtopas.lt)\n"
         "Mitja Podgornik (Yamamoto rocketmail.com)\n"
         "Nicolas del Pozo (niko geroa.com)\n"
         "Patrick Mast (harbour winfakt.com)\n"
         "Paul Tucker (ptucker sympatico.ca)\n"
         "Pavel Tsarenko (tpe2 mail.ru)\n"
         "Peter Rees (peter rees.co.nz)\n"
         "Peter Townsend (cephas tpgi.com.au)\n"
         "Phil Barnett (philb iag.net)\n"
         "Phil Krylov (phil newstar.rinet.ru)\n"
         "Pritpal Bedi (bedipritpal hotmail com)\n"
         "Przemyslaw Czerpak (druzus priv.onet.pl)\n"
         "Rab Thomson (rthomson synstar.com)\n"
         "Randy Portnoff (randy palmasdev.com)\n"
         "Richard Alexandre Cuylen (racuylen altern.org)\n"
         "Robert Arseniuk (roberta jmpolska.com)\n"
         "Ron Pinkas (ron profit-master.com)\n"
         "Ross Presser (ross_presser imtek.com)\n"
         "Ryszard Glab (rglab imid.med.pl)\n"
         "Tamas Tevesz (ice extreme.hu)\n"
         "Teo Fonrouge (teo windtelsoft.com)\n"
         "Tim Stone (timstone mstrlink.com)\n"
         "Tomaz Zupan (tomaz.zupan orpo.si)\n"
         "Vailton Renato (vailtom gmail com)\n"
         "Viktor Szakats (vszakats.net/harbour)\n"
         "Vladimir Kazimirchik (v_kazimirchik yahoo com)\n"
         "Walter Negro (anegro overnet.com.ar)\n"
         "Xavi (jarabal gmail com)\n"
      );
}
Пример #6
0
static void hb_pp_Disp( void * cargo, const char * szMessage )
{
   HB_COMP_DECL = ( PHB_COMP ) cargo;

   hb_compOutStd( HB_COMP_PARAM, szMessage );
}