compiler

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  
c:\harbour\source\compiler
cmdcheck.c
TypeFunctionSourceLine
STATIC ULONGPackDateTime( void )
static ULONG PackDateTime( void )
{
   BYTE szString[4];
   BYTE nValue;

#if defined(HB_OS_WIN_32)
   SYSTEMTIME st;

   GetLocalTime( &st );

   nValue = ( BYTE ) ( ( st.wYear - 1980 ) & ( 2 ^ 6 ) );      /* 6 bits */
   szString[0] = nValue << 2;
   nValue = ( BYTE ) ( st.wMonth );    /* 4 bits */
   szString[0] |= nValue >> 2;
   szString[1] = nValue << 6;
   nValue = ( BYTE ) ( st.wDay );      /* 5 bits */
   szString[1] |= nValue << 1;

   nValue = ( BYTE ) st.wHour;         /* 5 bits */
   szString[1] = nValue >> 4;
   szString[2] = nValue << 4;
   nValue = ( BYTE ) st.wMinute;       /* 6 bits */
   szString[2] |= nValue >> 2;
   szString[3] = nValue << 6;
   nValue = ( BYTE ) st.wSecond;       /* 6 bits */
   szString[3] |= nValue;
#else
   time_t t;
   struct tm *oTime;

#if defined( HB_OS_LINUX ) && !defined( __WATCOMC__ )
   struct tm tm;
   time( &t );
   oTime = &tm;
   localtime_r( &t, oTime );
#else
   time( &t );
   oTime = localtime( &t );
#endif

   nValue = ( BYTE ) ( ( ( oTime->tm_year + 1900 ) - 1980 ) & ( 2 ^ 6 ) );      /* 6 bits */
   szString[0] = nValue << 2;
   nValue = ( BYTE ) ( oTime->tm_mon + 1 );     /* 4 bits */
   szString[0] |= nValue >> 2;
   szString[1] = nValue << 6;
   nValue = ( BYTE ) ( oTime->tm_mday );        /* 5 bits */
   szString[1] |= nValue << 1;

   nValue = ( BYTE ) oTime->tm_hour;    /* 5 bits */
   szString[1] = nValue >> 4;
   szString[2] = nValue << 4;
   nValue = ( BYTE ) oTime->tm_min;     /* 6 bits */
   szString[2] |= nValue >> 2;
   szString[3] = nValue << 6;
   nValue = ( BYTE ) oTime->tm_sec;     /* 6 bits */
   szString[3] |= nValue;
#endif

   return HB_MKLONG( szString[3], szString[2], szString[1], szString[0] );
}
cmdcheck.c78
STATIC VOIDhb_notSupportedInfo( HB_COMP_DECL, const char *szSwitch )
static void hb_notSupportedInfo( HB_COMP_DECL, const char *szSwitch )
{
   char buffer[ 512 ];

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

   hb_compOutStd( HB_COMP_PARAM, buffer );
}
cmdcheck.c139
STATIC VOIDhb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch )
static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch )
{
   if( szSwitch && !HB_COMP_PARAM->fExit )
   {
      const char *s = szSwitch;

      /* If szSwitch doesn't start with a HB_OSOPTSEP char
       * show an error
       */
      if( !HB_ISOPTSEP( *s ) )
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
      else
      {
         s++;
         switch( *s )
         {
            case 'a':
            case 'A':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fAutoMemvarAssume = FALSE;
               else
                  HB_COMP_PARAM->fAutoMemvarAssume = TRUE;
               break;

            case 'b':
            case 'B':
            {
               unsigned int i = 0;
               char *szOption = hb_strupr( hb_strdup( s ) );

               while( i < strlen( szOption ) && !HB_ISOPTSEP( szOption[i] ) )
                  i++;
               szOption[i] = '\0';

               if( strcmp( szOption, "BUILD" ) == 0 )
                  HB_COMP_PARAM->fBuildInfo = TRUE;
               else
               {
                  if( *( s + 1 ) == '-' )
                     HB_COMP_PARAM->fDebugInfo = FALSE;
                  else
                  {
                     HB_COMP_PARAM->fDebugInfo = TRUE;
                     HB_COMP_PARAM->fLineNumbers = TRUE;
                  }
               }

               hb_xfree( szOption );
               break;
            }

            case 'c':
            case 'C':
            {
               unsigned int i = 0;
               char *szOption = hb_strupr( hb_strdup( s ) );

               while( i < strlen( szOption ) && !HB_ISOPTSEP( szOption[i] ) )
                  i++;
               szOption[i] = '\0';

               if( strcmp( szOption, "CREDITS" ) == 0 ||
                   strcmp( szOption, "CREDIT" ) == 0 || 
                   strcmp( szOption, "CREDI" ) == 0 || 
                   strcmp( szOption, "CRED" ) == 0 )
                  HB_COMP_PARAM->fCredits = TRUE;
               else
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, szOption, NULL );

               hb_xfree( szOption );
               break;
            }

            case 'd':
            case 'D':
               /* NOTE: Ignore these -d switches will be processed separately */
               break;

            case 'e':
            case 'E':
               if( *( s + 1 ) == 's' || *( s + 1 ) == 'S' )
               {
                  switch( *( s + 2 ) )
                  {
                     case '\0':
                     case '0':
                        HB_COMP_PARAM->iExitLevel = HB_EXITLEVEL_DEFAULT;
                        break;

                     case '1':
                        HB_COMP_PARAM->iExitLevel = HB_EXITLEVEL_SETEXIT;
                        break;

                     case '2':
                        HB_COMP_PARAM->iExitLevel = HB_EXITLEVEL_DELTARGET;
                        break;

                     default:
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
                  }
               }
               else
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );

               break;

            case 'g':
            case 'G':
               switch( *( s + 1 ) )
               {
                  case 'c':
                  case 'C':
                     HB_COMP_PARAM->iLanguage = HB_LANG_C;

                     switch( *( s + 2 ) )
                     {
                        case '3':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_REALCODE;
                           break;

                        case '2':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_VERBOSE;
                           break;

                        case '1':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_NORMAL;
                           break;

                        case '\0':
                        case '0':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_COMPACT;
                           break;

                        default:
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
                     }
                     break;

                  case 'o':
                  case 'O':
                     HB_COMP_PARAM->iLanguage = HB_LANG_OBJ_MODULE;

                     switch( *( s + 2 ) )
                     {
                        case '3':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_REALCODE;
                           break;

                        case '2':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_VERBOSE;
                           break;

                        case '1':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_NORMAL;
                           break;

                        case '\0':
                        case '0':
                           HB_COMP_PARAM->iGenCOutput = HB_COMPGENC_COMPACT;
                           break;

                        default:
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
                     }
                     break;

                  case 'h':
                  case 'H':
                     HB_COMP_PARAM->iLanguage = HB_LANG_PORT_OBJ;
                     break;

#ifdef HB_GEN_W32_OBJ
                  case 'w':
                  case 'W':
                     HB_COMP_PARAM->iLanguage = HB_LANG_OBJ32;
                     break;
#endif

                  default:
                     hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_UNSUPPORTED_LANG, NULL, NULL );
                     break;
               }
               break;

               /* NOTE:
                  h or H from HELP or help
                */
            case 'h':
            case 'H':
            case '?':
               break;

               /* NOTE:
                  It already has support for several include files
                */
            case 'i':
            case 'I':
               hb_pp_addSearchPath( HB_COMP_PARAM->pLex->pPP, s + 1, FALSE );
               break;

            case 'j':
            case 'J':
               HB_COMP_PARAM->fI18n = TRUE;
               if( s[ 1 ] )
                  HB_COMP_PARAM->pI18nFileName = hb_fsFNameSplit( s + 1 );
               break;

            case 'k':
            case 'K':
            {
               int i = 1;

               while( s[i] && !HB_COMP_PARAM->fExit )
               {
                  switch( s[i++] )
                  {
                     case '?':
                        hb_compPrintLogo( HB_COMP_PARAM );
                        hb_compPrintModes( HB_COMP_PARAM );
                        HB_COMP_PARAM->fLogo = FALSE;
                        HB_COMP_PARAM->fQuiet = TRUE;
                        break;

                     case 'h':
                     case 'H':
                        /* default Harbour mode */
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_HARBOUR;
                        break;

                     case 'c':
                     case 'C':
                        /* clear all flags - minimal set of features */
                        HB_COMP_PARAM->supported &= HB_COMPFLAG_SHORTCUTS;
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_OPTJUMP |
                                                    HB_COMPFLAG_MACROTEXT;
                        break;

                     case 'x':
                     case 'X':
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_XBASE;
                        break;

                     case 'i':
                     case 'I':
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_HB_INLINE;
                        break;

                     case 'j':
                     case 'J':
                        HB_COMP_PARAM->supported &= ~HB_COMPFLAG_OPTJUMP;
                        break;

                     case 'm':
                     case 'M':
                        HB_COMP_PARAM->supported &= ~HB_COMPFLAG_MACROTEXT;
                        break;

                     case 'r':
                     case 'R':
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_RT_MACRO;
                        break;

                     case 's':
                     case 'S':
                        HB_COMP_PARAM->supported |= HB_COMPFLAG_ARRSTR;
                        break;

                     default:
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
                        break;
                  }
               }
               break;
            }

            case 'l':
            case 'L':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fLineNumbers = TRUE;
               else
                  HB_COMP_PARAM->fLineNumbers = FALSE;
               break;

            case 'm':
            case 'M':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fAutoOpen = TRUE;
               else
                  HB_COMP_PARAM->fAutoOpen = FALSE;
               break;

            case 'n':
            case 'N':
               /*
                  -n1 no start up procedure and no implicit start up procedure
                */
               if( *( s + 1 ) == '1' )
               {
                  HB_COMP_PARAM->fStartProc = FALSE;
                  HB_COMP_PARAM->fNoStartUp = TRUE;
               }
               /*
                  -n or -n0 no implicit start up procedure
                */
               else if( ( *( s + 1 ) == '0' ) || ( *( s + 1 ) == '\0' ) )
                  HB_COMP_PARAM->fStartProc = FALSE;
               /*
                  -n- ceates implicit start up procedure
                */
               else if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fStartProc = TRUE;
               else
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
               break;

            case 'o':
            case 'O':
            {
               char *szPath = hb_strdup( s + 1 );

               HB_COMP_PARAM->pOutPath = hb_fsFNameSplit( szPath );
               hb_xfree( szPath );
               break;
            }

               /* Added for preprocessor needs */
            case 'p':
            case 'P':
               if( s[ 1 ] == '+' && s[ 2 ] == '\0' )
                  HB_COMP_PARAM->fPPT = TRUE;
               else if( s[ 1 ] == '-' && s[ 2 ] == '\0' )
                  HB_COMP_PARAM->fPPO = FALSE;
               else
               {
                  if( HB_COMP_PARAM->pPpoPath )
                  {
                     HB_COMP_PARAM->pPpoPath = NULL;
                     hb_xfree( HB_COMP_PARAM->pPpoPath );
                  }
                  if( s[ 1 ] )
                     HB_COMP_PARAM->pPpoPath = hb_fsFNameSplit( s + 1 );
                  HB_COMP_PARAM->fPPO = TRUE;
               }
               break;

            case 'q':
            case 'Q':
               switch( *( s + 1 ) )
               {
                  case '2':
                     HB_COMP_PARAM->fFullQuiet = TRUE;
                  case '0':
                     HB_COMP_PARAM->fLogo = FALSE;
                  default:
                     HB_COMP_PARAM->fQuiet = TRUE;
               }
               break;

            case 'r':
            case 'R':
               if( *( s + 1 ) == ':' )
               {
                  int iOverflow;
                  int iCycles = ( int ) hb_strValInt( s + 2, &iOverflow );

                  if( !iOverflow && iCycles > 0 )
                     HB_COMP_PARAM->iMaxTransCycles = iCycles;
               }
               else
               {
                  /* TODO: Implement this switch */
                  hb_notSupportedInfo( HB_COMP_PARAM, s );
               }
               break;

            case 's':
            case 'S':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fSyntaxCheckOnly = FALSE;
               else
                  HB_COMP_PARAM->fSyntaxCheckOnly = TRUE;
               break;

            case 't':
            case 'T':
               /* TODO: Implement this switch */
               hb_notSupportedInfo( HB_COMP_PARAM, s );
               break;

            case 'u':
            case 'U':
               if( s[1] && toupper( s[1] ) == 'N'
                   && s[2] && toupper( s[2] ) == 'D' && s[3] && toupper( s[3] ) == 'E' && s[4] && toupper( s[4] ) == 'F' && s[5] == ':' )
               {
                  /* NOTE: Ignore these -undef: switches will be processed separately */
                  break;
               }
               HB_COMP_PARAM->szStdCh = hb_strdup( s + 1 );
               break;

            case 'v':
            case 'V':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->fForceMemvars = FALSE;
               else
                  HB_COMP_PARAM->fForceMemvars = TRUE;
               break;

            case 'w':
            case 'W':
               HB_COMP_PARAM->iWarnings = 1;
               if( s[1] )
               {                /*there is -w<0,1,2,3> probably */
                  HB_COMP_PARAM->iWarnings = s[1] - '0';
                  if( HB_COMP_PARAM->iWarnings < 0 || HB_COMP_PARAM->iWarnings > 3 )
                     hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
               }
               break;

            case 'x':
            case 'X':
            {
               unsigned int i = 1;
               while( s[i] && !HB_ISOPTSEP( s[i] ) &&
                      i < sizeof( HB_COMP_PARAM->szPrefix ) - 1 )
               {
                  ++i;
               }
               if( i > 1 )
               {
                  memcpy( HB_COMP_PARAM->szPrefix, s + 1, i - 1 );
                  HB_COMP_PARAM->szPrefix[ i - 1 ] = '_';
                  HB_COMP_PARAM->szPrefix[ i ] = '\0';
               }
               else
               {
                  snprintf( HB_COMP_PARAM->szPrefix,
                            sizeof( HB_COMP_PARAM->szPrefix ),
                            "%08lX_", PackDateTime() );
               }
               break;
            }

#ifdef YYDEBUG
            case 'y':
            case 'Y':
               yydebug = TRUE;
               break;
#endif

            case 'z':
            case 'Z':
               if( *( s + 1 ) == '-' )
                  HB_COMP_PARAM->supported |= HB_COMPFLAG_SHORTCUTS;
               else
                  HB_COMP_PARAM->supported &= ~HB_COMPFLAG_SHORTCUTS;
               break;

            default:
               hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL );
               break;
         }
      }
   }
}
cmdcheck.c149
VOIDhb_compChkCompilerSwitch( HB_COMP_DECL, int iArg, char * const Args[] )
void hb_compChkCompilerSwitch( HB_COMP_DECL, int iArg, char * const Args[] )
{
   /* If iArg is passed check the command line options */
   if( iArg )
   {
      int i;

      /* Check all switches in command line
         They start with an OS_OPT_DELIMITER char
       */
      for( i = 1; i < iArg && !HB_COMP_PARAM->fExit; i++ )
      {
         const char * szSwitch = Args[i];

         if( !HB_ISOPTSEP( szSwitch[0] ) )
            continue;

         if( szSwitch[0] == '-' )
         {
            int j = 1;
            char Switch[7];

            Switch[0] = '-';

            while( szSwitch[j] && !HB_COMP_PARAM->fExit )
            {
               Switch[1] = szSwitch[j];

               if( szSwitch[j + 1] == '-' )
               {
                  Switch[2] = '-';
                  Switch[3] = '\0';

                  hb_compChkEnvironVar( HB_COMP_PARAM, Switch );

                  j += 2;
                  continue;
               }
               else
               {
                  switch( Switch[1] )
                  {
                     case 'b':
                     case 'B':
                        if( szSwitch[j + 1] && toupper( ( BYTE ) szSwitch[j + 1] ) == 'U' &&
                            szSwitch[j + 2] && toupper( ( BYTE ) szSwitch[j + 2] ) == 'I' &&
                            szSwitch[j + 3] && toupper( ( BYTE ) szSwitch[j + 3] ) == 'L' &&
                            szSwitch[j + 4] && toupper( ( BYTE ) szSwitch[j + 4] ) == 'D' )
                        {
                           Switch[2] = 'U';
                           Switch[3] = 'I';
                           Switch[4] = 'L';
                           Switch[5] = 'D';
                           Switch[6] = '\0';

                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );

                           j += 5;
                           continue;
                        }
                        else if( !szSwitch[j + 1] )
                        {
                           Switch[2] = '\0';
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                           j += 1;
                           continue;
                        }
                        break;

                     case 'c':
                     case 'C':
                        if( szSwitch[j + 1] && toupper( ( BYTE ) szSwitch[j + 1] ) == 'R' &&
                            szSwitch[j + 2] && toupper( ( BYTE ) szSwitch[j + 2] ) == 'E' &&
                            szSwitch[j + 3] && toupper( ( BYTE ) szSwitch[j + 3] ) == 'D' )
                        {
                           Switch[2] = 'R';
                           Switch[3] = 'E';
                           Switch[4] = 'D';
                           Switch[5] = '\0';

                           j += 4;

                           if( szSwitch[j] && toupper( ( BYTE ) szSwitch[j] ) == 'I' )
                           {
                              j++;
                              if( szSwitch[j] && toupper( ( BYTE ) szSwitch[j] ) == 'T' )
                              {
                                 j++;
                                 if( szSwitch[j] && toupper( ( BYTE ) szSwitch[j] ) == 'S' )
                                 {
                                    j++;
                                 }
                              }
                           }
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                        }
                        else
                        {
                           Switch[2] = '\0';
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, Switch, NULL );
                        }
                        continue;

                     case 'd':
                     case 'D':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as part of #define and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case 'e':
                     case 'E':
                        if( toupper( ( BYTE ) szSwitch[j + 1] ) == 'S' && isdigit( ( BYTE ) szSwitch[j + 2] ) )
                        {
                           Switch[2] = 'S';
                           Switch[3] = szSwitch[j + 2];
                           Switch[4] = '\0';

                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                           j += 3;
                        }
                        else
                        {
                           Switch[2] = '\0';
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, Switch, NULL );
                        }
                        continue;

                     case 'g':
                     case 'G':
                        /* Required argument */
                        Switch[2] = szSwitch[j + 1];
                        if( Switch[2] )
                        {
                           if( isdigit( ( BYTE ) szSwitch[j + 2] ) )
                           {
                              /* Optional argument */
                              Switch[3] = szSwitch[j + 2];
                              Switch[4] = '\0';
                              j += 3;
                           }
                           else
                           {
                              /* No optional argument */
                              Switch[3] = '\0';
                              j += 2;
                           }
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                        }
                        else
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, Switch, NULL );
                        continue;

                     case 'i':
                     case 'I':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as IncludePath and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case 'j':
                     case 'J':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );
                        j = strlen( szSwitch );
                        continue;

                     case 'k':
                     case 'K':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as part of #define and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case 'n':
                     case 'N':
                        /* Required argument */
                        if( szSwitch[j + 1] )
                        {
                           /* Optional argument */
                           Switch[2] = szSwitch[j + 1];
                           Switch[3] = '\0';
                           j += 2;
                        }
                        else
                        {
                           /* No optional argument */
                           Switch[2] = '\0';
                           j += 1;
                        }
                        hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                        continue;

                     case 'o':
                     case 'O':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as OutputPath and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case 'p':
                     case 'P':
                        if( szSwitch[j + 1] )
                        {
                           szSwitch += ( j - 1 );
                           hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                           /* Accept rest as PPOPath and continue with next Args[]. */
                           j += strlen( szSwitch ) - 1;
                        }
                        else
                        {
                           Switch[2] = '\0';
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                           j++;
                        }
                        continue;

                     case 'q':
                     case 'Q':
                        if( szSwitch[j + 1] && isdigit( ( BYTE ) szSwitch[j + 1] ) )
                        {
                           Switch[2] = szSwitch[j + 1];
                           Switch[3] = '\0';

                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );

                           j += 2;
                           continue;
                        }
                        else
                        {
                           Switch[2] = '\0';
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                        }

                        break;

                     case 'r':
                     case 'R':
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );
                        j = strlen( szSwitch ) - 1;
                        break;

                     case 'u':
                     case 'U':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as part of .ch Path or "undef:" and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case 'w':
                     case 'W':
                        if( szSwitch[j + 1] && isdigit( ( BYTE ) szSwitch[j + 1] ) )
                        {
                           Switch[2] = szSwitch[j + 1];
                           Switch[3] = '\0';

                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );

                           j += 2;
                           continue;
                        }
                        else
                        {
                           Switch[2] = '\0';
                           hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                        }

                        break;

                     case 'x':
                     case 'X':
                        szSwitch += ( j - 1 );
                        hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );

                        /* Accept rest as INIT Symbol and continue with next Args[]. */
                        j = strlen( szSwitch );
                        continue;

                     case '-':
                     {
                        int l = ++j;
                        while( szSwitch[j] && !HB_ISOPTSEP( szSwitch[j] ) )
                           j++;
                        if( szSwitch[l-1] == '-' && j-l == 7 &&
                            memcmp( &szSwitch[l], "version", 7 ) == 0 )
                        {
                           HB_COMP_PARAM->fLogo = TRUE;
                           HB_COMP_PARAM->fQuiet = TRUE;
                        }
                        else
                           hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, &szSwitch[l], NULL );
                        if( szSwitch[j] )
                           ++j;
                        continue;
                     }
                     default:
                        Switch[2] = '\0';
                        hb_compChkEnvironVar( HB_COMP_PARAM, Switch );
                  }
               }

               j++;
            }
            continue;
         }

         while( !HB_COMP_PARAM->fExit )
         {
            int j = 1;

            while( szSwitch[j] && !HB_ISOPTSEP( szSwitch[j] ) )
               j++;

            if( szSwitch[j] && szSwitch[j] == '/' )
            {
               char * szTmp = hb_strndup( szSwitch, j );
               hb_compChkEnvironVar( HB_COMP_PARAM, szTmp );
               hb_xfree( szTmp );
               szSwitch += j;
            }
            else
            {
               hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );
               break;
            }
         }
      }
   }
   else
      /* Chech the environment variables */
   {
      /* NOTE: CLIPPERCMD enviroment variable
         is overriden if HARBOURCMD exists
       */
      char *szStrEnv = hb_getenv( "HARBOURCMD" );

      if( !szStrEnv || szStrEnv[0] == '\0' )
      {
         if( szStrEnv )
            hb_xfree( ( void * ) szStrEnv );

         szStrEnv = hb_getenv( "CLIPPERCMD" );
      }

      if( szStrEnv )
      {
         char *szSwitch, *szPtr;

         szPtr = szStrEnv;
         while( *szPtr && !HB_COMP_PARAM->fExit )
         {
            while( *szPtr == ' ' )
               ++szPtr;
            szSwitch = szPtr;
            if( *szSwitch )
            {
               while( *++szPtr )
               {
                  if( *szPtr == ' ' )
                  {
                     *szPtr++ = '\0';
                     break;
                  }
               }
               hb_compChkEnvironVar( HB_COMP_PARAM, szSwitch );
            }
         }
         hb_xfree( ( void * ) szStrEnv );
      }
   }
}
cmdcheck.c615
VOIDhb_compChkPaths( HB_COMP_DECL )
void hb_compChkPaths( HB_COMP_DECL )
{
   char *szInclude = hb_getenv( "INCLUDE" );

   if( szInclude )
   {
      if( szInclude[0] != '\0' )
         hb_pp_addSearchPath( HB_COMP_PARAM->pLex->pPP, szInclude, FALSE );
      hb_xfree( ( void * ) szInclude );
   }
}
cmdcheck.c999
STATIC VOIDhb_compChkDefineSwitch( HB_COMP_DECL, const char *pszSwitch )
static void hb_compChkDefineSwitch( HB_COMP_DECL, const char *pszSwitch )
{
   if( pszSwitch && HB_ISOPTSEP( pszSwitch[0] ) )
   {
      if( pszSwitch[1] == 'd' || pszSwitch[1] == 'D' )
      {
         if( pszSwitch[2] )
         {
            char *szDefText = hb_strdup( pszSwitch + 2 ), *szAssign;

            szAssign = strchr( szDefText, '=' );
            if( szAssign )
               *szAssign++ = '\0';
            hb_pp_addDefine( HB_COMP_PARAM->pLex->pPP, szDefText, szAssign );
            hb_xfree( szDefText );
         }
      }
      else if( pszSwitch[1] && toupper( pszSwitch[1] ) == 'U' &&
               pszSwitch[2] && toupper( pszSwitch[2] ) == 'N' &&
               pszSwitch[3] && toupper( pszSwitch[3] ) == 'D' &&
               pszSwitch[4] && toupper( pszSwitch[4] ) == 'E' &&
               pszSwitch[5] && toupper( pszSwitch[5] ) == 'F' &&
               pszSwitch[6] == ':' )
      {
         char *szDefText = hb_strdup( pszSwitch + 7 );
         unsigned int i = 0;

         while( szDefText[i] && !HB_ISOPTSEP( szDefText[i] ) )
         {
            i++;
         }
         szDefText[i] = '\0';

         if( szDefText[0] )
            hb_pp_delDefine( HB_COMP_PARAM->pLex->pPP, szDefText );
         hb_xfree( szDefText );
      }
   }
}
cmdcheck.c1011
VOIDhb_compChkDefines( HB_COMP_DECL, int iArg, char * const Args[] )
void hb_compChkDefines( HB_COMP_DECL, int iArg, char * const Args[] )
{
   /* Check the environment variables */
   {
      /* NOTE: CLIPPERCMD enviroment variable is overriden
         if HARBOURCMD exists */
      char *szStrEnv = hb_getenv( "HARBOURCMD" );

      if( !szStrEnv || szStrEnv[0] == '\0' )
      {
         if( szStrEnv )
            hb_xfree( ( void * ) szStrEnv );

         szStrEnv = hb_getenv( "CLIPPERCMD" );
      }

      if( szStrEnv )
      {
         char *szSwitch, *szPtr;

         szPtr = szStrEnv;
         while( *szPtr && !HB_COMP_PARAM->fExit )
         {
            while( *szPtr == ' ' )
               ++szPtr;
            szSwitch = szPtr;
            if( *szSwitch )
            {
               while( *++szPtr )
               {
                  if( *szPtr == ' ' )
                  {
                     *szPtr++ = '\0';
                     break;
                  }
               }
               hb_compChkDefineSwitch( HB_COMP_PARAM, szSwitch );
            }
         }
         hb_xfree( ( void * ) szStrEnv );
      }
   }

   /* Check the command line options */
   {
      int i;

      /* Check all switches in command line They start with an OS_OPT_DELIMITER
         char */
      for( i = 1; i < iArg; i++ )
         hb_compChkDefineSwitch( HB_COMP_PARAM, Args[i] );
   }
}
cmdcheck.c1051
complex.c
TypeFunctionSourceLine
STATIC INThb_comp_asType( PHB_PP_TOKEN pToken, BOOL fArray )
static int hb_comp_asType( PHB_PP_TOKEN pToken, BOOL fArray )
{
   if( pToken && HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_KEYWORD )
   {
      PHB_LEX_KEY pKey = ( PHB_LEX_KEY ) s_typetable;
      int i = sizeof( s_typetable ) / sizeof( HB_LEX_KEY );

      hb_pp_tokenUpper( pToken );
      do
      {
         if( pKey->minlen <= pToken->len && pToken->len <= pKey->maxlen &&
             memcmp( pKey->value, pToken->value, pToken->len ) == 0 )
            return ( fArray ? s_asArrayTypes : s_asTypes ) [ pKey->type ];
         ++pKey;
      }
      while( --i );
   }
   return 0;
}
complex.c219
STATIC INThb_comp_keywordType( PHB_PP_TOKEN pToken )
static int hb_comp_keywordType( PHB_PP_TOKEN pToken )
{
   PHB_LEX_KEY pKey = ( PHB_LEX_KEY ) s_keytable;
   int i = sizeof( s_keytable ) / sizeof( HB_LEX_KEY );

   do
   {
      if( pKey->minlen <= pToken->len && pToken->len <= pKey->maxlen &&
          memcmp( pKey->value, pToken->value, pToken->len ) == 0 )
      {
         if( HB_PP_TOKEN_ALLOC( pToken->type ) && pToken->len == pKey->maxlen )
         {
            hb_xfree( ( void * ) pToken->value );
            pToken->value = pKey->value;
            pToken->type |= HB_PP_TOKEN_STATIC;
         }
         return pKey->type;
      }
      ++pKey;
   }
   while( --i );
   return IDENTIFIER;
}
complex.c239
STATIC CHAR *hb_comp_tokenIdentifer( HB_COMP_DECL, PHB_PP_TOKEN pToken )
static char * hb_comp_tokenIdentifer( HB_COMP_DECL, PHB_PP_TOKEN pToken )
{
   if( HB_PP_TOKEN_ALLOC( pToken->type ) )
   {
      pToken->value = hb_compIdentifierNew( HB_COMP_PARAM, pToken->value, HB_IDENT_FREE );
      pToken->type |= HB_PP_TOKEN_STATIC;
   }

   return ( char * ) pToken->value;
}
complex.c263
STATIC CONST CHAR *hb_comp_tokenString( YYSTYPE *yylval_ptr, HB_COMP_DECL, PHB_PP_TOKEN pToken )
static const char * hb_comp_tokenString( YYSTYPE *yylval_ptr, HB_COMP_DECL, PHB_PP_TOKEN pToken )
{
   yylval_ptr->valChar.length = pToken->len;
   yylval_ptr->valChar.string = ( char * ) pToken->value;
   yylval_ptr->valChar.dealloc = FALSE;
   if( HB_PP_TOKEN_ALLOC( pToken->type ) )
   {
      yylval_ptr->valChar.dealloc = ( ULONG ) pToken->len != strlen( pToken->value );
      pToken->value = hb_compIdentifierNew( HB_COMP_PARAM, pToken->value,
               yylval_ptr->valChar.dealloc ? HB_IDENT_COPY : HB_IDENT_FREE );
      if( !yylval_ptr->valChar.dealloc )
         yylval_ptr->valChar.string = ( char * ) pToken->value;
      pToken->type |= HB_PP_TOKEN_STATIC;
   }
   return pToken->value;
}
complex.c274
STATIC BOOLhb_comp_timeDecode( PHB_PP_TOKEN pTime, LONG * plTime )
static BOOL hb_comp_timeDecode( PHB_PP_TOKEN pTime, LONG * plTime )
{
   HB_LONG lHour, lMinute, lMilliSec;
   double dNumber;
   int iDec, iWidth;

   if( !pTime || HB_PP_TOKEN_TYPE( pTime->type ) != HB_PP_TOKEN_NUMBER ||
       hb_compStrToNum( pTime->value, pTime->len, &lHour, &dNumber,
                        &iDec, &iWidth ) || lHour < 0 || lHour >= 24 )
      return FALSE;

   pTime = pTime->pNext;
   if( !pTime || HB_PP_TOKEN_TYPE( pTime->type ) != HB_PP_TOKEN_SEND )
      return FALSE;

   pTime = pTime->pNext;
   if( !pTime || HB_PP_TOKEN_TYPE( pTime->type ) != HB_PP_TOKEN_NUMBER ||
       hb_compStrToNum( pTime->value, pTime->len, &lMinute, &dNumber,
                        &iDec, &iWidth ) || lMinute < 0 || lMinute >= 60 )
      return FALSE;

   pTime = pTime->pNext;
   if( !pTime )
      return FALSE;

   if( HB_PP_TOKEN_TYPE( pTime->type ) == HB_PP_TOKEN_SEND )
   {
      pTime = pTime->pNext;
      if( !pTime || HB_PP_TOKEN_TYPE( pTime->type ) != HB_PP_TOKEN_NUMBER )
         return FALSE;

      if( hb_compStrToNum( pTime->value, pTime->len, &lMilliSec, &dNumber,
                           &iDec, &iWidth ) )
      {
         if( dNumber < 0.0 || dNumber >= 60.0 )
            return FALSE;
         lMilliSec = ( HB_LONG ) ( dNumber * 1000 );
      }
      else if( lMilliSec < 0 || lMilliSec >= 60 )
         return FALSE;
      else
         lMilliSec *= 1000;
      pTime = pTime->pNext;
   }
   else
      lMilliSec = 0;

   if( HB_PP_TOKEN_TYPE( pTime->type ) == HB_PP_TOKEN_KEYWORD &&
       lHour > 0 && lHour <= 12 )
   {
      if( ( pTime->len == 1 &&
            ( pTime->value[0] == 'A' || pTime->value[0] == 'a' ) ) ||
          ( pTime->len == 2 && hb_stricmp( pTime->value, "AM" ) == 0 ) )
      {
         if( lHour == 12 )
            lHour = 0;
         pTime = pTime->pNext;
      }
      else if( ( pTime->len == 1 &&
                 ( pTime->value[0] == 'P' || pTime->value[0] == 'p' ) ) ||
               ( pTime->len == 2 && hb_stricmp( pTime->value, "PM" ) == 0 ) )
      {
         if( lHour < 12 )
            lHour += 12;
         pTime = pTime->pNext;
      }
   }

   if( !pTime || HB_PP_TOKEN_TYPE( pTime->type ) != HB_PP_TOKEN_RIGHT_CB )
      return FALSE;

   *plTime = ( lHour * 60 + lMinute ) * 60000 + lMilliSec;

   return TRUE;
}
complex.c292
STATIC BOOLhb_comp_dayTimeDecode( PHB_COMP_LEX pLex, PHB_PP_TOKEN pToken, YYSTYPE *yylval_ptr )
static BOOL hb_comp_dayTimeDecode( PHB_COMP_LEX pLex, PHB_PP_TOKEN pToken,
                                   YYSTYPE *yylval_ptr )
{
   /* TODO: decode datetime in VFP strict date form:
    *    {^YYYY/MM/DD[,][HH[:MM[:SS][.CCC]][A|P]]}
    * VFP accepts slash, dot or hyphen as date delimiter and
    * 12 or 24-hour formatted time,
    * If only hours are included in time part then comma have to
    * be used to separate date and time parts or it's necesary
    * to follow the hours with a colon.
    *    { ^      [[]
    *      [  [ :  [ :  [ .  ] ] ] [A|P] ] }
    * We will not accept dot as date delimiter to avoid possible
    * conflicts with PP.
    */

   /* Now support for dates constatns: {^YYYY/MM/DD} or {^YYYY-MM-DD} */
   PHB_PP_TOKEN pYear, pMonth, pDay;
   HB_LONG lYear, lMonth, lDay;
   LONG lDate = 0, lTime = 0;
   double dNumber;
   int iDec, iWidth;

   pYear = pToken->pNext->pNext;
   if( pYear && HB_PP_TOKEN_TYPE( pYear->type ) == HB_PP_TOKEN_NUMBER &&
       pYear->pNext )
   {
      if( ( HB_PP_TOKEN_TYPE( pYear->pNext->type ) == HB_PP_TOKEN_DIV ||
            HB_PP_TOKEN_TYPE( pYear->pNext->type ) == HB_PP_TOKEN_MINUS ) &&
          !hb_compStrToNum( pYear->value, pYear->len, &lYear, &dNumber,
                            &iDec, &iWidth ) )
      {
         pMonth = pYear->pNext->pNext;
         if( pMonth && HB_PP_TOKEN_TYPE( pMonth->type ) == HB_PP_TOKEN_NUMBER &&
             pMonth->pNext && HB_PP_TOKEN_TYPE( pYear->pNext->type ) ==
                              HB_PP_TOKEN_TYPE( pMonth->pNext->type ) &&
             !hb_compStrToNum( pMonth->value, pMonth->len, &lMonth, &dNumber,
                               &iDec, &iWidth ) )
         {
            pDay = pMonth->pNext->pNext;
            if( pDay && HB_PP_TOKEN_TYPE( pDay->type ) == HB_PP_TOKEN_NUMBER &&
                pDay->pNext &&
                !hb_compStrToNum( pDay->value, pDay->len, &lDay, &dNumber,
                                  &iDec, &iWidth ) )
            {
               pDay = pDay->pNext;
               if( HB_PP_TOKEN_TYPE( pDay->type ) != HB_PP_TOKEN_RIGHT_CB )
               {
                  if( HB_PP_TOKEN_TYPE( pDay->type ) == HB_PP_TOKEN_COMMA )
                     pDay = pDay->pNext;
                  if( !hb_comp_timeDecode( pDay, &lTime ) )
                     return 0;
               }
               lDate = hb_dateEncode( lYear, lMonth, lDay );
               if( lDate != 0 || ( lYear == 0 && lMonth == 0 && lDay == 0 ) )
               {
                  while( HB_PP_TOKEN_TYPE( pToken->type ) != HB_PP_TOKEN_RIGHT_CB )
                     pToken = hb_pp_tokenGet( pLex->pPP );
                  yylval_ptr->valLong.lNumber = lDate;
                  pLex->iState = LITERAL;
                  return NUM_DATE;
               }
            }
         }
      }
      else if( hb_comp_timeDecode( pDay, &lTime ) )
      {
         ;
      }
   }

   return 0;
}
complex.c368
INThb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL )
int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL )
{
   PHB_COMP_LEX pLex = HB_COMP_PARAM->pLex;
   PHB_PP_TOKEN pToken = hb_pp_tokenGet( pLex->pPP );

   if( pLex->fEol )
   {
      pLex->fEol = FALSE;
      HB_COMP_PARAM->currLine++;
   }

   if( !pToken || HB_COMP_PARAM->fExit )
   {
      pLex->lasttok = NULL;
      return 0;
   }

   pLex->lasttok = pToken->value;

   switch( HB_PP_TOKEN_TYPE( pToken->type ) )
   {
      case HB_PP_TOKEN_NUMBER:
      {
         HB_LONG lNumber;
         double dNumber;
         int iDec, iWidth;

         pLex->iState = LITERAL;
         if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) )
         {
            yylval_ptr->valDouble.dNumber = dNumber;
            yylval_ptr->valDouble.bDec    = ( UCHAR ) iDec;
            yylval_ptr->valDouble.bWidth  = ( UCHAR ) iWidth;
            return NUM_DOUBLE;
         }
         else
         {
            yylval_ptr->valLong.lNumber = lNumber;
            yylval_ptr->valLong.bWidth  = ( UCHAR ) iWidth;
            return NUM_LONG;
         }
      }
      case HB_PP_TOKEN_DATE:
         pLex->iState = LITERAL;
         if( pToken->len == 10 )
         {
            int year, month, day;
            hb_dateStrGet( pToken->value + 2, &year, &month, &day );
            yylval_ptr->valLong.lNumber = hb_dateEncode( year, month, day );
         }
         else
            yylval_ptr->valLong.lNumber = 0;

         if( yylval_ptr->valLong.lNumber == 0 &&
             strcmp( pToken->value + 2, "0" ) != 0 &&
             strcmp( pToken->value + 2, "00000000" ) != 0 )
         {
            hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_DATE, pToken->value, NULL );
         }
         return NUM_DATE;

      case HB_PP_TOKEN_STRING:
         pLex->iState = LITERAL;
         pLex->lasttok = hb_comp_tokenString( yylval_ptr, HB_COMP_PARAM, pToken );
         return LITERAL;

      case HB_PP_TOKEN_LOGICAL:
         pLex->iState = LITERAL;
         return pToken->value[ 1 ] == 'T' ? TRUEVALUE : FALSEVALUE;

      case HB_PP_TOKEN_MACROVAR:
         pLex->iState = MACROVAR;
         hb_pp_tokenUpper( pToken );
         pLex->lasttok = yylval_ptr->string =
                              hb_comp_tokenIdentifer( HB_COMP_PARAM, pToken );
         return MACROVAR;

      case HB_PP_TOKEN_MACROTEXT:
         pLex->iState = MACROTEXT;
         hb_pp_tokenUpper( pToken );
         pLex->lasttok = yylval_ptr->string =
                              hb_comp_tokenIdentifer( HB_COMP_PARAM, pToken );
         return MACROTEXT;

      case HB_PP_TOKEN_LEFT_SB:
         switch( pLex->iState )
         {
            case OPERATOR:
            case LSEPARATOR:
            case LARRAY:
            case IF:
            case ELSEIF:
            case CASE:
            case BREAK:
            case RETURN:
            case WITH:
            case WHILE:
            case DECLARE_TYPE:
               pLex->iState = LITERAL;
               hb_pp_tokenToString( pLex->pPP, pToken );
               pLex->lasttok = hb_comp_tokenString( yylval_ptr, HB_COMP_PARAM,
                                                    pToken );
               return LITERAL;

            default:
               pLex->iState = LINDEX;
               return '[';
         }

      case HB_PP_TOKEN_RIGHT_SB:
         pLex->iState = RINDEX;
         return ']';

      case HB_PP_TOKEN_LEFT_CB:
         if( pToken->pNext )
         {
            if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_PIPE )
            {
               yylval_ptr->asCodeblock.string = hb_strdup( 
                  hb_pp_tokenBlockString( pLex->pPP, pToken,
                                          &yylval_ptr->asCodeblock.flags,
                                          &yylval_ptr->asCodeblock.length ) );
               hb_pp_tokenGet( pLex->pPP );
               return CBSTART;
            }
#if 0
            else if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_POWER )
            {
               int iType = hb_comp_dayTimeDecode( pLex, pToken, yylval_ptr );
               if( iType )
                  return iType;
            }
#endif
         }
         pLex->iState = LARRAY;
         return '{';

      case HB_PP_TOKEN_RIGHT_CB:
         pLex->iState = RARRAY;
         return '}';

      case HB_PP_TOKEN_LEFT_PB:
         pLex->iState = LSEPARATOR;
         return '(';

      case HB_PP_TOKEN_RIGHT_PB:
         pLex->iState = RSEPARATOR;
         return ')';

      case HB_PP_TOKEN_EPSILON:
         pLex->iState = OPERATOR;
         return EPSILON;

      case HB_PP_TOKEN_HASH:
      case HB_PP_TOKEN_DIRECTIVE:
         if( pLex->iState == LOOKUP && pToken->pNext &&
             HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
             hb_stricmp( "LINE", pToken->pNext->value ) == 0 )
         {
            hb_pp_tokenGet( pLex->pPP );
            return LINE;
         }
         pLex->iState = OPERATOR;
         return NE1;

      case HB_PP_TOKEN_NE:
         pLex->iState = OPERATOR;
         return NE2;

      case HB_PP_TOKEN_ASSIGN:
         pLex->iState = OPERATOR;
         return INASSIGN;

      case HB_PP_TOKEN_EQUAL:
         pLex->iState = OPERATOR;
         return EQ;

      case HB_PP_TOKEN_INC:
         pLex->iState = OPERATOR;
         return INC;

      case HB_PP_TOKEN_DEC:
         pLex->iState = OPERATOR;
         return DEC;

      case HB_PP_TOKEN_ALIAS:
         pLex->iState = OPERATOR;
         return ALIASOP;

      case HB_PP_TOKEN_LE:
         pLex->iState = OPERATOR;
         return LE;

      case HB_PP_TOKEN_GE:
         pLex->iState = OPERATOR;
         return GE;

      case HB_PP_TOKEN_PLUSEQ:
         pLex->iState = OPERATOR;
         return PLUSEQ;

      case HB_PP_TOKEN_MINUSEQ:
         pLex->iState = OPERATOR;
         return MINUSEQ;

      case HB_PP_TOKEN_MULTEQ:
         pLex->iState = OPERATOR;
         return MULTEQ;

      case HB_PP_TOKEN_DIVEQ:
         pLex->iState = OPERATOR;
         return DIVEQ;

      case HB_PP_TOKEN_MODEQ:
         pLex->iState = OPERATOR;
         return MODEQ;

      case HB_PP_TOKEN_EXPEQ:
         pLex->iState = OPERATOR;
         return EXPEQ;

      case HB_PP_TOKEN_POWER:
         pLex->iState = OPERATOR;
         return POWER;

      case HB_PP_TOKEN_AND:
         pLex->iState = OPERATOR;
         return AND;

      case HB_PP_TOKEN_OR:
         pLex->iState = OPERATOR;
         return OR;

      case HB_PP_TOKEN_NOT:
         pLex->iState = OPERATOR;
         return NOT;

      case HB_PP_TOKEN_SEND:
         if( HB_PP_LEX_SELF( pToken ) )
         {
            pLex->lasttok = yylval_ptr->string = ( char * ) "SELF";
            pLex->iState = IDENTIFIER;
            return IDENTIFIER;
         }
         pLex->iState = OPERATOR;
         return ( UCHAR ) pToken->value[ 0 ];

      case HB_PP_TOKEN_EQ:
         if( HB_SUPPORT_HARBOUR && pToken->pNext && pToken->pNext->spaces == 0 &&
             HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_GT )
         {
            hb_pp_tokenGet( pLex->pPP );
            pLex->iState = OPERATOR;
            return HASHOP;
         }
         /* no break */
      case HB_PP_TOKEN_PLUS:
      case HB_PP_TOKEN_MINUS:
      case HB_PP_TOKEN_MULT:
      case HB_PP_TOKEN_DIV:
      case HB_PP_TOKEN_MOD:
      case HB_PP_TOKEN_IN:
      case HB_PP_TOKEN_COMMA:
      case HB_PP_TOKEN_PIPE:
      case HB_PP_TOKEN_AMPERSAND:
      case HB_PP_TOKEN_DOT:
      case HB_PP_TOKEN_LT:
      case HB_PP_TOKEN_GT:
      case HB_PP_TOKEN_REFERENCE:
         pLex->iState = OPERATOR;
         return ( UCHAR ) pToken->value[ 0 ];

      case HB_PP_TOKEN_EOL:
         pLex->fEol = TRUE;
      case HB_PP_TOKEN_EOC:
         pLex->iState = LOOKUP;
         return ( UCHAR ) pToken->value[ 0 ];

      case HB_PP_TOKEN_KEYWORD:
      {
         int iType;
         hb_pp_tokenUpper( pToken );
         iType = hb_comp_keywordType( pToken );
         pLex->lasttok = yylval_ptr->string =
                              hb_comp_tokenIdentifer( HB_COMP_PARAM, pToken );
         switch( iType )
         {
            case FUNCTION:
            case PROCEDURE:
               if( HB_SUPPORT_HARBOUR && ( pLex->iState != LOOKUP ||
                   ( !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                     HB_PP_LEX_NEEDLEFT( pToken->pNext ) ) ) &&
                   pLex->iState != INIT && pLex->iState != EXIT &&
                   pLex->iState != STATIC )
               {
                  iType = IDENTIFIER;
                  break;
               }
               /* Clipper accepts FUNCTION and PROCEDURE in one context only */
               if( !pToken->pNext ||
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) != HB_PP_TOKEN_KEYWORD )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_SYNTAX, pToken->value, NULL );
               pLex->iState = iType;
               return pLex->iState;

            case BEGINSEQ:
               if( pLex->iState == LOOKUP && pToken->pNext &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD )
               {
                  if( pToken->pNext->len >= 4 && pToken->pNext->len <= 8 &&
                      hb_strnicmp( "SEQUENCE", pToken->pNext->value, pToken->pNext->len ) == 0 )
                  {
                     hb_pp_tokenGet( pLex->pPP );
                     break;
                  }
               }
               iType = IDENTIFIER;
               break;

            case RECOVER:
               if( pLex->iState == LOOKUP )
               {
                  if( HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  {
                     pLex->iState = RECOVER;
                     return RECOVER;
                  }
                  else if( pToken->pNext &&
                           HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                           pToken->pNext->len >= 4 && pToken->pNext->len <= 5 &&
                           hb_strnicmp( "USING", pToken->pNext->value, pToken->pNext->len ) == 0 )
                  {
                     hb_pp_tokenGet( pLex->pPP );
                     pLex->iState = RECOVERUSING;
                     return RECOVERUSING;
                  }
               }
               iType = IDENTIFIER;
               break;

            case ALWAYS:
               if( pLex->iState == LOOKUP && HB_PP_TOKEN_ISEOC( pToken->pNext ) )
               {
                  pLex->iState = ALWAYS;
                  return ALWAYS;
               }
               iType = IDENTIFIER;
               break;

            case END:
               if( pLex->iState == LOOKUP )
               {
                  if( pToken->pNext &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                      pToken->pNext->len >= 4 && pToken->pNext->len <= 8 &&
                      hb_strnicmp( "SEQUENCE", pToken->pNext->value, pToken->pNext->len ) == 0 )
                  {
                     if( HB_COMP_PARAM->functions.pLast->wSeqCounter == 0 )
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                         HB_COMP_ERR_ENDIF, NULL, NULL );
                     hb_pp_tokenGet( pLex->pPP );
                     pLex->iState = ENDSEQ;
                     return ENDSEQ;
                  }
                  else if( HB_PP_TOKEN_ISEOC( pToken->pNext ) ||
                           HB_PP_TOKEN_TYPE( pToken->pNext->type ) ==
                                                         HB_PP_TOKEN_KEYWORD )
                  {
                     pLex->iState = END;
                     return END;
                  }
                  if( !HB_SUPPORT_HARBOUR )
                  {
                     /* Clipper does not like end[], end(), end->, end-- & end++ at
                        the begining of line */
                     if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_SB ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_INC ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_DEC ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS )
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                         HB_COMP_ERR_ENDIF, NULL, NULL );
                  }
               }
               iType = IDENTIFIER;
               break;

            case ELSE:
               if( HB_SUPPORT_HARBOUR )
               {
                  if( pLex->iState != LOOKUP ||
                      !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  {
                     iType = IDENTIFIER;
                     break;
                  }
               }
               /* Clipper accepts ELSE in one context only */
               if( HB_COMP_PARAM->functions.pLast->wIfCounter == 0 )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_UNMATCHED_ELSE, NULL, NULL );
               pLex->iState = ELSE;
               return ELSE;

            case ELSEIF:
               if( HB_SUPPORT_HARBOUR )
               {
                  if( pLex->iState != LOOKUP ||
                      ( !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                        HB_PP_LEX_NEEDLEFT( pToken->pNext ) ) )
                  {
                     iType = IDENTIFIER;
                     break;
                  }
               }
               /* Clipper accepts ELSEIF in one context only */
               if( HB_COMP_PARAM->functions.pLast->wIfCounter == 0 )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_UNMATCHED_ELSEIF, NULL, NULL );
               pLex->iState = ELSEIF;
               return ELSEIF;

            case ENDIF:
               if( HB_SUPPORT_HARBOUR )
               {
                  if( pLex->iState != LOOKUP ||
                      !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  {
                     iType = IDENTIFIER;
                     break;
                  }
               }
               /* Clipper accepts ENDIF in one context only */
               if( HB_COMP_PARAM->functions.pLast->wIfCounter == 0 )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_ENDIF, NULL, NULL );
               break;

            case ENDCASE:
               if( HB_SUPPORT_HARBOUR )
               {
                  if( pLex->iState != LOOKUP ||
                      !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  {
                     iType = IDENTIFIER;
                     break;
                  }
               }
               /* Clipper accepts ENDCASE in one context only */
               if( HB_COMP_PARAM->functions.pLast->wCaseCounter == 0 )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_ENDCASE, NULL, NULL );
               break;

            case ENDDO:
               if( HB_SUPPORT_HARBOUR )
               {
                  if( pLex->iState != LOOKUP ||
                      !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  {
                     iType = IDENTIFIER;
                     break;
                  }
               }
               /* Clipper accepts ENDDO in one context only */
               if( HB_COMP_PARAM->functions.pLast->wWhileCounter == 0 )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_ENDDO, NULL, NULL );
               break;

            case ENDSEQ:
            case ENDSWITCH:
            case ENDWITH:
               if( pLex->iState != LOOKUP || !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
                  iType = IDENTIFIER;
               break;

            case INIT:
               if( pLex->iState == LOOKUP && pToken->pNext &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                   pToken->pNext->len >= 4 &&
                   ( hb_strnicmp( "FUNCTION", pToken->pNext->value,
                                  pToken->pNext->len ) == 0 ||
                     hb_strnicmp( "PROCEDURE", pToken->pNext->value,
                                  pToken->pNext->len ) == 0 ) )
               {
                  pLex->iState = INIT;
                  return INIT;
               }
               iType = IDENTIFIER;
               break;

            case FIELD:
               if( pToken->pNext && 
                   ( ( pLex->iState == LOOKUP &&
                       HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD ) ||
                     HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS ) )
               {
                  pLex->iState = FIELD;
                  return FIELD;
               }
               iType = IDENTIFIER;
               break;

            case BREAK:
               /* NOTE: Clipper does not like break[] in any context
                *       There are no resons to limit this use in Harbour.
                */
               if( pLex->iState == LOOKUP &&
                   ( HB_PP_TOKEN_ISEOC( pToken->pNext ) ||
                     !( HB_PP_LEX_NEEDLEFT( pToken->pNext ) ||
                        HB_PP_TOKEN_TYPE( pToken->pNext->type ) ==
                                                      HB_PP_TOKEN_LEFT_PB ) ) )
               {
                  pLex->iState = BREAK;
                  return BREAK;
               }
               iType = IDENTIFIER;
               break;

            case CASE:
            case OTHERWISE:
               if( pLex->iState == LOOKUP &&
                   ( HB_PP_TOKEN_ISEOC( pToken->pNext ) ||
                     ( iType == CASE && !HB_PP_LEX_NEEDLEFT( pToken->pNext ) ) ) )
               {
                  if( HB_COMP_PARAM->functions.pLast->wCaseCounter == 0 &&
                      HB_COMP_PARAM->functions.pLast->wSwitchCounter == 0 )
                     hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                      HB_COMP_ERR_CASE, NULL, NULL );
                  pLex->iState = iType;
                  return iType;
               }
               iType = IDENTIFIER;
               break;

            case FOR:
               if( pLex->iState == LOOKUP &&
                   !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                   ( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD ||
                     /* Clipper always assume FOR (somevar):=1 TO ... here */
                     HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB ) )
               {
                  if( pToken->pNext->pNext &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) != HB_PP_TOKEN_ASSIGN &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) != HB_PP_TOKEN_EQ &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                      hb_stricmp( "EACH", pToken->pNext->value ) == 0 )
                  {
                     hb_pp_tokenGet( pLex->pPP );
                     pLex->iState = FOREACH;
                     return FOREACH;
                  }
                  pLex->iState = FOR;
                  return FOR;
               }
               iType = IDENTIFIER;
               break;

            case NEXT:
               if( pLex->iState == LOOKUP )
               {
                  if( HB_PP_TOKEN_ISEOC( pToken->pNext ) ||
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD )
                  {
                     if( HB_COMP_PARAM->functions.pLast->wForCounter == 0 )
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                         HB_COMP_ERR_NEXTFOR, NULL, NULL );
                     pLex->iState = iType;
                     return iType;
                  }
                  if( ! HB_SUPPORT_HARBOUR )
                  {
                     /* Clipper does not like NEXT[], NEXT(), NEXT->,
                        NEXT++ & NEXT-- at the begining of line */
                     if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_SB ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_INC ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_DEC ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS )
                        hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                         HB_COMP_ERR_NEXTFOR, NULL, NULL );
                  }
               }
               iType = IDENTIFIER;
               break;

            case RETURN:
            case DOSWITCH:
               if( pLex->iState == LOOKUP &&
                   ( HB_PP_TOKEN_ISEOC( pToken->pNext ) ||
                     !HB_PP_LEX_NEEDLEFT( pToken->pNext ) ) )
               {
                  pLex->iState = iType;
                  return iType;
               }
               iType = IDENTIFIER;
               break;

            case DECLARE:
               if( pLex->iState == LOOKUP &&
                   !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
               {
                  if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_MACROVAR ||
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_MACROTEXT )
                  {
                     pLex->iState = PRIVATE;
                     return PRIVATE;
                  }
                  else if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD )
                  {
                     if( HB_PP_TOKEN_ISEOC( pToken->pNext->pNext ) ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) == HB_PP_TOKEN_LEFT_SB ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) == HB_PP_TOKEN_COMMA ||
                         HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) == HB_PP_TOKEN_ASSIGN ||
                         ( HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                           hb_stricmp( "AS", pToken->pNext->pNext->value ) == 0 ) )
                     {
                        pLex->iState = PRIVATE;
                        return PRIVATE;
                     }
                     pLex->iState = DECLARE;
                     return DECLARE;
                  }
               }
               iType = IDENTIFIER;
               break;

            case DO:
               if( pLex->iState == LOOKUP && !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
               {
                  if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD )
                  {
                     if( pToken->pNext->len == 4 &&
                         hb_stricmp( "CASE", pToken->pNext->value ) == 0 )
                     {
                        if( HB_PP_TOKEN_ISEOC( pToken->pNext->pNext ) )
                        {
                           hb_pp_tokenGet( pLex->pPP );
                           pLex->iState = DOCASE;
                           return DOCASE;
                        }
                     }
                     else if( pToken->pNext->len >= 4 &&
                              pToken->pNext->len <= 5 &&
                              hb_strnicmp( "WHILE", pToken->pNext->value,
                                           pToken->pNext->len ) == 0 &&
                        /* check if it's not DO while [WITH ] */
                        !HB_PP_TOKEN_ISEOC( pToken->pNext->pNext ) &&
                        ( HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) != HB_PP_TOKEN_KEYWORD ||
                          pToken->pNext->pNext->len != 4 ||
                          hb_stricmp( "WITH", pToken->pNext->pNext->value ) != 0 ) )
                     {
                        /* DO WHILE  */
                        hb_pp_tokenGet( pLex->pPP );
                        pLex->iState = WHILE;
                        return WHILE;
                     }
                     /* DO identifier [WITH ] */
                     pToken = hb_pp_tokenGet( pLex->pPP );
                     /* do not upper next token for case sensitive file systems */
                     /* hb_pp_tokenUpper( pToken ); */
                     pLex->lasttok = yylval_ptr->string =
                              hb_comp_tokenIdentifer( HB_COMP_PARAM, pToken );
                     pLex->iState = IDENTIFIER;
                     return DOIDENT;
                  }
                  else if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_MACROVAR ||
                           HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_MACROTEXT )
                  {
                     /* DO &id WITH */
                     pLex->iState = DO;
                     return DO;
                  }
               }
               iType = IDENTIFIER;
               break;

            case WHILE:
               if( pLex->iState == LOOKUP &&
                   !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                   !HB_PP_LEX_NEEDLEFT( pToken->pNext ) )
               {
                  pLex->iState = WHILE;
                  return WHILE;
               }
               iType = IDENTIFIER;
               break;

            case WITH:
               if( !HB_PP_TOKEN_ISEOC( pToken->pNext ) )
               {
                  if( pLex->iState == LOOKUP &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                      pToken->pNext->len >= 4 &&
                      hb_strnicmp( "OBJECT", pToken->pNext->value,
                                   pToken->pNext->len ) == 0 )
                  {
                     hb_pp_tokenGet( pLex->pPP );
                     pLex->iState = WITHOBJECT;
                     return WITHOBJECT;
                  }
                  else if( pLex->iState == MACROVAR ||
                           pLex->iState == MACROTEXT ||
                           pLex->iState == IDENTIFIER )
                  {
                     pLex->iState = WITH;
                     return WITH;
                  }
               }
               iType = IDENTIFIER;
               break;

            case IIF:
               if( pLex->iState == FUNCTION || pLex->iState == PROCEDURE ||
                   ( !HB_SUPPORT_HARBOUR && HB_PP_TOKEN_ISEOC( pToken->pNext ) ) )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_SYNTAX, "IIF", NULL );
               else if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB )
               {
                  pLex->iState = IIF;
                  return IIF;
               }
               else if( ! HB_SUPPORT_HARBOUR )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_SYNTAX, pToken->pNext->value, NULL );
               else
               iType = IDENTIFIER;
               break;

            case IF:
               if( pLex->iState == FUNCTION || pLex->iState == PROCEDURE ||
                   ( !HB_SUPPORT_HARBOUR && HB_PP_TOKEN_ISEOC( pToken->pNext ) ) )
                  hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                   HB_COMP_ERR_SYNTAX, "IF", NULL );
               else if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB )
               {
                  if( pLex->iState == LOOKUP )
                  {
                     PHB_PP_TOKEN pNext = pToken->pNext->pNext;   /* COND EXP */

                     pLex->iState = IF;
                     if( hb_pp_tokenNextExp( &pNext ) )  /* TRUE EXP */
                     {
                        if( hb_pp_tokenNextExp( &pNext ) )  /* FALSE EXP */
                        {
                           if( !hb_pp_tokenNextExp( &pNext ) && pNext &&
                               HB_PP_TOKEN_TYPE( pNext->type ) == HB_PP_TOKEN_RIGHT_PB )
                              pLex->iState = IIF;
                        }
                     }
                  }
                  else
                     pLex->iState = IIF;
   
                  return pLex->iState;
               }
               else if( HB_PP_LEX_NEEDLEFT( pToken->pNext ) || pLex->iState != LOOKUP )
               {
                  if( !HB_SUPPORT_HARBOUR )
                     hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E',
                                      HB_COMP_ERR_SYNTAX2, pToken->pNext->value, "IF" );
               }
               else
               {
                  pLex->iState = IF;
                  return IF;
               }
               iType = IDENTIFIER;
               break;

            case PROCREQ:
               if( pToken->pNext &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB )
               {
                  hb_pp_tokenGet( pLex->pPP );
                  pLex->iState = LSEPARATOR;
                  return PROCREQ;
               }
               iType = IDENTIFIER;
               break;

            case SELF:
               if( pToken->pNext && pToken->pNext->pNext &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->pNext->type ) == HB_PP_TOKEN_RIGHT_PB )
               {
                  hb_pp_tokenGet( pLex->pPP );
                  hb_pp_tokenGet( pLex->pPP );
                  pLex->iState = RSEPARATOR;
                  return SELF;
               }
               iType = IDENTIFIER;
               break;

            case AS_TYPE:
            {
               int iAs = hb_comp_asType( pToken->pNext, FALSE );
               if( iAs )
               {
                  pLex->iState = DECLARE_TYPE;
                  pToken = hb_pp_tokenGet( pLex->pPP );
                  if( iAs == AS_ARRAY && pToken->pNext &&
                      HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                      hb_stricmp( "OF", pToken->pNext->value ) == 0 )
                  {
                     int iAsArray = hb_comp_asType( pToken->pNext->pNext, TRUE );
                     if( iAsArray )
                     {
                        hb_pp_tokenGet( pLex->pPP );
                        hb_pp_tokenGet( pLex->pPP );
                        return iAsArray;
                     }
                  }
                  return iAs;
               }
               iType = IDENTIFIER;
               break;
            }
            case DECLARE_CLASS:
               if( pLex->iState == LOOKUP && !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD )
               {
                  pLex->iState = DECLARE_TYPE;
                  return DECLARE_CLASS;
               }
               iType = IDENTIFIER;
               break;
            case DECLARE_MEMBER:
               if( pLex->iState == LOOKUP && !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                   ( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD ||
                     HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_CB ) )
               {
                  pLex->iState = OPERATOR;
                  return DECLARE_MEMBER;
               }
               iType = IDENTIFIER;
               break;

            case THREAD:
               if( pLex->iState == LOOKUP && !HB_PP_TOKEN_ISEOC( pToken->pNext ) &&
                   HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD &&
                   pToken->pNext->len >= 4 &&
                   hb_strnicmp( "STATIC", pToken->pNext->value,
                                pToken->pNext->len ) == 0 )
               {
                  pLex->iState = LOOKUP;
                  return iType;
               }
               iType = IDENTIFIER;
               break;

            case EXIT:
            case STATIC:
               if( pLex->iState == LOOKUP )
               {
                  pLex->iState = iType;
                  return iType;
               }
               break;

            case NIL:
               if( pLex->iState == DECLARE_TYPE )
                  iType = IDENTIFIER;
               break;
            case IN:
            case LOOP:
            case STEP:
            case TO:
            case ANNOUNCE:
            case OPTIONAL:
            case DESCEND:
            case DYNAMIC:
            case EXTERN:
            case LOCAL:
            case MEMVAR:
            case PARAMETERS:
            case PRIVATE:
            case PUBLIC:
               break;
         }
         pLex->iState = IDENTIFIER;
         return iType;
      }
      default:
         return ( UCHAR ) pToken->value[ 0 ];
   }
}
complex.c443
VOIDhb_compParserStop( HB_COMP_DECL )
void hb_compParserStop( HB_COMP_DECL )
{
   HB_SYMBOL_UNUSED( HB_COMP_PARAM );
}
complex.c1333
fixflex.c
TypeFunctionSourceLine
VOIDfixup( char * inbuf, char * outbuf, int c_plus_plus )
void fixup( char * inbuf, char * outbuf, int c_plus_plus )
{
   char * ptr;
   if( c_plus_plus )
   {
      /* If compiling for C++, the arrays need to be extern "C" in both modules */
      static char s_tempbuf[ BUF_SIZE + 1 ];
      hb_strncpy( s_tempbuf, "extern \"C\" ", BUF_SIZE );
      hb_strncpy( outbuf, s_tempbuf, BUF_SIZE );
      hb_strncat( outbuf, inbuf + 7, BUF_SIZE );
      hb_strncat( s_tempbuf, inbuf + 7, BUF_SIZE );
      hb_strncpy( inbuf, s_tempbuf, BUF_SIZE );
   }
   else
   {
      /* if compiling for C, the arrays only need to be extern in lexyy.c */
      hb_strncpy( outbuf, inbuf + 7, BUF_SIZE );
      memcpy( inbuf, "extern", 6 );
   }
   ptr = strchr( inbuf, '=' );
   if( ptr ) *ptr = ';';
}
fixflex.c87
INTmain( int argc, char * argv [] )
int main( int argc, char * argv [] )
{
   int c_plus_plus = 0, rc = 0;
   char backup[ MAXPATH ];

   if( argc < 4 )
   {
      /* Must have at least 4 arguments. */
      rc = 1;
      puts( "\nUsage: FIXFLEX source dest1 dest2 dest3 [-P[+|-]]\n\n"
            "Where source is the name of the generated FLEX source file, dest1 and dest2\n"
            "are the names of the source files to extract the two largest flex tables into\n"
            "and -P or -P+ is needed when compiling Harbour using C++ instead of C.\n"
            "Note: -P- may be used to indicate the default of compiling Harbour using ANSI C." );
   }
   else
   {
      int i;
      size_t len;
      for( i = 5; i < argc; i++ )
      {
         if( strcmp( argv[ i ], "-P" ) == 0 ) c_plus_plus = 1;
         if( strcmp( argv[ i ], "-P+" ) == 0 ) c_plus_plus = 1;
         if( strcmp( argv[ i ], "-P-" ) == 0 ) c_plus_plus = 0;
      }      
      /* Rename source to backup. */
      hb_strncpy( backup, argv[ 1 ], sizeof( backup ) - 1 );
      len = strlen( backup );
      for( i = 1; i < 4; i++ ) if( backup[ len - i ] == '.' ) backup[ len - i ] = 0;
      hb_strncat( backup, ".bak", sizeof( backup ) - 1 );
      if( rename( argv[ 1 ], backup ) )
      {
         rc = 10;
         printf( "\nError %d (DOS error %02xd) renaming %s to %s.", errno, _doserrno, argv[ 1 ], backup );
      }
   }
   if( rc == 0 )
   {
      /* Read from backup as source. */
      FILE * source = fopen( backup, "r" );
      if( ! source )
      {
         rc = 11;
         printf( "\nUnable to open %s for reading.", backup );
      }
      else
      {
         /* Create new source. */
         FILE * replace = fopen( argv[ 1 ], "w" );
         if( ! replace )
         {
            rc = 12;
            printf( "\nUnable to create %s for writing (after renaming to %s).", argv[ 1 ], backup );
         }
         else
         {
            /* Create dest 1. */
            FILE * dest1, * dest2, * dest3;
            dest1 = fopen( argv[ 2 ], "w" );
            if( ! dest1 )
            {
               rc = 13;
               printf( "\nUnable to create %s for writing.", argv[ 2 ] );
            }
            /* Create dest 2. */
            dest2 = fopen( argv[ 3 ], "w" );
            if( ! dest2 )
            {
               rc = 17;
               printf( "\nUnable to create %s for writing.", argv[ 3 ] );
            }
            /* Create dest 2. */
            dest3 = fopen( argv[ 4 ], "w" );
            if( ! dest3 )
            {
               rc = 19;
               printf( "\nUnable to create %s for writing.", argv[ 4 ] );
            }
            if( rc == 0 )
            {
               /* Initialize. */
               int copy = 0, move1 = 0, move2 = 0, move3 = 0, check_count = 6;
               int defer_move = 0, defer_end = 0;
               static char inbuf[ BUF_SIZE + 1 ];
               static char outbuf[ sizeof( inbuf ) ];

               do
               {
                  /* Read from source */
                  fgets( inbuf, BUF_SIZE, source );
                  if( ferror( source ) )
                  {
                     rc = 14;
                     printf( "\nError %d (DOS error %02xd) reading from %s.", errno, _doserrno, backup );
                  }
                  else
                  {
                     char * ptr;
                     hb_strncpy( outbuf, inbuf, BUF_SIZE );

                     /* Check for stuff to copy or move to dest. */
                     if( check_count > 0 && !move1 && !move2 && !move3 && !copy )
                     {
                        ptr = strstr( inbuf, "yy_nxt" );
                        if( ptr )
                        {
                           /* It's the first of the two big tables.
                              Move it out of source into dest1, leaving only
                              an extern or extern "C" declaration. */
                           printf( "\nLocated table yy_nxt" );
                           fixup( inbuf, outbuf, c_plus_plus );
                           move1 = 1;
                           defer_move = 1;
                           check_count--;
                        }
                        else
                        {
                           ptr = strstr( inbuf, "yy_chk" );
                           if( ptr )
                           {
                              /* It's the second of the two big tables.
                                 Move it out of source into dest2, leaving only
                                 an extern or extern "C" declaration. */
                              printf( "\nLocated table yy_chk" );
                              fixup( inbuf, outbuf, c_plus_plus );
                              move2 = 1;
                              defer_move = 1;
                              check_count--;
                           }
                           else
                           {
                              ptr = strstr( inbuf, "#define FLEX_SCANNER" );
                              if( ptr )
                              {
                                 /* It's the start of various #defines that
                                    need to be copied from source to dest in
                                    order to set up the yyconst define. */
                                 printf( "\nLocated first #define to copy" );
                                 copy = 1;
                                 check_count--;
                              }
                              else
                              {
                                 #define TABLE_MAX 3
                                 int i;
                                 char * table[ TABLE_MAX ] =
                                 { "yy_accept", "yy_base", "yy_def" };
                                 ptr = 0;
                                 for( i = 0; i < TABLE_MAX && !ptr; i++ )
                                 {
                                    ptr = strstr( inbuf, table[ i ] );
                                    if( ptr ) printf( "\nLocated table %s", table[ i ] );
                                 }
                                 if( ptr )
                                 {
                                    /* It's one of the smaller big tables.
                                       Move them all out of source into dest3, leaving
                                       only an extern or extern "C" declaration. */
                                    fixup( inbuf, outbuf, c_plus_plus );
                                    move3 = 1;
                                    defer_move = 1;
                                    check_count--;
                                 }
                              }
                           }
                        }
                     }
                     else if( move1 || move2 || move3 || copy )
                     {
                        /* Check for stuff to end copy or move. */
                        ptr = strstr( inbuf, "}" );
                        if( ptr && ( move1 || move2 || move3 ) ) defer_end = 1; /* End of table to move. */
                        else
                        {
                           ptr = strstr( inbuf, "#ifdef YY_USE_PROTOS" );
                           if( ptr && copy )
                           {
                              printf( "\nLocated last #define to copy" );
                              copy = 0; /* End of #defines to copy. */
                           }
                        }
                     }
                     if( move1 || move2 || move3 || copy )
                     {
                        /* If moving or copying from source to dest, do so. */
                        if( copy || move1 )
                        {
                           fputs( outbuf, dest1 );
                           if( ferror( dest1 ) )
                           {
                              rc = 15;
                              printf( "\nError %d (DOS error %02xd) writing to %s.", errno, _doserrno, argv[ 2 ] );
                           }
                        }
                        if( copy || move2 )
                        {
                           fputs( outbuf, dest2 );
                           if( ferror( dest2 ) )
                           {
                              rc = 18;
                              printf( "\nError %d (DOS error %02xd) writing to %s.", errno, _doserrno, argv[ 3 ] );
                           }
                        }
                        if( copy || move3 )
                        {
                           fputs( outbuf, dest3 );
                           if( ferror( dest3 ) )
                           {
                              rc = 20;
                              printf( "\nError %d (DOS error %02xd) writing to %s.", errno, _doserrno, argv[ 4 ] );
                           }
                        }
                     }
                     if( !feof( source ) && ( ( !move1 && !move2 && !move3 ) || defer_move ) && rc == 0 )
                     {
                        /* If not moving to dest, then write to new source. */
                        fputs( inbuf, replace );
                        if( ferror( replace ) )
                        {
                           rc = 16;
                           printf( "\nError %d (DOS error %02xd) writing to %s (after renaming to %s).", 
                                     errno, _doserrno, argv[ 1 ], backup );
                        }
                     }
                     /* Clean up. */
                     if( defer_move ) defer_move = 0;
                     if( defer_end )
                     {
                        move1 = 0;
                        move2 = 0;
                        move3 = 0;
                        defer_end = 0;
                     }
                  }
               } while( !feof( source ) && rc == 0 );
            }
         }
      }
   }

   return rc;
}
fixflex.c110
genc.c
TypeFunctionSourceLine
VOIDhb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName )
void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName )       /* generates the C language output */
{
   char szFileName[ _POSIX_PATH_MAX + 1 ];
   char szModulname[ _POSIX_PATH_MAX + 1 ];
   PCOMSYMBOL pSym;
   PFUNCTION pFunc;
   PINLINE pInline;
   PFUNCALL pFuncall;
   FILE * yyc; /* file handle for C output */
   BOOL bIsInlineFunction = FALSE;
   BOOL bIsInitStatics;
   BOOL bIsLineNumberInfo;
   BOOL bIsInitFunction;
   BOOL bIsExitFunction;
   BOOL bIsStaticFunction;

   hb_fsFNameMerge( szFileName, pFileName );
   if( ! pFileName->szExtension )
      pFileName->szExtension = ".c";
   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 + _POSIX_PATH_MAX ];
      snprintf( buffer, sizeof( buffer ),
                "Generating C source output to \'%s\'... ", szFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }

   {
      char *szCmp = hb_verCompiler();
      char *szHrb  = hb_verHarbour();

      fprintf( yyc, "/*\n * %s\n", szHrb );
      fprintf( yyc, " * %s\n", szCmp );
      fprintf( yyc, " * Generated C source from \"%s\"\n */\n\n", HB_COMP_PARAM->szFile );

      hb_xfree( szCmp );
      hb_xfree( szHrb );
   }

   if( HB_COMP_PARAM->iFunctionCnt )
   {
      fprintf( yyc, "#include \"hbvmpub.h\"\n" );
      if( HB_COMP_PARAM->iGenCOutput != HB_COMPGENC_COMPACT )
         fprintf( yyc, "#include \"hbpcode.h\"\n" );
      fprintf( yyc, "#include \"hbinit.h\"\n" );

      if( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_REALCODE )
         fprintf( yyc, "#include \"hbxvm.h\"\n" );

      fprintf( yyc, "\n\n" );

      /* write functions prototypes for PRG defined functions */
      pFunc = HB_COMP_PARAM->functions.pFirst;
      if( ! HB_COMP_PARAM->fStartProc )
         pFunc = pFunc->pNext; /* No implicit starting procedure */

      while( pFunc )
      {
         bIsInitStatics    = ( pFunc == HB_COMP_PARAM->pInitFunc );
         bIsLineNumberInfo = ( pFunc == HB_COMP_PARAM->pLineFunc );
         bIsInitFunction   = ( pFunc->cScope & HB_FS_INIT ) != 0;
         bIsExitFunction   = ( pFunc->cScope & HB_FS_EXIT ) != 0;
         bIsStaticFunction = ( pFunc->cScope & HB_FS_STATIC ) != 0;

         /* Is it _STATICS$ - static initialization function */
         if( bIsInitStatics )
            fprintf( yyc, "HB_FUNC_INITSTATICS();\n" );
         /* Is it an (_INITLINES) function */
         else if( bIsLineNumberInfo )
            fprintf( yyc, "HB_FUNC_INITLINES();\n" );
         /* Is it an INIT FUNCTION/PROCEDURE */
         else if( bIsInitFunction )
            hb_compGenCFunc( yyc, "HB_FUNC_INIT( %s );\n", pFunc->szName, 1 );
         /* Is it an EXIT FUNCTION/PROCEDURE */
         else if( bIsExitFunction )
            hb_compGenCFunc( yyc, "HB_FUNC_EXIT( %s );\n", pFunc->szName, 1 );
         /* Is it a STATIC FUNCTION/PROCEDURE */
         else if( bIsStaticFunction )
            fprintf( yyc, "HB_FUNC_STATIC( %s );\n", pFunc->szName );
         else /* Then it must be PUBLIC FUNCTION/PROCEDURE */
            fprintf( yyc, "HB_FUNC( %s );\n", pFunc->szName );

         pFunc = pFunc->pNext;
      }

      /* write functions prototypes for inline blocks */
      pInline = HB_COMP_PARAM->inlines.pFirst;
      while( pInline )
      {
         if( pInline->szName )
         {
            bIsInlineFunction = TRUE;
            fprintf( yyc, "HB_FUNC_STATIC( %s );\n", pInline->szName );
         }
         pInline = pInline->pNext;
      }

      /* write functions prototypes for called functions outside this PRG */
      pFuncall = HB_COMP_PARAM->funcalls.pFirst;
      while( pFuncall )
      {
         if( hb_compFunctionFind( HB_COMP_PARAM, pFuncall->szName ) == NULL &&
             hb_compInlineFind( HB_COMP_PARAM, pFuncall->szName ) == NULL )
            fprintf( yyc, "HB_FUNC_EXTERN( %s );\n", pFuncall->szName );
         pFuncall = pFuncall->pNext;
      }

      /* writes the symbol table */
      /* Generate the wrapper that will initialize local symbol table
       */
      hb_strncpyUpper( szModulname, pFileName->szName, sizeof( szModulname ) - 1 );
      /* replace non ID characters in name of local symbol table by '_' */
      {
         int iLen = strlen( szModulname ), i;

         for( i = 0; i < iLen; i++ )
         {
            char c = szModulname[ i ];

            if( ! ( c >= 'A' && c <= 'Z' ) &&
                ! ( c >= 'a' && c <= 'z' ) &&
                ! ( c >= '0' && c <= '9' ) &&
                ! ( c == '_' ) )
            {
               szModulname[ i ] = '_';
            }
         }
      }
      fprintf( yyc, "\n\nHB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_%s%s )\n", HB_COMP_PARAM->szPrefix, szModulname );

      pSym = HB_COMP_PARAM->symbols.pFirst;
      while( pSym )
      {
         if( pSym->szName[ 0 ] == '(' )
         {
            /* Since the normal function cannot be INIT and EXIT at the same time
             * we are using these two bits to mark the special function used to
             * initialize static variables or debugging info about valid stop lines
             */
            fprintf( yyc, "{ \"%s\", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_%s}, NULL }",
                     pSym->szName, !memcmp( pSym->szName, "(_INITLINES", 11 ) ?
                     "INITLINES" : "INITSTATICS" ); /* NOTE: "hb_" intentionally in lower case */
         }
         else
         {
            fprintf( yyc, "{ \"%s\", {", pSym->szName );

            if( pSym->cScope & HB_FS_STATIC )
               fprintf( yyc, "HB_FS_STATIC" );

            else if( pSym->cScope & HB_FS_INIT )
               fprintf( yyc, "HB_FS_INIT" );

            else if( pSym->cScope & HB_FS_EXIT )
               fprintf( yyc, "HB_FS_EXIT" );

            else
               fprintf( yyc, "HB_FS_PUBLIC" );

            if( pSym->cScope & VS_MEMVAR )
               fprintf( yyc, " | HB_FS_MEMVAR" );

            if( pSym->cScope & HB_FS_MESSAGE )
               fprintf( yyc, " | HB_FS_MESSAGE" );

            if( ( pSym->cScope & HB_FS_FIRST ) &&  ( ! HB_COMP_PARAM->fNoStartUp ) )
               fprintf( yyc, " | HB_FS_FIRST" );

            /* specify the function address if it is a defined function or an
               external called function */
            if( pSym->cScope & HB_FS_LOCAL ) /* is it a function defined in this module */
            {
               fprintf( yyc, " | HB_FS_LOCAL" );

               if( pSym->cScope & HB_FS_INIT )
                  hb_compGenCFunc( yyc, "}, {HB_INIT_FUNCNAME( %s )}, NULL }", pSym->szName, 1 );
               else if( pSym->cScope & HB_FS_EXIT )
                  hb_compGenCFunc( yyc, "}, {HB_EXIT_FUNCNAME( %s )}, NULL }", pSym->szName, 1 );
               else
                  fprintf( yyc, "}, {HB_FUNCNAME( %s )}, NULL }", pSym->szName );
            }
            else if( pSym->cScope & HB_FS_DEFERRED ) /* is it a function declared as dynamic */
               fprintf( yyc, " | HB_FS_DEFERRED}, {NULL}, NULL }" );
            else if( pSym->bFunc && hb_compFunCallFind( HB_COMP_PARAM, pSym->szName ) ) /* is it a function called from this module */
               fprintf( yyc, "}, {HB_FUNCNAME( %s )}, NULL }", pSym->szName );
            else
               fprintf( yyc, "}, {NULL}, NULL }" );   /* memvar | alias | message */
         }

         if( pSym != HB_COMP_PARAM->symbols.pLast )
            fprintf( yyc, ",\n" );

         pSym = pSym->pNext;
      }

      hb_writeEndInit( HB_COMP_PARAM, yyc, szModulname, HB_COMP_PARAM->szFile );

      /* Generate functions data
       */
      pFunc = HB_COMP_PARAM->functions.pFirst;
      if( ! HB_COMP_PARAM->fStartProc )
         pFunc = pFunc->pNext; /* No implicit starting procedure */

      while( pFunc )
      {
         bIsInitStatics    = ( pFunc == HB_COMP_PARAM->pInitFunc );
         bIsLineNumberInfo = ( pFunc == HB_COMP_PARAM->pLineFunc );
         bIsInitFunction   = ( pFunc->cScope & HB_FS_INIT ) != 0;
         bIsExitFunction   = ( pFunc->cScope & HB_FS_EXIT ) != 0;
         bIsStaticFunction = ( pFunc->cScope & HB_FS_STATIC ) != 0;

         /* Is it _STATICS$ - static initialization function */
         if( bIsInitStatics )
            fprintf( yyc, "HB_FUNC_INITSTATICS()" );
         /* Is it an (_INITLINES) function */
         else if( bIsLineNumberInfo )
            fprintf( yyc, "HB_FUNC_INITLINES()" );
         /* Is it an INIT FUNCTION/PROCEDURE */
         else if( bIsInitFunction )
            hb_compGenCFunc( yyc, "HB_FUNC_INIT( %s )", pFunc->szName, 1 );
         /* Is it an EXIT FUNCTION/PROCEDURE */
         else if( bIsExitFunction )
            hb_compGenCFunc( yyc, "HB_FUNC_EXIT( %s )", pFunc->szName, 1 );
         /* Is it a STATIC FUNCTION/PROCEDURE */
         else if( bIsStaticFunction )
            fprintf( yyc, "HB_FUNC_STATIC( %s )", pFunc->szName );
         else /* Then it must be PUBLIC FUNCTION/PROCEDURE */
            fprintf( yyc, "HB_FUNC( %s )", pFunc->szName );

         fprintf( yyc, "\n" );
         if( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_REALCODE )
         {
            hb_compGenCRealCode( HB_COMP_PARAM, pFunc, yyc );
         }
         else
         {
            if( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_COMPACT )
               hb_compGenCCompact( pFunc, yyc );
            else
               hb_compGenCReadable( HB_COMP_PARAM, pFunc, yyc );
         }
         fprintf( yyc, "\n" );
         pFunc = pFunc->pNext;
      }

      /* Generate C inline functions
       */
      if( bIsInlineFunction )
      {
         fprintf( yyc, "#include \"hbapi.h\"\n" );
         fprintf( yyc, "#include \"hbstack.h\"\n" );
         fprintf( yyc, "#include \"hbapierr.h\"\n" );
         fprintf( yyc, "#include \"hbapiitm.h\"\n" );
         fprintf( yyc, "#include \"hbvm.h\"\n" );
         fprintf( yyc, "#include \"hbapicls.h\"\n" );
         fprintf( yyc, "#include \"hboo.ch\"\n" );
      }

      pInline = HB_COMP_PARAM->inlines.pFirst;
      while( pInline )
      {
         if( pInline->pCode )
         {
            fprintf( yyc, "#line %i ", pInline->iLine );
            hb_compGenCString( yyc, ( BYTE * ) pInline->szFileName,
                               strlen( pInline->szFileName ) );
            fprintf( yyc, "\n" );

            if( pInline->szName )
               fprintf( yyc, "HB_FUNC_STATIC( %s )\n", pInline->szName );

            fprintf( yyc, "%s", pInline->pCode );
         }
         pInline = pInline->pNext;
      }
   }
   else
   {
      pInline = HB_COMP_PARAM->inlines.pFirst;
      while( pInline )
      {
         if( pInline->pCode )
         {
            if( !bIsInlineFunction )
            {
               fprintf( yyc, "#include \"hbvmpub.h\"\n" );
               if( HB_COMP_PARAM->iGenCOutput != HB_COMPGENC_COMPACT )
                  fprintf( yyc, "#include \"hbpcode.h\"\n" );
               fprintf( yyc, "#include \"hbinit.h\"\n" );
               if( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_REALCODE )
                  fprintf( yyc, "#include \"hbxvm.h\"\n" );
               bIsInlineFunction = TRUE;
            }
            fprintf( yyc, "#line %i ", pInline->iLine );
            hb_compGenCString( yyc, ( BYTE * ) pInline->szFileName,
                               strlen( pInline->szFileName ) );
            fprintf( yyc, "\n" );

            if( pInline->szName )
               fprintf( yyc, "HB_FUNC_STATIC( %s )\n", pInline->szName );

            fprintf( yyc, "%s", pInline->pCode );
         }
         pInline = pInline->pNext;
      }
      if( !bIsInlineFunction )
         fprintf( yyc, "\n/* Empty source file */\n" );
   }

   fclose( yyc );

   if( ! HB_COMP_PARAM->fQuiet )
      hb_compOutStd( HB_COMP_PARAM, "Done.\n" );
}
genc.c51
STATIC VOIDhb_writeEndInit( HB_COMP_DECL, FILE* yyc, const char * szModulname, const char * szSourceFile )
static void hb_writeEndInit( HB_COMP_DECL, FILE* yyc, const char * szModulname, const char * szSourceFile )
{
/*
   HB_SYMBOL_UNUSED( szSourceFile );
   fprintf( yyc, "\nHB_INIT_SYMBOLS_END( hb_vm_SymbolInit_%s%s )\n\n",
                 HB_COMP_PARAM->szPrefix, szModulname );
*/
   fprintf( yyc, "\nHB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_%s%s, ",
                 HB_COMP_PARAM->szPrefix, szModulname );
   hb_compGenCString( yyc, ( BYTE * ) szSourceFile, strlen( szSourceFile ) );
   fprintf( yyc, ", 0x%lx, 0x%04x )\n\n", 0L, HB_PCODE_VER );

   fprintf( yyc, "#if defined( HB_PRAGMA_STARTUP )\n"
                 "   #pragma startup hb_vm_SymbolInit_%s%s\n"
                 "#elif defined( HB_MSC_STARTUP )\n"
                 "   #if defined( HB_OS_WIN_64 )\n"
                 "      #pragma section( HB_MSC_START_SEGMENT, long, read )\n"
                 "   #endif\n"
                 "   #pragma data_seg( HB_MSC_START_SEGMENT )\n"
                 "   static HB_$INITSYM hb_vm_auto_SymbolInit_%s%s = hb_vm_SymbolInit_%s%s;\n"
                 "   #pragma data_seg()\n"
                 "#endif\n\n",
                 HB_COMP_PARAM->szPrefix, szModulname,
                 HB_COMP_PARAM->szPrefix, szModulname,
                 HB_COMP_PARAM->szPrefix, szModulname );
}
genc.c375
STATIC VOIDhb_compGenCFunc( FILE * yyc, const char *cDecor, const char *szName, int iStrip )
static void hb_compGenCFunc( FILE * yyc, const char *cDecor, const char *szName, int iStrip )
{
   int i=0;

   while( cDecor[i] )
   {
      if( cDecor[i] == '%' && cDecor[i+1] == 's' )
      {
         int j=0;
         while( szName[j+iStrip] )
         {
            fwrite( (void*)(szName+j), 1, 1, yyc );
            j++;
         }
         i +=2;
      }
      else
      {
         fwrite( (void*)(cDecor+i), 1, 1, yyc );
         i++;
      }
   }
}
genc.c403
STATIC VOIDhb_compGenCByteStr( FILE * yyc, BYTE * pText, ULONG ulLen )
static void hb_compGenCByteStr( FILE * yyc, BYTE * pText, ULONG ulLen )
{
   ULONG ulPos;
   for( ulPos = 0; ulPos < ulLen; ulPos++ )
   {
      BYTE uchr = ( BYTE ) pText[ ulPos ];
      /*
       * NOTE: After optimization some CHR(n) can be converted
       *    into a string containing nonprintable characters.
       *
       * TODO: add switch to use hexadecimal format "%#04x"
       */
      if( ( uchr < ( BYTE ) ' ' ) || ( uchr >= 127 ) )
         fprintf( yyc, "%i, ", uchr );
      else if( strchr( "\'\\\"", uchr ) )
         fprintf( yyc, "%i, ", uchr );
      else
         fprintf( yyc, "\'%c\', ", uchr );
   }
}
genc.c427
STATIC VOIDhb_compGenCLocalName( PFUNCTION pFunc, int iLocal, ULONG lPCodePos, HB_GENC_INFO_PTR cargo )
static void hb_compGenCLocalName( PFUNCTION pFunc, int iLocal, ULONG lPCodePos, HB_GENC_INFO_PTR cargo )
{
   /* Variable with negative order are local variables
    * referenced in a codeblock -handle it with care
    */

   if( cargo->ulEndBlockPos > lPCodePos )
   {
      /* we are accesing variables within a codeblock */
      /* the names of codeblock variable are lost     */
      if( iLocal < 0 )
         fprintf( cargo->yyc, "\t/* localvar%i */", -iLocal );
      else
         fprintf( cargo->yyc, "\t/* codeblockvar%i */", iLocal );
   }
   else
   {
      const char *szName = hb_compLocalVariableName( pFunc, ( USHORT ) iLocal );

      if( szName )
         fprintf( cargo->yyc, "\t/* %s */", szName );
      else
         fprintf( cargo->yyc, "\t/* localvar%i */", iLocal );
   }
}
genc.c448
STATIC VOIDhb_compGenCStaticName( USHORT uiStatic, HB_GENC_INFO_PTR cargo )
static void hb_compGenCStaticName( USHORT uiStatic, HB_GENC_INFO_PTR cargo )
{
   const char *szName = hb_compStaticVariableName( cargo->HB_COMP_PARAM, uiStatic );
   if( szName )
      fprintf( cargo->yyc, "\t/* %s */", szName );
   else
      fprintf( cargo->yyc, "\t/* staticvar%hu */", uiStatic );
}
genc.c474
STATIC HB_GENC_FUNC(hb_p_and )
static HB_GENC_FUNC( hb_p_and )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_AND,\n" );
   return 1;
}
genc.c483
STATIC HB_GENC_FUNC(hb_p_arraypush )
static HB_GENC_FUNC( hb_p_arraypush )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ARRAYPUSH,\n" );
   return 1;
}
genc.c492
STATIC HB_GENC_FUNC(hb_p_arraypushref )
static HB_GENC_FUNC( hb_p_arraypushref )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ARRAYPUSHREF,\n" );
   return 1;
}
genc.c501
STATIC HB_GENC_FUNC(hb_p_arraypop )
static HB_GENC_FUNC( hb_p_arraypop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ARRAYPOP,\n" );
   return 1;
}
genc.c510
STATIC HB_GENC_FUNC(hb_p_dec )
static HB_GENC_FUNC( hb_p_dec )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DEC,\n" );
   return 1;
}
genc.c519
STATIC HB_GENC_FUNC(hb_p_arraydim )
static HB_GENC_FUNC( hb_p_arraydim )
{
   fprintf( cargo->yyc, "\tHB_P_ARRAYDIM, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %i */", HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c528
STATIC HB_GENC_FUNC(hb_p_divide )
static HB_GENC_FUNC( hb_p_divide )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DIVIDE,\n" );
   return 1;
}
genc.c538
STATIC HB_GENC_FUNC(hb_p_do )
static HB_GENC_FUNC( hb_p_do )
{
   fprintf( cargo->yyc, "\tHB_P_DO, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c547
STATIC HB_GENC_FUNC(hb_p_doshort )
static HB_GENC_FUNC( hb_p_doshort )
{
   fprintf( cargo->yyc, "\tHB_P_DOSHORT, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c555
STATIC HB_GENC_FUNC(hb_p_duplicate )
static HB_GENC_FUNC( hb_p_duplicate )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DUPLICATE,\n" );
   return 1;
}
genc.c561
STATIC HB_GENC_FUNC(hb_p_duplunref )
static HB_GENC_FUNC( hb_p_duplunref )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DUPLUNREF,\n" );
   return 1;
}
genc.c570
STATIC HB_GENC_FUNC(hb_p_dupltwo )
static HB_GENC_FUNC( hb_p_dupltwo )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DUPLTWO,\n" );
   return 1;
}
genc.c579
STATIC HB_GENC_FUNC(hb_p_pushunref )
static HB_GENC_FUNC( hb_p_pushunref )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHUNREF,\n" );
   return 1;
}
genc.c588
STATIC HB_GENC_FUNC(hb_p_swap )
static HB_GENC_FUNC( hb_p_swap )
{
   fprintf( cargo->yyc, "\tHB_P_SWAP, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c597
STATIC HB_GENC_FUNC(hb_p_equal )
static HB_GENC_FUNC( hb_p_equal )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_EQUAL,\n" );
   return 1;
}
genc.c603
STATIC HB_GENC_FUNC(hb_p_exactlyequal )
static HB_GENC_FUNC( hb_p_exactlyequal )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_EXACTLYEQUAL,\n" );
   return 1;
}
genc.c612
STATIC HB_GENC_FUNC(hb_p_endblock )
static HB_GENC_FUNC( hb_p_endblock )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ENDBLOCK,\n" );
   return 1;
}
genc.c621
STATIC HB_GENC_FUNC(hb_p_endproc )
static HB_GENC_FUNC( hb_p_endproc )
{
   if( lPCodePos + 1 == pFunc->lPCodePos )
      fprintf( cargo->yyc, "\tHB_P_ENDPROC\n" );
   else
      fprintf( cargo->yyc, "\tHB_P_ENDPROC,\n" );
   return 1;
}
genc.c630
STATIC HB_GENC_FUNC(hb_p_false )
static HB_GENC_FUNC( hb_p_false )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_FALSE,\n" );
   return 1;
}
genc.c639
STATIC HB_GENC_FUNC(hb_p_fortest )
static HB_GENC_FUNC( hb_p_fortest )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_FORTEST,\n" );
   return 1;
}
genc.c648
STATIC HB_GENC_FUNC(hb_p_frame )
static HB_GENC_FUNC( hb_p_frame )
{
   fprintf( cargo->yyc, "\tHB_P_FRAME, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* locals, params */" );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c657
STATIC HB_GENC_FUNC(hb_p_funcptr )
static HB_GENC_FUNC( hb_p_funcptr )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_FUNCPTR,\n" );
   return 1;
}
genc.c667
STATIC HB_GENC_FUNC(hb_p_function )
static HB_GENC_FUNC( hb_p_function )
{
   fprintf( cargo->yyc, "\tHB_P_FUNCTION, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c676
STATIC HB_GENC_FUNC(hb_p_functionshort )
static HB_GENC_FUNC( hb_p_functionshort )
{
   fprintf( cargo->yyc, "\tHB_P_FUNCTIONSHORT, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c684
STATIC HB_GENC_FUNC(hb_p_arraygen )
static HB_GENC_FUNC( hb_p_arraygen )
{
   fprintf( cargo->yyc, "\tHB_P_ARRAYGEN, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %i */", HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c690
STATIC HB_GENC_FUNC(hb_p_hashgen )
static HB_GENC_FUNC( hb_p_hashgen )
{
   fprintf( cargo->yyc, "\tHB_P_HASHGEN, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %i */", HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c700
STATIC HB_GENC_FUNC(hb_p_greater )
static HB_GENC_FUNC( hb_p_greater )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_GREATER,\n" );
   return 1;
}
genc.c710
STATIC HB_GENC_FUNC(hb_p_greaterequal )
static HB_GENC_FUNC( hb_p_greaterequal )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_GREATEREQUAL,\n" );
   return 1;
}
genc.c719
STATIC HB_GENC_FUNC(hb_p_inc )
static HB_GENC_FUNC( hb_p_inc )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_INC,\n" );
   return 1;
}
genc.c728
STATIC HB_GENC_FUNC(hb_p_instring )
static HB_GENC_FUNC( hb_p_instring )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_INSTRING,\n" );
   return 1;
}
genc.c737
STATIC HB_GENC_FUNC(hb_p_jumpnear )
static HB_GENC_FUNC( hb_p_jumpnear )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );

      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c746
STATIC HB_GENC_FUNC(hb_p_jump )
static HB_GENC_FUNC( hb_p_jump )
{
   fprintf( cargo->yyc, "\tHB_P_JUMP, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );

      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c760
STATIC HB_GENC_FUNC(hb_p_jumpfar )
static HB_GENC_FUNC( hb_p_jumpfar )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPFAR, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c775
STATIC HB_GENC_FUNC(hb_p_jumpfalsenear )
static HB_GENC_FUNC( hb_p_jumpfalsenear )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPFALSENEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c790
STATIC HB_GENC_FUNC(hb_p_jumpfalse )
static HB_GENC_FUNC( hb_p_jumpfalse )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPFALSE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c803
STATIC HB_GENC_FUNC(hb_p_jumpfalsefar )
static HB_GENC_FUNC( hb_p_jumpfalsefar )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPFALSEFAR, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c817
STATIC HB_GENC_FUNC(hb_p_jumptruenear )
static HB_GENC_FUNC( hb_p_jumptruenear )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPTRUENEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c832
STATIC HB_GENC_FUNC(hb_p_jumptrue )
static HB_GENC_FUNC( hb_p_jumptrue )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPTRUE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %05li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c845
STATIC HB_GENC_FUNC(hb_p_jumptruefar )
static HB_GENC_FUNC( hb_p_jumptruefar )
{
   fprintf( cargo->yyc, "\tHB_P_JUMPTRUEFAR, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, ( LONG ) ( lPCodePos + lOffset ) );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c859
STATIC HB_GENC_FUNC(hb_p_less )
static HB_GENC_FUNC( hb_p_less )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_LESS,\n" );
   return 1;
}
genc.c874
STATIC HB_GENC_FUNC(hb_p_lessequal )
static HB_GENC_FUNC( hb_p_lessequal )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_LESSEQUAL,\n" );
   return 1;
}
genc.c883
STATIC HB_GENC_FUNC(hb_p_line )
static HB_GENC_FUNC( hb_p_line )
{
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "/* %05li */ ", lPCodePos );
   else
      fprintf( cargo->yyc, "\t" );
   fprintf( cargo->yyc, "HB_P_LINE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %i */", HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c892
STATIC HB_GENC_FUNC(hb_p_localname )
static HB_GENC_FUNC( hb_p_localname )
{
   ULONG ulStart = lPCodePos;

   fprintf( cargo->yyc, "\tHB_P_LOCALNAME, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", ( char * ) pFunc->pCode + lPCodePos + 3 );
   fprintf( cargo->yyc, "\n" );
   lPCodePos += 3;
   while( pFunc->pCode[ lPCodePos ] )
   {
      char chr = pFunc->pCode[ lPCodePos++ ];
      if( chr == '\'' || chr == '\\')
         fprintf( cargo->yyc, " \'\\%c\',", chr );
      else
         fprintf( cargo->yyc, " \'%c\',", chr );
   }
   fprintf( cargo->yyc, " 0,\n" );

   return ( lPCodePos - ulStart + 1 );
}
genc.c907
STATIC HB_GENC_FUNC(hb_p_macropop )
static HB_GENC_FUNC( hb_p_macropop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPOP, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c930
STATIC HB_GENC_FUNC(hb_p_macropopaliased )
static HB_GENC_FUNC( hb_p_macropopaliased )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPOPALIASED, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c939
STATIC HB_GENC_FUNC(hb_p_macropush )
static HB_GENC_FUNC( hb_p_macropush )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSH, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c948
STATIC HB_GENC_FUNC(hb_p_macropushref )
static HB_GENC_FUNC( hb_p_macropushref )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSHREF,\n" );
   return 1;
}
genc.c957
STATIC HB_GENC_FUNC(hb_p_macrodo )
static HB_GENC_FUNC( hb_p_macrodo )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACRODO, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c966
STATIC HB_GENC_FUNC(hb_p_macrofunc )
static HB_GENC_FUNC( hb_p_macrofunc )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROFUNC, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c976
STATIC HB_GENC_FUNC(hb_p_macrosend )
static HB_GENC_FUNC( hb_p_macrosend )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROSEND, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c986
STATIC HB_GENC_FUNC(hb_p_macroarraygen )
static HB_GENC_FUNC( hb_p_macroarraygen )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROARRAYGEN, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c996
STATIC HB_GENC_FUNC(hb_p_macropushlist )
static HB_GENC_FUNC( hb_p_macropushlist )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSHLIST, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c1006
STATIC HB_GENC_FUNC(hb_p_macropushindex )
static HB_GENC_FUNC( hb_p_macropushindex )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSHINDEX,\n" );
   return 1;
}
genc.c1015
STATIC HB_GENC_FUNC(hb_p_macropushpare )
static HB_GENC_FUNC( hb_p_macropushpare )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSHPARE, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c1024
STATIC HB_GENC_FUNC(hb_p_macropushaliased )
static HB_GENC_FUNC( hb_p_macropushaliased )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROPUSHALIASED, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c1033
STATIC HB_GENC_FUNC(hb_p_macrosymbol )
static HB_GENC_FUNC( hb_p_macrosymbol )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROSYMBOL,\n" );
   return 1;
}
genc.c1042
STATIC HB_GENC_FUNC(hb_p_macrotext )
static HB_GENC_FUNC( hb_p_macrotext )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MACROTEXT,\n" );
   return 1;
}
genc.c1051
STATIC HB_GENC_FUNC(hb_p_message )
static HB_GENC_FUNC( hb_p_message )
{
   fprintf( cargo->yyc, "\tHB_P_MESSAGE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1060
STATIC HB_GENC_FUNC(hb_p_minus )
static HB_GENC_FUNC( hb_p_minus )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MINUS,\n" );
   return 1;
}
genc.c1070
STATIC HB_GENC_FUNC(hb_p_modulename )
static HB_GENC_FUNC( hb_p_modulename )
{
   ULONG ulStart = lPCodePos;

   fprintf( cargo->yyc, "\tHB_P_MODULENAME," );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %s */", ( char * ) pFunc->pCode + lPCodePos + 1 );
   fprintf( cargo->yyc, "\n" );
   lPCodePos++;
   while( pFunc->pCode[ lPCodePos ] )
   {
      char chr = pFunc->pCode[ lPCodePos++ ];
      if( chr == '\'' || chr == '\\')
         fprintf( cargo->yyc, " \'\\%c\',", chr );
      else
         fprintf( cargo->yyc, " \'%c\',", chr );
   }
   fprintf( cargo->yyc, " 0,\n" );

   return ( lPCodePos - ulStart + 1 );
}
genc.c1079
STATIC HB_GENC_FUNC(hb_p_modulus )
static HB_GENC_FUNC( hb_p_modulus )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MODULUS,\n" );
   return 1;
}
genc.c1101
STATIC HB_GENC_FUNC(hb_p_mult )
static HB_GENC_FUNC( hb_p_mult )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MULT,\n" );
   return 1;
}
genc.c1110
STATIC HB_GENC_FUNC(hb_p_negate )
static HB_GENC_FUNC( hb_p_negate )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_NEGATE,\n" );
   return 1;
}
genc.c1119
STATIC HB_GENC_FUNC(hb_p_not )
static HB_GENC_FUNC( hb_p_not )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_NOT,\n" );
   return 1;
}
genc.c1128
STATIC HB_GENC_FUNC(hb_p_notequal )
static HB_GENC_FUNC( hb_p_notequal )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_NOTEQUAL,\n" );
   return 1;
}
genc.c1137
STATIC HB_GENC_FUNC(hb_p_or )
static HB_GENC_FUNC( hb_p_or )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_OR,\n" );
   return 1;
}
genc.c1146
STATIC HB_GENC_FUNC(hb_p_parameter )
static HB_GENC_FUNC( hb_p_parameter )
{
   fprintf( cargo->yyc, "\tHB_P_PARAMETER, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c1155
STATIC HB_GENC_FUNC(hb_p_plus )
static HB_GENC_FUNC( hb_p_plus )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PLUS,\n" );
   return 1;
}
genc.c1166
STATIC HB_GENC_FUNC(hb_p_pop )
static HB_GENC_FUNC( hb_p_pop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_POP,\n" );
   return 1;
}
genc.c1175
STATIC HB_GENC_FUNC(hb_p_popalias )
static HB_GENC_FUNC( hb_p_popalias )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_POPALIAS,\n" );
   return 1;
}
genc.c1184
STATIC HB_GENC_FUNC(hb_p_popaliasedfield )
static HB_GENC_FUNC( hb_p_popaliasedfield )
{
   fprintf( cargo->yyc, "\tHB_P_POPALIASEDFIELD, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1193
STATIC HB_GENC_FUNC(hb_p_popaliasedfieldnear )
static HB_GENC_FUNC( hb_p_popaliasedfieldnear )
{
   fprintf( cargo->yyc, "\tHB_P_POPALIASEDFIELDNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1203
STATIC HB_GENC_FUNC(hb_p_popaliasedvar )
static HB_GENC_FUNC( hb_p_popaliasedvar )
{
   fprintf( cargo->yyc, "\tHB_P_POPALIASEDVAR, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1212
STATIC HB_GENC_FUNC(hb_p_popfield )
static HB_GENC_FUNC( hb_p_popfield )
{
   fprintf( cargo->yyc, "\tHB_P_POPFIELD, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1222
STATIC HB_GENC_FUNC(hb_p_poplocal )
static HB_GENC_FUNC( hb_p_poplocal )
{
   fprintf( cargo->yyc, "\tHB_P_POPLOCAL, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      int iVar = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1232
STATIC HB_GENC_FUNC(hb_p_poplocalnear )
static HB_GENC_FUNC( hb_p_poplocalnear )
{
   fprintf( cargo->yyc, "\tHB_P_POPLOCALNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
   {
      int iVar = ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1246
STATIC HB_GENC_FUNC(hb_p_popmemvar )
static HB_GENC_FUNC( hb_p_popmemvar )
{
   fprintf( cargo->yyc, "\tHB_P_POPMEMVAR, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1259
STATIC HB_GENC_FUNC(hb_p_popstatic )
static HB_GENC_FUNC( hb_p_popstatic )
{
   fprintf( cargo->yyc, "\tHB_P_POPSTATIC, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      hb_compGenCStaticName( HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), cargo );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1269
STATIC HB_GENC_FUNC(hb_p_popvariable )
static HB_GENC_FUNC( hb_p_popvariable )
{
   fprintf( cargo->yyc, "\tHB_P_POPVARIABLE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1280
STATIC HB_GENC_FUNC(hb_p_power )
static HB_GENC_FUNC( hb_p_power )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_POWER,\n" );
   return 1;
}
genc.c1290
STATIC HB_GENC_FUNC(hb_p_pushalias )
static HB_GENC_FUNC( hb_p_pushalias )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHALIAS,\n" );
   return 1;
}
genc.c1299
STATIC HB_GENC_FUNC(hb_p_pushaliasedfield )
static HB_GENC_FUNC( hb_p_pushaliasedfield )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHALIASEDFIELD, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1308
STATIC HB_GENC_FUNC(hb_p_pushaliasedfieldnear )
static HB_GENC_FUNC( hb_p_pushaliasedfieldnear )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHALIASEDFIELDNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1318
STATIC HB_GENC_FUNC(hb_p_pushaliasedvar )
static HB_GENC_FUNC( hb_p_pushaliasedvar )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHALIASEDVAR, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1327
STATIC HB_GENC_FUNC(hb_p_pushblockshort )
static HB_GENC_FUNC( hb_p_pushblockshort )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHBLOCKSHORT, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %i */",
               pFunc->pCode[ lPCodePos + 1 ] );
   fprintf( cargo->yyc, "\n" );

   if( cargo->ulEndBlockPos < lPCodePos )
      cargo->ulEndBlockPos = lPCodePos + pFunc->pCode[ lPCodePos + 1 ] - 1;

   return 2;
}
genc.c1337
STATIC HB_GENC_FUNC(hb_p_pushblock )
static HB_GENC_FUNC( hb_p_pushblock )
{
   USHORT wVar, w;
   ULONG ulStart = lPCodePos;

   fprintf( cargo->yyc, "\tHB_P_PUSHBLOCK, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %i */",
               HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );

   w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 3 ] );
   fprintf( cargo->yyc, "\t%i, %i,",
            pFunc->pCode[ lPCodePos + 3 ],
            pFunc->pCode[ lPCodePos + 4 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* number of local parameters (%i) */", w );
   fprintf( cargo->yyc, "\n" );

   wVar = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 5 ] );
   fprintf( cargo->yyc, "\t%i, %i,",
            pFunc->pCode[ lPCodePos + 5 ],
            pFunc->pCode[ lPCodePos + 6 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* number of local variables (%i) */", wVar );
   fprintf( cargo->yyc, "\n" );

   lPCodePos += 7;  /* codeblock size + number of parameters + number of local variables */
   /* create the table of referenced local variables */
   while( wVar-- )
   {
      fprintf( cargo->yyc, "\t%i, %i,",
               pFunc->pCode[ lPCodePos ],
               pFunc->pCode[ lPCodePos + 1 ] );
      /* NOTE:
         * When a codeblock is used to initialize a static variable
         * the names of local variables cannot be determined
         * because at the time of C code generation we don't know
         * in which function was defined this local variable
         */
      if( cargo->bVerbose && ( pFunc->cScope & HB_FS_INITEXIT ) != HB_FS_INITEXIT )
      {
         w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos ] );
         hb_compGenCLocalName( pFunc, w, lPCodePos, cargo );
      }
      fprintf( cargo->yyc, "\n" );
      lPCodePos += 2;
   }

   if( cargo->ulEndBlockPos < ulStart )
      cargo->ulEndBlockPos = ulStart + HB_PCODE_MKUSHORT( &pFunc->pCode[ ulStart + 1 ] ) - 1;

   return (lPCodePos - ulStart);
}
genc.c1352
STATIC HB_GENC_FUNC(hb_p_pushblocklarge )
static HB_GENC_FUNC( hb_p_pushblocklarge )
{
   USHORT wVar, w;
   ULONG ulStart = lPCodePos;

   fprintf( cargo->yyc, "\tHB_P_PUSHBLOCKLARGE, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %lu */",
               HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );

   w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 4 ] );
   fprintf( cargo->yyc, "\t%i, %i,",
            pFunc->pCode[ lPCodePos + 4 ],
            pFunc->pCode[ lPCodePos + 5 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* number of local parameters (%i) */", w );
   fprintf( cargo->yyc, "\n" );

   wVar = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 6 ] );
   fprintf( cargo->yyc, "\t%i, %i,",
            pFunc->pCode[ lPCodePos + 6 ],
            pFunc->pCode[ lPCodePos + 7 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* number of local variables (%i) */", wVar );
   fprintf( cargo->yyc, "\n" );

   lPCodePos += 8;  /* codeblock size + number of parameters + number of local variables */
   /* create the table of referenced local variables */
   while( wVar-- )
   {
      fprintf( cargo->yyc, "\t%i, %i,",
               pFunc->pCode[ lPCodePos ],
               pFunc->pCode[ lPCodePos + 1 ] );
      /* NOTE:
         * When a codeblock is used to initialize a static variable
         * the names of local variables cannot be determined
         * because at the time of C code generation we don't know
         * in which function was defined this local variable
         */
      if( cargo->bVerbose && ( pFunc->cScope & HB_FS_INITEXIT ) != HB_FS_INITEXIT )
      {
         w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos ] );
         hb_compGenCLocalName( pFunc, w, lPCodePos, cargo );
      }
      fprintf( cargo->yyc, "\n" );
      lPCodePos += 2;
   }

   if( cargo->ulEndBlockPos < ulStart )
      cargo->ulEndBlockPos = ulStart + HB_PCODE_MKUINT24( &pFunc->pCode[ ulStart + 1 ] ) - 1;

   return (lPCodePos - ulStart);
}
genc.c1407
STATIC HB_GENC_FUNC(hb_p_pushdouble )
static HB_GENC_FUNC( hb_p_pushdouble )
{
   int i;

   fprintf( cargo->yyc, "\tHB_P_PUSHDOUBLE," );
   ++lPCodePos;
   for( i = 0; i < ( int ) ( sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ) ); ++i )
   {
      fprintf( cargo->yyc, " %i,", ( UCHAR ) pFunc->pCode[ lPCodePos + i ] );
   }
   if( cargo->bVerbose )
   {
      fprintf( cargo->yyc, "\t/* %.*f, %d, %d */",
      ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ],
      HB_PCODE_MKDOUBLE( &pFunc->pCode[ lPCodePos ] ),
      ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) ],
      ( UCHAR ) pFunc->pCode[ lPCodePos + sizeof( double ) + sizeof( BYTE ) ] );
   }
   fprintf( cargo->yyc, "\n" );

   return sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ) + 1;
}
genc.c1463
STATIC HB_GENC_FUNC(hb_p_pushfield )
static HB_GENC_FUNC( hb_p_pushfield )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHFIELD, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1486
STATIC HB_GENC_FUNC(hb_p_pushbyte )
static HB_GENC_FUNC( hb_p_pushbyte )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHBYTE, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %i */", ( signed char ) pFunc->pCode[ lPCodePos + 1 ] );
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1496
STATIC HB_GENC_FUNC(hb_p_pushint )
static HB_GENC_FUNC( hb_p_pushint )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHINT, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %i */", HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1505
STATIC HB_GENC_FUNC(hb_p_pushlocal )
static HB_GENC_FUNC( hb_p_pushlocal )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHLOCAL, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      int iVar = (int) HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1515
STATIC HB_GENC_FUNC(hb_p_pushlocalnear )
static HB_GENC_FUNC( hb_p_pushlocalnear )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHLOCALNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose )
   {
      int iVar = ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1529
STATIC HB_GENC_FUNC(hb_p_pushlocalref )
static HB_GENC_FUNC( hb_p_pushlocalref )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHLOCALREF, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
   {
      int iVar = (int) HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1542
STATIC HB_GENC_FUNC(hb_p_pushlong )
static HB_GENC_FUNC( hb_p_pushlong )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHLONG, %i, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ],
            pFunc->pCode[ lPCodePos + 4 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %li */", HB_PCODE_MKLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );

   return 5;
}
genc.c1556
STATIC HB_GENC_FUNC(hb_p_pushlonglong )
static HB_GENC_FUNC( hb_p_pushlonglong )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHLONGLONG, %i, %i, %i, %i, %i, %i, %i, %i, ",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ],
            pFunc->pCode[ lPCodePos + 4 ],
            pFunc->pCode[ lPCodePos + 5 ],
            pFunc->pCode[ lPCodePos + 6 ],
            pFunc->pCode[ lPCodePos + 7 ],
            pFunc->pCode[ lPCodePos + 8 ] );
   if( cargo->bVerbose )
   {
#ifdef HB_LONG_LONG_OFF
      fprintf( cargo->yyc, "\t/* %f */", HB_PCODE_MKLONGLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
#else
      fprintf( cargo->yyc, "\t/* %" PFLL "i */", HB_PCODE_MKLONGLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
#endif
   }
   fprintf( cargo->yyc, "\n" );

   return 9;
}
genc.c1569
STATIC HB_GENC_FUNC(hb_p_pushmemvar )
static HB_GENC_FUNC( hb_p_pushmemvar )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHMEMVAR, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1593
STATIC HB_GENC_FUNC(hb_p_pushmemvarref )
static HB_GENC_FUNC( hb_p_pushmemvarref )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHMEMVARREF, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1603
STATIC HB_GENC_FUNC(hb_p_pushnil )
static HB_GENC_FUNC( hb_p_pushnil )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHNIL,\n" );
   return 1;
}
genc.c1613
STATIC HB_GENC_FUNC(hb_p_pushself )
static HB_GENC_FUNC( hb_p_pushself )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHSELF,\n" );
   return 1;
}
genc.c1622
STATIC HB_GENC_FUNC(hb_p_pushstatic )
static HB_GENC_FUNC( hb_p_pushstatic )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHSTATIC, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      hb_compGenCStaticName( HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), cargo );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1631
STATIC HB_GENC_FUNC(hb_p_pushstaticref )
static HB_GENC_FUNC( hb_p_pushstaticref )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHSTATICREF, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      hb_compGenCStaticName( HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), cargo );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1642
STATIC HB_GENC_FUNC(hb_p_pushstrshort )
static HB_GENC_FUNC( hb_p_pushstrshort )
{
   USHORT wLen = pFunc->pCode[ lPCodePos + 1 ];

   fprintf( cargo->yyc, "\tHB_P_PUSHSTRSHORT, %i,", pFunc->pCode[ lPCodePos + 1 ] );

   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* %i */", wLen );

   if( wLen > 0 )
   {
      fprintf( cargo->yyc, "\n\t" );
      hb_compGenCByteStr( cargo->yyc, &pFunc->pCode[ lPCodePos + 2 ], wLen );
   }
   fprintf( cargo->yyc, "\n" );
   return wLen + 2;
}
genc.c1653
STATIC HB_GENC_FUNC(hb_p_pushstr )
static HB_GENC_FUNC( hb_p_pushstr )
{
   USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );

   fprintf( cargo->yyc, "\tHB_P_PUSHSTR, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );

   if( cargo->bVerbose )
         fprintf( cargo->yyc, "\t/* %i */", wLen );

   if( wLen > 0 )
   {
      fprintf( cargo->yyc, "\n\t" );
      hb_compGenCByteStr( cargo->yyc, &pFunc->pCode[ lPCodePos + 3 ], wLen );
   }
   fprintf( cargo->yyc, "\n" );
   return wLen + 3;
}
genc.c1671
STATIC HB_GENC_FUNC(hb_p_pushstrlarge )
static HB_GENC_FUNC( hb_p_pushstrlarge )
{
   ULONG ulLen = HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );

   fprintf( cargo->yyc, "\tHB_P_PUSHSTRLARGE, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );

   if( cargo->bVerbose )
         fprintf( cargo->yyc, "\t/* %lu */", ulLen );

   if( ulLen > 0 )
   {
      fprintf( cargo->yyc, "\n\t" );
      hb_compGenCByteStr( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], ulLen );
   }
   fprintf( cargo->yyc, "\n" );
   return ulLen + 4;
}
genc.c1691
STATIC HB_GENC_FUNC(hb_p_pushstrhidden )
static HB_GENC_FUNC( hb_p_pushstrhidden )
{
   USHORT wLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] );

   fprintf( cargo->yyc, "\tHB_P_PUSHSTRHIDDEN, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );

   if( cargo->bVerbose )
         fprintf( cargo->yyc, "\t/* %i */", wLen );

   if( wLen > 0 )
   {
      fprintf( cargo->yyc, "\n\t" );
      hb_compGenCByteStr( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], wLen );
   }
   fprintf( cargo->yyc, "\n" );
   return wLen + 4;
}
genc.c1712
STATIC HB_GENC_FUNC(hb_p_pushsym )
static HB_GENC_FUNC( hb_p_pushsym )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHSYM, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1733
STATIC HB_GENC_FUNC(hb_p_pushsymnear )
static HB_GENC_FUNC( hb_p_pushsymnear )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHSYMNEAR, %i,",
            pFunc->pCode[ lPCodePos + 1 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, pFunc->pCode[ lPCodePos + 1 ] ) );
   fprintf( cargo->yyc, "\n" );
   return 2;
}
genc.c1743
STATIC HB_GENC_FUNC(hb_p_pushfuncsym )
static HB_GENC_FUNC( hb_p_pushfuncsym )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHFUNCSYM, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1752
STATIC HB_GENC_FUNC(hb_p_pushvariable )
static HB_GENC_FUNC( hb_p_pushvariable )
{
   fprintf( cargo->yyc, "\tHB_P_PUSHVARIABLE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1762
STATIC HB_GENC_FUNC(hb_p_retvalue )
static HB_GENC_FUNC( hb_p_retvalue )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_RETVALUE,\n" );
   return 1;
}
genc.c1772
STATIC HB_GENC_FUNC(hb_p_send )
static HB_GENC_FUNC( hb_p_send )
{
   fprintf( cargo->yyc, "\tHB_P_SEND, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c1781
STATIC HB_GENC_FUNC(hb_p_sendshort )
static HB_GENC_FUNC( hb_p_sendshort )
{
   fprintf( cargo->yyc, "\tHB_P_SENDSHORT, %i,\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
genc.c1789
STATIC HB_GENC_FUNC(hb_p_pushovarref )
static HB_GENC_FUNC( hb_p_pushovarref )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHOVARREF,\n" );
   return 1;
}
genc.c1795
STATIC HB_GENC_FUNC(hb_p_seqblock )
static HB_GENC_FUNC( hb_p_seqblock )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_SEQBLOCK,\n" );
   return 1;
}
genc.c1804
STATIC HB_GENC_FUNC(hb_p_seqbegin )
static HB_GENC_FUNC( hb_p_seqbegin )
{
   fprintf( cargo->yyc, "\tHB_P_SEQBEGIN, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, lPCodePos + lOffset );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c1813
STATIC HB_GENC_FUNC(hb_p_seqend )
static HB_GENC_FUNC( hb_p_seqend )
{
   if( cargo->bVerbose ) fprintf( cargo->yyc, "/* %05li */ ", lPCodePos );
   else fprintf( cargo->yyc, "\t" );
   fprintf( cargo->yyc, "HB_P_SEQEND, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, lPCodePos + lOffset );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c1828
STATIC HB_GENC_FUNC(hb_p_seqrecover )
static HB_GENC_FUNC( hb_p_seqrecover )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_SEQRECOVER,\n" );
   return 1;
}
genc.c1845
STATIC HB_GENC_FUNC(hb_p_seqalways )
static HB_GENC_FUNC( hb_p_seqalways )
{
   fprintf( cargo->yyc, "\tHB_P_SEQALWAYS, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, lPCodePos + lOffset );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c1854
STATIC HB_GENC_FUNC(hb_p_alwaysbegin )
static HB_GENC_FUNC( hb_p_alwaysbegin )
{
   HB_SYMBOL_UNUSED( pFunc );

   if( cargo->bVerbose ) fprintf( cargo->yyc, "/* %05li */ ", lPCodePos );
   else fprintf( cargo->yyc, "\t" );

   fprintf( cargo->yyc, "HB_P_ALWAYSBEGIN, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose )
   {
      LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
      fprintf( cargo->yyc, "\t/* %li (abs: %08li) */", lOffset, lPCodePos + lOffset );
   }
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c1869
STATIC HB_GENC_FUNC(hb_p_alwaysend )
static HB_GENC_FUNC( hb_p_alwaysend )
{
   HB_SYMBOL_UNUSED( pFunc );

   if( cargo->bVerbose ) fprintf( cargo->yyc, "/* %05li */ ", lPCodePos );
   else fprintf( cargo->yyc, "\t" );

   fprintf( cargo->yyc, "HB_P_ALWAYSEND,\n" );
   return 1;
}
genc.c1889
STATIC HB_GENC_FUNC(hb_p_sframe )
static HB_GENC_FUNC( hb_p_sframe )
{
   fprintf( cargo->yyc, "\tHB_P_SFRAME, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* symbol (_INITSTATICS) */" );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c1900
STATIC HB_GENC_FUNC(hb_p_statics )
static HB_GENC_FUNC( hb_p_statics )
{
   fprintf( cargo->yyc, "\tHB_P_STATICS, %i, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ],
            pFunc->pCode[ lPCodePos + 4 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* symbol (_INITSTATICS), %i statics */", HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) );
   fprintf( cargo->yyc, "\n" );

   return 5;
}
genc.c1910
STATIC HB_GENC_FUNC(hb_p_staticname )
static HB_GENC_FUNC( hb_p_staticname )
{
   ULONG ulStart = lPCodePos;

   fprintf( cargo->yyc, "\tHB_P_STATICNAME, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", ( char * ) pFunc->pCode + lPCodePos + 4 );
   fprintf( cargo->yyc, "\n" );

   lPCodePos += 4;
   while( pFunc->pCode[ lPCodePos ] )
   {
      char chr = pFunc->pCode[ lPCodePos++ ];
      if( chr == '\'' || chr == '\\')
         fprintf( cargo->yyc, " \'\\%c\',", chr );
      else
         fprintf( cargo->yyc, " \'%c\',", chr );
   }
   fprintf( cargo->yyc, " 0,\n" );

   return ( lPCodePos - ulStart + 1 );
}
genc.c1924
STATIC HB_GENC_FUNC(hb_p_threadstatics )
static HB_GENC_FUNC( hb_p_threadstatics )
{
   USHORT w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), u;

   fprintf( cargo->yyc, "\tHB_P_THREADSTATICS, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "\t/* number of thread static variables: %i */", w );
   fprintf( cargo->yyc, "\n" );

   lPCodePos += 3;
   for( u = 0; u < w; ++u )
   {
      fprintf( cargo->yyc, "\t%i, %i,",
               pFunc->pCode[ lPCodePos ],
               pFunc->pCode[ lPCodePos + 1 ] );
      if( cargo->bVerbose )
         hb_compGenCStaticName( HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos ] ), cargo );
      fprintf( cargo->yyc, "\n" );
      lPCodePos +=2;
   }

   return ( ( ULONG ) w << 1 ) + 3;
}
genc.c1949
STATIC HB_GENC_FUNC(hb_p_swapalias )
static HB_GENC_FUNC( hb_p_swapalias )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_SWAPALIAS,\n" );
   return 1;
}
genc.c1975
STATIC HB_GENC_FUNC(hb_p_true )
static HB_GENC_FUNC( hb_p_true )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_TRUE,\n" );
   return 1;
}
genc.c1984
STATIC HB_GENC_FUNC(hb_p_one )
static HB_GENC_FUNC( hb_p_one )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ONE,\n" );
   return 1;
}
genc.c1993
STATIC HB_GENC_FUNC(hb_p_zero )
static HB_GENC_FUNC( hb_p_zero )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_ZERO,\n" );
   return 1;
}
genc.c2002
STATIC HB_GENC_FUNC(hb_p_noop )
static HB_GENC_FUNC( hb_p_noop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_NOOP,\n" );
   return 1;
}
genc.c2011
STATIC HB_GENC_FUNC(hb_p_dummy )
static HB_GENC_FUNC( hb_p_dummy )
{
   HB_SYMBOL_UNUSED( cargo );
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   return 1;
}
genc.c2020
STATIC HB_GENC_FUNC(hb_p_enumstart )
static HB_GENC_FUNC( hb_p_enumstart )
{
   fprintf( cargo->yyc, "\tHB_P_ENUMSTART, %i, %i,\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
genc.c2028
STATIC HB_GENC_FUNC(hb_p_enumnext )
static HB_GENC_FUNC( hb_p_enumnext )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   fprintf( cargo->yyc, "\tHB_P_ENUMNEXT,\n" );
   return 1;
}
genc.c2035
STATIC HB_GENC_FUNC(hb_p_enumprev )
static HB_GENC_FUNC( hb_p_enumprev )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   fprintf( cargo->yyc, "\tHB_P_ENUMPREV,\n" );
   return 1;
}
genc.c2043
STATIC HB_GENC_FUNC(hb_p_enumend )
static HB_GENC_FUNC( hb_p_enumend )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   fprintf( cargo->yyc, "\tHB_P_ENUMEND,\n" );
   return 1;
}
genc.c2051
STATIC HB_GENC_FUNC(hb_p_switch )
static HB_GENC_FUNC( hb_p_switch )
{
   if( cargo->bVerbose )
      fprintf( cargo->yyc, "/* %05li */ ", lPCodePos );
   else
      fprintf( cargo->yyc, "\t" );

   fprintf( cargo->yyc, "HB_P_SWITCH, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );

   if( cargo->bVerbose )
   {
      fprintf( cargo->yyc, "\t/* %i*/", HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   }

   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c2059
STATIC HB_GENC_FUNC(hb_p_pushdate )
static HB_GENC_FUNC( hb_p_pushdate )
{

   fprintf( cargo->yyc, "\tHB_P_PUSHDATE, %i, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ],
            pFunc->pCode[ lPCodePos + 4 ] );
   if( cargo->bVerbose )
   {
      int year, month, day;
      char date[9];

      hb_dateDecode( HB_PCODE_MKLONG( &pFunc->pCode[ lPCodePos + 1 ] ), &year, &month, &day );
      hb_dateStrPut( date, year, month, day );
      date[8] = '\0';
      fprintf( cargo->yyc, "\t/* %s */", date );
   }
   fprintf( cargo->yyc, "\n" );

   return 5;
}
genc.c2077
STATIC HB_GENC_FUNC(hb_p_localnearaddint )
static HB_GENC_FUNC( hb_p_localnearaddint )
{
   fprintf( cargo->yyc, "\tHB_P_LOCALNEARADDINT, %i, %i, %i,", pFunc->pCode[ lPCodePos + 1 ],
                                                               pFunc->pCode[ lPCodePos + 2 ],
                                                               pFunc->pCode[ lPCodePos + 3 ] );

   if( cargo->bVerbose )
   {
      int iVar = ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
      fprintf( cargo->yyc, "/* %i */", HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 2 ] ) );
   }
   fprintf( cargo->yyc, "\n" );

   return 4;
}
genc.c2101
STATIC HB_GENC_FUNC(hb_p_localaddint )
static HB_GENC_FUNC( hb_p_localaddint )
{
   fprintf( cargo->yyc, "\tHB_P_LOCALADDINT, %i, %i, %i, %i,", pFunc->pCode[ lPCodePos + 1 ],
                                                               pFunc->pCode[ lPCodePos + 2 ],
                                                               pFunc->pCode[ lPCodePos + 3 ],
                                                               pFunc->pCode[ lPCodePos + 4 ] );

   if( cargo->bVerbose )
   {
      int iVar = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
      fprintf( cargo->yyc, "/* %i */", HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) );
   }
   fprintf( cargo->yyc, "\n" );

   return 5;
}
genc.c2118
STATIC HB_GENC_FUNC(hb_p_localinc )
static HB_GENC_FUNC( hb_p_localinc )
{
   fprintf( cargo->yyc, "\tHB_P_LOCALINC, %i, %i,", pFunc->pCode[ lPCodePos + 1 ],
                                                    pFunc->pCode[ lPCodePos + 2 ] );

   if( cargo->bVerbose )
   {
      int iVar = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );

   return 3;
}
genc.c2136
STATIC HB_GENC_FUNC(hb_p_localdec )
static HB_GENC_FUNC( hb_p_localdec )
{
   fprintf( cargo->yyc, "\tHB_P_LOCALDEC, %i, %i,", pFunc->pCode[ lPCodePos + 1 ],
                                                    pFunc->pCode[ lPCodePos + 2 ] );

   if( cargo->bVerbose )
   {
      int iVar = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );

   return 3;
}
genc.c2151
STATIC HB_GENC_FUNC(hb_p_localincpush )
static HB_GENC_FUNC( hb_p_localincpush )
{
   fprintf( cargo->yyc, "\tHB_P_LOCALINCPUSH, %i, %i,", pFunc->pCode[ lPCodePos + 1 ],
                                                    pFunc->pCode[ lPCodePos + 2 ] );

   if( cargo->bVerbose )
   {
      int iVar = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
      hb_compGenCLocalName( pFunc, iVar, lPCodePos, cargo );
   }
   fprintf( cargo->yyc, "\n" );

   return 3;
}
genc.c2166
STATIC HB_GENC_FUNC(hb_p_pluseqpop )
static HB_GENC_FUNC( hb_p_pluseqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PLUSEQPOP,\n" );
   return 1;
}
genc.c2181
STATIC HB_GENC_FUNC(hb_p_minuseqpop )
static HB_GENC_FUNC( hb_p_minuseqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MINUSEQPOP,\n" );
   return 1;
}
genc.c2190
STATIC HB_GENC_FUNC(hb_p_multeqpop )
static HB_GENC_FUNC( hb_p_multeqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MULTEQPOP,\n" );
   return 1;
}
genc.c2199
STATIC HB_GENC_FUNC(hb_p_diveqpop )
static HB_GENC_FUNC( hb_p_diveqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DIVEQPOP,\n" );
   return 1;
}
genc.c2208
STATIC HB_GENC_FUNC(hb_p_modeqpop )
static HB_GENC_FUNC( hb_p_modeqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MODEQPOP,\n" );
   return 1;
}
genc.c2217
STATIC HB_GENC_FUNC(hb_p_expeqpop )
static HB_GENC_FUNC( hb_p_expeqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_EXPEQPOP,\n" );
   return 1;
}
genc.c2226
STATIC HB_GENC_FUNC(hb_p_inceqpop )
static HB_GENC_FUNC( hb_p_inceqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_INCEQPOP,\n" );
   return 1;
}
genc.c2235
STATIC HB_GENC_FUNC(hb_p_deceqpop )
static HB_GENC_FUNC( hb_p_deceqpop )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DECEQPOP,\n" );
   return 1;
}
genc.c2244
STATIC HB_GENC_FUNC(hb_p_pluseq )
static HB_GENC_FUNC( hb_p_pluseq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PLUSEQ,\n" );
   return 1;
}
genc.c2253
STATIC HB_GENC_FUNC(hb_p_minuseq )
static HB_GENC_FUNC( hb_p_minuseq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MINUSEQ,\n" );
   return 1;
}
genc.c2262
STATIC HB_GENC_FUNC(hb_p_multeq )
static HB_GENC_FUNC( hb_p_multeq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MULTEQ,\n" );
   return 1;
}
genc.c2271
STATIC HB_GENC_FUNC(hb_p_diveq )
static HB_GENC_FUNC( hb_p_diveq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DIVEQ,\n" );
   return 1;
}
genc.c2280
STATIC HB_GENC_FUNC(hb_p_modeq )
static HB_GENC_FUNC( hb_p_modeq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_MODEQ,\n" );
   return 1;
}
genc.c2289
STATIC HB_GENC_FUNC(hb_p_expeq )
static HB_GENC_FUNC( hb_p_expeq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_EXPEQ,\n" );
   return 1;
}
genc.c2298
STATIC HB_GENC_FUNC(hb_p_inceq )
static HB_GENC_FUNC( hb_p_inceq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_INCEQ,\n" );
   return 1;
}
genc.c2307
STATIC HB_GENC_FUNC(hb_p_deceq )
static HB_GENC_FUNC( hb_p_deceq )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_DECEQ,\n" );
   return 1;
}
genc.c2316
STATIC HB_GENC_FUNC(hb_p_withobjectstart )
static HB_GENC_FUNC( hb_p_withobjectstart )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_WITHOBJECTSTART,\n" );
   return 1;
}
genc.c2325
STATIC HB_GENC_FUNC(hb_p_withobjectmessage )
static HB_GENC_FUNC( hb_p_withobjectmessage )
{
   fprintf( cargo->yyc, "\tHB_P_WITHOBJECTMESSAGE, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* %s */", hb_compSymbolName( cargo->HB_COMP_PARAM, HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ) );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c2334
STATIC HB_GENC_FUNC(hb_p_withobjectend )
static HB_GENC_FUNC( hb_p_withobjectend )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_WITHOBJECTEND,\n" );
   return 1;
}
genc.c2344
STATIC HB_GENC_FUNC(hb_p_vframe )
static HB_GENC_FUNC( hb_p_vframe )
{
   fprintf( cargo->yyc, "\tHB_P_VFRAME, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* locals, params */" );
   fprintf( cargo->yyc, "\n" );
   return 3;
}
genc.c2353
STATIC HB_GENC_FUNC(hb_p_largeframe )
static HB_GENC_FUNC( hb_p_largeframe )
{
   fprintf( cargo->yyc, "\tHB_P_LARGEFRAME, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* locals, params */" );
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c2363
STATIC HB_GENC_FUNC(hb_p_largevframe )
static HB_GENC_FUNC( hb_p_largevframe )
{
   fprintf( cargo->yyc, "\tHB_P_LARGEVFRAME, %i, %i, %i,",
            pFunc->pCode[ lPCodePos + 1 ],
            pFunc->pCode[ lPCodePos + 2 ],
            pFunc->pCode[ lPCodePos + 3 ] );
   if( cargo->bVerbose ) fprintf( cargo->yyc, "\t/* locals, params */" );
   fprintf( cargo->yyc, "\n" );
   return 4;
}
genc.c2374
STATIC HB_GENC_FUNC(hb_p_pushvparams )
static HB_GENC_FUNC( hb_p_pushvparams )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   fprintf( cargo->yyc, "\tHB_P_PUSHVPARAMS,\n" );
   return 1;
}

/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const HB_GENC_FUNC_PTR s_verbose_table[] = {
   hb_p_and,
   hb_p_arraypush,
   hb_p_arraypop,
   hb_p_arraydim,
   hb_p_arraygen,
   hb_p_equal,
   hb_p_endblock,
   hb_p_endproc,
   hb_p_exactlyequal,
   hb_p_false,
   hb_p_fortest,
   hb_p_function,
   hb_p_functionshort,
   hb_p_frame,
   hb_p_funcptr,
   hb_p_greater,
   hb_p_greaterequal,
   hb_p_dec,
   hb_p_divide,
   hb_p_do,
   hb_p_doshort,
   hb_p_duplicate,
   hb_p_dupltwo,
   hb_p_inc,
   hb_p_instring,
   hb_p_jumpnear,
   hb_p_jump,
   hb_p_jumpfar,
   hb_p_jumpfalsenear,
   hb_p_jumpfalse,
   hb_p_jumpfalsefar,
   hb_p_jumptruenear,
   hb_p_jumptrue,
   hb_p_jumptruefar,
   hb_p_lessequal,
   hb_p_less,
   hb_p_line,
   hb_p_localname,
   hb_p_macropop,
   hb_p_macropopaliased,
   hb_p_macropush,
   hb_p_macroarraygen,
   hb_p_macropushlist,
   hb_p_macropushindex,
   hb_p_macropushpare,
   hb_p_macropushaliased,
   hb_p_macrosymbol,
   hb_p_macrotext,
   hb_p_message,
   hb_p_minus,
   hb_p_modulus,
   hb_p_modulename,
   /* start: pcodes generated by macro compiler */
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   /* end: */
   hb_p_mult,
   hb_p_negate,
   hb_p_noop,
   hb_p_not,
   hb_p_notequal,
   hb_p_or,
   hb_p_parameter,
   hb_p_plus,
   hb_p_pop,
   hb_p_popalias,
   hb_p_popaliasedfield,
   hb_p_popaliasedfieldnear,
   hb_p_popaliasedvar,
   hb_p_popfield,
   hb_p_poplocal,
   hb_p_poplocalnear,
   hb_p_popmemvar,
   hb_p_popstatic,
   hb_p_popvariable,
   hb_p_power,
   hb_p_pushalias,
   hb_p_pushaliasedfield,
   hb_p_pushaliasedfieldnear,
   hb_p_pushaliasedvar,
   hb_p_pushblock,
   hb_p_pushblockshort,
   hb_p_pushfield,
   hb_p_pushbyte,
   hb_p_pushint,
   hb_p_pushlocal,
   hb_p_pushlocalnear,
   hb_p_pushlocalref,
   hb_p_pushlong,
   hb_p_pushmemvar,
   hb_p_pushmemvarref,
   hb_p_pushnil,
   hb_p_pushdouble,
   hb_p_pushself,
   hb_p_pushstatic,
   hb_p_pushstaticref,
   hb_p_pushstr,
   hb_p_pushstrshort,
   hb_p_pushsym,
   hb_p_pushsymnear,
   hb_p_pushvariable,
   hb_p_retvalue,
   hb_p_send,
   hb_p_sendshort,
   hb_p_seqbegin,
   hb_p_seqend,
   hb_p_seqrecover,
   hb_p_sframe,
   hb_p_statics,
   hb_p_staticname,
   hb_p_swapalias,
   hb_p_true,
   hb_p_zero,
   hb_p_one,
   hb_p_macrofunc,
   hb_p_macrodo,
   /* start: more pcodes generated by macro compiler */
   hb_p_dummy,
   /* end: */
   hb_p_localnearaddint,
   hb_p_macropushref,
   hb_p_pushlonglong,
   hb_p_enumstart,
   hb_p_enumnext,
   hb_p_enumprev,
   hb_p_enumend,
   hb_p_switch,
   hb_p_pushdate,
   /* optimalization of inlined math operations (+=, -= */
   hb_p_pluseqpop,
   hb_p_minuseqpop,
   hb_p_multeqpop,
   hb_p_diveqpop,
   hb_p_pluseq,
   hb_p_minuseq,
   hb_p_multeq,
   hb_p_diveq,
   hb_p_withobjectstart,
   hb_p_withobjectmessage,
   hb_p_withobjectend,
   hb_p_macrosend,
   hb_p_pushovarref,
   hb_p_arraypushref,
   hb_p_vframe,
   hb_p_largeframe,
   hb_p_largevframe,
   hb_p_pushstrhidden,
   hb_p_localaddint,
   hb_p_modeqpop,
   hb_p_expeqpop,
   hb_p_modeq,
   hb_p_expeq,
   hb_p_duplunref,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_pushblocklarge,
   hb_p_pushstrlarge,
   hb_p_swap,
   hb_p_pushvparams,
   hb_p_pushunref,
   hb_p_seqalways,
   hb_p_alwaysbegin,
   hb_p_alwaysend,
   hb_p_deceqpop,
   hb_p_inceqpop,
   hb_p_deceq,
   hb_p_inceq,
   hb_p_localdec,
   hb_p_localinc,
   hb_p_localincpush,
   hb_p_pushfuncsym,
   hb_p_hashgen,
   hb_p_seqblock,
   hb_p_threadstatics
};
genc.c2385
STATIC VOIDhb_compGenCReadable( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc )
static void hb_compGenCReadable( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc )
{
   const HB_GENC_FUNC_PTR * pFuncTable = s_verbose_table;
   HB_GENC_INFO genc_info;

   /* Make sure that table is correct */
   assert( HB_P_LAST_PCODE == sizeof( s_verbose_table ) / sizeof( HB_GENC_FUNC_PTR ) );

   genc_info.HB_COMP_PARAM = HB_COMP_PARAM;
   genc_info.ulEndBlockPos = 0;
   genc_info.bVerbose = ( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_VERBOSE );
   genc_info.yyc = yyc;

   fprintf( yyc, "{\n   static const BYTE pcode[] =\n   {\n" );
   hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) &genc_info );

   if( genc_info.bVerbose )
      fprintf( yyc, "/* %05li */\n", pFunc->lPCodePos );
   fprintf( yyc, "   };\n\n" );
   fprintf( yyc, "   hb_vmExecute( pcode, symbols );\n}\n" );
}
genc.c2585
STATIC VOIDhb_compGenCCompact( PFUNCTION pFunc, FILE * yyc )
static void hb_compGenCCompact( PFUNCTION pFunc, FILE * yyc )
{
   ULONG lPCodePos = 0;
   int nChar;

   fprintf( yyc, "{\n\tstatic const BYTE pcode[] =\n\t{\n\t\t" );

   nChar = 0;
   while( lPCodePos < pFunc->lPCodePos )
   {
      ++nChar;

      if( nChar > 1 )
         fprintf( yyc, "," );

      if( nChar == 15 )
      {
         fprintf( yyc, "\n\t\t" );
         nChar = 1;
      }

      /* Displaying as decimal is more compact than hex */
      fprintf( yyc, "%d", ( int ) pFunc->pCode[ lPCodePos++ ] );
   }

   if( nChar != 0)
      fprintf( yyc, "\n" );

   fprintf( yyc, "\t};\n\n" );
   fprintf( yyc, "\thb_vmExecute( pcode, symbols );\n}\n" );
}
genc.c2607
gencc.c
TypeFunctionSourceLine
\ } WHILE( 0 ) VOIDhb_compGenCString( FILE * yyc, BYTE * pText, ULONG ulLen )
void hb_compGenCString( FILE * yyc, BYTE * pText, ULONG ulLen )
{
   ULONG ulPos;

   fputc( '"', yyc );
   for( ulPos = 0; ulPos < ulLen; ulPos++ )
   {
      BYTE uchr = ( BYTE ) pText[ ulPos ];
      /*
       * NOTE: After optimization some CHR(n) can be converted
       *       into a string containing nonprintable characters.
       *
       * TODO: add switch to use hexadecimal format "%#04x"
       *
       * ? is escaped to avoid conflicts with trigraph sequences which
       * are part of ANSI C standard
       */
      if( uchr == '"' || uchr == '\\' || uchr == '?' )
         fprintf( yyc, "\\%c", uchr );
      else if( uchr < ( BYTE ) ' ' || uchr >= 127 )
         fprintf( yyc, "\\%03o", uchr );
      else
         fprintf( yyc, "%c", uchr );
   }
   fputc( '"', yyc );
}
gencc.c49
STATIC VOIDhb_gencc_copyLocals( FILE * yyc, int iLocal1, int iLocal2 )
static void hb_gencc_copyLocals( FILE * yyc, int iLocal1, int iLocal2 )
{
   if( iLocal1 != iLocal2 )
      fprintf( yyc, "\thb_xvmCopyLocals( %d, %d );\n", iLocal1, iLocal2 );
}
gencc.c76
STATIC INThb_gencc_checkJumpCondAhead( LONG lValue, PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo, const char * szFunc )
static int hb_gencc_checkJumpCondAhead( LONG lValue, PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo,
                                        const char * szFunc )
{
   if( HB_GENC_GETLABEL( lPCodePos + 1 ) == 0 )
   {
      LONG lOffset = 0;
      BOOL fNot = FALSE;
      int iSize = 0;

      switch( pFunc->pCode[ lPCodePos + 1 ] )
      {
         case HB_P_JUMPFALSENEAR:
            lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 2 ] );
            fNot = TRUE;
            iSize = 3;
            break;

         case HB_P_JUMPFALSE:
            lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 2 ] );
            fNot = TRUE;
            iSize = 4;
            break;

         case HB_P_JUMPFALSEFAR:
            lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 2 ] );
            fNot = TRUE;
            iSize = 5;
            break;

         case HB_P_JUMPTRUENEAR:
            lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 2 ] );
            iSize = 3;
            break;

         case HB_P_JUMPTRUE:
            lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 2 ] );
            iSize = 4;
            break;

         case HB_P_JUMPTRUEFAR:
            lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 2 ] );
            iSize = 5;
            break;
      }

      if( iSize )
      {
         fprintf( cargo->yyc, "\tif( hb_xvm%sIntIs( %ld, &fValue ) ) break;\n",
                  szFunc, lValue );
         fprintf( cargo->yyc, "\tif( %sfValue )\n\t\tgoto lab%05ld;\n",
                  fNot ? "!" : "", HB_GENC_GETLABEL( lPCodePos + 1 + lOffset ) );
         return iSize;
      }
   }
   fprintf( cargo->yyc, "\tif( hb_xvm%sInt( %ld ) ) break;\n",
            szFunc, lValue );
   return 1;
}
gencc.c82
STATIC INThb_gencc_checkNumAhead( LONG lValue, PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo )
static int hb_gencc_checkNumAhead( LONG lValue, PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo )
{
   if( HB_GENC_GETLABEL( lPCodePos ) == 0 )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_POPLOCAL:
            fprintf( cargo->yyc, "\thb_xvmLocalSetInt( %d, %ld );\n",
                     HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
                     lValue );
            return 3;

         case HB_P_POPLOCALNEAR:
            fprintf( cargo->yyc, "\thb_xvmLocalSetInt( %d, %ld );\n",
                     ( signed char ) pFunc->pCode[ lPCodePos + 1 ], lValue );
            return 2;

         case HB_P_EQUAL:
         case HB_P_EXACTLYEQUAL:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "Equal" );

         case HB_P_NOTEQUAL:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "NotEqual" );

         case HB_P_GREATER:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "GreaterThen" );

         case HB_P_GREATEREQUAL:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "GreaterEqualThen" );

         case HB_P_LESS:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "LessThen" );

         case HB_P_LESSEQUAL:
            return hb_gencc_checkJumpCondAhead( lValue, pFunc, lPCodePos, cargo, "LessEqualThen" );

         case HB_P_ARRAYPUSH:
            if( lValue > 0 )
            {
               fprintf( cargo->yyc, "\tif( hb_xvmArrayItemPush( %ld ) ) break;\n", lValue );
               return 1;
            }
            break;

         case HB_P_ARRAYPOP:
            if( lValue > 0 )
            {
               fprintf( cargo->yyc, "\tif( hb_xvmArrayItemPop( %ld ) ) break;\n", lValue );
               return 1;
            }
            break;

         case HB_P_MULT:
            fprintf( cargo->yyc, "\tif( hb_xvmMultByInt( %ld ) ) break;\n", lValue );
            return 1;

         case HB_P_DIVIDE:
            fprintf( cargo->yyc, "\tif( hb_xvmDivideByInt( %ld ) ) break;\n", lValue );
            return 1;

         case HB_P_MINUS:
            if( lValue > 0 )
            {
               fprintf( cargo->yyc, "\tif( hb_xvmAddInt( -%ld ) ) break;\n", lValue );
               return 1;
            }
            lValue = -lValue;
            /* no break */

         case HB_P_PLUS:
            fprintf( cargo->yyc, "\tif( hb_xvmAddInt( %ld ) ) break;\n", lValue );
            return 1;
      }
   }
   return 0;
}
gencc.c141
STATIC INThb_gencc_checkPlusAhead( PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo )
static int hb_gencc_checkPlusAhead( PFUNCTION pFunc, ULONG lPCodePos, PHB_LABEL_INFO cargo )
{
   if( HB_GENC_GETLABEL( lPCodePos ) == 0 )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_POPLOCALNEAR:
            fprintf( cargo->yyc, "\thb_xvmLocalAdd( %d );\n",
                     ( signed char ) pFunc->pCode[ lPCodePos + 1 ] );
            return 2;

         case HB_P_POPLOCAL:
            fprintf( cargo->yyc, "\thb_xvmLocalAdd( %d );\n",
                     HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
            return 3;

         case HB_P_POPSTATIC:
            fprintf( cargo->yyc, "\thb_xvmStaticAdd( %hu );\n",
                     HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
            return 3;

         case HB_P_POPMEMVAR:
            fprintf( cargo->yyc, "\thb_xvmMemvarAdd( symbols + %hu );\n",
                     HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
            return 3;
      }
   }
   return 0;
}
gencc.c218
STATIC HB_GENC_FUNC(hb_p_and )
static HB_GENC_FUNC( hb_p_and )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmAnd() ) break;\n" );
   return 1;
}
gencc.c248
STATIC HB_GENC_FUNC(hb_p_arraypush )
static HB_GENC_FUNC( hb_p_arraypush )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmArrayPush() ) break;\n" );
   return 1;
}
gencc.c256
STATIC HB_GENC_FUNC(hb_p_arraypushref )
static HB_GENC_FUNC( hb_p_arraypushref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmArrayPushRef() ) break;\n" );
   return 1;
}
gencc.c264
STATIC HB_GENC_FUNC(hb_p_arraypop )
static HB_GENC_FUNC( hb_p_arraypop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmArrayPop() ) break;\n" );
   return 1;
}
gencc.c272
STATIC HB_GENC_FUNC(hb_p_dec )
static HB_GENC_FUNC( hb_p_dec )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDec() ) break;\n" );
   return 1;
}
gencc.c280
STATIC HB_GENC_FUNC(hb_p_arraydim )
static HB_GENC_FUNC( hb_p_arraydim )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmArrayDim( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c288
STATIC HB_GENC_FUNC(hb_p_divide )
static HB_GENC_FUNC( hb_p_divide )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDivide() ) break;\n" );
   return 1;
}
gencc.c297
STATIC HB_GENC_FUNC(hb_p_do )
static HB_GENC_FUNC( hb_p_do )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDo( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c305
STATIC HB_GENC_FUNC(hb_p_doshort )
static HB_GENC_FUNC( hb_p_doshort )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDo( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c314
STATIC HB_GENC_FUNC(hb_p_duplicate )
static HB_GENC_FUNC( hb_p_duplicate )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmDuplicate();\n" );
   return 1;
}
gencc.c323
STATIC HB_GENC_FUNC(hb_p_duplunref )
static HB_GENC_FUNC( hb_p_duplunref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmDuplUnRef();\n" );
   return 1;
}
gencc.c331
STATIC HB_GENC_FUNC(hb_p_dupltwo )
static HB_GENC_FUNC( hb_p_dupltwo )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmDuplTwo();\n" );
   return 1;
}
gencc.c339
STATIC HB_GENC_FUNC(hb_p_pushunref )
static HB_GENC_FUNC( hb_p_pushunref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushUnRef();\n" );
   return 1;
}
gencc.c347
STATIC HB_GENC_FUNC(hb_p_swap )
static HB_GENC_FUNC( hb_p_swap )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmSwap(%d);\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c355
STATIC HB_GENC_FUNC(hb_p_equal )
static HB_GENC_FUNC( hb_p_equal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmEqual() ) break;\n" );
   return 1;
}
gencc.c363
STATIC HB_GENC_FUNC(hb_p_exactlyequal )
static HB_GENC_FUNC( hb_p_exactlyequal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmExactlyEqual() ) break;\n" );
   return 1;
}
gencc.c371
STATIC HB_GENC_FUNC(hb_p_endblock )
static HB_GENC_FUNC( hb_p_endblock )
{
   HB_GENC_LABEL();

   HB_GENC_ERROR( "HB_P_ENDBLOCK" );
   return 1;
}
gencc.c379
STATIC HB_GENC_FUNC(hb_p_endproc )
static HB_GENC_FUNC( hb_p_endproc )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\t/* *** END PROC *** */\n" );
   if( lPCodePos < pFunc->lPCodePos - 1 )
   {
      if( cargo->iNestedBlock )
         fprintf( cargo->yyc, "\thb_xvmEndProc();\n" );
      fprintf( cargo->yyc, "\tbreak;\n" );
   }
   return 1;
}
gencc.c387
STATIC HB_GENC_FUNC(hb_p_false )
static HB_GENC_FUNC( hb_p_false )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushLogical( FALSE );\n" );
   return 1;
}
gencc.c401
STATIC HB_GENC_FUNC(hb_p_fortest )
static HB_GENC_FUNC( hb_p_fortest )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmForTest() ) break;\n" );
   return 1;
}
gencc.c409
STATIC HB_GENC_FUNC(hb_p_frame )
static HB_GENC_FUNC( hb_p_frame )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmFrame( %hu, %hu );\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
gencc.c417
STATIC HB_GENC_FUNC(hb_p_funcptr )
static HB_GENC_FUNC( hb_p_funcptr )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmFuncPtr();\n" );
   return 1;
}
gencc.c426
STATIC HB_GENC_FUNC(hb_p_function )
static HB_GENC_FUNC( hb_p_function )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmFunction( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c434
STATIC HB_GENC_FUNC(hb_p_functionshort )
static HB_GENC_FUNC( hb_p_functionshort )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmFunction( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c443
STATIC HB_GENC_FUNC(hb_p_arraygen )
static HB_GENC_FUNC( hb_p_arraygen )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmArrayGen( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c452
STATIC HB_GENC_FUNC(hb_p_hashgen )
static HB_GENC_FUNC( hb_p_hashgen )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmHashGen( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c461
STATIC HB_GENC_FUNC(hb_p_greater )
static HB_GENC_FUNC( hb_p_greater )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmGreater() ) break;\n" );
   return 1;
}
gencc.c470
STATIC HB_GENC_FUNC(hb_p_greaterequal )
static HB_GENC_FUNC( hb_p_greaterequal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmGreaterEqual() ) break;\n" );
   return 1;
}
gencc.c478
STATIC HB_GENC_FUNC(hb_p_inc )
static HB_GENC_FUNC( hb_p_inc )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmInc() ) break;\n" );
   return 1;
}
gencc.c486
STATIC HB_GENC_FUNC(hb_p_instring )
static HB_GENC_FUNC( hb_p_instring )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmInstring() ) break;\n" );
   return 1;
}
gencc.c494
STATIC HB_GENC_FUNC(hb_p_jumpnear )
static HB_GENC_FUNC( hb_p_jumpnear )
{
   LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 2;
}
gencc.c502
STATIC HB_GENC_FUNC(hb_p_jump )
static HB_GENC_FUNC( hb_p_jump )
{
   LONG lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 3;
}
gencc.c513
STATIC HB_GENC_FUNC(hb_p_jumpfar )
static HB_GENC_FUNC( hb_p_jumpfar )
{
   LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 4;
}
gencc.c524
STATIC HB_GENC_FUNC(hb_p_jumpfalsenear )
static HB_GENC_FUNC( hb_p_jumpfalsenear )
{
   LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( !fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 2;
}
gencc.c535
STATIC HB_GENC_FUNC(hb_p_jumpfalse )
static HB_GENC_FUNC( hb_p_jumpfalse )
{
   LONG lOffset = HB_PCODE_MKSHORT( &( pFunc->pCode[ lPCodePos + 1 ] ) );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( !fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 3;
}
gencc.c546
STATIC HB_GENC_FUNC(hb_p_jumpfalsefar )
static HB_GENC_FUNC( hb_p_jumpfalsefar )
{
   LONG lOffset = HB_PCODE_MKINT24( &( pFunc->pCode[ lPCodePos + 1 ] ) );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( !fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 4;
}
gencc.c557
STATIC HB_GENC_FUNC(hb_p_jumptruenear )
static HB_GENC_FUNC( hb_p_jumptruenear )
{
   LONG lOffset = ( signed char ) ( pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 2;
}
gencc.c568
STATIC HB_GENC_FUNC(hb_p_jumptrue )
static HB_GENC_FUNC( hb_p_jumptrue )
{
   LONG lOffset = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 3;
}
gencc.c579
STATIC HB_GENC_FUNC(hb_p_jumptruefar )
static HB_GENC_FUNC( hb_p_jumptruefar )
{
   LONG lOffset = HB_PCODE_MKINT24( &( pFunc->pCode[ lPCodePos + 1 ] ) );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopLogical( &fValue ) ) break;\n\tif( fValue )\n\t\tgoto lab%05ld;\n",
            HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   return 4;
}
gencc.c590
STATIC HB_GENC_FUNC(hb_p_less )
static HB_GENC_FUNC( hb_p_less )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLess() ) break;\n" );
   return 1;
}
gencc.c601
STATIC HB_GENC_FUNC(hb_p_lessequal )
static HB_GENC_FUNC( hb_p_lessequal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLessEqual() ) break;\n" );
   return 1;
}
gencc.c609
STATIC HB_GENC_FUNC(hb_p_line )
static HB_GENC_FUNC( hb_p_line )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmSetLine( %d );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c617
STATIC HB_GENC_FUNC(hb_p_localname )
static HB_GENC_FUNC( hb_p_localname )
{
   USHORT usLen;

   HB_GENC_LABEL();

   usLen = strlen( ( char * ) &pFunc->pCode[ lPCodePos + 3 ] );
   fprintf( cargo->yyc, "\thb_xvmLocalName( %hu, ",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 3 ], usLen );
   fprintf( cargo->yyc, " );\n" );
   return usLen + 4;
}
gencc.c626
STATIC HB_GENC_FUNC(hb_p_macropop )
static HB_GENC_FUNC( hb_p_macropop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPop( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c640
STATIC HB_GENC_FUNC(hb_p_macropopaliased )
static HB_GENC_FUNC( hb_p_macropopaliased )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPopAliased( %d ) ) break;\n", pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c649
STATIC HB_GENC_FUNC(hb_p_macropush )
static HB_GENC_FUNC( hb_p_macropush )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPush( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c657
STATIC HB_GENC_FUNC(hb_p_macropushref )
static HB_GENC_FUNC( hb_p_macropushref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPushRef() ) break;\n" );
   return 1;
}
gencc.c666
STATIC HB_GENC_FUNC(hb_p_macrodo )
static HB_GENC_FUNC( hb_p_macrodo )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroDo( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c674
STATIC HB_GENC_FUNC(hb_p_macrofunc )
static HB_GENC_FUNC( hb_p_macrofunc )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroFunc( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c683
STATIC HB_GENC_FUNC(hb_p_macrosend )
static HB_GENC_FUNC( hb_p_macrosend )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroSend( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c692
STATIC HB_GENC_FUNC(hb_p_macroarraygen )
static HB_GENC_FUNC( hb_p_macroarraygen )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroArrayGen( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c701
STATIC HB_GENC_FUNC(hb_p_macropushlist )
static HB_GENC_FUNC( hb_p_macropushlist )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPushList( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c710
STATIC HB_GENC_FUNC(hb_p_macropushindex )
static HB_GENC_FUNC( hb_p_macropushindex )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPushIndex() ) break;\n" );
   return 1;
}
gencc.c719
STATIC HB_GENC_FUNC(hb_p_macropushpare )
static HB_GENC_FUNC( hb_p_macropushpare )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPushPare( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c727
STATIC HB_GENC_FUNC(hb_p_macropushaliased )
static HB_GENC_FUNC( hb_p_macropushaliased )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroPushAliased( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c736
STATIC HB_GENC_FUNC(hb_p_macrosymbol )
static HB_GENC_FUNC( hb_p_macrosymbol )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroSymbol() ) break;\n" );
   return 1;
}
gencc.c745
STATIC HB_GENC_FUNC(hb_p_macrotext )
static HB_GENC_FUNC( hb_p_macrotext )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMacroText() ) break;\n" );
   return 1;
}
gencc.c753
STATIC HB_GENC_FUNC(hb_p_message )
static HB_GENC_FUNC( hb_p_message )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushSymbol( symbols + %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c761
STATIC HB_GENC_FUNC(hb_p_minus )
static HB_GENC_FUNC( hb_p_minus )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMinus() ) break;\n" );
   return 1;
}
gencc.c770
STATIC HB_GENC_FUNC(hb_p_modulename )
static HB_GENC_FUNC( hb_p_modulename )
{
   USHORT usLen;

   HB_GENC_LABEL();

   usLen = strlen( ( char * ) &pFunc->pCode[ lPCodePos + 1 ] );
   fprintf( cargo->yyc, "\thb_xvmModuleName( " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 1 ], usLen );
   fprintf( cargo->yyc, " );\n" );
   return usLen + 2;
}
gencc.c778
STATIC HB_GENC_FUNC(hb_p_modulus )
static HB_GENC_FUNC( hb_p_modulus )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmModulus() ) break;\n" );
   return 1;
}
gencc.c791
STATIC HB_GENC_FUNC(hb_p_mult )
static HB_GENC_FUNC( hb_p_mult )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMult() ) break;\n" );
   return 1;
}
gencc.c799
STATIC HB_GENC_FUNC(hb_p_negate )
static HB_GENC_FUNC( hb_p_negate )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmNegate() ) break;\n" );
   return 1;
}
gencc.c807
STATIC HB_GENC_FUNC(hb_p_not )
static HB_GENC_FUNC( hb_p_not )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmNot() ) break;\n" );
   return 1;
}
gencc.c815
STATIC HB_GENC_FUNC(hb_p_notequal )
static HB_GENC_FUNC( hb_p_notequal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmNotEqual() ) break;\n" );
   return 1;
}
gencc.c823
STATIC HB_GENC_FUNC(hb_p_or )
static HB_GENC_FUNC( hb_p_or )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmOr() ) break;\n" );
   return 1;
}
gencc.c831
STATIC HB_GENC_FUNC(hb_p_parameter )
static HB_GENC_FUNC( hb_p_parameter )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmParameter( symbols + %hu, %d );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
            pFunc->pCode[ lPCodePos + 3 ] );
   return 4;
}
gencc.c839
STATIC HB_GENC_FUNC(hb_p_plus )
static HB_GENC_FUNC( hb_p_plus )
{
   int iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkPlusAhead( pFunc, lPCodePos + 1, cargo );

   if( iSkip != 0 )
      return 1 + iSkip;

   fprintf( cargo->yyc, "\tif( hb_xvmPlus() ) break;\n" );
   return 1;
}
gencc.c849
STATIC HB_GENC_FUNC(hb_p_pop )
static HB_GENC_FUNC( hb_p_pop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_stackPop();\n" );
   return 1;
}
gencc.c864
STATIC HB_GENC_FUNC(hb_p_popalias )
static HB_GENC_FUNC( hb_p_popalias )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopAlias() ) break;\n" );
   return 1;
}
gencc.c872
STATIC HB_GENC_FUNC(hb_p_popaliasedfield )
static HB_GENC_FUNC( hb_p_popaliasedfield )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopAliasedField( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c880
STATIC HB_GENC_FUNC(hb_p_popaliasedfieldnear )
static HB_GENC_FUNC( hb_p_popaliasedfieldnear )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopAliasedField( symbols + %hu ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c889
STATIC HB_GENC_FUNC(hb_p_popaliasedvar )
static HB_GENC_FUNC( hb_p_popaliasedvar )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopAliasedVar( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c898
STATIC HB_GENC_FUNC(hb_p_popfield )
static HB_GENC_FUNC( hb_p_popfield )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopField( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c907
STATIC HB_GENC_FUNC(hb_p_poplocal )
static HB_GENC_FUNC( hb_p_poplocal )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPopLocal( %hd );\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c916
STATIC HB_GENC_FUNC(hb_p_poplocalnear )
static HB_GENC_FUNC( hb_p_poplocalnear )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPopLocal( %d );\n",
            ( signed char ) pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c925
STATIC HB_GENC_FUNC(hb_p_popmemvar )
static HB_GENC_FUNC( hb_p_popmemvar )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopMemvar( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c934
STATIC HB_GENC_FUNC(hb_p_popstatic )
static HB_GENC_FUNC( hb_p_popstatic )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPopStatic( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c943
STATIC HB_GENC_FUNC(hb_p_popvariable )
static HB_GENC_FUNC( hb_p_popvariable )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPopVariable( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c952
STATIC HB_GENC_FUNC(hb_p_power )
static HB_GENC_FUNC( hb_p_power )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPower() ) break;\n" );
   return 1;
}
gencc.c961
STATIC HB_GENC_FUNC(hb_p_pushalias )
static HB_GENC_FUNC( hb_p_pushalias )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushAlias() ) break;\n" );
   return 1;
}
gencc.c969
STATIC HB_GENC_FUNC(hb_p_pushaliasedfield )
static HB_GENC_FUNC( hb_p_pushaliasedfield )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushAliasedField( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c977
STATIC HB_GENC_FUNC(hb_p_pushaliasedfieldnear )
static HB_GENC_FUNC( hb_p_pushaliasedfieldnear )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushAliasedField( symbols + %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c986
STATIC HB_GENC_FUNC(hb_p_pushaliasedvar )
static HB_GENC_FUNC( hb_p_pushaliasedvar )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushAliasedVar( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c995
STATIC HB_GENC_FUNC(hb_p_pushblockshort )
static HB_GENC_FUNC( hb_p_pushblockshort )
{
   USHORT usSize, us;

   HB_GENC_LABEL();

   usSize = pFunc->pCode[ lPCodePos + 1 ] - 2;
   lPCodePos += 2;

   fprintf( cargo->yyc, "\t{\n\t\tstatic const BYTE codeblock[ %hd ] = {", usSize );

   for( us = 0; us < usSize; ++us )
   {
      if( ( us & 0x0f ) == 0 )
         fprintf( cargo->yyc, "\n\t\t\t" );
      if( us == usSize - 1 )
         fprintf( cargo->yyc, "%d", pFunc->pCode[ lPCodePos + us ] );
      else
         fprintf( cargo->yyc, "%d, ", pFunc->pCode[ lPCodePos + us ] );
   }
   fprintf( cargo->yyc, " };\n\t\thb_xvmPushBlockShort( codeblock, symbols );\n\t}\n" );

   return 2 + usSize;
}
gencc.c1004
STATIC HB_GENC_FUNC(hb_p_pushblock )
static HB_GENC_FUNC( hb_p_pushblock )
{
   USHORT usSize, us;

   HB_GENC_LABEL();

   usSize = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) - 3;
   lPCodePos += 3;

   fprintf( cargo->yyc, "\t{\n\t\tstatic const BYTE codeblock[ %hd ] = {", usSize );

   for( us = 0; us < usSize; ++us )
   {
      if( ( us & 0x0f ) == 0 )
         fprintf( cargo->yyc, "\n\t\t\t" );
      if( us == usSize - 1 )
         fprintf( cargo->yyc, "%d", pFunc->pCode[ lPCodePos + us ] );
      else
         fprintf( cargo->yyc, "%d, ", pFunc->pCode[ lPCodePos + us ] );
   }
   fprintf( cargo->yyc, " };\n\t\thb_xvmPushBlock( codeblock, symbols );\n\t}\n" );

   return 3 + usSize;
}
gencc.c1029
STATIC HB_GENC_FUNC(hb_p_pushblocklarge )
static HB_GENC_FUNC( hb_p_pushblocklarge )
{
   ULONG ulSize, ul;

   HB_GENC_LABEL();

   ulSize = HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] ) - 4;
   lPCodePos += 4;

   fprintf( cargo->yyc, "\t{\n\t\tstatic const BYTE codeblock[ %lu ] = {", ulSize );

   for( ul = 0; ul < ulSize; ++ul )
   {
      if( ( ul & 0x0f ) == 0 )
         fprintf( cargo->yyc, "\n\t\t\t" );
      if( ul == ulSize - 1 )
         fprintf( cargo->yyc, "%d", pFunc->pCode[ lPCodePos + ul ] );
      else
         fprintf( cargo->yyc, "%d, ", pFunc->pCode[ lPCodePos + ul ] );
   }
   fprintf( cargo->yyc, " };\n\t\thb_xvmPushBlock( codeblock, symbols );\n\t}\n" );

   return 4 + ulSize;
}
gencc.c1054
STATIC HB_GENC_FUNC(hb_p_pushdouble )
static HB_GENC_FUNC( hb_p_pushdouble )
{
   HB_GENC_LABEL();

#if 0
   fprintf( cargo->yyc, "\thb_xvmPushDouble( %.*f, %d, %d );\n",
            pFunc->pCode[ lPCodePos + 1 + sizeof( double ) + sizeof( BYTE ) ] + 1,
            HB_PCODE_MKDOUBLE( &pFunc->pCode[ lPCodePos + 1 ] ),
            pFunc->pCode[ lPCodePos + 1 + sizeof( double ) ],
            pFunc->pCode[ lPCodePos + 1 + sizeof( double ) + sizeof( BYTE ) ] );
#else
   /*
    * This version keeps double calculation compatible with RT FL functions
    */
   fprintf( cargo->yyc, "\thb_xvmPushDouble( * ( double * ) " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 1 ], sizeof( double ) );
   fprintf( cargo->yyc, ", %d, %d );\n",
            pFunc->pCode[ lPCodePos + 1 + sizeof( double ) ],
            pFunc->pCode[ lPCodePos + 1 + sizeof( double ) + sizeof( BYTE ) ] );
#endif
   return sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ) + 1;
}
gencc.c1079
STATIC HB_GENC_FUNC(hb_p_pushfield )
static HB_GENC_FUNC( hb_p_pushfield )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushField( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1102
STATIC HB_GENC_FUNC(hb_p_pushbyte )
static HB_GENC_FUNC( hb_p_pushbyte )
{
   int iVal = ( signed char ) pFunc->pCode[ lPCodePos + 1 ], iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( iVal, pFunc, lPCodePos + 2, cargo );

   if( iSkip == 0 )
      fprintf( cargo->yyc, "\thb_xvmPushInteger( %d );\n", iVal );
   return 2 + iSkip;
}
gencc.c1111
STATIC HB_GENC_FUNC(hb_p_pushint )
static HB_GENC_FUNC( hb_p_pushint )
{
   int iVal = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( iVal, pFunc, lPCodePos + 3, cargo );

   if( iSkip == 0 )
      fprintf( cargo->yyc, "\thb_xvmPushInteger( %d );\n", iVal );
   return 3 + iSkip;
}
gencc.c1124
STATIC HB_GENC_FUNC(hb_p_pushlocal )
static HB_GENC_FUNC( hb_p_pushlocal )
{
   HB_GENC_LABEL();

   if( HB_GENC_GETLABEL( lPCodePos + 3 ) == 0 )
   {
      switch( pFunc->pCode[ lPCodePos + 3 ] )
      {
         case HB_P_POPLOCALNEAR:
            hb_gencc_copyLocals( cargo->yyc,
                        HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
                        ( signed char ) pFunc->pCode[ lPCodePos + 4 ] );
            return 5;

         case HB_P_POPLOCAL:
            hb_gencc_copyLocals( cargo->yyc,
                        HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
                        HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 4 ] ) );
            return 6;
      }
   }

   fprintf( cargo->yyc, "\thb_xvmPushLocal( %d );\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1137
STATIC HB_GENC_FUNC(hb_p_pushlocalnear )
static HB_GENC_FUNC( hb_p_pushlocalnear )
{
   HB_GENC_LABEL();

   if( HB_GENC_GETLABEL( lPCodePos + 2 ) == 0 )
   {
      switch( pFunc->pCode[ lPCodePos + 2 ] )
      {
         case HB_P_POPLOCALNEAR:
            hb_gencc_copyLocals( cargo->yyc,
                        ( signed char ) pFunc->pCode[ lPCodePos + 1 ],
                        ( signed char ) pFunc->pCode[ lPCodePos + 3 ] );
            return 4;

         case HB_P_POPLOCAL:
            hb_gencc_copyLocals( cargo->yyc,
                        ( signed char ) pFunc->pCode[ lPCodePos + 1 ],
                        HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) );
            return 5;
      }
   }

   fprintf( cargo->yyc, "\thb_xvmPushLocal( %d );\n",
            ( signed char ) pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c1164
STATIC HB_GENC_FUNC(hb_p_pushlocalref )
static HB_GENC_FUNC( hb_p_pushlocalref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushLocalByRef( %d );\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1191
STATIC HB_GENC_FUNC(hb_p_pushlong )
static HB_GENC_FUNC( hb_p_pushlong )
{
   LONG lVal = HB_PCODE_MKLONG( &pFunc->pCode[ lPCodePos + 1 ] ), iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( lVal, pFunc, lPCodePos + 5, cargo );

   if( iSkip == 0 )
   {
#if HB_INT_MAX >= INT32_MAX
      fprintf( cargo->yyc, "\thb_xvmPushInteger( %d );\n", ( int ) lVal );
#else
      fprintf( cargo->yyc, "\thb_xvmPushLong( %ldL );\n", ( long ) lVal );
#endif
   }
   return 5 + iSkip;
}
gencc.c1200
STATIC HB_GENC_FUNC(hb_p_pushlonglong )
static HB_GENC_FUNC( hb_p_pushlonglong )
{
#ifdef HB_LONG_LONG_OFF
   HB_GENC_LABEL();
   fprintf( cargo->yyc, "\thb_xvmPushLongLong( %.1f );\n", HB_PCODE_MKLONGLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 9;
#elif LONG_MAX == LONGLONG_MAX
   LONGLONG llVal = HB_PCODE_MKLONGLONG( &pFunc->pCode[ lPCodePos + 1 ] ), iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( llVal, pFunc, lPCodePos + 9, cargo );

   if( iSkip == 0 )
   {
      fprintf( cargo->yyc, "\thb_xvmPushLong( %ldL );\n", ( long ) llVal );
   }
   return 9 + iSkip;
#else
   HB_GENC_LABEL();
   fprintf( cargo->yyc, "\thb_xvmPushLongLong( HB_LL( %" PFLL "i ) );\n", HB_PCODE_MKLONGLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 9;
#endif
}
gencc.c1219
STATIC HB_GENC_FUNC(hb_p_pushmemvar )
static HB_GENC_FUNC( hb_p_pushmemvar )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushMemvar( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1244
STATIC HB_GENC_FUNC(hb_p_pushmemvarref )
static HB_GENC_FUNC( hb_p_pushmemvarref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushMemvarByRef( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1253
STATIC HB_GENC_FUNC(hb_p_pushnil )
static HB_GENC_FUNC( hb_p_pushnil )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushNil();\n" );
   return 1;
}
gencc.c1262
STATIC HB_GENC_FUNC(hb_p_pushself )
static HB_GENC_FUNC( hb_p_pushself )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushSelf();\n" );
   return 1;
}
gencc.c1270
STATIC HB_GENC_FUNC(hb_p_pushstatic )
static HB_GENC_FUNC( hb_p_pushstatic )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStatic( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1278
STATIC HB_GENC_FUNC(hb_p_pushstaticref )
static HB_GENC_FUNC( hb_p_pushstaticref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStaticByRef( %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1287
STATIC HB_GENC_FUNC(hb_p_pushstrshort )
static HB_GENC_FUNC( hb_p_pushstrshort )
{
   USHORT usLen = pFunc->pCode[ lPCodePos + 1 ] - 1;

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStringConst( " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 2 ], usLen );
   fprintf( cargo->yyc, ", %hu );\n", usLen );

   return 3 + usLen;
}
gencc.c1296
STATIC HB_GENC_FUNC(hb_p_pushstr )
static HB_GENC_FUNC( hb_p_pushstr )
{
   USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) - 1;

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStringConst( " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 3 ], usLen );
   fprintf( cargo->yyc, ", %hu );\n", usLen );

   return 4 + usLen;
}
gencc.c1309
STATIC HB_GENC_FUNC(hb_p_pushstrlarge )
static HB_GENC_FUNC( hb_p_pushstrlarge )
{
   ULONG ulLen = HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] ) - 1;

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStringConst( " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], ulLen );
   fprintf( cargo->yyc, ", %lu );\n", ulLen );

   return 5 + ulLen;
}
gencc.c1322
STATIC HB_GENC_FUNC(hb_p_pushstrhidden )
static HB_GENC_FUNC( hb_p_pushstrhidden )
{
   USHORT usLen = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] );

   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushStringHidden( " );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], usLen );
   fprintf( cargo->yyc, ", %hu );\n", usLen );

   return 4 + usLen;
}
gencc.c1335
STATIC HB_GENC_FUNC(hb_p_pushsym )
static HB_GENC_FUNC( hb_p_pushsym )
{
   HB_GENC_LABEL();

   if( HB_GENC_GETLABEL( lPCodePos + 3 ) == 0 &&
       pFunc->pCode[ lPCodePos + 3 ] == HB_P_PUSHNIL &&
       HB_GENC_GETLABEL( lPCodePos + 3 ) == 0 )
   {
      fprintf( cargo->yyc, "\thb_xvmPushFuncSymbol( symbols + %hu );\n",
               HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
      return 4;
   }

   fprintf( cargo->yyc, "\thb_xvmPushSymbol( symbols + %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1348
STATIC HB_GENC_FUNC(hb_p_pushsymnear )
static HB_GENC_FUNC( hb_p_pushsymnear )
{
   HB_GENC_LABEL();

   if( HB_GENC_GETLABEL( lPCodePos + 2 ) == 0 &&
       pFunc->pCode[ lPCodePos + 2 ] == HB_P_PUSHNIL &&
       HB_GENC_GETLABEL( lPCodePos + 2 ) == 0 )
   {
      fprintf( cargo->yyc, "\thb_xvmPushFuncSymbol( symbols + %hu );\n",
               pFunc->pCode[ lPCodePos + 1 ] );
      return 3;
   }

   fprintf( cargo->yyc, "\thb_xvmPushSymbol( symbols + %d );\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c1366
STATIC HB_GENC_FUNC(hb_p_pushfuncsym )
static HB_GENC_FUNC( hb_p_pushfuncsym )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushFuncSymbol( symbols + %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1384
STATIC HB_GENC_FUNC(hb_p_pushvariable )
static HB_GENC_FUNC( hb_p_pushvariable )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushVariable( symbols + %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1393
STATIC HB_GENC_FUNC(hb_p_retvalue )
static HB_GENC_FUNC( hb_p_retvalue )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmRetValue();\n" );
   return 1;
}
gencc.c1402
STATIC HB_GENC_FUNC(hb_p_send )
static HB_GENC_FUNC( hb_p_send )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmSend( %hu ) ) break;\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1410
STATIC HB_GENC_FUNC(hb_p_sendshort )
static HB_GENC_FUNC( hb_p_sendshort )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmSend( %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ] );
   return 2;
}
gencc.c1419
STATIC HB_GENC_FUNC(hb_p_pushovarref )
static HB_GENC_FUNC( hb_p_pushovarref )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPushObjectVarRef() ) break;\n" );
   return 1;
}
gencc.c1428
STATIC HB_GENC_FUNC(hb_p_seqalways )
static HB_GENC_FUNC( hb_p_seqalways )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmSeqAlways();\n\tdo {\n" );
   cargo->iNestedBlock++;
   return 4;
}
gencc.c1436
STATIC HB_GENC_FUNC(hb_p_alwaysbegin )
static HB_GENC_FUNC( hb_p_alwaysbegin )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\t} while( 0 );\n\tif( hb_xvmAlwaysBegin() ) break;\n\tdo {\n" );
   return 4;
}
gencc.c1445
STATIC HB_GENC_FUNC(hb_p_alwaysend )
static HB_GENC_FUNC( hb_p_alwaysend )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\t} while( 0 );\n\tif( hb_xvmAlwaysEnd() ) break;\n" );
   cargo->iNestedBlock--;
   return 1;
}
gencc.c1453
STATIC HB_GENC_FUNC(hb_p_seqblock )
static HB_GENC_FUNC( hb_p_seqblock )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmSeqBlock() ) break;\n" );
   return 1;
}
gencc.c1462
STATIC HB_GENC_FUNC(hb_p_seqbegin )
static HB_GENC_FUNC( hb_p_seqbegin )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmSeqBegin();\n\tdo {\n" );
   cargo->iNestedBlock++;
   return 4;
}
gencc.c1470
STATIC HB_GENC_FUNC(hb_p_seqend )
static HB_GENC_FUNC( hb_p_seqend )
{
   LONG lOffset = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );

   HB_GENC_LABEL();

   if( lOffset == 4 ) /* no RECOVER clasue */
      fprintf( cargo->yyc, "\t} while( 0 );\n\tif( hb_xvmSeqEnd() ) break;\n" );
   else /* RECOVER exists */
      fprintf( cargo->yyc, "\tif( hb_xvmSeqEndTest() ) break;\n\tgoto lab%05ld;\n\t} while( 0 );\n",
               HB_GENC_GETLABEL( lPCodePos + lOffset ) );
   cargo->iNestedBlock--;
   return 4;
}
gencc.c1479
STATIC HB_GENC_FUNC(hb_p_seqrecover )
static HB_GENC_FUNC( hb_p_seqrecover )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmSeqRecover() ) break;\n" );
   return 1;
}
gencc.c1494
STATIC HB_GENC_FUNC(hb_p_sframe )
static HB_GENC_FUNC( hb_p_sframe )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmSFrame( symbols + %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1502
STATIC HB_GENC_FUNC(hb_p_statics )
static HB_GENC_FUNC( hb_p_statics )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmStatics( symbols + %hu, %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) );
   return 5;
}
gencc.c1511
STATIC HB_GENC_FUNC(hb_p_staticname )
static HB_GENC_FUNC( hb_p_staticname )
{
   USHORT usLen;

   HB_GENC_LABEL();

   usLen = strlen( ( char * ) &pFunc->pCode[ lPCodePos + 4 ] );
   fprintf( cargo->yyc, "\thb_xvmStaticName( %hu, %hu, ",
            ( USHORT ) pFunc->pCode[ lPCodePos + 1 ],
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] ) );
   hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 4 ], usLen );
   fprintf( cargo->yyc, " );\n" );
   return usLen + 5;
}
gencc.c1521
STATIC HB_GENC_FUNC(hb_p_threadstatics )
static HB_GENC_FUNC( hb_p_threadstatics )
{
   USHORT w;
   ULONG ulSize, ul;

   HB_GENC_LABEL();

   w = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
   ulSize = ( ULONG ) w << 1;

   fprintf( cargo->yyc, "\t{\n\t\tstatic const BYTE statics[ %lu ] = {", ulSize );

   for( ul = 0; ul < ulSize; ++ul )
   {
      if( ( ul & 0x0f ) == 0 )
         fprintf( cargo->yyc, "\n\t\t\t" );
      if( ul == ulSize - 1 )
         fprintf( cargo->yyc, "%d", pFunc->pCode[ lPCodePos + ul ] );
      else
         fprintf( cargo->yyc, "%d, ", pFunc->pCode[ lPCodePos + ul ] );
   }
   fprintf( cargo->yyc, " };\n\t\thb_xvmThreadStatics( %hu, statics );\n\t}\n", w );

   return 3 + ulSize;
}
gencc.c1536
STATIC HB_GENC_FUNC(hb_p_swapalias )
static HB_GENC_FUNC( hb_p_swapalias )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmSwapAlias() ) break;\n" );
   return 1;
}
gencc.c1562
STATIC HB_GENC_FUNC(hb_p_true )
static HB_GENC_FUNC( hb_p_true )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushLogical( TRUE );\n" );
   return 1;
}
gencc.c1570
STATIC HB_GENC_FUNC(hb_p_one )
static HB_GENC_FUNC( hb_p_one )
{
   int iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( 1, pFunc, lPCodePos + 1, cargo );
   if( iSkip == 0 )
      fprintf( cargo->yyc, "\thb_xvmPushInteger( 1 );\n" );
   return 1 + iSkip;
}
gencc.c1578
STATIC HB_GENC_FUNC(hb_p_zero )
static HB_GENC_FUNC( hb_p_zero )
{
   int iSkip;

   HB_GENC_LABEL();

   iSkip = hb_gencc_checkNumAhead( 0, pFunc, lPCodePos + 1, cargo );
   if( iSkip == 0 )
      fprintf( cargo->yyc, "\thb_xvmPushInteger( 0 );\n" );
   return 1 + iSkip;
}
gencc.c1590
STATIC HB_GENC_FUNC(hb_p_noop )
static HB_GENC_FUNC( hb_p_noop )
{
   HB_GENC_LABEL();

   return 1;
}
gencc.c1602
STATIC HB_GENC_FUNC(hb_p_dummy )
static HB_GENC_FUNC( hb_p_dummy )
{
   HB_SYMBOL_UNUSED( cargo );
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   return 1;
}
gencc.c1609
STATIC HB_GENC_FUNC(hb_p_enumstart )
static HB_GENC_FUNC( hb_p_enumstart )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmEnumStart( %d, %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
gencc.c1617
STATIC HB_GENC_FUNC(hb_p_enumnext )
static HB_GENC_FUNC( hb_p_enumnext )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmEnumNext() ) break;\n" );
   return 1;
}
gencc.c1626
STATIC HB_GENC_FUNC(hb_p_enumprev )
static HB_GENC_FUNC( hb_p_enumprev )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmEnumPrev() ) break;\n" );
   return 1;
}
gencc.c1634
STATIC HB_GENC_FUNC(hb_p_enumend )
static HB_GENC_FUNC( hb_p_enumend )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmEnumEnd();\n" );
   return 1;
}
gencc.c1642
STATIC HB_GENC_FUNC(hb_p_switch )
static HB_GENC_FUNC( hb_p_switch )
{
   USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us;
   ULONG ulStart = lPCodePos, ulNewPos;
   BOOL fNum = FALSE, fStr = FALSE;

   HB_GENC_LABEL();

   lPCodePos += 3;
   for( us = 0; us < usCases; ++us )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_PUSHLONG:
            fNum = TRUE;
            lPCodePos += 5;
            break;
         case HB_P_PUSHSTRSHORT:
            fStr = TRUE;
            lPCodePos += 2 + pFunc->pCode[ lPCodePos + 1 ];
            break;
         case HB_P_PUSHNIL:
            /* default clause */
            lPCodePos++;
            break;
      }
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_JUMPNEAR:
            ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
            lPCodePos += 2;
            break;
         case HB_P_JUMP:
            ulNewPos = lPCodePos + HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 3;
            break;
         /*case HB_P_JUMPFAR:*/
         default:
            ulNewPos = lPCodePos + HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 4;
            break;
      }
   }

   if( fStr || fNum )
   {
      fprintf( cargo->yyc, "\t{\n\t\tPHB_ITEM pSwitch = hb_stackItemFromTop( -1 );\n"
                           "\t\tHB_TYPE type = hb_itemType( pSwitch );\n" );
      if( fStr )
      {
         fprintf( cargo->yyc, "\t\tchar * pszText = (type & HB_IT_STRING) ? hb_itemGetCPtr( pSwitch ) : NULL;\n" );
         fprintf( cargo->yyc, "\t\tULONG ulLen = pszText ? hb_itemGetCLen( pSwitch ) : 0;\n" );
      }
      if( fNum )
         fprintf( cargo->yyc, "\t\tlong lVal = (type & HB_IT_NUMINT) ? hb_itemGetNL( pSwitch ) : 0;\n\n" );
   }

   lPCodePos = ulStart + 3;
   for( us = 0; us < usCases; ++us )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_PUSHLONG:
            fprintf( cargo->yyc, "\t\tif( (type & HB_IT_NUMINT) != 0 && lVal == %ldL )\n",
                     HB_PCODE_MKLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
            lPCodePos += 5;
            break;
         case HB_P_PUSHSTRSHORT:
            fprintf( cargo->yyc, "\t\tif( pszText && ulLen == %d && !memcmp( pszText, ",
                     pFunc->pCode[ lPCodePos + 1 ] - 1 );
            hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 2 ],
                               pFunc->pCode[ lPCodePos + 1 ] - 1 );
            fprintf( cargo->yyc, ", %d ) )\n", pFunc->pCode[ lPCodePos + 1 ] - 1 );
            lPCodePos += 2 + pFunc->pCode[ lPCodePos + 1 ];
            break;
         case HB_P_PUSHNIL:
            /* default clause */
            lPCodePos++;
            break;
      }
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_JUMPNEAR:
            ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
            lPCodePos += 2;
            break;
         case HB_P_JUMP:
            ulNewPos = lPCodePos + HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 3;
            break;
         /*case HB_P_JUMPFAR:*/
         default:
            ulNewPos = lPCodePos + HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 4;
            break;
      }
      fprintf( cargo->yyc, "\t\t{\n\t\t\thb_stackPop();\n\t\t\tgoto lab%05ld;\n\t\t}\n",
               HB_GENC_GETLABEL( ulNewPos ) );
   }
   if( fStr || fNum )
      fprintf( cargo->yyc, "\t}\n" );

   return lPCodePos - ulStart;
}
gencc.c1650
STATIC HB_GENC_FUNC(hb_p_pushdate )
static HB_GENC_FUNC( hb_p_pushdate )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushDate( %ldL );\n",
            ( long ) HB_PCODE_MKLONG( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 5;
}
gencc.c1755
STATIC HB_GENC_FUNC(hb_p_localnearaddint )
static HB_GENC_FUNC( hb_p_localnearaddint )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLocalAddInt( %d, %d ) ) break;\n",
            pFunc->pCode[ lPCodePos + 1 ],
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 2 ] ) );
   return 4;
}
gencc.c1764
STATIC HB_GENC_FUNC(hb_p_localaddint )
static HB_GENC_FUNC( hb_p_localaddint )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLocalAddInt( %d, %d ) ) break;\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) );
   return 5;
}
gencc.c1774
STATIC HB_GENC_FUNC(hb_p_localinc )
static HB_GENC_FUNC( hb_p_localinc )
{
   int iLocal = HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
   HB_GENC_LABEL();

   if( HB_GENC_GETLABEL( lPCodePos + 3 ) == 0 &&
       ( ( pFunc->pCode[ lPCodePos + 3 ] == HB_P_PUSHLOCAL &&
           iLocal == HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 4 ] ) ) ||
         ( pFunc->pCode[ lPCodePos + 3 ] == HB_P_PUSHLOCALNEAR &&
           iLocal == pFunc->pCode[ lPCodePos + 4 ] ) ) )
   {
      fprintf( cargo->yyc, "\tif( hb_xvmLocalIncPush( %d ) ) break;\n", iLocal );
      return ( pFunc->pCode[ lPCodePos + 3 ] == HB_P_PUSHLOCAL ) ? 6 : 5;
   }

   fprintf( cargo->yyc, "\tif( hb_xvmLocalInc( %d ) ) break;\n", iLocal );
   return 3;
}
gencc.c1784
STATIC HB_GENC_FUNC(hb_p_localdec )
static HB_GENC_FUNC( hb_p_localdec )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLocalDec( %d ) ) break;\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );
   return 3;
}
gencc.c1803
STATIC HB_GENC_FUNC(hb_p_localincpush )
static HB_GENC_FUNC( hb_p_localincpush )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmLocalIncPush( %d ) ) break;\n",
            HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) );

   return 3;
}
gencc.c1812
STATIC HB_GENC_FUNC(hb_p_pluseqpop )
static HB_GENC_FUNC( hb_p_pluseqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPlusEqPop() ) break;\n" );
   return 1;
}
gencc.c1822
STATIC HB_GENC_FUNC(hb_p_minuseqpop )
static HB_GENC_FUNC( hb_p_minuseqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMinusEqPop() ) break;\n" );
   return 1;
}
gencc.c1830
STATIC HB_GENC_FUNC(hb_p_multeqpop )
static HB_GENC_FUNC( hb_p_multeqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMultEqPop() ) break;\n" );
   return 1;
}
gencc.c1838
STATIC HB_GENC_FUNC(hb_p_diveqpop )
static HB_GENC_FUNC( hb_p_diveqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDivEqPop() ) break;\n" );
   return 1;
}
gencc.c1846
STATIC HB_GENC_FUNC(hb_p_modeqpop )
static HB_GENC_FUNC( hb_p_modeqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmModEqPop() ) break;\n" );
   return 1;
}
gencc.c1854
STATIC HB_GENC_FUNC(hb_p_expeqpop )
static HB_GENC_FUNC( hb_p_expeqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmExpEqPop() ) break;\n" );
   return 1;
}
gencc.c1862
STATIC HB_GENC_FUNC(hb_p_deceqpop )
static HB_GENC_FUNC( hb_p_deceqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDecEqPop() ) break;\n" );
   return 1;
}
gencc.c1870
STATIC HB_GENC_FUNC(hb_p_inceqpop )
static HB_GENC_FUNC( hb_p_inceqpop )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmIncEqPop() ) break;\n" );
   return 1;
}
gencc.c1878
STATIC HB_GENC_FUNC(hb_p_pluseq )
static HB_GENC_FUNC( hb_p_pluseq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmPlusEq() ) break;\n" );
   return 1;
}
gencc.c1886
STATIC HB_GENC_FUNC(hb_p_minuseq )
static HB_GENC_FUNC( hb_p_minuseq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMinusEq() ) break;\n" );
   return 1;
}
gencc.c1894
STATIC HB_GENC_FUNC(hb_p_multeq )
static HB_GENC_FUNC( hb_p_multeq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmMultEq() ) break;\n" );
   return 1;
}
gencc.c1902
STATIC HB_GENC_FUNC(hb_p_diveq )
static HB_GENC_FUNC( hb_p_diveq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDivEq() ) break;\n" );
   return 1;
}
gencc.c1910
STATIC HB_GENC_FUNC(hb_p_modeq )
static HB_GENC_FUNC( hb_p_modeq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmModEq() ) break;\n" );
   return 1;
}
gencc.c1918
STATIC HB_GENC_FUNC(hb_p_expeq )
static HB_GENC_FUNC( hb_p_expeq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmExpEq() ) break;\n" );
   return 1;
}
gencc.c1926
STATIC HB_GENC_FUNC(hb_p_deceq )
static HB_GENC_FUNC( hb_p_deceq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmDecEq() ) break;\n" );
   return 1;
}
gencc.c1934
STATIC HB_GENC_FUNC(hb_p_inceq )
static HB_GENC_FUNC( hb_p_inceq )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\tif( hb_xvmIncEq() ) break;\n" );
   return 1;
}
gencc.c1942
STATIC HB_GENC_FUNC(hb_p_withobjectstart )
static HB_GENC_FUNC( hb_p_withobjectstart )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmWithObjectStart();\n" );
   return 1;
}
gencc.c1950
STATIC HB_GENC_FUNC(hb_p_withobjectend )
static HB_GENC_FUNC( hb_p_withobjectend )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmWithObjectEnd();\n" );
   return 1;
}
gencc.c1958
STATIC HB_GENC_FUNC(hb_p_withobjectmessage )
static HB_GENC_FUNC( hb_p_withobjectmessage )
{
   USHORT usSym = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
   HB_GENC_LABEL();

   if( usSym == 0xFFFF )
      fprintf( cargo->yyc, "\thb_xvmWithObjectMessage( NULL );\n" );
   else
      fprintf( cargo->yyc, "\thb_xvmWithObjectMessage( symbols + %hu );\n",
               usSym );

   return 3;
}
gencc.c1966
STATIC HB_GENC_FUNC(hb_p_vframe )
static HB_GENC_FUNC( hb_p_vframe )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmVFrame( %hu, %hu );\n",
            pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] );
   return 3;
}
gencc.c1980
STATIC HB_GENC_FUNC(hb_p_largeframe )
static HB_GENC_FUNC( hb_p_largeframe )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmFrame( %hu, %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
            pFunc->pCode[ lPCodePos + 3 ] );
   return 4;
}
gencc.c1989
STATIC HB_GENC_FUNC(hb_p_largevframe )
static HB_GENC_FUNC( hb_p_largevframe )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmVFrame( %hu, %hu );\n",
            HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ),
            pFunc->pCode[ lPCodePos + 3 ] );
   return 4;
}
gencc.c1999
STATIC HB_GENC_FUNC(hb_p_pushvparams )
static HB_GENC_FUNC( hb_p_pushvparams )
{
   HB_GENC_LABEL();

   fprintf( cargo->yyc, "\thb_xvmPushVParams();\n" );
   return 1;
}


/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const HB_GENC_FUNC_PTR s_verbose_table[] = {
   hb_p_and,
   hb_p_arraypush,
   hb_p_arraypop,
   hb_p_arraydim,
   hb_p_arraygen,
   hb_p_equal,
   hb_p_endblock,
   hb_p_endproc,
   hb_p_exactlyequal,
   hb_p_false,
   hb_p_fortest,
   hb_p_function,
   hb_p_functionshort,
   hb_p_frame,
   hb_p_funcptr,
   hb_p_greater,
   hb_p_greaterequal,
   hb_p_dec,
   hb_p_divide,
   hb_p_do,
   hb_p_doshort,
   hb_p_duplicate,
   hb_p_dupltwo,
   hb_p_inc,
   hb_p_instring,
   hb_p_jumpnear,
   hb_p_jump,
   hb_p_jumpfar,
   hb_p_jumpfalsenear,
   hb_p_jumpfalse,
   hb_p_jumpfalsefar,
   hb_p_jumptruenear,
   hb_p_jumptrue,
   hb_p_jumptruefar,
   hb_p_lessequal,
   hb_p_less,
   hb_p_line,
   hb_p_localname,
   hb_p_macropop,
   hb_p_macropopaliased,
   hb_p_macropush,
   hb_p_macroarraygen,
   hb_p_macropushlist,
   hb_p_macropushindex,
   hb_p_macropushpare,
   hb_p_macropushaliased,
   hb_p_macrosymbol,
   hb_p_macrotext,
   hb_p_message,
   hb_p_minus,
   hb_p_modulus,
   hb_p_modulename,
   /* start: pcodes generated by macro compiler */
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_dummy,
   /* end: */
   hb_p_mult,
   hb_p_negate,
   hb_p_noop,
   hb_p_not,
   hb_p_notequal,
   hb_p_or,
   hb_p_parameter,
   hb_p_plus,
   hb_p_pop,
   hb_p_popalias,
   hb_p_popaliasedfield,
   hb_p_popaliasedfieldnear,
   hb_p_popaliasedvar,
   hb_p_popfield,
   hb_p_poplocal,
   hb_p_poplocalnear,
   hb_p_popmemvar,
   hb_p_popstatic,
   hb_p_popvariable,
   hb_p_power,
   hb_p_pushalias,
   hb_p_pushaliasedfield,
   hb_p_pushaliasedfieldnear,
   hb_p_pushaliasedvar,
   hb_p_pushblock,
   hb_p_pushblockshort,
   hb_p_pushfield,
   hb_p_pushbyte,
   hb_p_pushint,
   hb_p_pushlocal,
   hb_p_pushlocalnear,
   hb_p_pushlocalref,
   hb_p_pushlong,
   hb_p_pushmemvar,
   hb_p_pushmemvarref,
   hb_p_pushnil,
   hb_p_pushdouble,
   hb_p_pushself,
   hb_p_pushstatic,
   hb_p_pushstaticref,
   hb_p_pushstr,
   hb_p_pushstrshort,
   hb_p_pushsym,
   hb_p_pushsymnear,
   hb_p_pushvariable,
   hb_p_retvalue,
   hb_p_send,
   hb_p_sendshort,
   hb_p_seqbegin,
   hb_p_seqend,
   hb_p_seqrecover,
   hb_p_sframe,
   hb_p_statics,
   hb_p_staticname,
   hb_p_swapalias,
   hb_p_true,
   hb_p_zero,
   hb_p_one,
   hb_p_macrofunc,
   hb_p_macrodo,
   /* start: more pcodes generated by macro compiler */
   hb_p_dummy,
   /* end: */
   hb_p_localnearaddint,
   hb_p_macropushref,
   hb_p_pushlonglong,
   hb_p_enumstart,
   hb_p_enumnext,
   hb_p_enumprev,
   hb_p_enumend,
   hb_p_switch,
   hb_p_pushdate,
   /* optimalization of inlined math operations (+=, -= */
   hb_p_pluseqpop,
   hb_p_minuseqpop,
   hb_p_multeqpop,
   hb_p_diveqpop,
   hb_p_pluseq,
   hb_p_minuseq,
   hb_p_multeq,
   hb_p_diveq,
   hb_p_withobjectstart,
   hb_p_withobjectmessage,
   hb_p_withobjectend,
   hb_p_macrosend,
   hb_p_pushovarref,
   hb_p_arraypushref,
   hb_p_vframe,
   hb_p_largeframe,
   hb_p_largevframe,
   hb_p_pushstrhidden,
   hb_p_localaddint,
   hb_p_modeqpop,
   hb_p_expeqpop,
   hb_p_modeq,
   hb_p_expeq,
   hb_p_duplunref,
   hb_p_dummy,
   hb_p_dummy,
   hb_p_pushblocklarge,
   hb_p_pushstrlarge,
   hb_p_swap,
   hb_p_pushvparams,
   hb_p_pushunref,
   hb_p_seqalways,
   hb_p_alwaysbegin,
   hb_p_alwaysend,
   hb_p_deceqpop,
   hb_p_inceqpop,
   hb_p_deceq,
   hb_p_inceq,
   hb_p_localdec,
   hb_p_localinc,
   hb_p_localincpush,
   hb_p_pushfuncsym,
   hb_p_hashgen,
   hb_p_seqblock,
   hb_p_threadstatics
};
gencc.c2009
VOIDhb_compGenCRealCode( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc )
void hb_compGenCRealCode( HB_COMP_DECL, PFUNCTION pFunc, FILE * yyc )
{
   const HB_GENC_FUNC_PTR * pFuncTable = s_verbose_table;
   HB_LABEL_INFO label_info;

   /* Make sure that table is correct */
   assert( HB_P_LAST_PCODE == sizeof( s_verbose_table ) / sizeof( HB_GENC_FUNC_PTR ) );

   label_info.yyc = yyc;
   label_info.fVerbose = ( HB_COMP_PARAM->iGenCOutput == HB_COMPGENC_VERBOSE );
   label_info.fSetSeqBegin = FALSE;
   label_info.fCondJump = FALSE;
   label_info.iNestedBlock = 0;
   if( pFunc->lPCodePos == 0 )
      label_info.pulLabels = NULL;
   else
   {
      label_info.pulLabels = ( ULONG * ) hb_xgrab( pFunc->lPCodePos * sizeof( ULONG ) );
      memset( label_info.pulLabels, 0, pFunc->lPCodePos * sizeof( ULONG ) );
      hb_compGenLabelTable( pFunc, &label_info );
   }

   fprintf( yyc, "{\n" );
   if( label_info.fCondJump )
      fprintf( yyc, "   BOOL fValue;\n" );
   fprintf( yyc, "   do {\n" );

   hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) &label_info );

   fprintf( yyc, "   } while( 0 );\n" );
   fprintf( yyc, "   hb_xvmExitProc();\n" );
   fprintf( yyc, "}\n" );

   if( label_info.pulLabels )
      hb_xfree( label_info.pulLabels );
}
gencc.c2209
gencobj.c
TypeFunctionSourceLine
STATIC CHAR *hb_searchpath( const char * pszFile, char * pszEnv, char * pszCfg )
static char * hb_searchpath( const char * pszFile, char * pszEnv, char * pszCfg )
{
   char * pszPath;
   BOOL bFound = FALSE;

   /* Check current dir first  */
   if( hb_fsFileExists( ( const char * ) pszFile ) )
   {
      snprintf( pszCfg, _POSIX_PATH_MAX + 1, "%s", pszFile );
      return ( char * ) pszFile;
   }
   else
   {
      /* Check if pszFile exists somewhere in the path */
      while( * pszEnv )
      {
         pszPath = pszEnv;
         while( *pszEnv )
         {
            if( *pszEnv == HB_OS_PATH_LIST_SEP_CHR )
            {
               *pszEnv++ = '\0';
               break;
            }
            pszEnv++;
         }
         if( *pszPath )
         {
            snprintf( pszCfg, _POSIX_PATH_MAX + 1, "%s%c%s", pszPath, HB_OS_PATH_DELIM_CHR, pszFile );
            if( hb_fsFileExists( ( const char * ) pszCfg ) )
            {
               bFound = TRUE;
               break;
            }
         }
      }
   }

   /* If not found, make sure to return a NULL string */
   if( ! bFound )
      *pszCfg = '\0';

   return ( char * ) pszCfg;
}
gencobj.c45
STATIC VOIDhb_substenvvar( char * szLine )
static void hb_substenvvar( char * szLine )
{
   char szBuf[ HB_CFG_LINE_LEN + 1 ], * szVar, * ptr;

   ptr = szLine;
   while( *ptr )
   {
      if( *ptr == '$' && ptr[ 1 ] == '(' )
      {
         int i = 2, j;
         while( ( ptr[ i ] >= 'A' && ptr[ i ] <= 'Z' ) ||
                ( ptr[ i ] >= 'a' && ptr[ i ] <= 'z' ) ||
                ( ptr[ i ] >= '0' && ptr[ i ] <= '0' ) || ptr[ i ] == '_' )
            ++i;
         if( i > 2 && ptr[ i ] == ')' )
         {
            ptr[ 0 ] = 0;
            ptr[ i ] = 0;
            hb_strncpy( szBuf, szLine, sizeof( szBuf ) - 1 );
            szVar = hb_getenv( ptr + 2 );
            if( szVar )
            {
               hb_strncat( szBuf, szVar, sizeof( szBuf ) - 1 );
               hb_xfree( szVar );
            }
            j = strlen( szBuf );
            hb_strncat( szBuf, &ptr[ i + 1 ], sizeof( szBuf ) - 1 );
            hb_strncpy( szLine, szBuf, HB_CFG_LINE_LEN );
            ptr = szLine + j;
         }
      }
      ++ptr;
   }
}
gencobj.c90
VOIDhb_compGenCObj( HB_COMP_DECL, PHB_FNAME pFileName )
void hb_compGenCObj( HB_COMP_DECL, PHB_FNAME pFileName )
{
   char szFileName[ _POSIX_PATH_MAX + 1 ];
   char szLine[ HB_CFG_LINE_LEN + 1 ];
   char szCompiler[ HB_CFG_LINE_LEN + 1 ] = "";
   char szOptions[ HB_CFG_LINE_LEN + 1 ] = "";
   char szCommandLine[ HB_CFG_LINE_LEN * 2 + 1 ];
   char szOutPath[ _POSIX_PATH_MAX + 1 ] = "\0";
   char pszTemp[ _POSIX_PATH_MAX + 1 ] = "";
   char buffer[ HB_CFG_LINE_LEN * 2 + 1024 ];
#if defined( HB_OS_UNIX_COMPATIBLE )
   char * pszEnv = hb_strdup( "/etc:/usr/local/etc" );
#else
   char * pszEnv = hb_getenv( "PATH" );
#endif
   char * pszCfgFileName = hb_getenv( "HB_CFG_FILE" );
   FILE * filecfg;
   BOOL bVerbose = FALSE;   /* Don't show C compiler messages (default). */
   BOOL bDelTmp = TRUE;     /* Delete intermediate C file (default). */
   int iSuccess;

   HB_SYMBOL_UNUSED( HB_COMP_PARAM );

   /* First pass: build the C output */

   /* Force file extension to avoid collisions when called from a make utility */
   pFileName->szExtension = ".c";
   hb_fsFNameMerge( szFileName, pFileName );
   hb_compGenCCode( HB_COMP_PARAM, HB_COMP_PARAM->pFileName );

   /* Begin second pass */

   /* Set up things  */
   if( !pszCfgFileName )
      pszCfgFileName = hb_strdup( HB_CFG_FILENAME );

   if( pszEnv && *hb_searchpath( pszCfgFileName, pszEnv, pszTemp ) )
   {
      filecfg = hb_fopen( pszTemp, "rt" );
      if( ! filecfg )
      {
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OPEN_CFG, szFileName, NULL );
         if( pszEnv )
            hb_xfree( ( void * ) pszEnv );
         hb_xfree( ( void * ) pszCfgFileName );
         return;
      }

      while( fgets( szLine, HB_CFG_LINE_LEN, filecfg ) != NULL )
      {
         ULONG ulLen;
         char * szStr = szLine;
         char * szToken;

         hb_substenvvar( szLine );

         /* Trim left */
         while( HB_ISSPACE( *szStr ) )
            szStr++;

         /* Trim right */
         ulLen = strlen( szStr );
         while( ulLen && HB_ISSPACE( szStr[ ulLen - 1 ] ) )
            ulLen--;

         szStr[ ulLen ] = '\0';
         /* TODO: Check for comments within macros, i.e: CC=bcc32 #comment */

         if( *szStr )
         {
            szToken = strchr( szStr, '=' );
         
            if( szToken )
            {
               *szToken++ = '\0';
               if( *szToken )
               {
                  /* Checks compiler name */
                  if( ! hb_stricmp( szStr, "CC" ) )
                  {
                     snprintf( szCompiler, sizeof( szCompiler ), "%s", szToken );
                  }
                  /* Checks optional switches */
                  else if( ! hb_stricmp( szStr, "CFLAGS" ) )
                  {
                     snprintf( szOptions, sizeof( szCompiler ), "%s", szToken );
                  }
                  /* Wanna see C compiler output ? */
                  else if( ! hb_stricmp( szStr, "VERBOSE" ) )
                  {
                     if( ! hb_stricmp( szToken, "YES" ) )
                        bVerbose = TRUE;
                  }
                  /* Delete intermediate C file ? */
                  else if( ! hb_stricmp( szStr, "DELTMP" ) )
                  {
                     if( ! hb_stricmp( szToken, "NO" ) )
                        bDelTmp = FALSE;
                  }
               }
            }
         }
      }

      fclose( filecfg );

   } else {
      snprintf( buffer, sizeof( buffer ),
                "\nError: Can't find %s file in %s.\n"
                "%s should be a text file that contains:\n"
                "CC=C compiler binary name eg. CC=gcc\n"
                "CFLAGS=C compiler options eg. -c -I\n"
                "       ( 'compile only' and harbour include dir are mandatory )\n"
                "VERBOSE=NO|YES to show steps messages default is NO\n"
                "DELTMP=NO|YES to delete generated C source default is YES\n"
                "remember also to properly set the C compiler env.\n",
                pszCfgFileName, pszEnv, pszCfgFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );

      if( pszEnv )
         hb_xfree( ( void * ) pszEnv );
      hb_xfree( ( void * ) pszCfgFileName );
      return;
   }

   if( pszEnv )
      hb_xfree( ( void * ) pszEnv );

   if( ! HB_COMP_PARAM->fQuiet )
   {
      snprintf( buffer, sizeof( buffer ),
                "\nBuilding object module for \'%s\'\nusing C compiler \'%s\' as defined in \'%s\'...\n",
                szFileName, szCompiler, pszCfgFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }

   /* Check if -o was used */
   if( HB_COMP_PARAM->pOutPath )
   {
      PHB_FNAME pOut = hb_fsFNameSplit( ( char * ) szFileName );

      if( HB_COMP_PARAM->pOutPath->szPath )
         pOut->szPath = HB_COMP_PARAM->pOutPath->szPath;

#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__WATCOMC__)
      pOut->szExtension = ".obj";
#else
      pOut->szExtension = ".o";  /* Don't know if we can hardcode it for Un*x */
#endif
      hb_fsFNameMerge( pszTemp, pOut );

#if defined(_MSC_VER)
      hb_strncat( szOutPath, "-Fo", sizeof( szOutPath ) - 1 );
#elif defined(__WATCOMC__)
      hb_strncat( szOutPath, "-fo=", sizeof( szOutPath ) - 1 );      
#else
      hb_strncat( szOutPath, "-o", sizeof( szOutPath ) - 1 );
#endif

      hb_strncat( szOutPath, pszTemp, sizeof( szOutPath ) - 1 );

      hb_xfree( pOut );
   }

   if( *szCompiler )
   {
      snprintf( szCommandLine, sizeof( szCommandLine ), "%s %s %s %s", szCompiler, szOptions, szOutPath, szFileName );

      if( bVerbose )
      {
         snprintf( buffer, sizeof( buffer ), "Exec: %s\n", szCommandLine );
         hb_compOutStd( HB_COMP_PARAM, buffer );
      }
      else
         hb_strncat( szCommandLine, HB_NULL_STR, sizeof( szCommandLine ) - 1 );

      /* Compile it! */
      iSuccess = ( system( szCommandLine ) != -1 );

      /* Delete intermediate .c file */
      /* QUESTION: Leave this file if C compiler fails ? */
      if( bDelTmp ) /* && iSuccess ) */
      {
         if( bVerbose )
         {
            snprintf( buffer, sizeof( buffer ), "Deleting: \"%s\"\n", szFileName );
            hb_compOutStd( HB_COMP_PARAM, buffer );
         }
         remove( ( char * ) szFileName );
      }

      if( ! HB_COMP_PARAM->fQuiet )
      {
         if( iSuccess )
            hb_compOutStd( HB_COMP_PARAM, "Done.\n" );
         else
         {
            snprintf( buffer, sizeof( buffer ),
                      "\nFailed to execute: \"%s\"\n", szCommandLine );
            hb_compOutErr( HB_COMP_PARAM, buffer );
         }
      }
   }
   else
   {
      snprintf( buffer, sizeof( buffer ),
                "\nError: No compiler defined in %s\n", pszCfgFileName );
      hb_compOutErr( HB_COMP_PARAM, buffer );
   }

   hb_xfree( ( void * ) pszCfgFileName );
}
gencobj.c125
genhrb.c
TypeFunctionSourceLine
STATIC PFUNCTIONhb_compFirstFunc( HB_COMP_DECL )
static PFUNCTION hb_compFirstFunc( HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst;
   if( ! HB_COMP_PARAM->fStartProc )
      pFunc = pFunc->pNext;
   return pFunc;
}
genhrb.c39
STATIC ULONGhb_compHrbSize( HB_COMP_DECL, ULONG * pulSymbols, ULONG * pulFunctions )
static ULONG hb_compHrbSize( HB_COMP_DECL, ULONG * pulSymbols, ULONG * pulFunctions )
{
   PFUNCTION pFunc;
   PCOMSYMBOL pSym;
   ULONG ulSize;

   * pulSymbols = * pulFunctions = 0;

   /* count total size */
   ulSize = 10;  /* signature[4] + version[2] + symbols_number[4] */
   pSym = HB_COMP_PARAM->symbols.pFirst;
   while( pSym )
   {
      ( * pulSymbols )++;
      ulSize += strlen( pSym->szName ) + 3; /* \0 + symscope[1] + symtype[1] */
      pSym = pSym->pNext;
   }
   ulSize += 4; /* functions_number[4] */
   /* Generate functions data */
   pFunc = hb_compFirstFunc( HB_COMP_PARAM );
   while( pFunc )
   {
      ( * pulFunctions )++;
      ulSize += strlen( pFunc->szName ) + 5 + pFunc->lPCodePos; /* \0 + func_size[4] + function_body */
      pFunc = pFunc->pNext;
   }

   return ulSize;
}
genhrb.c47
VOIDhb_compGenBufPortObj( HB_COMP_DECL, BYTE ** pBufPtr, ULONG * pulSize )
void hb_compGenBufPortObj( HB_COMP_DECL, BYTE ** pBufPtr, ULONG * pulSize )
{
   PFUNCTION pFunc;
   PCOMSYMBOL pSym;
   ULONG ulSymbols, ulFunctions, ulLen;
   BYTE * ptr;

   * pulSize = hb_compHrbSize( HB_COMP_PARAM, &ulSymbols, &ulFunctions );
   /* additional 0 byte is for passing buffer directly as string item */
   ptr = * pBufPtr = ( BYTE * ) hb_xgrab( * pulSize + 1 );

   /* signature */
   *ptr++ = 0xC0;
   *ptr++ = 'H';
   *ptr++ = 'R';
   *ptr++ = 'B';
   HB_PUT_LE_UINT16( ptr, 2 );   /* version number */
   ptr += 2;

   HB_PUT_LE_UINT32( ptr, ulSymbols ); /* number of symbols */
   ptr += 4;
   /* generate the symbol table */
   pSym = HB_COMP_PARAM->symbols.pFirst;
   while( pSym )
   {
      ulLen = strlen( pSym->szName ) + 1;
      memcpy( ptr, pSym->szName, ulLen );
      ptr += ulLen;
      /* TOFIX: this conversion strips upper byte from symbol scope
       *        Now we added workaround for it by using some strict
       *        bit order and restoring some others at runtime when
       *        .hrb file is loaded but we should create new format
       *        for .hrb files in which this field will have at least
       *        16bit [druzus]
       */
      *ptr++ = ( BYTE ) pSym->cScope;
      /* symbol type */
      /* if( hb_compFunctionFind( HB_COMP_PARAM, pSym->szName ) ) */
      if( pSym->cScope & HB_FS_LOCAL )
         *ptr++ = SYM_FUNC;      /* function defined in this module */
      else if( pSym->cScope & HB_FS_DEFERRED )
         *ptr++ = SYM_DEFERRED;  /* lately bound function */
      else if( hb_compFunCallFind( HB_COMP_PARAM, pSym->szName ) )
         *ptr++ = SYM_EXTERN; /* external function */
      else
         *ptr++ = SYM_NOLINK; /* other symbol */
      pSym = pSym->pNext;
   }

   HB_PUT_LE_UINT32( ptr, ulFunctions );  /* number of functions */
   ptr += 4;
   /* generate functions data */
   pFunc = hb_compFirstFunc( HB_COMP_PARAM );
   while( pFunc )
   {
      ulLen = strlen( pFunc->szName ) + 1;
      memcpy( ptr, pFunc->szName, ulLen );
      ptr += ulLen;
      HB_PUT_LE_UINT32( ptr, pFunc->lPCodePos );      /* function size */
      ptr += 4;
      memcpy( ptr, pFunc->pCode, pFunc->lPCodePos );  /* function body */
      ptr += pFunc->lPCodePos;
      pFunc = pFunc->pNext;
   }
}
genhrb.c77
VOIDhb_compGenPortObj( HB_COMP_DECL, PHB_FNAME pFileName )
void hb_compGenPortObj( HB_COMP_DECL, PHB_FNAME pFileName )
{
   char szFileName[ _POSIX_PATH_MAX + 1 ];
   ULONG ulSize;
   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 + _POSIX_PATH_MAX ];
      snprintf( buffer, sizeof( buffer ),
                "Generating Harbour Portable Object source output to \'%s\'... ", szFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }

   hb_compGenBufPortObj( HB_COMP_PARAM, &pHrbBody, &ulSize );
   fwrite( pHrbBody, ulSize, 1, yyc );
   hb_xfree( pHrbBody );

   fclose( yyc );

   if( ! HB_COMP_PARAM->fQuiet )
      hb_compOutStd( HB_COMP_PARAM, "Done.\n" );
}
genhrb.c143
genobj32.c
TypeFunctionSourceLine
VOIDhb_compGenObj32( HB_COMP_DECL, PHB_FNAME pFileName )
void hb_compGenObj32( HB_COMP_DECL, PHB_FNAME pFileName )
{
   char szFileName[ _POSIX_PATH_MAX + 1 ];
   FILE * hObjFile;  /* file handle for OBJ output */
   char * szVer;

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

   if( ( hObjFile = hb_fopen( szFileName, "wb" ) ) == NULL )
   {
      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 + _POSIX_PATH_MAX ];
      snprintf( buffer, sizeof( buffer ),
                "Generating Windows/DOS OBJ32 output to \'%s\'... ", szFileName );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }

   CompiledFileName( hObjFile, szFileName );
   szVer = hb_verHarbour();
   CompilerVersion( hObjFile, szVer );
   hb_xfree( szVer );
   GenerateLocalNames( hObjFile );
   GenerateExternals( HB_COMP_PARAM, hObjFile );
   GenerateCodeSegment( HB_COMP_PARAM, hObjFile );
   GenerateDataSegment( HB_COMP_PARAM, hObjFile );
   GenerateSymbolsSegment( HB_COMP_PARAM, hObjFile );
   End( hObjFile );
   if( externNames )
   {
      hb_xfree( externNames );
      externNames = NULL;
   }

   fclose( hObjFile );

   if( ! HB_COMP_PARAM->fQuiet )
      hb_compOutStd( HB_COMP_PARAM, "Done.\n" );
}
genobj32.c65
STATIC USHORThb_compFunctionGetPos( HB_COMP_DECL, char * szFunctionName )
static USHORT hb_compFunctionGetPos( HB_COMP_DECL, char * szFunctionName ) /* return 0 if not found or order + 1 */
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst;
   USHORT wFunction = HB_COMP_PARAM->fStartProc ? 1 : 0;

   while( pFunc )
   {
      if( ! strcmp( pFunc->szName, szFunctionName ) && pFunc != HB_COMP_PARAM->functions.pFirst )
         return wFunction;
      wFunction++;
      pFunc = pFunc->pNext;
   }
   return 0;
}
genobj32.c111
STATIC ULONGGetSymbolsSize( HB_COMP_DECL )
static ULONG GetSymbolsSize( HB_COMP_DECL )
{
  return HB_COMP_PARAM->symbols.iCount * sizeof( HB_SYMB );
}
genobj32.c126
STATIC PCOMSYMBOLGetFirstSymbol( HB_COMP_DECL )
static PCOMSYMBOL GetFirstSymbol( HB_COMP_DECL )
{
  PCOMSYMBOL pSymbol = HB_COMP_PARAM->symbols.pFirst;
  return pSymbol;
}
genobj32.c131
STATIC CHAR *GetSymbolName( HB_COMP_DECL, ULONG ulPos )
static char * GetSymbolName( HB_COMP_DECL, ULONG ulPos )
{
  PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  ULONG ul = 0;

  while( pSymbol && ( ul++ < ulPos ) )
    pSymbol = pSymbol->pNext;

  return pSymbol->szName;
}
genobj32.c137
STATIC ULONGGetPCodesSize( HB_COMP_DECL )
static ULONG GetPCodesSize( HB_COMP_DECL )
{
  ULONG ulTotal = 0;
  PFUNCTION pFunction = HB_COMP_PARAM->functions.pFirst;

  if( ! HB_COMP_PARAM->fStartProc )
    pFunction = pFunction->pNext;

  while( pFunction )
    {
      ulTotal += pFunction->lPCodePos;
      pFunction = pFunction->pNext;
    }
  return ulTotal;
}
genobj32.c148
STATIC ULONGGetSymbolsAmount( HB_COMP_DECL )
static ULONG GetSymbolsAmount( HB_COMP_DECL )
{
  PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  ULONG ulAmount = 1;

  while( pSymbol->pNext )
    {
      ulAmount++;
      pSymbol = pSymbol->pNext;
    }
  return ulAmount;
}
genobj32.c164
STATIC BOOLIsExternal( HB_COMP_DECL, ULONG ulSymbol )
static BOOL IsExternal( HB_COMP_DECL, ULONG ulSymbol )
{
  PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  ULONG ul = 0;

  while( ul++ < ulSymbol )
    pSymbol = pSymbol->pNext;

  return ! hb_compFunctionFind( HB_COMP_PARAM, pSymbol->szName );
}
genobj32.c177
STATIC USHORTGetExternalPos( char * szExternal )
static USHORT GetExternalPos( char * szExternal )
{
  USHORT w = 0;

  while( w < wExternals )
    {
      if( ! strcmp( szExternal, externNames[ w ] ) )
        break;
      w++;
    }

  return w;
}
genobj32.c188
STATIC VOIDGenerateLocalNames( FILE * hObjFile )
static void GenerateLocalNames( FILE * hObjFile )
{
  char * localNames[] = { "_TEXT", "CODE",
                          "_NULL", "_DATA", "DATA",
                          "_BSS", "BSS", "DGROUP",
                          "HB_STARTSYMBOLS", "HB_SYMBOLS", "HB_ENDSYMBOLS", "HARBOUR",
                          "HB_STARTBORSYMBOLS", "_INIT_", "HB_ENDBORSYMBOLS", "INITDATA", "BORLAND",
                          0 };

  LocalNames( hObjFile, localNames );
}
genobj32.c202
STATIC VOIDGenerateSymbolsSegment( HB_COMP_DECL, FILE * hObjFile )
static void GenerateSymbolsSegment( HB_COMP_DECL, FILE * hObjFile )
{
  BYTE symbolsData[]   = { 0, 0, 0, 0, 0, 0, 0, 0 };
  BYTE groupDGroup[]   = { 2, 3, 4, 0 }; /* segments defined order for DGROUP */
  BYTE groupSymGroup[] = { 5, 6, 7, 0 }; /* segments defined order for SYMGROUP */
  BYTE groupInitData[] = { 8, 9, 10, 0 }; /* segments defined order for INITDATA */

  DefineSegment( hObjFile, 10,   /* HB_STARTSYMBOLS position + 1 into localnames */
                            6,   /* "DATA" position + 1 into localNames */
                            0 ); /* segment length */
  DefineSegment( hObjFile, 11,   /* HB_SYMBOLS position + 1 into localNames */
                            6,   /* "DATA" position + 1 into localNames */
                            8 ); /* segment length */
  DefineSegment( hObjFile, 12,   /* HB_ENDSYMBOLS position + 1 into localNames */
                            6,   /* "DATA" position + 1 into localNames */
                            0 ); /* segment length */

  DefineSegment( hObjFile, 14,   /* HB_STARTBORSYMBOLS position + 1 into localnames */
                           17,   /* INITDATA position + 1 into localNames */
                            0 ); /* segment length */
  DefineSegment( hObjFile, 15,   /* HB_STARTSYMBOLS position + 1 into localnames */
                           17,   /* INITDATA position + 1 into localNames */
                            0 ); /* segment length */
  DefineSegment( hObjFile, 16,   /* HB_ENDBORSYMBOLS position + 1 into localnames */
                           17,   /* INITDATA position + 1 into localNames */
                            0 ); /* segment length */

  GroupDef( hObjFile,  8, groupDGroup );   /* "DGROUP" localNames position - 1 */
  GroupDef( hObjFile, 12, groupSymGroup ); /* "SYMGROUP" localNames position - 1 */
  GroupDef( hObjFile, 17, groupInitData ); /* "BORLAND" localNames position - 1 */

  * ( USHORT * ) symbolsData = (USHORT) GetSymbolsAmount( HB_COMP_PARAM );

  EnumeratedData( hObjFile, 6, symbolsData, sizeof( symbolsData ), 0 ); /* HB_SYMBOLS defined order segment */

  Fixup( hObjFile, 0xE4, 4, /* offset into HB_SYMBOLS segment */
                      0x54,
                         4 ); /* DATA segment defined order */
}
genobj32.c214
STATIC VOIDGenerateDataSegment( HB_COMP_DECL, FILE * hObjFile )
static void GenerateDataSegment( HB_COMP_DECL, FILE * hObjFile )
{
  HB_SYMB symbol;
  ULONG ulSize = GetSymbolsSize( HB_COMP_PARAM );
  PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  ULONG ulSymbols = GetSymbolsAmount( HB_COMP_PARAM ), ul;

  while( pSymbol )
    {
      ulSize += strlen( pSymbol->szName ) + 1;
      pSymbol = pSymbol->pNext;
    }

  ulSize += GetPCodesSize( HB_COMP_PARAM );

  DefineSegment( hObjFile,  4,   /* _NULL position + 1 into localnames */
                            6,   /* "DATA" position + 1 into localNames */
                            0 ); /* segment length */
  DefineSegment( hObjFile,  7,   /* _BSS position + 1 into localNames */
                            8,   /* "BSS" position + 1 into localNames */
                            0 ); /* segment length */
  DefineSegment( hObjFile, 5, /* "_DATA" position + 1 into localNames */
                           6, /* "DATA" position + 1 into localNames */
                    (USHORT) ulSize ); /* segment length */

  memset( &symbol, 0, sizeof( symbol ) );
  DataSegment( HB_COMP_PARAM, hObjFile, (BYTE *) &symbol,
               sizeof( symbol ), GetSymbolsAmount( HB_COMP_PARAM ), ulSize );

  pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  for( ul = 0; ul < ulSymbols; ul++ )
    {
      Fixup( hObjFile, 0xE4, (USHORT) ( ul * sizeof( HB_SYMB ) ), 0x54, 4 ); /* 4 = Data symbol name location */

      if( IsExternal( HB_COMP_PARAM, ul ) )
        {
          if( ! ( pSymbol->cScope & HB_FS_MESSAGE ) )
            Fixup( hObjFile, 0xE4, (USHORT) ( ul * sizeof( HB_SYMB ) ) + 8, 0x56,
                   GetExternalPos( GetSymbolName( HB_COMP_PARAM, ul ) ) + 1 );
        }
      else
        {
          /* if( ! ( pSymbol->cScope & HB_FS_MESSAGE ) ) */
          Fixup( hObjFile, 0xE4, (USHORT) ( ul * sizeof( HB_SYMB ) ) + 8, 0x54, 1 ); /* function address location */
        }
      pSymbol = pSymbol->pNext;
    }
}
genobj32.c254
STATIC VOIDGenerateCodeSegment( HB_COMP_DECL, FILE * hObjFile )
static void GenerateCodeSegment( HB_COMP_DECL, FILE * hObjFile )
{
  USHORT wFunctions = HB_COMP_PARAM->functions.iCount - ( HB_COMP_PARAM->fStartProc ? 0: 1 );
  ULONG ulSize    = wFunctions * sizeof( prgFunction );
  PFUNCTION pFunc = ( HB_COMP_PARAM->fStartProc ? HB_COMP_PARAM->functions.pFirst: HB_COMP_PARAM->functions.pFirst->pNext );
  USHORT w = 0;

  DefineSegment( hObjFile, 2, /* "_TEXT" position + 1 into localNames */
                 3, /* "CODE" position + 1 into localNames */
                 (USHORT) ulSize ); /* segment length */

  while( pFunc )
    {
      if( !( pFunc->cScope & ( HB_FS_STATIC | HB_FS_INIT | HB_FS_EXIT ) ) )
        PubDef( hObjFile, pFunc->szName, 1, w * sizeof( prgFunction ) );
      w++;
      pFunc = pFunc->pNext;
    }

  CodeSegment( HB_COMP_PARAM, hObjFile, prgFunction, sizeof( prgFunction ), wFunctions );

  for( w = 0; w < wFunctions; w++ )
    {
      /* prgFunction fixups */
      Fixup( hObjFile, 0xE4, ( w * sizeof( prgFunction ) ) + 1,
             0x54, 4 ); /* 4 = DATA segment defined order */

      Fixup( hObjFile, 0xE4, ( w * sizeof( prgFunction ) ) + 6,
             0x54, 4 ); /* DATA segment define order - pcode location */

      Fixup( hObjFile, 0xA4, ( w * sizeof( prgFunction ) ) + 11,
             0x56, 1 ); /* External: _hb_vmExecute */
    }
}
genobj32.c303
STATIC VOIDGenerateExternals( HB_COMP_DECL, FILE * hObjFile )
static void GenerateExternals( HB_COMP_DECL, FILE * hObjFile )
{
  USHORT w;
  PFUNCALL pFunc;
  PFUNCTION pFTemp;

  /* calculate amount of externals */
  pFunc = HB_COMP_PARAM->funcalls.pFirst;
  while( pFunc )
    {
      if( ( pFTemp = hb_compFunctionFind( HB_COMP_PARAM, pFunc->szName ) ) == NULL || pFTemp == HB_COMP_PARAM->functions.pFirst )
        wExternals++;
      pFunc = pFunc->pNext;
    }
  if( wExternals )
    {
      externNames = ( char * * ) hb_xgrab( sizeof( char * ) * ( wExternals + 2 ) );
      w = 1;
      externNames[ 0 ] = "_hb_vmExecute";

      pFunc = HB_COMP_PARAM->funcalls.pFirst;
      while( pFunc )
        {
          if( ( pFTemp = hb_compFunctionFind( HB_COMP_PARAM, pFunc->szName ) ) == NULL || pFTemp == HB_COMP_PARAM->functions.pFirst )
            externNames[ w++ ] = pFunc->szName;
          pFunc = pFunc->pNext;
        }
      externNames[ w ] = 0;
      ExternalNames( hObjFile, externNames );
    }
}
genobj32.c338
STATIC VOIDputbyte( BYTE b, FILE * hObjFile, BYTE * pbChecksum )
static void putbyte( BYTE b, FILE * hObjFile, BYTE * pbChecksum )
{
  fputc( b, hObjFile );
  * pbChecksum += b;
}
genobj32.c370
STATIC VOIDputword( USHORT w, FILE * hObjFile, BYTE * pbChecksum )
static void putword( USHORT w, FILE * hObjFile, BYTE * pbChecksum )
{
  putbyte( HB_LOBYTE( w ), hObjFile, pbChecksum );
  putbyte( HB_HIBYTE( w ), hObjFile, pbChecksum );
}
genobj32.c376
STATIC VOIDCompiledFileName( FILE * hObjFile, char * szFileName )
static void CompiledFileName( FILE * hObjFile, char * szFileName )
{
  USHORT wLen = strlen( szFileName );
  BYTE bChk = 0; /* this is a checksum the linker will check to asure OBJ integrity */
  BYTE bChar;

  putbyte( 0x80, hObjFile, &bChk );  /* this tells the linker the kind of OBJ record this is */
  putbyte( 1 + 1 + wLen, hObjFile, &bChk ); /* now it comes the total length of this OBJ record */
  putbyte( 0, hObjFile, &bChk );
  putbyte( (BYTE) wLen, hObjFile, &bChk );     /* szFileName length */

  while( ( bChar = * szFileName++ ) != 0 )
      putbyte( bChar, hObjFile, &bChk );   /* each of the szFileName characters */

  putbyte( 256 - bChk, hObjFile, &bChk ); /* a checksum that will be recalculated by the linker */
}
genobj32.c382
STATIC VOIDCompilerVersion( FILE * hObjFile, char * szVersion )
static void CompilerVersion( FILE * hObjFile, char * szVersion )
{
  USHORT wLen = strlen( szVersion );
  BYTE bChk = 0; /* this is a checksum the linker will check to asure OBJ integrity */
  BYTE bChar;

  putbyte( 0x88, hObjFile, &bChk );  /* this tells the linker the kind of OBJ record this is */
  putword( 3 + wLen, hObjFile, &bChk ); /* now it comes the total length of this OBJ record */
  putword( 0, hObjFile, &bChk );

  while( ( bChar = * szVersion++ ) != 0 )
      putbyte( bChar, hObjFile, &bChk );   /* each of the szFileName characters */

  putbyte( 256 - bChk, hObjFile, &bChk ); /* a checksum that will be recalculated by the linker */
}
genobj32.c399
STATIC VOIDLocalNames( FILE * hObjFile, char * szNames[] )
static void LocalNames( FILE * hObjFile, char * szNames[] )
{
  BYTE b = 0, c;
  USHORT wTotalLen = 0;
  BYTE bChk = 0;

  while( szNames[ b ] )
    wTotalLen += strlen( szNames[ b++ ] );
  wTotalLen += 2 + b;

  putbyte( 0x96, hObjFile, &bChk );
  putword( wTotalLen, hObjFile, &bChk );
  putbyte( 0, hObjFile, &bChk );

  b = 0;
  while( szNames[ b ] )
    {
      putbyte( strlen( szNames[ b ] ), hObjFile, &bChk );

      c = 0;
      while( szNames[ b ][ c ] )
          putbyte( szNames[ b ][ c++ ], hObjFile, &bChk );
      b++;
    }
  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c415
STATIC VOIDExternalNames( FILE * hObjFile, char * szNames[] )
static void ExternalNames( FILE * hObjFile, char * szNames[] )
{
  BYTE b = 0, c;
  USHORT wTotalLen = 0;
  BYTE bChk = 0;

  while( szNames[ b ] )
  {
    if( b == 0 )
       wTotalLen += strlen( szNames[ b++ ] ) + 1;
    else
       wTotalLen += strlen( szPrefix ) + strlen( szNames[ b++ ] ) + 1;
  }
  wTotalLen += 2 + b - 1;

  putbyte( 0x8C, hObjFile, &bChk );
  putword( wTotalLen, hObjFile, &bChk );

  b = 0;
  while( szNames[ b ] )
    {
      if( b == 0 )
         putbyte( strlen( szNames[ b ] ), hObjFile, &bChk );
      else
         putbyte( strlen( szPrefix ) + strlen( szNames[ b ] ), hObjFile, &bChk );

      c = 0;

      if( b > 0 )
      {
         while( szPrefix[ c ] )
            putbyte( szPrefix[ c++ ], hObjFile, &bChk );
         c = 0;
      }

      while( szNames[ b ][ c ] )
          putbyte( szNames[ b ][ c++ ], hObjFile, &bChk );
      putbyte( 0, hObjFile, &bChk );
      b++;
    }
  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c442
STATIC VOIDCodeSegment( HB_COMP_DECL, FILE * hObjFile, BYTE * prgCode, ULONG ulPrgLen, USHORT wFunctions )
static void CodeSegment( HB_COMP_DECL, FILE * hObjFile, BYTE * prgCode, ULONG ulPrgLen, USHORT wFunctions )
{
  BYTE bChk = 0;
  USHORT y;
  USHORT wTotalLen = (USHORT) ( ulPrgLen * wFunctions ) + 4;
  ULONG ul;
  PFUNCTION pFunction = HB_COMP_PARAM->functions.pFirst;
  ULONG ulPCodeOffset = HB_COMP_PARAM->symbols.iCount * sizeof( HB_SYMB );

  if( ! HB_COMP_PARAM->fStartProc )
    pFunction = pFunction->pNext;

  putbyte( 0xA0, hObjFile, &bChk );
  putword( wTotalLen, hObjFile, &bChk );
  putbyte( 1, hObjFile, &bChk ); /* 1 = _TEXT segment */
  putword( 0, hObjFile, &bChk ); /* 0 = offset */

  for( y = 0; y < wFunctions; y++ )
    {
      * ( ULONG * ) &prgCode[ 6 ] = ulPCodeOffset; /* function pcode offset */
      for( ul = 0; ul < ulPrgLen; ul++ )
          putbyte( * ( prgCode + ul ), hObjFile, &bChk );
      ulPCodeOffset += pFunction->lPCodePos;
      pFunction = pFunction->pNext;
    }

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c485
STATIC VOIDDataSegment( HB_COMP_DECL, FILE * hObjFile, BYTE * symbol, ULONG wSymLen, ULONG wSymbols, ULONG ulSize )
static void DataSegment( HB_COMP_DECL, FILE * hObjFile, BYTE * symbol, ULONG wSymLen, ULONG wSymbols,
                         ULONG ulSize )
{
  BYTE bChk = 0;
  ULONG w, y;
  USHORT wTotalLen = 4 + (USHORT) ulSize;
  PCOMSYMBOL pSymbol = GetFirstSymbol( HB_COMP_PARAM );
  PFUNCTION pFunction = HB_COMP_PARAM->functions.pFirst;
  ULONG ulSymbolNameOffset = GetSymbolsSize( HB_COMP_PARAM ) + GetPCodesSize( HB_COMP_PARAM );
  ULONG ulFunctionOffset;

  if( ! HB_COMP_PARAM->fStartProc )
    pFunction = pFunction->pNext;

  putbyte( 0xA0, hObjFile, &bChk );
  putword( wTotalLen, hObjFile, &bChk );
  putbyte( 4, hObjFile, &bChk ); /* 2 = _DATA segment defined order */
  putword( 0, hObjFile, &bChk ); /* 0 = offset */

  for( y = 0; y < wSymbols; y++ )
    {
      * ( ULONG * ) symbol = ulSymbolNameOffset;

      if( ! IsExternal( HB_COMP_PARAM, y ) )
        {
          ulFunctionOffset = ( hb_compFunctionGetPos( HB_COMP_PARAM, pSymbol->szName ) - 1 ) *
            sizeof( prgFunction );
          * ( ( ULONG * ) &symbol[ 8 ] ) = ulFunctionOffset; /* 8 offset of function pointer into symbol */
        }
      else
        * ( ( ULONG * ) &symbol[ 8 ] ) = 0; /* 8 offset of function pointer into symbol */

      if( pSymbol->cScope == HB_FS_MESSAGE )
        symbol[ 4 ] = HB_FS_PUBLIC;
      else
        symbol[ 4 ] = pSymbol->cScope;

      for( w = 0; w < wSymLen; w++ )
         putbyte( * ( symbol + w ), hObjFile, &bChk );

      ulSymbolNameOffset += strlen( pSymbol->szName ) + 1;
      pSymbol = pSymbol->pNext;
    }

  while( pFunction )
    {
      w = 0;
      while( w < pFunction->lPCodePos )
         putbyte( pFunction->pCode[ w++ ], hObjFile, &bChk );

      pFunction = pFunction->pNext;
    }

  pSymbol = GetFirstSymbol( HB_COMP_PARAM );

  while( pSymbol )
    {
      for( w = 0; w < strlen( pSymbol->szName ); w++ )
          putbyte( pSymbol->szName[ w ], hObjFile, &bChk );

      putbyte( 0, hObjFile, &bChk );
      pSymbol = pSymbol->pNext;
    }

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c514
STATIC VOIDDefineSegment( FILE * hObjFile, BYTE bName, BYTE bClass, USHORT wLen )
static void DefineSegment( FILE * hObjFile, BYTE bName, BYTE bClass, USHORT wLen )
{
  BYTE bChk = 0;

  putbyte( 0x98, hObjFile, &bChk );
  putbyte( 7, hObjFile, &bChk );      /* SegDef records have always this length */
  putbyte( 0, hObjFile, &bChk );

  putbyte( 0xA9, hObjFile, &bChk );
  putword( wLen, hObjFile, &bChk );
  putbyte( bName, hObjFile, &bChk );
  putbyte( bClass, hObjFile, &bChk );
  putbyte( 0, hObjFile, &bChk );

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c581
STATIC VOIDPubDef( FILE * hObjFile, char * szName, USHORT wSegment, USHORT wOffset )
static void PubDef( FILE * hObjFile, char * szName, USHORT wSegment, USHORT wOffset )
{
  BYTE bChk = 0;
  BYTE bChar;
  USHORT wLen = 2 + 2 + strlen( szPrefix ) + strlen( szName ) + 2 + 1;
  const char * szTemp;

  putbyte( 0x90, hObjFile, &bChk );
  putword( wLen, hObjFile, &bChk );
  putbyte( 0x00, hObjFile, &bChk );
  putbyte( (BYTE) wSegment, hObjFile, &bChk );
  putbyte( strlen( szPrefix ) + strlen( szName ), hObjFile, &bChk );

  szTemp = szPrefix;
  while( ( bChar = * szTemp++ ) != 0 )
     putbyte( bChar, hObjFile, &bChk );

  while( ( bChar = * szName++ ) != 0 )
     putbyte( bChar, hObjFile, &bChk );

  putword( wOffset, hObjFile, &bChk );
  putbyte( 0x00, hObjFile, &bChk );

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c598
STATIC VOIDFixup( FILE * hObjFile, BYTE bType, USHORT wOffset, BYTE bFlags, BYTE bSymbol )
static void Fixup( FILE * hObjFile, BYTE bType, USHORT wOffset, BYTE bFlags, BYTE bSymbol )
{
  BYTE bChk = 0;

  putbyte( 0x9D, hObjFile, &bChk );
  putword( 5, hObjFile, &bChk );
  putbyte( bType + HB_HIBYTE( wOffset ), hObjFile, &bChk );
  putbyte( HB_LOBYTE( wOffset ), hObjFile, &bChk );
  putbyte( bFlags, hObjFile, &bChk );
  putbyte( bSymbol, hObjFile, &bChk );

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c624
STATIC VOIDEnumeratedData( FILE * hObjFile, BYTE bSegment, BYTE * pData, USHORT wLen, USHORT wOffset )
static void EnumeratedData( FILE * hObjFile, BYTE bSegment, BYTE * pData, USHORT wLen, USHORT wOffset )
{
  BYTE bChk = 0;
  USHORT w;

  putbyte( 0xA0, hObjFile, &bChk );
  putword( ( USHORT ) ( wLen + 4 ), hObjFile, &bChk );
  putbyte( bSegment, hObjFile, &bChk );
  putword( wOffset, hObjFile, &bChk );

  for( w = 0; w < wLen; w++ )
     putbyte( * ( pData + w ), hObjFile, &bChk );

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c638
STATIC VOIDEnd( FILE * hObjFile )
static void End( FILE * hObjFile )
{
  BYTE bChk = 0;

  putbyte( 0x8A, hObjFile, &bChk );
  putbyte( 0x02, hObjFile, &bChk );
  putbyte( 0x00, hObjFile, &bChk );
  putbyte( 0x00, hObjFile, &bChk );
  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c654
STATIC VOIDGroupDef( FILE * hObjFile, BYTE bName, BYTE * aSegs )
static void GroupDef( FILE * hObjFile, BYTE bName, BYTE * aSegs )
{
  BYTE bChk = 0;
  USHORT wRecLen = 2;
  USHORT w       = 0;

  while( aSegs[ w++ ] )
    wRecLen += 2;

  putbyte( 0x9A, hObjFile, &bChk );
  putword( wRecLen, hObjFile, &bChk );
  putbyte( bName + 1, hObjFile, &bChk );

  w = 0;
  while( aSegs[ w ] )
  {
      putbyte( 0xFF, hObjFile, &bChk );
      putbyte( aSegs[ w++ ], hObjFile, &bChk );
  }

  putbyte( 256 - bChk, hObjFile, &bChk );
}
genobj32.c665
hbcmplib.c
TypeFunctionSourceLine
STATIC VOIDhb_compGenArgList( int iFirst, int iLast, int * pArgC, char *** pArgV )
static void hb_compGenArgList( int iFirst, int iLast,
                               int * pArgC, char *** pArgV )
{
   PHB_ITEM pParam;
   ULONG ul;
   int argc = 0, i;
   char ** argv;

   for( i = iFirst; i <= iLast; ++i )
   {
      pParam = hb_param( i, HB_IT_ARRAY | HB_IT_STRING );
      if( pParam )
      {
         if( HB_IS_ARRAY( pParam ) )
         {
            ul = hb_arrayLen( pParam );
            if( ul ) do
            {
               if( hb_arrayGetType( pParam, ul ) & HB_IT_STRING )
                  ++argc;
            }
            while( --ul );
         }
         else if( HB_IS_STRING( pParam ) )
            ++argc;
      }
   }

   argv = ( char ** ) hb_xgrab( sizeof( char * ) * ( argc + 1 ) );
   argc = 0;
   for( i = iFirst; i <= iLast; ++i )
   {
      pParam = hb_param( i, HB_IT_ARRAY | HB_IT_STRING );
      if( pParam )
      {
         if( HB_IS_ARRAY( pParam ) )
         {
            ul = hb_arrayLen( pParam );
            if( ul ) do
            {
               if( hb_arrayGetType( pParam, ul ) & HB_IT_STRING )
                  argv[ argc++ ] = hb_arrayGetCPtr( pParam, ul );
            }
            while( --ul );
         }
         else if( HB_IS_STRING( pParam ) )
            argv[ argc++ ] = hb_itemGetCPtr( pParam );
      }
   }
   argv[ argc ] = NULL;

   * pArgC = argc;
   * pArgV = argv;
}
hbcmplib.c56
HB_FUNCHB_COMPILE(void)
HB_FUNC( HB_COMPILE )
{
   int argc;
   char ** argv;

   hb_compGenArgList( 1, hb_pcount(), &argc, &argv );

   hb_retni( hb_compMain( argc, argv, NULL, NULL, NULL ) );
   hb_xfree( argv );
}
hbcmplib.c111
HB_FUNCHB_COMPILEBUF(void)
HB_FUNC( HB_COMPILEBUF )
{
   int iResult, argc;
   char ** argv;
   BYTE * pBuffer;
   ULONG ulLen;

   hb_compGenArgList( 1, hb_pcount(), &argc, &argv );
   iResult = hb_compMain( argc, argv, &pBuffer, &ulLen, NULL );
   hb_xfree( argv );
   if( iResult == EXIT_SUCCESS && pBuffer )
      hb_retclen_buffer( ( char * ) pBuffer, ulLen );
}
hbcmplib.c122
HB_FUNCHB_COMPILEFROMBUF(void)
HB_FUNC( HB_COMPILEFROMBUF )
{
   int iResult, argc;
   char ** argv, * szSource;
   BYTE * pBuffer;
   ULONG ulLen;

   szSource = hb_parc( 1 );
   if( szSource )
   {
      hb_compGenArgList( 2, hb_pcount(), &argc, &argv );
      iResult = hb_compMain( argc, argv, &pBuffer, &ulLen, szSource );
      hb_xfree( argv );
      if( iResult == EXIT_SUCCESS && pBuffer )
         hb_retclen_buffer( ( char * ) pBuffer, ulLen );
   }
}
hbcmplib.c136
hbcomp.c
TypeFunctionSourceLine
STATIC HB_EXPR_PTRhb_compExprAlloc( HB_COMP_DECL )
static HB_EXPR_PTR hb_compExprAlloc( HB_COMP_DECL )
{
   PHB_EXPRLST pExpItm = ( PHB_EXPRLST ) hb_xgrab( sizeof( HB_EXPRLST ) );

   pExpItm->pNext = HB_COMP_PARAM->pExprLst;
   HB_COMP_PARAM->pExprLst = pExpItm;
   if( pExpItm->pNext )
   {
      pExpItm->pPrev = pExpItm->pNext->pPrev;
      pExpItm->pNext->pPrev = pExpItm;
      pExpItm->pPrev->pNext = pExpItm;
   }
   else
      pExpItm->pPrev = pExpItm->pNext = pExpItm;

   return &pExpItm->Expression;
}
hbcomp.c56
STATIC VOIDhb_compExprDealloc( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static void hb_compExprDealloc( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   if( HB_COMP_PARAM->pExprLst )
   {
      PHB_EXPRLST pExpItm = ( PHB_EXPRLST ) pExpr;

      pExpItm->pNext->pPrev = pExpItm->pPrev;
      pExpItm->pPrev->pNext = pExpItm->pNext;
      if( pExpItm == HB_COMP_PARAM->pExprLst )
      {
         if( pExpItm->pNext == pExpItm )
            HB_COMP_PARAM->pExprLst = NULL;
         else
            HB_COMP_PARAM->pExprLst = pExpItm->pNext;
      }
      hb_xfree( pExpItm );
   }
}
hbcomp.c74
STATIC HB_EXPR_PTRhb_compExprNew( HB_COMP_DECL, HB_EXPRTYPE iType )
static HB_EXPR_PTR hb_compExprNew( HB_COMP_DECL, HB_EXPRTYPE iType )
{
   HB_EXPR_PTR pExpr;

   HB_TRACE(HB_TR_DEBUG, ("hb_compExprNew(%p,%i)", HB_COMP_PARAM, iType));

   pExpr = hb_compExprAlloc( HB_COMP_PARAM );
   pExpr->ExprType = iType;
   pExpr->pNext    = NULL;
   pExpr->ValType  = HB_EV_UNKNOWN;
   pExpr->Counter  = 1;

   return pExpr;
}
hbcomp.c93
STATIC VOIDhb_compExprClear( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static void hb_compExprClear( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   if( --pExpr->Counter == 0 )
      hb_compExprDealloc( HB_COMP_PARAM, pExpr );
}
hbcomp.c108
STATIC VOIDhb_compExprDelete( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static void hb_compExprDelete( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   HB_TRACE(HB_TR_DEBUG, ("hb_compExprDelete(%p,%p)", HB_COMP_PARAM, pExpr));
   if( pExpr && --pExpr->Counter == 0 )
   {
      HB_EXPR_USE( pExpr, HB_EA_DELETE );
      hb_compExprDealloc( HB_COMP_PARAM, pExpr );
   }
}
hbcomp.c116
STATIC VOIDhb_compExprFree( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static void hb_compExprFree( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   HB_TRACE(HB_TR_DEBUG, ("hb_compExprFree()"));
   if( --pExpr->Counter == 0 )
   {
      HB_EXPR_USE( pExpr, HB_EA_DELETE );
      hb_compExprDealloc( HB_COMP_PARAM, pExpr );
   }
}
hbcomp.c128
VOIDhb_compExprLstDealloc( HB_COMP_DECL )
void hb_compExprLstDealloc( HB_COMP_DECL )
{
   if( HB_COMP_PARAM->pExprLst )
   {
      PHB_EXPRLST pExpItm, pExp;
      pExpItm = pExp = HB_COMP_PARAM->pExprLst;
      HB_COMP_PARAM->pExprLst = NULL;
      do
      {
         hb_compExprDelete( HB_COMP_PARAM, &pExp->Expression );
         pExp = pExp->pNext;
      }
      while( pExp != pExpItm );
      do
      {
         PHB_EXPRLST pFree = pExp;
         pExp = pExp->pNext;
         hb_xfree( pFree );
      }
      while( pExp != pExpItm );
   }
}
hbcomp.c140
STATIC HB_EXPR_PTRhb_compErrorType( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static HB_EXPR_PTR hb_compErrorType( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_TYPE, szDesc, NULL );
   return pExpr;
}
hbcomp.c163
STATIC HB_EXPR_PTRhb_compErrorSyntax( HB_COMP_DECL, HB_EXPR_PTR pExpr )
static HB_EXPR_PTR hb_compErrorSyntax( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_SYNTAX, szDesc, NULL );
   return pExpr;
}
hbcomp.c170
STATIC VOIDhb_compErrorDuplVar( HB_COMP_DECL, const char * szVarName )
static void hb_compErrorDuplVar( HB_COMP_DECL, const char * szVarName )
{
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_VAR_DUPL, szVarName, NULL );
}

static const HB_COMP_FUNCS s_comp_funcs =
{
   hb_compExprNew,
   hb_compExprClear,
   hb_compExprFree,
   hb_compExprDelete,

   hb_compErrorType,
   hb_compErrorSyntax,
   hb_compErrorDuplVar,
};
hbcomp.c177
HB_COMP_PTRhb_comp_new( void )
HB_COMP_PTR hb_comp_new( void )
{
   HB_COMP_PTR pComp = NULL;
   PHB_PP_STATE pPP = hb_pp_new();

   if( pPP )
   {
      pComp = ( HB_COMP_PTR ) hb_xgrab( sizeof( HB_COMP ) );
      memset( pComp, 0, sizeof( HB_COMP ) );
      pComp->pLex = ( PHB_COMP_LEX ) hb_xgrab( sizeof( HB_COMP_LEX ) );
      memset( pComp->pLex, 0, sizeof( HB_COMP_LEX ) );

      /* initialize default settings */
      pComp->mode = HB_MODE_COMPILER;
      pComp->funcs = &s_comp_funcs;

      pComp->pLex->pPP = pPP;

      /* various compatibility flags (-k switch)
         activate Harbour extensions by default. */
      pComp->supported = HB_COMPFLAG_HARBOUR   |
                         HB_COMPFLAG_XBASE     |
                         HB_COMPFLAG_HB_INLINE |
                         HB_COMPFLAG_OPTJUMP   |
                         HB_COMPFLAG_MACROTEXT |
                         HB_COMPFLAG_SHORTCUTS;

      pComp->fTextSubst       = ( pComp->supported & HB_COMPFLAG_MACROTEXT ) != 0;
      pComp->fLongOptimize    = TRUE;
      pComp->fPPO             = FALSE;    /* flag indicating, is ppo output needed */
      pComp->fStartProc       = TRUE;     /* holds if we need to create the starting procedure */
      pComp->fLineNumbers     = TRUE;     /* holds if we need pcodes with line numbers */
      pComp->fAnyWarning      = FALSE;    /* holds if there was any warning during the compilation process */
      pComp->fAutoMemvarAssume= FALSE;    /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/
      pComp->fForceMemvars    = FALSE;    /* holds if memvars are assumed when accesing undeclared variable (-v)*/
      pComp->fDebugInfo       = FALSE;    /* holds if generate debugger required info */
      pComp->fNoStartUp       = FALSE;    /* C code generation embed HB_FS_FIRST or not */
      pComp->fCredits         = FALSE;    /* print credits */
      pComp->fBuildInfo       = FALSE;    /* print build info */
      pComp->fLogo            = TRUE;     /* print logo */
      pComp->fSyntaxCheckOnly = FALSE;    /* syntax check only */
      pComp->fAutoOpen        = TRUE;
      pComp->fError           = FALSE;

      pComp->iWarnings  = 0;                    /* enable parse warnings */
      pComp->iGenCOutput= HB_COMPGENC_COMPACT;  /* C code generation default mode */
      pComp->iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */
      pComp->iLanguage  = HB_LANG_C;            /* default Harbour generated output language */
   }

   return pComp;
}
hbcomp.c194
VOIDhb_comp_free( HB_COMP_PTR pComp )
void hb_comp_free( HB_COMP_PTR pComp )
{
   hb_compCompileEnd( pComp );
   hb_compParserStop( pComp );

   /* free allocated expressions only when errors appear - in all
    * other cases expressions should be always cleanly freed so
    * executing hb_compExprLstDealloc() may only hides some real
    * memory leaks
    */
   if( pComp->iErrorCount != 0 )
      hb_compExprLstDealloc( pComp );

   hb_compIdentifierClose( pComp );

   if( pComp->pOutPath )
      hb_xfree( pComp->pOutPath );

   if( pComp->pPpoPath )
      hb_xfree( pComp->pPpoPath );

   while( pComp->autoopen )
   {
      PAUTOOPEN pAutoOpen = pComp->autoopen;

      pComp->autoopen = pComp->autoopen->pNext;
      hb_xfree( pAutoOpen );
   }

   if( pComp->pOutBuf )
      hb_xfree( pComp->pOutBuf );

   if( pComp->pLex )
   {
      if( pComp->pLex->pPP )
         hb_pp_free( pComp->pLex->pPP );
      hb_xfree( pComp->pLex );
   }
   if( pComp->szStdCh )
      hb_xfree( pComp->szStdCh );
   hb_xfree( pComp );
}
hbcomp.c247
VOIDhb_compOutStd( HB_COMP_DECL, const char * szMessage )
void hb_compOutStd( HB_COMP_DECL, const char * szMessage )
{
   if( ! HB_COMP_PARAM->fFullQuiet )
   {
      if( HB_COMP_PARAM->outStdFunc )
         HB_COMP_PARAM->outStdFunc( HB_COMP_PARAM->cargo, szMessage );
      else
#if defined( HB_OS_UNIX_COMPATIBLE )
         fprintf( stdout, "%s", szMessage ); fflush( stdout );
#else
         fprintf( stderr, "%s", szMessage ); fflush( stderr );
#endif
   }
}
hbcomp.c290
VOIDhb_compOutErr( HB_COMP_DECL, const char * szMessage )
void hb_compOutErr( HB_COMP_DECL, const char * szMessage )
{
   if( ! HB_COMP_PARAM->fFullQuiet )
   {
      if( HB_COMP_PARAM->outErrFunc )
         HB_COMP_PARAM->outErrFunc( HB_COMP_PARAM->cargo, szMessage );
      else
#if defined( HB_OS_UNIX_COMPATIBLE )
         fprintf( stderr, "%s", szMessage ); fflush( stderr );
#else
         fprintf( stdout, "%s", szMessage ); fflush( stdout );
#endif
   }
}
hbcomp.c305
hbdbginf.c
TypeFunctionSourceLine
PHB_DEBUGINFOhb_compGetDebugInfo( HB_COMP_DECL )
PHB_DEBUGINFO hb_compGetDebugInfo( HB_COMP_DECL )
{
   PHB_DEBUGINFO pLineInfo = NULL, pInfo = NULL;
   ULONG ulPos, ulSkip, ulLine, ulOffset;
   const char * pszModuleName = "", * ptr;
   PFUNCTION pFunc;

   pFunc = HB_COMP_PARAM->functions.pFirst;
   if( ! HB_COMP_PARAM->fStartProc )
      pFunc = pFunc->pNext;

   while( pFunc )
   {
      ulPos = ulLine = 0;
      while( ulPos < pFunc->lPCodePos )
      {
         ulSkip = 0;
         switch( pFunc->pCode[ ulPos ] )
         {
            case HB_P_LINE:
               ulLine = HB_PCODE_MKUSHORT( &pFunc->pCode[ ulPos + 1 ] );
               break;

            case HB_P_MODULENAME:
               pszModuleName = ( const char * ) &pFunc->pCode[ ulPos + 1 ];
               pInfo = NULL;
               break;

            /*
             * This enables checking also code block bodies,
             * if it's not necessary then simply remove the
             * code below. [druzus]
             */
            case HB_P_PUSHBLOCK:
               ulSkip = 7 + HB_PCODE_MKUSHORT( &pFunc->pCode[ ulPos + 5 ] ) * 2;
               break;

            case HB_P_PUSHBLOCKSHORT:
               ulSkip = 2;
               break;
         }

         if( ulLine != 0 )
         {
            if( !pInfo )
            {
               int i;

               ptr = strchr( pszModuleName, ':' );
               i = ptr ? ( int ) ( ptr - pszModuleName ) : ( int ) strlen( pszModuleName );

               pInfo = pLineInfo;
               while( pInfo != NULL )
               {
                  if( strncmp( pszModuleName, pInfo->pszModuleName, i ) == 0 &&
                      ( pInfo->pszModuleName[ i ] == '\0' ||
                        pInfo->pszModuleName[ i ] == ':' ) )
                     break;
                  pInfo = pInfo->pNext;
               }
               if( !pInfo )
               {
                  pInfo = ( PHB_DEBUGINFO ) hb_xgrab( sizeof( HB_DEBUGINFO ) );
                  pInfo->pszModuleName = hb_strndup( pszModuleName, i );
                  pInfo->ulFirstLine = pInfo->ulLastLine = ulLine;
                  /*
                   * allocate memory in 256 bytes chunks (for 2048 lines)
                   * The last 1 byte is reserved for additional 0 byte if
                   * the caller will want to use the returned buffer as
                   * parameter to hb_compGenPushString(). [druzus]
                   */
                  pInfo->ulAllocated = ( ( ulLine >> 3 ) + 0x100 ) & 0xFFFFFF00L;
                  pInfo->pLineMap = ( BYTE * ) hb_xgrab( pInfo->ulAllocated + 1 );
                  memset( pInfo->pLineMap, 0, pInfo->ulAllocated + 1 );
                  pInfo->pNext = pLineInfo;
                  pLineInfo = pInfo;
               }
            }
            ulOffset = ulLine >> 3;
            if( pInfo->ulAllocated <= ulOffset )
            {
               ULONG ulNewSize = ( ( ulLine >> 3 ) + 0x100 ) & 0xFFFFFF00L;
               pInfo->pLineMap = ( BYTE * ) hb_xrealloc( pInfo->pLineMap, ulNewSize + 1 );
               memset( pInfo->pLineMap + pInfo->ulAllocated, 0, ulNewSize - pInfo->ulAllocated + 1 );
               pInfo->ulAllocated = ulNewSize;
            }
            pInfo->pLineMap[ ulOffset ] |= 1 << ( ulLine & 0x7 );
            /*
             * It's possible the the line number will be ascending
             * if some external file is included more then once. [druzus]
             */
            if( pInfo->ulFirstLine > ulLine )
               pInfo->ulFirstLine = ulLine;
            if( pInfo->ulLastLine < ulLine )
               pInfo->ulLastLine = ulLine;
            ulLine = 0;
         }

         if( ulSkip == 0 )
         {
            ulSkip = hb_compPCodeSize( pFunc, ulPos );
            if( ulSkip == 0 )
               break;
         }
         ulPos += ulSkip;
      }
      pFunc = pFunc->pNext;
   }

   return pLineInfo;
}
hbdbginf.c55
hbdead.c
TypeFunctionSourceLine
STATIC VOIDhb_compCodeTraceAddJump( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos )
static void hb_compCodeTraceAddJump( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos )
{
   /* Checking for ulPCodePos < pInfo->ulPCodeSize disabled intentionally
    * for easier detecting bugs in generated PCODE
    */
   /*
   if( ulPCodePos < pInfo->ulPCodeSize && pInfo->pCodeMark[ ulPCodePos ] == 0 )
   */
   if( pInfo->pCodeMark[ ulPCodePos ] == 0 )
   {
      if( pInfo->ulJumpSize == 0 )
      {
         pInfo->ulJumpSize = HB_JUMPADDR_ALLOC;
         pInfo->plJumps = ( ULONG * ) hb_xgrab( pInfo->ulJumpSize *
                                                sizeof( ULONG ) );
      }
      else if( pInfo->ulJumpSize == pInfo->ulJumpCount )
      {
         pInfo->ulJumpSize += HB_JUMPADDR_ALLOC;
         pInfo->plJumps = ( ULONG * ) hb_xrealloc( pInfo->plJumps,
                                       pInfo->ulJumpSize * sizeof( ULONG ) );
      }
      pInfo->plJumps[ pInfo->ulJumpCount++ ] = ulPCodePos;
      pInfo->pCodeMark[ ulPCodePos ] = 1;
   }
}
hbdead.c75
STATIC ULONGhb_compCodeTraceNextPos( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos )
static ULONG hb_compCodeTraceNextPos( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos )
{
   if( ulPCodePos < pInfo->ulPCodeSize && pInfo->pCodeMark[ ulPCodePos ] == 0 )
      return ulPCodePos;

   while( pInfo->ulJumpPos < pInfo->ulJumpCount )
   {
      ulPCodePos = pInfo->plJumps[ pInfo->ulJumpPos++ ];
      if( pInfo->pCodeMark[ ulPCodePos ] == 1 )
         return ulPCodePos;
   }

   pInfo->fFinished = TRUE;
   return pInfo->ulPCodeSize;
}
hbdead.c102
STATIC VOIDhb_compCodeTraceMark( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos, ULONG ulSize )
static void hb_compCodeTraceMark( PHB_CODETRACE_INFO pInfo, ULONG ulPCodePos, ULONG ulSize )
{
   memset( &pInfo->pCodeMark[ ulPCodePos ], 2, ulSize );
}
hbdead.c118
STATIC HB_CODETRACE_FUNC(hb_p_default )
static HB_CODETRACE_FUNC( hb_p_default )
{
   ULONG ulSize = hb_compPCodeSize( pFunc, lPCodePos );

   hb_compCodeTraceMark( cargo, lPCodePos, ulSize );
   return hb_compCodeTraceNextPos( cargo, lPCodePos + ulSize );
}
hbdead.c127
STATIC HB_CODETRACE_FUNC(hb_p_jumpnear )
static HB_CODETRACE_FUNC( hb_p_jumpnear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   hb_compCodeTraceMark( cargo, lPCodePos, 2 );
   return hb_compCodeTraceNextPos( cargo, ulNewPos );
}
hbdead.c135
STATIC HB_CODETRACE_FUNC(hb_p_jump )
static HB_CODETRACE_FUNC( hb_p_jump )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 3 );
   return hb_compCodeTraceNextPos( cargo, ulNewPos );
}
hbdead.c143
STATIC HB_CODETRACE_FUNC(hb_p_jumpfar )
static HB_CODETRACE_FUNC( hb_p_jumpfar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   return hb_compCodeTraceNextPos( cargo, ulNewPos );
}
hbdead.c152
STATIC HB_CODETRACE_FUNC(hb_p_jumpfalsenear )
static HB_CODETRACE_FUNC( hb_p_jumpfalsenear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   hb_compCodeTraceMark( cargo, lPCodePos, 2 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 2 );
}
hbdead.c161
STATIC HB_CODETRACE_FUNC(hb_p_jumpfalse )
static HB_CODETRACE_FUNC( hb_p_jumpfalse )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 3 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 3 );
}
hbdead.c171
STATIC HB_CODETRACE_FUNC(hb_p_jumpfalsefar )
static HB_CODETRACE_FUNC( hb_p_jumpfalsefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 4 );
}
hbdead.c182
STATIC HB_CODETRACE_FUNC(hb_p_jumptruenear )
static HB_CODETRACE_FUNC( hb_p_jumptruenear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   hb_compCodeTraceMark( cargo, lPCodePos, 2 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 2 );
}
hbdead.c193
STATIC HB_CODETRACE_FUNC(hb_p_jumptrue )
static HB_CODETRACE_FUNC( hb_p_jumptrue )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 3 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 3 );
}
hbdead.c203
STATIC HB_CODETRACE_FUNC(hb_p_jumptruefar )
static HB_CODETRACE_FUNC( hb_p_jumptruefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   hb_compCodeTraceAddJump( cargo, ulNewPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 4 );
}
hbdead.c214
STATIC HB_CODETRACE_FUNC(hb_p_seqalways )
static HB_CODETRACE_FUNC( hb_p_seqalways )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulAlwaysPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   hb_compCodeTraceAddJump( cargo, ulAlwaysPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 4 );
}
hbdead.c225
STATIC HB_CODETRACE_FUNC(hb_p_alwaysbegin )
static HB_CODETRACE_FUNC( hb_p_alwaysbegin )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulAlwaysEndPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   hb_compCodeTraceAddJump( cargo, ulAlwaysEndPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 4 );
}
hbdead.c236
STATIC HB_CODETRACE_FUNC(hb_p_seqbegin )
static HB_CODETRACE_FUNC( hb_p_seqbegin )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulRecoverPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   /* this is a hack for -gc3 output - it's not really necessary
    * for pure PCODE evaluation
    */
   if( pFunc->pCode[ ulRecoverPos ] != HB_P_SEQEND &&
       pFunc->pCode[ ulRecoverPos - 4 ] == HB_P_SEQEND )
   {
      hb_compCodeTraceAddJump( cargo, ulRecoverPos - 4 );
   }

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );
   hb_compCodeTraceAddJump( cargo, ulRecoverPos );

   return hb_compCodeTraceNextPos( cargo, lPCodePos + 4 );
}
hbdead.c247
STATIC HB_CODETRACE_FUNC(hb_p_seqend )
static HB_CODETRACE_FUNC( hb_p_seqend )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   hb_compCodeTraceMark( cargo, lPCodePos, 4 );

   return hb_compCodeTraceNextPos( cargo, ulNewPos );
}
hbdead.c267
STATIC HB_CODETRACE_FUNC(hb_p_switch )
static HB_CODETRACE_FUNC( hb_p_switch )
{
   USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us;
   ULONG ulStart = lPCodePos, ulNewPos;

   lPCodePos += 3;
   for( us = 0; us < usCases; ++us )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_PUSHBYTE:
            lPCodePos += 2;
            break;
         case HB_P_PUSHINT:
            lPCodePos += 3;
            break;
         case HB_P_PUSHLONG:
         case HB_P_PUSHDATE:
            lPCodePos += 5;
            break;
         case HB_P_PUSHLONGLONG:
            lPCodePos += 9;
            break;
         case HB_P_PUSHSTRSHORT:
            lPCodePos += 2 + pFunc->pCode[ lPCodePos + 1 ];
            break;
         case HB_P_PUSHSTR:
            lPCodePos += 3 + HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
            break;
         case HB_P_PUSHSTRLARGE:
            lPCodePos += 4 + HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );
            break;
         case HB_P_PUSHNIL:
            /* default clause */
            us = usCases;
            lPCodePos++;
            break;
      }
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_JUMPNEAR:
            ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];
            lPCodePos += 2;
            break;
         case HB_P_JUMP:
            ulNewPos = lPCodePos + HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 3;
            break;
         /*case HB_P_JUMPFAR:*/
         default:
            ulNewPos = lPCodePos + HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 1 ] );
            lPCodePos += 4;
            break;
      }
      hb_compCodeTraceAddJump( cargo, ulNewPos );
   }
   hb_compCodeTraceMark( cargo, ulStart, lPCodePos - ulStart );

   return hb_compCodeTraceNextPos( cargo, us > usCases ?
                                   cargo->ulPCodeSize : lPCodePos );
}
hbdead.c278
STATIC HB_CODETRACE_FUNC(hb_p_endblock )
static HB_CODETRACE_FUNC( hb_p_endblock )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   hb_compCodeTraceMark( cargo, lPCodePos, 1 );
   return hb_compCodeTraceNextPos( cargo, cargo->ulPCodeSize );
}
hbdead.c340
STATIC HB_CODETRACE_FUNC(hb_p_endproc )
static HB_CODETRACE_FUNC( hb_p_endproc )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );

   hb_compCodeTraceMark( cargo, lPCodePos, 1 );
   return hb_compCodeTraceNextPos( cargo, cargo->ulPCodeSize );
}

/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const PHB_CODETRACE_FUNC s_codeTraceFuncTable[] =
{
   hb_p_default,               /* HB_P_AND,                  */
   hb_p_default,               /* HB_P_ARRAYPUSH,            */
   hb_p_default,               /* HB_P_ARRAYPOP,             */
   hb_p_default,               /* HB_P_ARRAYDIM,             */
   hb_p_default,               /* HB_P_ARRAYGEN,             */
   hb_p_default,               /* HB_P_EQUAL,                */
   hb_p_endblock,              /* HB_P_ENDBLOCK,             */
   hb_p_endproc,               /* HB_P_ENDPROC,              */
   hb_p_default,               /* HB_P_EXACTLYEQUAL,         */
   hb_p_default,               /* HB_P_FALSE,                */
   hb_p_default,               /* HB_P_FORTEST,              */
   hb_p_default,               /* HB_P_FUNCTION,             */
   hb_p_default,               /* HB_P_FUNCTIONSHORT,        */
   hb_p_default,               /* HB_P_FRAME,                */
   hb_p_default,               /* HB_P_FUNCPTR,              */
   hb_p_default,               /* HB_P_GREATER,              */
   hb_p_default,               /* HB_P_GREATEREQUAL,         */
   hb_p_default,               /* HB_P_DEC,                  */
   hb_p_default,               /* HB_P_DIVIDE,               */
   hb_p_default,               /* HB_P_DO,                   */
   hb_p_default,               /* HB_P_DOSHORT,              */
   hb_p_default,               /* HB_P_DUPLICATE,            */
   hb_p_default,               /* HB_P_DUPLTWO,              */
   hb_p_default,               /* HB_P_INC,                  */
   hb_p_default,               /* HB_P_INSTRING,             */
   hb_p_jumpnear,              /* HB_P_JUMPNEAR,             */
   hb_p_jump,                  /* HB_P_JUMP,                 */
   hb_p_jumpfar,               /* HB_P_JUMPFAR,              */
   hb_p_jumpfalsenear,         /* HB_P_JUMPFALSENEAR,        */
   hb_p_jumpfalse,             /* HB_P_JUMPFALSE,            */
   hb_p_jumpfalsefar,          /* HB_P_JUMPFALSEFAR,         */
   hb_p_jumptruenear,          /* HB_P_JUMPTRUENEAR,         */
   hb_p_jumptrue,              /* HB_P_JUMPTRUE,             */
   hb_p_jumptruefar,           /* HB_P_JUMPTRUEFAR,          */
   hb_p_default,               /* HB_P_LESSEQUAL,            */
   hb_p_default,               /* HB_P_LESS,                 */
   hb_p_default,               /* HB_P_LINE,                 */
   hb_p_default,               /* HB_P_LOCALNAME,            */
   hb_p_default,               /* HB_P_MACROPOP,             */
   hb_p_default,               /* HB_P_MACROPOPALIASED,      */
   hb_p_default,               /* HB_P_MACROPUSH,            */
   hb_p_default,               /* HB_P_MACROARRAYGEN,        */
   hb_p_default,               /* HB_P_MACROPUSHLIST,        */
   hb_p_default,               /* HB_P_MACROPUSHINDEX,       */
   hb_p_default,               /* HB_P_MACROPUSHPARE,        */
   hb_p_default,               /* HB_P_MACROPUSHALIASED,     */
   hb_p_default,               /* HB_P_MACROSYMBOL,          */
   hb_p_default,               /* HB_P_MACROTEXT,            */
   hb_p_default,               /* HB_P_MESSAGE,              */
   hb_p_default,               /* HB_P_MINUS,                */
   hb_p_default,               /* HB_P_MODULUS,              */
   hb_p_default,               /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   hb_p_default,               /* HB_P_MMESSAGE,             */
   hb_p_default,               /* HB_P_MPOPALIASEDFIELD,     */
   hb_p_default,               /* HB_P_MPOPALIASEDVAR,       */
   hb_p_default,               /* HB_P_MPOPFIELD,            */
   hb_p_default,               /* HB_P_MPOPMEMVAR,           */
   hb_p_default,               /* HB_P_MPUSHALIASEDFIELD,    */
   hb_p_default,               /* HB_P_MPUSHALIASEDVAR,      */
   hb_p_default,               /* HB_P_MPUSHBLOCK,           */
   hb_p_default,               /* HB_P_MPUSHFIELD,           */
   hb_p_default,               /* HB_P_MPUSHMEMVAR,          */
   hb_p_default,               /* HB_P_MPUSHMEMVARREF,       */
   hb_p_default,               /* HB_P_MPUSHSYM,             */
   hb_p_default,               /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   hb_p_default,               /* HB_P_MULT,                 */
   hb_p_default,               /* HB_P_NEGATE,               */
   hb_p_default,               /* HB_P_NOOP,                 */
   hb_p_default,               /* HB_P_NOT,                  */
   hb_p_default,               /* HB_P_NOTEQUAL,             */
   hb_p_default,               /* HB_P_OR,                   */
   hb_p_default,               /* HB_P_PARAMETER,            */
   hb_p_default,               /* HB_P_PLUS,                 */
   hb_p_default,               /* HB_P_POP,                  */
   hb_p_default,               /* HB_P_POPALIAS,             */
   hb_p_default,               /* HB_P_POPALIASEDFIELD,      */
   hb_p_default,               /* HB_P_POPALIASEDFIELDNEAR,  */
   hb_p_default,               /* HB_P_POPALIASEDVAR,        */
   hb_p_default,               /* HB_P_POPFIELD,             */
   hb_p_default,               /* HB_P_POPLOCAL,             */
   hb_p_default,               /* HB_P_POPLOCALNEAR,         */
   hb_p_default,               /* HB_P_POPMEMVAR,            */
   hb_p_default,               /* HB_P_POPSTATIC,            */
   hb_p_default,               /* HB_P_POPVARIABLE,          */
   hb_p_default,               /* HB_P_POWER,                */
   hb_p_default,               /* HB_P_PUSHALIAS,            */
   hb_p_default,               /* HB_P_PUSHALIASEDFIELD,     */
   hb_p_default,               /* HB_P_PUSHALIASEDFIELDNEAR, */
   hb_p_default,               /* HB_P_PUSHALIASEDVAR,       */
   hb_p_default,               /* HB_P_PUSHBLOCK,            */
   hb_p_default,               /* HB_P_PUSHBLOCKSHORT,       */
   hb_p_default,               /* HB_P_PUSHFIELD,            */
   hb_p_default,               /* HB_P_PUSHBYTE,             */
   hb_p_default,               /* HB_P_PUSHINT,              */
   hb_p_default,               /* HB_P_PUSHLOCAL,            */
   hb_p_default,               /* HB_P_PUSHLOCALNEAR,        */
   hb_p_default,               /* HB_P_PUSHLOCALREF,         */
   hb_p_default,               /* HB_P_PUSHLONG,             */
   hb_p_default,               /* HB_P_PUSHMEMVAR,           */
   hb_p_default,               /* HB_P_PUSHMEMVARREF,        */
   hb_p_default,               /* HB_P_PUSHNIL,              */
   hb_p_default,               /* HB_P_PUSHDOUBLE,           */
   hb_p_default,               /* HB_P_PUSHSELF,             */
   hb_p_default,               /* HB_P_PUSHSTATIC,           */
   hb_p_default,               /* HB_P_PUSHSTATICREF,        */
   hb_p_default,               /* HB_P_PUSHSTR,              */
   hb_p_default,               /* HB_P_PUSHSTRSHORT,         */
   hb_p_default,               /* HB_P_PUSHSYM,              */
   hb_p_default,               /* HB_P_PUSHSYMNEAR,          */
   hb_p_default,               /* HB_P_PUSHVARIABLE,         */
   hb_p_default,               /* HB_P_RETVALUE,             */
   hb_p_default,               /* HB_P_SEND,                 */
   hb_p_default,               /* HB_P_SENDSHORT,            */
   hb_p_seqbegin,              /* HB_P_SEQBEGIN,             */
   hb_p_seqend,                /* HB_P_SEQEND,               */
   hb_p_default,               /* HB_P_SEQRECOVER,           */
   hb_p_default,               /* HB_P_SFRAME,               */
   hb_p_default,               /* HB_P_STATICS,              */
   hb_p_default,               /* HB_P_STATICNAME,           */
   hb_p_default,               /* HB_P_SWAPALIAS,            */
   hb_p_default,               /* HB_P_TRUE,                 */
   hb_p_default,               /* HB_P_ZERO,                 */
   hb_p_default,               /* HB_P_ONE,                  */
   hb_p_default,               /* HB_P_MACROFUNC,            */
   hb_p_default,               /* HB_P_MACRODO,              */
   hb_p_default,               /* HB_P_MPUSHSTR,             */
   hb_p_default,               /* HB_P_LOCALNEARADDINT,      */
   hb_p_default,               /* HB_P_MACROPUSHREF          */
   hb_p_default,               /* HB_P_PUSHLONGLONG          */
   hb_p_default,               /* HB_P_ENUMSTART             */
   hb_p_default,               /* HB_P_ENUMNEXT              */
   hb_p_default,               /* HB_P_ENUMPREV              */
   hb_p_default,               /* HB_P_ENUMEND               */
   hb_p_switch,                /* HB_P_SWITCH                */
   hb_p_default,               /* HB_P_PUSHDATE              */
                               /* optimalization of inlined math operations */
   hb_p_default,               /* HB_P_PLUSEQPOP             */
   hb_p_default,               /* HB_P_MINUSEQPOP            */
   hb_p_default,               /* HB_P_MULTEQPOP             */
   hb_p_default,               /* HB_P_DIVEQPOP              */
   hb_p_default,               /* HB_P_PLUSEQ                */
   hb_p_default,               /* HB_P_MINUSEQ               */
   hb_p_default,               /* HB_P_MULTEQ                */
   hb_p_default,               /* HB_P_DIVEQ                 */
   hb_p_default,               /* HB_P_WITHOBJECTSTART       */
   hb_p_default,               /* HB_P_WITHOBJECTMESSAGE     */
   hb_p_default,               /* HB_P_WITHOBJECTEND         */
   hb_p_default,               /* HB_P_MACROSEND             */
   hb_p_default,               /* HB_P_PUSHOVARREF           */
   hb_p_default,               /* HB_P_ARRAYPUSHREF          */
   hb_p_default,               /* HB_P_VFRAME                */
   hb_p_default,               /* HB_P_LARGEFRAME            */
   hb_p_default,               /* HB_P_LARGEVFRAME           */
   hb_p_default,               /* HB_P_PUSHSTRHIDDEN         */
   hb_p_default,               /* HB_P_LOCALADDINT           */
   hb_p_default,               /* HB_P_MODEQPOP              */
   hb_p_default,               /* HB_P_EXPEQPOP              */
   hb_p_default,               /* HB_P_MODEQ                 */
   hb_p_default,               /* HB_P_EXPEQ                 */
   hb_p_default,               /* HB_P_DUPLUNREF             */
   hb_p_default,               /* HB_P_MPUSHBLOCKLARGE       */
   hb_p_default,               /* HB_P_MPUSHSTRLARGE         */
   hb_p_default,               /* HB_P_PUSHBLOCKLARGE        */
   hb_p_default,               /* HB_P_PUSHSTRLARGE          */
   hb_p_default,               /* HB_P_SWAP                  */
   hb_p_default,               /* HB_P_PUSHVPARAMS           */
   hb_p_default,               /* HB_P_PUSHUNREF             */
   hb_p_seqalways,             /* HB_P_SEQALWAYS             */
   hb_p_alwaysbegin,           /* HB_P_ALWAYSBEGIN           */
   hb_p_default,               /* HB_P_ALWAYSEND             */
   hb_p_default,               /* HB_P_DECEQPOP              */
   hb_p_default,               /* HB_P_INCEQPOP              */
   hb_p_default,               /* HB_P_DECEQ                 */
   hb_p_default,               /* HB_P_INCEQ                 */
   hb_p_default,               /* HB_P_LOCALDEC              */
   hb_p_default,               /* HB_P_LOCALINC              */
   hb_p_default,               /* HB_P_LOCALINCPUSH          */
   hb_p_default,               /* HB_P_PUSHFUNCSYM           */
   hb_p_default,               /* HB_P_HASHGEN               */
   hb_p_default,               /* HB_P_SEQBLOCK              */
   hb_p_default                /* HB_P_THREADSTATICS         */
};
hbdead.c349
VOIDhb_compCodeTraceMarkDead( HB_COMP_DECL, PFUNCTION pFunc )
void hb_compCodeTraceMarkDead( HB_COMP_DECL, PFUNCTION pFunc )
{
   const PHB_CODETRACE_FUNC * pFuncTable = s_codeTraceFuncTable;
   HB_CODETRACE_INFO code_info;

   if( ! HB_COMP_ISSUPPORTED( HB_COMPFLAG_OPTJUMP ) || pFunc->lPCodePos < 2 )
      return;

   assert( HB_P_LAST_PCODE == sizeof( s_codeTraceFuncTable ) / sizeof( PHB_CODETRACE_FUNC ) );

   code_info.plJumps = NULL;
   code_info.ulJumpPos = 0;
   code_info.ulJumpSize = 0;
   code_info.ulJumpCount = 0;
   code_info.ulPCodeSize = pFunc->lPCodePos;
   code_info.fFinished = FALSE;

   code_info.pCodeMark = ( BYTE * ) hb_xgrab( code_info.ulPCodeSize );
   memset( code_info.pCodeMark, 0, code_info.ulPCodeSize );

   hb_compPCodeTrace( pFunc, ( HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) &code_info );

   if( code_info.fFinished )
   {
      ULONG ulPos = 0, ulCount = 0;
      BYTE bLastCode = HB_P_LAST_PCODE;

      do
      {
         if( code_info.pCodeMark[ ulPos ] == 0 )
            ++ulCount;
         else
         {
            bLastCode = pFunc->pCode[ ulPos ];
            if( ulCount )
            {
               hb_compNOOPfill( pFunc, ulPos - ulCount, ulCount, FALSE, TRUE );
               ulCount = 0;
            }
         }
      }
      while( ++ulPos < code_info.ulPCodeSize );

      /* do not strip the last HB_P_ENDBLOCK / HB_P_ENDPROC marker */
      if( ulCount > 0 && bLastCode != ( pFunc->szName ? HB_P_ENDPROC : HB_P_ENDBLOCK ) )
      {
         --ulPos;
         --ulCount;
      }

      if( ulCount > 0 )
      {
         /*
          * We cannot simply decrease size of the generated PCODE here
          * because jumps or noops tables may point to the this area
          * and we will have to update also the jump table, [druzus]
          */
         /*
         pFunc->pCode[ ulPos - ulCount ] = pFunc->pCode[ ulPos - 1 ];
         pFunc->lPCodePos = pFunc->lPCodeSize = ulPos - ulCount + 1;
         */
         hb_compNOOPfill( pFunc, ulPos - ulCount, ulCount, FALSE, TRUE );
      }
   }

   hb_xfree( code_info.pCodeMark );
   if( code_info.plJumps )
      hb_xfree( code_info.plJumps );
}
hbdead.c548
hbfix.c
TypeFunctionSourceLine
STATIC HB_FIX_FUNC(hb_p_pushblock )
static HB_FIX_FUNC( hb_p_pushblock )
{
   BYTE * pLocal = &pFunc->pCode[ lPCodePos + 7 ];
   USHORT wVar;

   HB_SYMBOL_UNUSED( cargo );

   /* opcode + codeblock size + number of parameters + number of local variables */
   wVar = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 5 ] );

   /* fix local variable's reference */
   while( wVar-- )
   {
      USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount;
      pLocal[ 0 ] = HB_LOBYTE( wLocal );
      pLocal[ 1 ] = HB_HIBYTE( wLocal );
      pLocal += 2;
   }

   /* only local variables used outside of a codeblock need fixing
    * skip the codeblock body
    */
   return HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbfix.c67
STATIC HB_FIX_FUNC(hb_p_pushblocklarge )
static HB_FIX_FUNC( hb_p_pushblocklarge )
{
   BYTE * pLocal = &pFunc->pCode[ lPCodePos + 8 ];
   USHORT wVar;

   HB_SYMBOL_UNUSED( cargo );

   /* opcode + codeblock size + number of parameters + number of local variables */
   wVar = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 6 ] );

   /* fix local variable's reference */
   while( wVar-- )
   {
      USHORT wLocal = HB_PCODE_MKUSHORT( pLocal ) + pFunc->wParamCount;
      pLocal[ 0 ] = HB_LOBYTE( wLocal );
      pLocal[ 1 ] = HB_HIBYTE( wLocal );
      pLocal += 2;
   }

   /* only local variables used outside of a codeblock need fixing
    * skip the codeblock body
    */
   return HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbfix.c92
STATIC HB_FIX_FUNC(hb_p_localfix )
static HB_FIX_FUNC( hb_p_localfix )
{
   BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
   SHORT iVar = HB_PCODE_MKSHORT( pVar );

   HB_SYMBOL_UNUSED( cargo );

   iVar += pFunc->wParamCount;
   pVar[ 0 ] = HB_LOBYTE( iVar );
   pVar[ 1 ] = HB_HIBYTE( iVar );

   return 0;
}
hbfix.c117
STATIC HB_FIX_FUNC(hb_p_localnearerr )
static HB_FIX_FUNC( hb_p_localnearerr )
{
   HB_SYMBOL_UNUSED( pFunc );
   HB_SYMBOL_UNUSED( lPCodePos );
   /*
    * this code should never be executed because compiler should
    * generate only non size optimized HB_P_POPLOCAL pcodes
    * for function body
    */
   hb_compGenError( cargo->HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_OPTIMIZEDLOCAL_OUT_OF_RANGE, "", "" );

   return 0;
}

/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const HB_FIX_FUNC_PTR s_fixlocals_table[] =
{
   NULL,                       /* HB_P_AND,                  */
   NULL,                       /* HB_P_ARRAYPUSH,            */
   NULL,                       /* HB_P_ARRAYPOP,             */
   NULL,                       /* HB_P_ARRAYDIM,             */
   NULL,                       /* HB_P_ARRAYGEN,             */
   NULL,                       /* HB_P_EQUAL,                */
   NULL,                       /* HB_P_ENDBLOCK,             */
   NULL,                       /* HB_P_ENDPROC,              */
   NULL,                       /* HB_P_EXACTLYEQUAL,         */
   NULL,                       /* HB_P_FALSE,                */
   NULL,                       /* HB_P_FORTEST,              */
   NULL,                       /* HB_P_FUNCTION,             */
   NULL,                       /* HB_P_FUNCTIONSHORT,        */
   NULL,                       /* HB_P_FRAME,                */
   NULL,                       /* HB_P_FUNCPTR,              */
   NULL,                       /* HB_P_GREATER,              */
   NULL,                       /* HB_P_GREATEREQUAL,         */
   NULL,                       /* HB_P_DEC,                  */
   NULL,                       /* HB_P_DIVIDE,               */
   NULL,                       /* HB_P_DO,                   */
   NULL,                       /* HB_P_DOSHORT,              */
   NULL,                       /* HB_P_DUPLICATE,            */
   NULL,                       /* HB_P_DUPLTWO,              */
   NULL,                       /* HB_P_INC,                  */
   NULL,                       /* HB_P_INSTRING,             */
   NULL,                       /* HB_P_JUMPNEAR,             */
   NULL,                       /* HB_P_JUMP,                 */
   NULL,                       /* HB_P_JUMPFAR,              */
   NULL,                       /* HB_P_JUMPFALSENEAR,        */
   NULL,                       /* HB_P_JUMPFALSE,            */
   NULL,                       /* HB_P_JUMPFALSEFAR,         */
   NULL,                       /* HB_P_JUMPTRUENEAR,         */
   NULL,                       /* HB_P_JUMPTRUE,             */
   NULL,                       /* HB_P_JUMPTRUEFAR,          */
   NULL,                       /* HB_P_LESSEQUAL,            */
   NULL,                       /* HB_P_LESS,                 */
   NULL,                       /* HB_P_LINE,                 */
   hb_p_localfix,              /* HB_P_LOCALNAME,            */
   NULL,                       /* HB_P_MACROPOP,             */
   NULL,                       /* HB_P_MACROPOPALIASED,      */
   NULL,                       /* HB_P_MACROPUSH,            */
   NULL,                       /* HB_P_MACROARRAYGEN,        */
   NULL,                       /* HB_P_MACROPUSHLIST,        */
   NULL,                       /* HB_P_MACROPUSHINDEX,       */
   NULL,                       /* HB_P_MACROPUSHPARE,        */
   NULL,                       /* HB_P_MACROPUSHALIASED,     */
   NULL,                       /* HB_P_MACROSYMBOL,          */
   NULL,                       /* HB_P_MACROTEXT,            */
   NULL,                       /* HB_P_MESSAGE,              */
   NULL,                       /* HB_P_MINUS,                */
   NULL,                       /* HB_P_MODULUS,              */
   NULL,                       /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   NULL,                       /* HB_P_MMESSAGE,             */
   NULL,                       /* HB_P_MPOPALIASEDFIELD,     */
   NULL,                       /* HB_P_MPOPALIASEDVAR,       */
   NULL,                       /* HB_P_MPOPFIELD,            */
   NULL,                       /* HB_P_MPOPMEMVAR,           */
   NULL,                       /* HB_P_MPUSHALIASEDFIELD,    */
   NULL,                       /* HB_P_MPUSHALIASEDVAR,      */
   NULL,                       /* HB_P_MPUSHBLOCK,           */
   NULL,                       /* HB_P_MPUSHFIELD,           */
   NULL,                       /* HB_P_MPUSHMEMVAR,          */
   NULL,                       /* HB_P_MPUSHMEMVARREF,       */
   NULL,                       /* HB_P_MPUSHSYM,             */
   NULL,                       /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   NULL,                       /* HB_P_MULT,                 */
   NULL,                       /* HB_P_NEGATE,               */
   NULL,                       /* HB_P_NOOP,                 */
   NULL,                       /* HB_P_NOT,                  */
   NULL,                       /* HB_P_NOTEQUAL,             */
   NULL,                       /* HB_P_OR,                   */
   NULL,                       /* HB_P_PARAMETER,            */
   NULL,                       /* HB_P_PLUS,                 */
   NULL,                       /* HB_P_POP,                  */
   NULL,                       /* HB_P_POPALIAS,             */
   NULL,                       /* HB_P_POPALIASEDFIELD,      */
   NULL,                       /* HB_P_POPALIASEDFIELDNEAR,  */
   NULL,                       /* HB_P_POPALIASEDVAR,        */
   NULL,                       /* HB_P_POPFIELD,             */
   hb_p_localfix,              /* HB_P_POPLOCAL,             */
   hb_p_localnearerr,          /* HB_P_POPLOCALNEAR,         */
   NULL,                       /* HB_P_POPMEMVAR,            */
   NULL,                       /* HB_P_POPSTATIC,            */
   NULL,                       /* HB_P_POPVARIABLE,          */
   NULL,                       /* HB_P_POWER,                */
   NULL,                       /* HB_P_PUSHALIAS,            */
   NULL,                       /* HB_P_PUSHALIASEDFIELD,     */
   NULL,                       /* HB_P_PUSHALIASEDFIELDNEAR, */
   NULL,                       /* HB_P_PUSHALIASEDVAR,       */
   hb_p_pushblock,             /* HB_P_PUSHBLOCK,            */
   NULL,                       /* HB_P_PUSHBLOCKSHORT,       */
   NULL,                       /* HB_P_PUSHFIELD,            */
   NULL,                       /* HB_P_PUSHBYTE,             */
   NULL,                       /* HB_P_PUSHINT,              */
   hb_p_localfix,              /* HB_P_PUSHLOCAL,            */
   hb_p_localnearerr,          /* HB_P_PUSHLOCALNEAR,        */
   hb_p_localfix,              /* HB_P_PUSHLOCALREF,         */
   NULL,                       /* HB_P_PUSHLONG,             */
   NULL,                       /* HB_P_PUSHMEMVAR,           */
   NULL,                       /* HB_P_PUSHMEMVARREF,        */
   NULL,                       /* HB_P_PUSHNIL,              */
   NULL,                       /* HB_P_PUSHDOUBLE,           */
   NULL,                       /* HB_P_PUSHSELF,             */
   NULL,                       /* HB_P_PUSHSTATIC,           */
   NULL,                       /* HB_P_PUSHSTATICREF,        */
   NULL,                       /* HB_P_PUSHSTR,              */
   NULL,                       /* HB_P_PUSHSTRSHORT,         */
   NULL,                       /* HB_P_PUSHSYM,              */
   NULL,                       /* HB_P_PUSHSYMNEAR,          */
   NULL,                       /* HB_P_PUSHVARIABLE,         */
   NULL,                       /* HB_P_RETVALUE,             */
   NULL,                       /* HB_P_SEND,                 */
   NULL,                       /* HB_P_SENDSHORT,            */
   NULL,                       /* HB_P_SEQBEGIN,             */
   NULL,                       /* HB_P_SEQEND,               */
   NULL,                       /* HB_P_SEQRECOVER,           */
   NULL,                       /* HB_P_SFRAME,               */
   NULL,                       /* HB_P_STATICS,              */
   NULL,                       /* HB_P_STATICNAME,           */
   NULL,                       /* HB_P_SWAPALIAS,            */
   NULL,                       /* HB_P_TRUE,                 */
   NULL,                       /* HB_P_ZERO,                 */
   NULL,                       /* HB_P_ONE,                  */
   NULL,                       /* HB_P_MACROFUNC,            */
   NULL,                       /* HB_P_MACRODO,              */
   NULL,                       /* HB_P_MPUSHSTR,             */
   hb_p_localnearerr,          /* HB_P_LOCALNEARADDINT,      */
   NULL,                       /* HB_P_MACROPUSHREF          */
   NULL,                       /* HB_P_PUSHLONGLONG          */
   NULL,                       /* HB_P_ENUMSTART             */
   NULL,                       /* HB_P_ENUMNEXT              */
   NULL,                       /* HB_P_ENUMPREV              */
   NULL,                       /* HB_P_ENUMEND               */
   NULL,                       /* HB_P_SWITCH                */
   NULL,                       /* HB_P_PUSHDATE              */
   NULL,                       /* HB_P_PLUSEQPOP             */
   NULL,                       /* HB_P_MINUSEQPOP            */
   NULL,                       /* HB_P_MULTEQPOP             */
   NULL,                       /* HB_P_DIVEQPOP              */
   NULL,                       /* HB_P_PLUSEQ                */
   NULL,                       /* HB_P_MINUSEQ               */
   NULL,                       /* HB_P_MULTEQ                */
   NULL,                       /* HB_P_DIVEQ                 */
   NULL,                       /* HB_P_WITHOBJECTSTART       */
   NULL,                       /* HB_P_WITHOBJECTMESSAGE     */
   NULL,                       /* HB_P_WITHOBJECTEND         */
   NULL,                       /* HB_P_MACROSEND             */
   NULL,                       /* HB_P_PUSHOVARREF           */
   NULL,                       /* HB_P_ARRAYPUSHREF          */
   NULL,                       /* HB_P_VFRAME                */
   NULL,                       /* HB_P_LARGEFRAME            */
   NULL,                       /* HB_P_LARGEVFRAME           */
   NULL,                       /* HB_P_PUSHSTRHIDDEN         */
   hb_p_localfix,              /* HB_P_LOCALADDINT           */
   NULL,                       /* HB_P_MODEQPOP              */
   NULL,                       /* HB_P_EXPEQPOP              */
   NULL,                       /* HB_P_MODEQ                 */
   NULL,                       /* HB_P_EXPEQ                 */
   NULL,                       /* HB_P_DUPLUNREF             */
   NULL,                       /* HB_P_MPUSHBLOCKLARGE       */
   NULL,                       /* HB_P_MPUSHSTRLARGE         */
   hb_p_pushblocklarge,        /* HB_P_PUSHBLOCKLARGE        */
   NULL,                       /* HB_P_PUSHSTRLARGE          */
   NULL,                       /* HB_P_SWAP                  */
   NULL,                       /* HB_P_PUSHVPARAMS           */
   NULL,                       /* HB_P_PUSHUNREF             */
   NULL,                       /* HB_P_SEQALWAYS             */
   NULL,                       /* HB_P_ALWAYSBEGIN           */
   NULL,                       /* HB_P_ALWAYSEND             */
   NULL,                       /* HB_P_DECEQPOP              */
   NULL,                       /* HB_P_INCEQPOP              */
   NULL,                       /* HB_P_DECEQ                 */
   NULL,                       /* HB_P_INCEQ                 */
   hb_p_localfix,              /* HB_P_LOCALDEC              */
   hb_p_localfix,              /* HB_P_LOCALINC              */
   hb_p_localfix,              /* HB_P_LOCALINCPUSH          */
   NULL,                       /* HB_P_PUSHFUNCSYM           */
   NULL,                       /* HB_P_HASHGEN               */
   NULL,                       /* HB_P_SEQBLOCK              */
   NULL                        /* HB_P_THREADSTATICS         */
};
hbfix.c131
VOIDhb_compFixFuncPCode( HB_COMP_DECL, PFUNCTION pFunc )
void hb_compFixFuncPCode( HB_COMP_DECL, PFUNCTION pFunc )
{
   const HB_FIX_FUNC_PTR * pFuncTable = s_fixlocals_table;
   HB_FIX_INFO fix_info;

   fix_info.HB_COMP_PARAM = HB_COMP_PARAM;

   assert( HB_P_LAST_PCODE == sizeof( s_fixlocals_table ) / sizeof( HB_FIX_FUNC_PTR ) );

   hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) &fix_info );
}
hbfix.c334
hbfunchk.c
TypeFunctionSourceLine
BOOLhb_compFunCallCheck( HB_COMP_DECL, const char * szFuncCall, int iArgs )
BOOL hb_compFunCallCheck( HB_COMP_DECL, const char * szFuncCall, int iArgs )
{
   unsigned int uiFirst = 0, uiLast = HB_STD_FUNCOUNT - 1, uiMiddle;
   int iLen = ( int ) strlen( szFuncCall ), iCmp;

   /* Respect 4 or more letters shortcuts
    * SECO() is not allowed because of Clipper function SECONDS()
    * however SECO32() is a valid name.
    */
   if( iLen < 4 )
      iLen = 4;
   do
   {
      uiMiddle = ( uiFirst + uiLast ) >> 1;
      iCmp = strncmp( szFuncCall, hb_StdFunc[ uiMiddle ].cFuncName, iLen );
      if( iCmp <= 0 )
         uiLast = uiMiddle;
      else
         uiFirst = uiMiddle + 1;
   }
   while( uiFirst < uiLast );

   if( uiFirst != uiMiddle )
      iCmp = strncmp( szFuncCall, hb_StdFunc[ uiFirst ].cFuncName, iLen );

   if( iCmp == 0 )
   {
      PHB_FUNCINFO pFunc = &hb_StdFunc[ uiFirst ];

      if( ( pFunc->iMinParam != -1 && iArgs < pFunc->iMinParam ) ||
          ( pFunc->iMaxParam != -1 && iArgs > pFunc->iMaxParam ) )
      {
         char szMsg[ 64 ];

         if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_HARBOUR ) )
         {
            if( pFunc->iMinParam == pFunc->iMaxParam )
               snprintf( szMsg, sizeof( szMsg ), "\nPassed: %i, expected: %i", iArgs, pFunc->iMinParam );
            else if( pFunc->iMaxParam == -1 )
               snprintf( szMsg, sizeof( szMsg ), "\nPassed: %i, expected at least: %i", iArgs, pFunc->iMinParam );
            else if( pFunc->iMinParam == -1 )
               snprintf( szMsg, sizeof( szMsg ), "\nPassed: %i, expected less than: %i", iArgs, pFunc->iMaxParam );
            else
               snprintf( szMsg, sizeof( szMsg ), "\nPassed: %i, expected from: %i to: %i", iArgs, pFunc->iMinParam, pFunc->iMaxParam );
         }
         else
            szMsg[ 0 ] = '\0';

         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_CHECKING_ARGS, szFuncCall, szMsg );

         return FALSE;
      }
   }

   return TRUE;
}
hbfunchk.c130
hbgenerr.c
TypeFunctionSourceLine
STATIC VOIDhb_compDispMessage( HB_COMP_DECL, char cPrefix, int iValue, const char * szText, const char * szPar1, const char * szPar2 )
static void hb_compDispMessage( HB_COMP_DECL, char cPrefix, int iValue,
                                const char * szText, const char * szPar1, const char * szPar2 )
{
   char buffer[ 512 ];

   if( HB_COMP_PARAM->currModule )
   {
      snprintf( buffer, sizeof( buffer ), "\r%s(%i) ",
                HB_COMP_PARAM->currModule, HB_COMP_PARAM->currLine );
      hb_compOutErr( HB_COMP_PARAM, buffer );
   }

   snprintf( buffer, sizeof( buffer ), "%s %c%04i  ",
             cPrefix == 'W' ? "Warning" : "Error", cPrefix, iValue );
   hb_compOutErr( HB_COMP_PARAM, buffer );
   snprintf( buffer, sizeof( buffer ), szText, szPar1, szPar2 );
   hb_compOutErr( HB_COMP_PARAM, buffer );
   hb_compOutErr( HB_COMP_PARAM, "\n" );
}
hbgenerr.c148
VOIDhb_compGenError( HB_COMP_DECL, const char * szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 )
void hb_compGenError( HB_COMP_DECL, const char * szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 )
{
   if( !HB_COMP_PARAM->fExit && ( cPrefix == 'F' || !HB_COMP_PARAM->fError ) )
   {
      PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;

      hb_compDispMessage( HB_COMP_PARAM, cPrefix, iError,
                          szErrors[ iError - 1 ], szError1, szError2 );

      HB_COMP_PARAM->iErrorCount++;
      HB_COMP_PARAM->fError = TRUE;
      while( pFunc )
      {
         pFunc->bError = TRUE;
         pFunc = pFunc->pOwner;
      }
      /* fatal error - exit immediately */
      if( cPrefix == 'F' )
         HB_COMP_PARAM->fExit = TRUE;
   }
}
hbgenerr.c168
VOIDhb_compGenWarning( HB_COMP_DECL, const char * szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2)
void hb_compGenWarning( HB_COMP_DECL, const char * szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2)
{
   const char * szText = szWarnings[ iWarning - 1 ];

   if( !HB_COMP_PARAM->fExit && ( ( int ) ( szText[ 0 ] - '0' ) <= HB_COMP_PARAM->iWarnings ) )
   {
      hb_compDispMessage( HB_COMP_PARAM, cPrefix, iWarning,
                          szText + 1, szWarning1, szWarning2 );

      HB_COMP_PARAM->fAnyWarning = TRUE;    /* report warnings at exit */
   }
}
hbgenerr.c190
HB_EXPR_PTRhb_compErrorLValue( HB_COMP_DECL, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compErrorLValue( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_LVALUE, szDesc, NULL );
   return pExpr;
}
hbgenerr.c203
HB_EXPR_PTRhb_compErrorIndex( HB_COMP_DECL, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compErrorIndex( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_INDEX, szDesc, NULL );
   return pExpr;
}
hbgenerr.c210
HB_EXPR_PTRhb_compErrorBound( HB_COMP_DECL, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compErrorBound( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_BOUND, szDesc, NULL );
   return pExpr;
}
hbgenerr.c217
HB_EXPR_PTRhb_compErrorAlias( HB_COMP_DECL, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compErrorAlias( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_ALIAS, szDesc, NULL );
   return pExpr;
}
hbgenerr.c224
HB_EXPR_PTRhb_compErrorStatic( HB_COMP_DECL, const char * szVarName, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compErrorStatic( HB_COMP_DECL, const char * szVarName, HB_EXPR_PTR pExpr )
{
   const char * szDesc = hb_compExprDescription( pExpr );
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_ILLEGAL_INIT, szVarName, szDesc );
   return pExpr;
}
hbgenerr.c231
HB_EXPR_PTRhb_compWarnMeaningless( HB_COMP_DECL, HB_EXPR_PTR pExpr )
HB_EXPR_PTR hb_compWarnMeaningless( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
   if( !HB_COMP_PARAM->fMeaningful )
   {
      const char * szDesc = hb_compExprDescription( pExpr );
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_MEANINGLESS, szDesc, NULL );
   }
   return pExpr;
}
hbgenerr.c238
VOIDhb_compErrorCodeblock( HB_COMP_DECL, const char * szBlock )
void hb_compErrorCodeblock( HB_COMP_DECL, const char * szBlock )
{
   BOOL fError = HB_COMP_PARAM->fError;
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_BLOCK, szBlock, NULL );
   HB_COMP_PARAM->fError = fError; /* restore error flag for this line */
}
hbgenerr.c248
VOIDhb_compErrorMacro( HB_COMP_DECL, const char *szText )
void hb_compErrorMacro( HB_COMP_DECL, const char *szText )
{
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_BAD_MACRO, szText, NULL );
}
hbgenerr.c255
HB_EXPR_PTRhb_compErrorRefer( HB_COMP_DECL, HB_EXPR_PTR pExpr, const char * szDesc )
HB_EXPR_PTR hb_compErrorRefer( HB_COMP_DECL, HB_EXPR_PTR pExpr, const char * szDesc )
{
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_INVALID_REFER, szDesc, NULL );
   return pExpr;
}
hbgenerr.c260
VOIDhb_compErrorVParams( HB_COMP_DECL, const char * szFuncOrBlock )
void hb_compErrorVParams( HB_COMP_DECL, const char * szFuncOrBlock )
{
   hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_NOT_VPARAMS, szFuncOrBlock, NULL );
}
hbgenerr.c266
hbident.c
TypeFunctionSourceLine
CONST CHAR *hb_compIdentifierNew( HB_COMP_DECL, const char * szName, int iType )
const char * hb_compIdentifierNew( HB_COMP_DECL, const char * szName, int iType )
{
   const char * szIdent;

   szIdent = ( char * ) hb_hashTableFind( HB_COMP_PARAM->pIdentifiers,
                                          ( void * ) szName );
   if( !szIdent )
   {
      /*
       * In the future we may add direct support for static identifiers
       * so it will not be necessary to allocate separate buffer for them
       */
      if( iType == HB_IDENT_COPY || iType == HB_IDENT_STATIC )
         szIdent = hb_strdup( szName );
      else
         szIdent = szName;

      hb_hashTableAdd( HB_COMP_PARAM->pIdentifiers,
                       ( void * ) szIdent, ( void * ) szIdent );
   }
   else if( iType == HB_IDENT_FREE )
      hb_xfree( ( void * ) szName );

   return szIdent;
}
hbident.c36
STATIC HB_HASH_FUNC(hb_comp_IdentKey )
static HB_HASH_FUNC( hb_comp_IdentKey )    /* ULONG func (void *Value, void *Cargo) */
{
   ULONG ulSum = 0;
   const char *szName = ( char * )Value;
   
   while( *szName )
     ulSum += *szName++;

   HB_SYMBOL_UNUSED( HashPtr );
   HB_SYMBOL_UNUSED( Cargo );

   return ulSum % HB_IDENT_TABLE_SIZE;
}
hbident.c64
STATIC HB_HASH_FUNC(hb_comp_IdentDel )
static HB_HASH_FUNC( hb_comp_IdentDel )
{
   hb_xfree( Value );
   HB_SYMBOL_UNUSED( HashPtr );
   HB_SYMBOL_UNUSED( Cargo );
   return 1;
}
hbident.c79
STATIC HB_HASH_FUNC(hb_comp_IdentComp )
static HB_HASH_FUNC( hb_comp_IdentComp )
{
   HB_SYMBOL_UNUSED( HashPtr );
   return strcmp( (char *)Value, (char *)Cargo );
}
hbident.c88
VOIDhb_compIdentifierOpen( HB_COMP_DECL )
void hb_compIdentifierOpen( HB_COMP_DECL )
{
   HB_COMP_PARAM->pIdentifiers = hb_hashTableCreate( HB_IDENT_TABLE_SIZE,
                     hb_comp_IdentKey, hb_comp_IdentDel, hb_comp_IdentComp );
}
hbident.c95
VOIDhb_compIdentifierClose( HB_COMP_DECL )
void hb_compIdentifierClose( HB_COMP_DECL )
{
   if( HB_COMP_PARAM->pIdentifiers )
   {
      hb_hashTableKill( HB_COMP_PARAM->pIdentifiers );
      HB_COMP_PARAM->pIdentifiers = NULL;
   }
}
hbident.c102
hblbl.c
TypeFunctionSourceLine
STATIC HB_LABEL_FUNC(hb_p_jumpnear )
static HB_LABEL_FUNC( hb_p_jumpnear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   cargo->pulLabels[ ulNewPos ]++;
   return 2;
}
hblbl.c60
STATIC HB_LABEL_FUNC(hb_p_jump )
static HB_LABEL_FUNC( hb_p_jump )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   cargo->pulLabels[ ulNewPos ]++;
   return 3;
}
hblbl.c71
STATIC HB_LABEL_FUNC(hb_p_jumpfar )
static HB_LABEL_FUNC( hb_p_jumpfar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   cargo->pulLabels[ ulNewPos ]++;
   return 4;
}
hblbl.c80
STATIC HB_LABEL_FUNC(hb_p_jumpfalsenear )
static HB_LABEL_FUNC( hb_p_jumpfalsenear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 2;
}
hblbl.c89
STATIC HB_LABEL_FUNC(hb_p_jumpfalse )
static HB_LABEL_FUNC( hb_p_jumpfalse )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 3;
}
hblbl.c98
STATIC HB_LABEL_FUNC(hb_p_jumpfalsefar )
static HB_LABEL_FUNC( hb_p_jumpfalsefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 4;
}
hblbl.c108
STATIC HB_LABEL_FUNC(hb_p_jumptruenear )
static HB_LABEL_FUNC( hb_p_jumptruenear )
{
   ULONG ulNewPos = lPCodePos + ( signed char ) pFunc->pCode[ lPCodePos + 1 ];

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 2;
}
hblbl.c118
STATIC HB_LABEL_FUNC(hb_p_jumptrue )
static HB_LABEL_FUNC( hb_p_jumptrue )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKSHORT( pAddr );

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 3;
}
hblbl.c127
STATIC HB_LABEL_FUNC(hb_p_jumptruefar )
static HB_LABEL_FUNC( hb_p_jumptruefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   cargo->fCondJump = TRUE;
   cargo->pulLabels[ ulNewPos ]++;
   return 4;
}
hblbl.c137
STATIC HB_LABEL_FUNC(hb_p_seqalways )
static HB_LABEL_FUNC( hb_p_seqalways )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulAlwaysPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   if( cargo->fSetSeqBegin )
      cargo->pulLabels[ ulAlwaysPos ]++;
   return 4;
}
hblbl.c147
STATIC HB_LABEL_FUNC(hb_p_alwaysbegin )
static HB_LABEL_FUNC( hb_p_alwaysbegin )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulAlwaysEndPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   if( cargo->fSetSeqBegin )
      cargo->pulLabels[ ulAlwaysEndPos ]++;
   return 4;
}
hblbl.c157
STATIC HB_LABEL_FUNC(hb_p_seqbegin )
static HB_LABEL_FUNC( hb_p_seqbegin )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   ULONG ulRecoverPos = lPCodePos + HB_PCODE_MKINT24( pAddr );

   if( cargo->fSetSeqBegin )
      cargo->pulLabels[ ulRecoverPos ]++;
   return 4;
}
hblbl.c167
STATIC HB_LABEL_FUNC(hb_p_seqend )
static HB_LABEL_FUNC( hb_p_seqend )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   LONG lOffset = HB_PCODE_MKINT24( pAddr );
   ULONG ulNewPos = lPCodePos + lOffset;

   if( cargo->fSetSeqBegin || lOffset != 4 )
      cargo->pulLabels[ ulNewPos ]++;
   return 4;
}

/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const PHB_LABEL_FUNC s_GenLabelFuncTable[] =
{
   NULL,                       /* HB_P_AND,                  */
   NULL,                       /* HB_P_ARRAYPUSH,            */
   NULL,                       /* HB_P_ARRAYPOP,             */
   NULL,                       /* HB_P_ARRAYDIM,             */
   NULL,                       /* HB_P_ARRAYGEN,             */
   NULL,                       /* HB_P_EQUAL,                */
   NULL,                       /* HB_P_ENDBLOCK,             */
   NULL,                       /* HB_P_ENDPROC,              */
   NULL,                       /* HB_P_EXACTLYEQUAL,         */
   NULL,                       /* HB_P_FALSE,                */
   NULL,                       /* HB_P_FORTEST,              */
   NULL,                       /* HB_P_FUNCTION,             */
   NULL,                       /* HB_P_FUNCTIONSHORT,        */
   NULL,                       /* HB_P_FRAME,                */
   NULL,                       /* HB_P_FUNCPTR,              */
   NULL,                       /* HB_P_GREATER,              */
   NULL,                       /* HB_P_GREATEREQUAL,         */
   NULL,                       /* HB_P_DEC,                  */
   NULL,                       /* HB_P_DIVIDE,               */
   NULL,                       /* HB_P_DO,                   */
   NULL,                       /* HB_P_DOSHORT,              */
   NULL,                       /* HB_P_DUPLICATE,            */
   NULL,                       /* HB_P_DUPLTWO,              */
   NULL,                       /* HB_P_INC,                  */
   NULL,                       /* HB_P_INSTRING,             */
   hb_p_jumpnear,              /* HB_P_JUMPNEAR,             */
   hb_p_jump,                  /* HB_P_JUMP,                 */
   hb_p_jumpfar,               /* HB_P_JUMPFAR,              */
   hb_p_jumpfalsenear,         /* HB_P_JUMPFALSENEAR,        */
   hb_p_jumpfalse,             /* HB_P_JUMPFALSE,            */
   hb_p_jumpfalsefar,          /* HB_P_JUMPFALSEFAR,         */
   hb_p_jumptruenear,          /* HB_P_JUMPTRUENEAR,         */
   hb_p_jumptrue,              /* HB_P_JUMPTRUE,             */
   hb_p_jumptruefar,           /* HB_P_JUMPTRUEFAR,          */
   NULL,                       /* HB_P_LESSEQUAL,            */
   NULL,                       /* HB_P_LESS,                 */
   NULL,                       /* HB_P_LINE,                 */
   NULL,                       /* HB_P_LOCALNAME,            */
   NULL,                       /* HB_P_MACROPOP,             */
   NULL,                       /* HB_P_MACROPOPALIASED,      */
   NULL,                       /* HB_P_MACROPUSH,            */
   NULL,                       /* HB_P_MACROARRAYGEN,        */
   NULL,                       /* HB_P_MACROPUSHLIST,        */
   NULL,                       /* HB_P_MACROPUSHINDEX,       */
   NULL,                       /* HB_P_MACROPUSHPARE,        */
   NULL,                       /* HB_P_MACROPUSHALIASED,     */
   NULL,                       /* HB_P_MACROSYMBOL,          */
   NULL,                       /* HB_P_MACROTEXT,            */
   NULL,                       /* HB_P_MESSAGE,              */
   NULL,                       /* HB_P_MINUS,                */
   NULL,                       /* HB_P_MODULUS,              */
   NULL,                       /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   NULL,                       /* HB_P_MMESSAGE,             */
   NULL,                       /* HB_P_MPOPALIASEDFIELD,     */
   NULL,                       /* HB_P_MPOPALIASEDVAR,       */
   NULL,                       /* HB_P_MPOPFIELD,            */
   NULL,                       /* HB_P_MPOPMEMVAR,           */
   NULL,                       /* HB_P_MPUSHALIASEDFIELD,    */
   NULL,                       /* HB_P_MPUSHALIASEDVAR,      */
   NULL,                       /* HB_P_MPUSHBLOCK,           */
   NULL,                       /* HB_P_MPUSHFIELD,           */
   NULL,                       /* HB_P_MPUSHMEMVAR,          */
   NULL,                       /* HB_P_MPUSHMEMVARREF,       */
   NULL,                       /* HB_P_MPUSHSYM,             */
   NULL,                       /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   NULL,                       /* HB_P_MULT,                 */
   NULL,                       /* HB_P_NEGATE,               */
   NULL,                       /* HB_P_NOOP,                 */
   NULL,                       /* HB_P_NOT,                  */
   NULL,                       /* HB_P_NOTEQUAL,             */
   NULL,                       /* HB_P_OR,                   */
   NULL,                       /* HB_P_PARAMETER,            */
   NULL,                       /* HB_P_PLUS,                 */
   NULL,                       /* HB_P_POP,                  */
   NULL,                       /* HB_P_POPALIAS,             */
   NULL,                       /* HB_P_POPALIASEDFIELD,      */
   NULL,                       /* HB_P_POPALIASEDFIELDNEAR,  */
   NULL,                       /* HB_P_POPALIASEDVAR,        */
   NULL,                       /* HB_P_POPFIELD,             */
   NULL,                       /* HB_P_POPLOCAL,             */
   NULL,                       /* HB_P_POPLOCALNEAR,         */
   NULL,                       /* HB_P_POPMEMVAR,            */
   NULL,                       /* HB_P_POPSTATIC,            */
   NULL,                       /* HB_P_POPVARIABLE,          */
   NULL,                       /* HB_P_POWER,                */
   NULL,                       /* HB_P_PUSHALIAS,            */
   NULL,                       /* HB_P_PUSHALIASEDFIELD,     */
   NULL,                       /* HB_P_PUSHALIASEDFIELDNEAR, */
   NULL,                       /* HB_P_PUSHALIASEDVAR,       */
   NULL,                       /* HB_P_PUSHBLOCK,            */
   NULL,                       /* HB_P_PUSHBLOCKSHORT,       */
   NULL,                       /* HB_P_PUSHFIELD,            */
   NULL,                       /* HB_P_PUSHBYTE,             */
   NULL,                       /* HB_P_PUSHINT,              */
   NULL,                       /* HB_P_PUSHLOCAL,            */
   NULL,                       /* HB_P_PUSHLOCALNEAR,        */
   NULL,                       /* HB_P_PUSHLOCALREF,         */
   NULL,                       /* HB_P_PUSHLONG,             */
   NULL,                       /* HB_P_PUSHMEMVAR,           */
   NULL,                       /* HB_P_PUSHMEMVARREF,        */
   NULL,                       /* HB_P_PUSHNIL,              */
   NULL,                       /* HB_P_PUSHDOUBLE,           */
   NULL,                       /* HB_P_PUSHSELF,             */
   NULL,                       /* HB_P_PUSHSTATIC,           */
   NULL,                       /* HB_P_PUSHSTATICREF,        */
   NULL,                       /* HB_P_PUSHSTR,              */
   NULL,                       /* HB_P_PUSHSTRSHORT,         */
   NULL,                       /* HB_P_PUSHSYM,              */
   NULL,                       /* HB_P_PUSHSYMNEAR,          */
   NULL,                       /* HB_P_PUSHVARIABLE,         */
   NULL,                       /* HB_P_RETVALUE,             */
   NULL,                       /* HB_P_SEND,                 */
   NULL,                       /* HB_P_SENDSHORT,            */
   hb_p_seqbegin,              /* HB_P_SEQBEGIN,             */
   hb_p_seqend,                /* HB_P_SEQEND,               */
   NULL,                       /* HB_P_SEQRECOVER,           */
   NULL,                       /* HB_P_SFRAME,               */
   NULL,                       /* HB_P_STATICS,              */
   NULL,                       /* HB_P_STATICNAME,           */
   NULL,                       /* HB_P_SWAPALIAS,            */
   NULL,                       /* HB_P_TRUE,                 */
   NULL,                       /* HB_P_ZERO,                 */
   NULL,                       /* HB_P_ONE,                  */
   NULL,                       /* HB_P_MACROFUNC,            */
   NULL,                       /* HB_P_MACRODO,              */
   NULL,                       /* HB_P_MPUSHSTR,             */
   NULL,                       /* HB_P_LOCALNEARADDINT,      */
   NULL,                       /* HB_P_MACROPUSHREF          */
   NULL,                       /* HB_P_PUSHLONGLONG          */
   NULL,                       /* HB_P_ENUMSTART             */
   NULL,                       /* HB_P_ENUMNEXT              */
   NULL,                       /* HB_P_ENUMPREV              */
   NULL,                       /* HB_P_ENUMEND               */
   NULL,                       /* HB_P_SWITCH                */
   NULL,                       /* HB_P_PUSHDATE              */
                               /* optimalization of inlined math operations */
   NULL,                       /* HB_P_PLUSEQPOP             */
   NULL,                       /* HB_P_MINUSEQPOP            */
   NULL,                       /* HB_P_MULTEQPOP             */
   NULL,                       /* HB_P_DIVEQPOP              */
   NULL,                       /* HB_P_PLUSEQ                */
   NULL,                       /* HB_P_MINUSEQ               */
   NULL,                       /* HB_P_MULTEQ                */
   NULL,                       /* HB_P_DIVEQ                 */
   NULL,                       /* HB_P_WITHOBJECTSTART       */
   NULL,                       /* HB_P_WITHOBJECTMESSAGE     */
   NULL,                       /* HB_P_WITHOBJECTEND         */
   NULL,                       /* HB_P_MACROSEND             */
   NULL,                       /* HB_P_PUSHOVARREF           */
   NULL,                       /* HB_P_ARRAYPUSHREF          */
   NULL,                       /* HB_P_VFRAME                */
   NULL,                       /* HB_P_LARGEFRAME            */
   NULL,                       /* HB_P_LARGEVFRAME           */
   NULL,                       /* HB_P_PUSHSTRHIDDEN         */
   NULL,                       /* HB_P_LOCALADDINT           */
   NULL,                       /* HB_P_MODEQPOP              */
   NULL,                       /* HB_P_EXPEQPOP              */
   NULL,                       /* HB_P_MODEQ                 */
   NULL,                       /* HB_P_EXPEQ                 */
   NULL,                       /* HB_P_DUPLUNREF             */
   NULL,                       /* HB_P_MPUSHBLOCKLARGE       */
   NULL,                       /* HB_P_MPUSHSTRLARGE         */
   NULL,                       /* HB_P_PUSHBLOCKLARGE        */
   NULL,                       /* HB_P_PUSHSTRLARGE          */
   NULL,                       /* HB_P_SWAP                  */
   NULL,                       /* HB_P_PUSHVPARAMS           */
   NULL,                       /* HB_P_PUSHUNREF             */
   hb_p_seqalways,             /* HB_P_SEQALWAYS             */
   hb_p_alwaysbegin,           /* HB_P_ALWAYSBEGIN           */
   NULL,                       /* HB_P_ALWAYSEND             */
   NULL,                       /* HB_P_DECEQPOP              */
   NULL,                       /* HB_P_INCEQPOP              */
   NULL,                       /* HB_P_DECEQ                 */
   NULL,                       /* HB_P_INCEQ                 */
   NULL,                       /* HB_P_LOCALDEC              */
   NULL,                       /* HB_P_LOCALINC              */
   NULL,                       /* HB_P_LOCALINCPUSH          */
   NULL,                       /* HB_P_PUSHFUNCSYM           */
   NULL,                       /* HB_P_HASHGEN               */
   NULL,                       /* HB_P_SEQBLOCK              */
   NULL                        /* HB_P_THREADSTATICS         */
};
hblbl.c177
VOIDhb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info )
void hb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info )
{
   const PHB_LABEL_FUNC * pFuncTable = s_GenLabelFuncTable;
   ULONG ulLabel = 0, ul;

   assert( HB_P_LAST_PCODE == sizeof( s_GenLabelFuncTable ) / sizeof( PHB_LABEL_FUNC ) );

   hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) label_info );

   for( ul = 0; ul < pFunc->lPCodePos; ++ul )
   {
      if( label_info->pulLabels[ ul ] )
      {
         label_info->pulLabels[ ul ] = ++ulLabel;
      }
   }
}
hblbl.c378
hbmain.c
TypeFunctionSourceLine
INThb_compMain( int argc, char * const argv[], BYTE ** pBufPtr, ULONG * pulSize, const char * szSource )
int hb_compMain( int argc, char * const argv[], BYTE ** pBufPtr, ULONG * pulSize,
                 const char * szSource )
{
   HB_COMP_DECL;
   int iStatus = EXIT_SUCCESS;
   BOOL bAnyFiles = FALSE;
   int i;

   HB_TRACE(HB_TR_DEBUG, ("hb_compMain()"));

   HB_COMP_PARAM = hb_comp_new();

   HB_COMP_PARAM->pOutPath = NULL;

   /* First check the environment variables */
   hb_compChkCompilerSwitch( HB_COMP_PARAM, 0, NULL );

   /* Then check command line arguments
      This will override duplicated environment settings */
   hb_compChkCompilerSwitch( HB_COMP_PARAM, argc, argv );
   if( !HB_COMP_PARAM->fExit )
   {
      if( pBufPtr && pulSize )
      {
         HB_COMP_PARAM->iLanguage = HB_LANG_PORT_OBJ_BUF;
      }

      if( HB_COMP_PARAM->fLogo )
         hb_compPrintLogo( HB_COMP_PARAM );

      if( HB_COMP_PARAM->fBuildInfo )
      {
         hb_compOutStd( HB_COMP_PARAM, "\n" );
         hb_verBuildInfo();
         hb_comp_free( HB_COMP_PARAM );
         return iStatus;
      }

      if( HB_COMP_PARAM->fCredits )
      {
         hb_compPrintCredits( HB_COMP_PARAM );
         hb_comp_free( HB_COMP_PARAM );
         return iStatus;
      }

      /* Set Search Path */
      hb_compChkPaths( HB_COMP_PARAM );

      /* Set standard rules */
      hb_compInitPP( HB_COMP_PARAM, argc, argv );

      /* Prepare the table of identifiers */
      hb_compIdentifierOpen( HB_COMP_PARAM );
   }

   if( szSource )
   {
      bAnyFiles = TRUE;
      iStatus = hb_compCompile( HB_COMP_PARAM, szSource, HB_COMP_MEMBUFFER );
   }
   else
   {
      /* Process all files passed via the command line. */
      for( i = 1; i < argc && !HB_COMP_PARAM->fExit; i++ )
      {
         HB_TRACE(HB_TR_DEBUG, ("main LOOP(%i,%s)", i, argv[i]));
         if( ! HB_ISOPTSEP( argv[ i ][ 0 ] ) )
         {
            bAnyFiles = TRUE;
            if( argv[ i ][ 0 ] == '@' )
               iStatus = hb_compProcessRSPFile( HB_COMP_PARAM, argv[ i ] + 1 );
            else
               iStatus = hb_compCompile( HB_COMP_PARAM, argv[ i ], HB_COMP_SINGLEFILE );
            if( iStatus != EXIT_SUCCESS )
               break;
         }
      }
   }

   if( ! bAnyFiles && ! HB_COMP_PARAM->fQuiet )
   {
      hb_compPrintUsage( HB_COMP_PARAM, argv[ 0 ] );
      iStatus = EXIT_FAILURE;
   }

   if( HB_COMP_PARAM->iErrorCount > 0 )
      iStatus = EXIT_FAILURE;

   if( pBufPtr && pulSize )
   {
      if( iStatus == EXIT_SUCCESS )
      {
         * pBufPtr = HB_COMP_PARAM->pOutBuf;
         * pulSize = HB_COMP_PARAM->ulOutBufSize;
         HB_COMP_PARAM->pOutBuf = NULL;
         HB_COMP_PARAM->ulOutBufSize = 0;
      }
      else
      {
         * pBufPtr = NULL;
         * pulSize = 0;
      }
   }

   hb_comp_free( HB_COMP_PARAM );

   return iStatus;
}
hbmain.c71
STATIC INThb_compProcessRSPFile( HB_COMP_DECL, const char * szRspName )
static int hb_compProcessRSPFile( HB_COMP_DECL, const char * szRspName )
{
   char szFile[ _POSIX_PATH_MAX + 1 ];
   int iStatus = EXIT_SUCCESS;
   PHB_FNAME pFileName;
   FILE *inFile;

   pFileName = hb_fsFNameSplit( szRspName );

   if( !pFileName->szExtension )
   {
      pFileName->szExtension = ".clp";
      hb_fsFNameMerge( szFile, pFileName );
      szRspName = szFile;
   }

   inFile = hb_fopen( szRspName, "r" );
   if( !inFile )
   {
      char buffer[ _POSIX_PATH_MAX + 80 ];
      snprintf( buffer, sizeof( buffer ),
                "Cannot open input file: %s\n", szRspName );
      hb_compOutErr( HB_COMP_PARAM, buffer );
      iStatus = EXIT_FAILURE;
   }
   else
   {
      int i = 0, ch;
      BOOL bAutoOpen = HB_COMP_PARAM->fAutoOpen;

      HB_COMP_PARAM->fAutoOpen = TRUE;

      do
      {
         ch = fgetc( inFile );

         /*
          * '"' - quoting file names is Harbour extension - 
          * Clipper does not serve it, [druzus]
          */
         if( ch == '"' )
         {
            while( ( ch = fgetc ( inFile ) ) != EOF && ch != '"' && ch != '\n' )
            {
               if( i < _POSIX_PATH_MAX )
                  szFile[ i++ ] = (char) ch;
            }
            if( ch == '"' )
               continue;
         }

         while( i == 0 && HB_ISSPACE( ch ) )
            ch = fgetc( inFile );
            
         if( ch == EOF || HB_ISSPACE( ch ) || ch == '#' )
         {
            szFile[ i ] = '\0';

            if( i > 0 )
               hb_compAutoOpenAdd( HB_COMP_PARAM,
                        hb_compIdentifierNew( HB_COMP_PARAM, szFile, HB_IDENT_COPY ) );
            i = 0;
            while( ch != EOF && ch != '\n' )
               ch = fgetc( inFile );
         }
         else if( i < _POSIX_PATH_MAX )
            szFile[ i++ ] = (char) ch;
      }
      while( ch != EOF );

      fclose( inFile );

      HB_COMP_PARAM->fAutoOpen = bAutoOpen;
      
      hb_fsFNameMerge( szFile, pFileName );
      hb_compCompile( HB_COMP_PARAM, szFile, HB_COMP_AUTOADDFILE );
   }

   hb_xfree( pFileName );

   return iStatus;
}

/* ------------------------------------------------------------------------- */
hbmain.c180
STATIC PCOMSYMBOLhb_compSymbolAdd( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, BOOL bFunction )
static PCOMSYMBOL hb_compSymbolAdd( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, BOOL bFunction )
{
   PCOMSYMBOL pSym;

   if( szSymbolName[ 0 ] )
   {
      /* Create a symbol for non-empty names only.
       * NOTE: an empty name is passed for a fake starting function when
       * '-n' switch is used
       */
      pSym = ( PCOMSYMBOL ) hb_xgrab( sizeof( COMSYMBOL ) );

      pSym->szName = szSymbolName;
      pSym->cScope = 0;
      pSym->pNext = NULL;
      pSym->bFunc = bFunction;

      if( ! HB_COMP_PARAM->symbols.iCount )
      {
         HB_COMP_PARAM->symbols.pFirst = pSym;
         HB_COMP_PARAM->symbols.pLast  = pSym;
      }
      else
      {
         ( ( PCOMSYMBOL ) HB_COMP_PARAM->symbols.pLast )->pNext = pSym;
         HB_COMP_PARAM->symbols.pLast = pSym;
      }
      HB_COMP_PARAM->symbols.iCount++;

      if( pwPos )
         *pwPos = HB_COMP_PARAM->symbols.iCount -1; /* position number starts form 0 */
   }
   else
      pSym = NULL;

   return pSym;
}
hbmain.c268
STATIC PCOMSYMBOLhb_compSymbolFind( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, BOOL bFunction )
static PCOMSYMBOL hb_compSymbolFind( HB_COMP_DECL, const char * szSymbolName, USHORT * pwPos, BOOL bFunction )
{
   PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst;
   USHORT wCnt = 0;

   if( pwPos )
      *pwPos = 0;
   while( pSym )
   {
      if( ! strcmp( pSym->szName, szSymbolName ) )
      {
         if( bFunction == pSym->bFunc )
         {
            if( pwPos )
               *pwPos = wCnt;
            return pSym;
         }
      }

      if( pSym->pNext )
      {
         pSym = pSym->pNext;
         ++wCnt;
      }
      else
         return NULL;
   }
   return NULL;
}
hbmain.c306
STATIC PCOMSYMBOLhb_compSymbolKill( PCOMSYMBOL pSym )
static PCOMSYMBOL hb_compSymbolKill( PCOMSYMBOL pSym )
{
   PCOMSYMBOL pNext = pSym->pNext;

   hb_xfree( ( void * ) pSym );

   return pNext;
}
hbmain.c336
CONST CHAR *hb_compSymbolName( HB_COMP_DECL, USHORT uiSymbol )
const char * hb_compSymbolName( HB_COMP_DECL, USHORT uiSymbol )
{
   PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst;

   while( pSym )
   {
      if( uiSymbol-- == 0 )
         return pSym->szName;
      pSym = pSym->pNext;
   }
   return NULL;
}
hbmain.c346
STATIC VOIDhb_compCheckDuplVars( HB_COMP_DECL, PVAR pVar, const char * szVarName )
static void hb_compCheckDuplVars( HB_COMP_DECL, PVAR pVar, const char * szVarName )
{
   while( pVar )
   {
      if( ! strcmp( pVar->szName, szVarName ) )
      {
         HB_COMP_ERROR_DUPLVAR( szVarName );
         break;
      }
      else
         pVar = pVar->pNext;
   }
}
hbmain.c362
STATIC USHORThb_compVarListAdd( PVAR * pVarLst, PVAR pVar )
static USHORT hb_compVarListAdd( PVAR * pVarLst, PVAR pVar )
{
   USHORT uiVar = 1;
   while( *pVarLst )
   {
      pVarLst = &( *pVarLst )->pNext;
      ++uiVar;
   }
   *pVarLst = pVar;

   return uiVar;
}
hbmain.c376
VOIDhb_compVariableAdd( HB_COMP_DECL, const char * szVarName, BYTE cValueType )
void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, BYTE cValueType )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;
   PVAR pVar;
   BOOL bFreeVar = TRUE;
   
   HB_SYMBOL_UNUSED( cValueType );

   if( ! HB_COMP_PARAM->fStartProc && HB_COMP_PARAM->functions.iCount <= 1 &&
       ( HB_COMP_PARAM->iVarScope == VS_LOCAL ||
         HB_COMP_PARAM->iVarScope == ( VS_PRIVATE | VS_PARAMETER ) ) )
   {
      /* Variable declaration is outside of function/procedure body.
         In this case only STATIC and PARAMETERS variables are allowed. */
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OUTSIDE, NULL, NULL );
      return;
   }

   /* check if we are declaring local/static variable after some
    * executable statements
    */
   if( pFunc->bFlags & FUN_STATEMENTS )
   {
      const char * szVarScope;
      switch( HB_COMP_PARAM->iVarScope )
      {
         case VS_LOCAL:
            szVarScope = "LOCAL";
            break;
         case VS_STATIC:
         case VS_TH_STATIC:
            szVarScope = "STATIC";
            break;
         case VS_FIELD:
            szVarScope = "FIELD";
            break;
         case VS_MEMVAR:
            szVarScope = "MEMVAR";
            break;
         default:
            szVarScope = NULL;
      }
      if( szVarScope )
      {
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_FOLLOWS_EXEC, szVarScope, NULL );
         return;
      }
   }

   /* Check if a declaration of duplicated variable name is requested */
   if( pFunc->szName )
   {
      /* variable defined in a function/procedure */
      hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pFields, szVarName );
      hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pStatics, szVarName );
      /* NOTE: Clipper warns if PARAMETER variable duplicates the MEMVAR
       * declaration
       */
      if( !( HB_COMP_PARAM->iVarScope == VS_PRIVATE ||
             HB_COMP_PARAM->iVarScope == VS_PUBLIC ) )
         hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pMemvars, szVarName );
   }
   else if( pFunc->bFlags & FUN_EXTBLOCK )
   {
      /* variable defined in an extended codeblock */
      hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pFields, szVarName );
      hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pStatics, szVarName );
   }
   else if( HB_COMP_PARAM->iVarScope != VS_PARAMETER )
   {
      char buffer[ 80 ];
      snprintf( buffer, sizeof( buffer ),
                "Wrong type of codeblock parameter, is: %d, should be: %d\r\n",
                HB_COMP_PARAM->iVarScope, VS_PARAMETER );
      hb_compOutErr( HB_COMP_PARAM, buffer );
      /* variable defined in a codeblock */
      HB_COMP_PARAM->iVarScope = VS_PARAMETER;
   }

   hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pLocals, szVarName );

   pVar = ( PVAR ) hb_xgrab( sizeof( VAR ) );
   pVar->szName = szVarName;
   pVar->szAlias = NULL;
   pVar->uiFlags = 0;
   pVar->cType = cValueType;
   pVar->iUsed = VU_NOT_USED;
   pVar->pNext = NULL;
   pVar->iDeclLine = HB_COMP_PARAM->currLine;

   if( toupper( cValueType ) == 'S' )
   {
      /* printf( "\nVariable %s is of Class: %s\n", szVarName, HB_COMP_PARAM->szFromClass ); */
      pVar->pClass = hb_compClassFind( HB_COMP_PARAM, HB_COMP_PARAM->szFromClass );
      if( ! pVar->pClass )
      {
         hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, HB_COMP_PARAM->szFromClass, szVarName );
         pVar->cType = 'O';
      }
      /* Resetting */
      HB_COMP_PARAM->szFromClass = NULL;
   }

   if( HB_COMP_PARAM->iVarScope & VS_PARAMETER )
      pVar->iUsed = VU_INITIALIZED;

   if( HB_COMP_PARAM->iVarScope & VS_MEMVAR )
   {
      PCOMSYMBOL pSym;
      USHORT wPos;

      if( HB_COMP_PARAM->fAutoMemvarAssume || HB_COMP_PARAM->iVarScope == VS_MEMVAR )
      {
         /* add this variable to the list of MEMVAR variables
          */
         if( pFunc->pMemvars )
            hb_compCheckDuplVars( HB_COMP_PARAM, pFunc->pMemvars, szVarName );

         hb_compVarListAdd( &pFunc->pMemvars, pVar );
         bFreeVar = FALSE;
      }

      switch( HB_COMP_PARAM->iVarScope )
      {
         case VS_MEMVAR:
            /* variable declared in MEMVAR statement */
            break;

         case( VS_PARAMETER | VS_PRIVATE ):
            if( ++pFunc->wParamNum > pFunc->wParamCount )
               pFunc->wParamCount = pFunc->wParamNum;

            pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); /* check if symbol exists already */
            if( ! pSym )
               pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR );
            pSym->cScope |= HB_FS_MEMVAR;

            hb_compGenPCode4( HB_P_PARAMETER, HB_LOBYTE( wPos ), HB_HIBYTE( wPos ), HB_LOBYTE( pFunc->wParamNum ), HB_COMP_PARAM );

            if( HB_COMP_PARAM->iWarnings >= 3 && bFreeVar )
            {
               PVAR pMemVar = pFunc->pMemvars;
               while( pMemVar && strcmp( pMemVar->szName, pVar->szName ) != 0 )
                  pMemVar = pMemVar->pNext;
               /* Not declared as memvar. */
               if( pMemVar == NULL )
               {
                  /* add this variable to the list of PRIVATE variables. */
                  hb_compVarListAdd( &pFunc->pPrivates, pVar );
                  bFreeVar = FALSE;
               }
            }
            if( bFreeVar )
               hb_xfree( pVar );
            break;

         case VS_PRIVATE:
            pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); /* check if symbol exists already */
            if( ! pSym )
               pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR );
            pSym->cScope |= HB_FS_MEMVAR;

            if( HB_COMP_PARAM->iWarnings >= 3 && bFreeVar )
            {
               PVAR pMemVar = pFunc->pMemvars;
               while( pMemVar && strcmp( pMemVar->szName, pVar->szName ) != 0 )
                  pMemVar = pMemVar->pNext;
               /* Not declared as memvar. */
               if( pMemVar == NULL )
               {
                  /* add this variable to the list of PRIVATE variables. */
                  hb_compVarListAdd( &pFunc->pPrivates, pVar );
                  bFreeVar = FALSE;
               }
            }
            if( bFreeVar )
               hb_xfree( pVar );
            break;

         case VS_PUBLIC:
            pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR ); /* check if symbol exists already */
            if( ! pSym )
               pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wPos, HB_SYM_MEMVAR );
            pSym->cScope |= HB_FS_MEMVAR;
            if( bFreeVar )
               hb_xfree( pVar );
            break;
      }
   }
   else
   {
      switch( HB_COMP_PARAM->iVarScope )
      {
         case VS_LOCAL:
         case VS_PARAMETER:
         {
            USHORT wLocal = hb_compVarListAdd( &pFunc->pLocals, pVar );

            if( HB_COMP_PARAM->iVarScope == VS_PARAMETER )
            {
               ++pFunc->wParamCount;
               pFunc->bFlags |= FUN_USES_LOCAL_PARAMS;
            }
            if( HB_COMP_PARAM->fDebugInfo )
            {
               hb_compGenPCode3( HB_P_LOCALNAME, HB_LOBYTE( wLocal ), HB_HIBYTE( wLocal ), HB_COMP_PARAM );
               hb_compGenPCodeN( ( BYTE * ) szVarName, strlen( szVarName ) + 1, HB_COMP_PARAM );
            }
            break;
         }
         case VS_TH_STATIC:
            pVar->uiFlags = VS_THREAD;
         case VS_STATIC:
            hb_compVarListAdd( &pFunc->pStatics, pVar );
            break;

         case VS_FIELD:
            hb_compVarListAdd( &pFunc->pFields, pVar );
            break;
      }
   }
}
hbmain.c389
VOIDhb_compFieldSetAlias( HB_COMP_DECL, const char * szAlias, int iField )
void hb_compFieldSetAlias( HB_COMP_DECL, const char * szAlias, int iField )
{
   PVAR pVar;

   pVar = HB_COMP_PARAM->functions.pLast->pFields;
   while( iField-- && pVar )
      pVar = pVar->pNext;

   while( pVar )
   {
      pVar->szAlias = szAlias;
      pVar = pVar->pNext;
   }
}
hbmain.c612
INThb_compFieldsCount( HB_COMP_DECL )
int hb_compFieldsCount( HB_COMP_DECL )
{
   int iFields = 0;
   PVAR pVar = HB_COMP_PARAM->functions.pLast->pFields;

   while( pVar )
   {
      ++iFields;
      pVar = pVar->pNext;
   }

   return iFields;
}
hbmain.c632
STATIC PVARhb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos )
static PVAR hb_compVariableGet( PVAR pVars, const char * szVarName, int * piPos )
{
   int iVar = 1;

   while( pVars )
   {
      if( pVars->szName && ! strcmp( pVars->szName, szVarName ) )
      {
         pVars->iUsed |= VU_USED;
         *piPos = iVar;
         return pVars;
      }
      pVars = pVars->pNext;
      ++iVar;
   }
   return NULL;
}
hbmain.c649
STATIC PVARhb_compVariableGetVar( PVAR pVars, USHORT wOrder )
static PVAR hb_compVariableGetVar( PVAR pVars, USHORT wOrder )
{
   while( pVars && --wOrder )
      pVars = pVars->pNext;
   return pVars;
}
hbmain.c667
STATIC USHORThb_compVariableGetPos( PVAR pVars, const char * szVarName )
static USHORT hb_compVariableGetPos( PVAR pVars, const char * szVarName )
{
   USHORT wVar = 1;

   while( pVars )
   {
      if( pVars->szName && ! strcmp( pVars->szName, szVarName ) )
      {
         pVars->iUsed |= VU_USED;
         return wVar;
      }
      pVars = pVars->pNext;
      ++wVar;
   }
   return 0;
}
hbmain.c675
PVARhb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope )
PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope )
{
   PFUNCTION pFunc, pGlobal, pOutBlock = NULL;
   BOOL fStatic = FALSE, fBlock = FALSE, fGlobal = FALSE;
   PVAR pVar = NULL;
   int iPos = 0, iScope = 0, iLevel = 0;

   if( piPos )
      *piPos = 0;
   else
      piPos = &iPos;
   if( piScope )
      *piScope = HB_VS_UNDECLARED;
   else
      piScope = &iScope;

   /* check current function/codeblock variables */
   pFunc = HB_COMP_PARAM->functions.pLast;
   pGlobal = ( HB_COMP_PARAM->fStartProc ||
               HB_COMP_PARAM->functions.pFirst == pFunc )
             ? NULL : HB_COMP_PARAM->functions.pFirst;

   while( pFunc )
   {
      if( ( pFunc->cScope & HB_FS_INITEXIT ) == HB_FS_INITEXIT )
      {  /* static initialization function */
         fStatic = TRUE;
      }
      else if( pFunc->szName )
      {  /* normal function/procedure */
         /* check local parameters */
         pVar = hb_compVariableGet( pFunc->pLocals, szVarName, piPos );
         if( pVar )
         {
            *piScope = HB_VS_LOCAL_VAR;
            if( fStatic )
            {
               /* local variable was referenced in a codeblock during
                * initialization of static variable. This cannot be supported
                * because static variables are initialized at program
                * startup when there is no local variables yet - hence we
                * cannot detach this local variable
                * For example:
                * LOCAL locvar
                * STATIC stavar:={ | x | locvar}
                *
                * NOTE: Clipper creates such a codeblock however at the
                * time of codeblock evaluation it generates a runtime error:
                * 'bound error: array acccess'
                * Called from: (b)STATICS$(0)
                */
               hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_ILLEGAL_INIT, "(b)", szVarName );
            }
            else if( fBlock )
            {
               /* We want to access a local variable defined in a function
                * that owns this codeblock. We cannot access this variable in
                * a normal way because at runtime the stack base will point
                * to local variables of EVAL function.
                */
               /* NOTE: The list of local variables defined in a function
                * and referenced in a codeblock will be stored in a outer
                * codeblock only. This makes sure that all variables will be
                * detached properly - the inner codeblock can be created
                * outside of a function where it was defined when the local
                * variables are not accessible.
                */
               *piPos = - hb_compVariableGetPos( pOutBlock->pDetached, szVarName );
               if( *piPos == 0 )
               {
                  /* this variable was not referenced yet - add it to the list */
                  pVar = ( PVAR ) hb_xgrab( sizeof( VAR ) );

                  pVar->szName = szVarName;
                  pVar->szAlias = NULL;
                  pVar->cType = ' ';
                  pVar->iUsed = VU_NOT_USED;
                  pVar->pNext  = NULL;
                  pVar->iDeclLine = HB_COMP_PARAM->currLine;
                  /* Use negative order to signal that we are accessing a local
                   * variable from a codeblock
                   */
                  *piPos = -hb_compVarListAdd( &pOutBlock->pDetached, pVar );
               }
               *piScope = HB_VS_CBLOCAL_VAR;
            }
         }
         else
         {
            /* check static variables */
            pVar = hb_compVariableGet( pFunc->pStatics, szVarName, piPos );
            if( pVar )
            {
               *piScope = HB_VS_STATIC_VAR;
               *piPos += pFunc->iStaticsBase;
            }
            else
            {
               /* check FIELDs */
               pVar = hb_compVariableGet( pFunc->pFields, szVarName, piPos );
               if( pVar )
                  *piScope = HB_VS_LOCAL_FIELD;
               else
               {
                  /* check MEMVARs */
                  pVar = hb_compVariableGet( pFunc->pMemvars, szVarName, piPos );
                  if( pVar )
                     *piScope = HB_VS_LOCAL_MEMVAR;
               }
            }
         }
      }
      else
      {  /* codeblock */
         fBlock = TRUE;
         /* check local parameters */
         pVar = hb_compVariableGet( pFunc->pLocals, szVarName, piPos );
         if( pVar )
         {
            *piScope = HB_VS_LOCAL_VAR;
            if( iLevel )
            {
               /* this variable is defined in a parent codeblock
                * It is not possible to access a parameter of a codeblock
                * in which the current codeblock is defined
                */
               hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OUTER_VAR, szVarName, NULL );
            }
         }
         else if( pFunc->bFlags & FUN_EXTBLOCK )
         {  /* extended codeblock */
            /* check static variables */
            pVar = hb_compVariableGet( pFunc->pStatics, szVarName, piPos );
            if( pVar )
            {
               *piScope = HB_VS_STATIC_VAR;
               *piPos += pFunc->iStaticsBase;
            }
            else
            {
               /* check FIELDs */
               pVar = hb_compVariableGet( pFunc->pFields, szVarName, piPos );
               if( pVar )
                  *piScope = HB_VS_LOCAL_FIELD;
               else
               {
                  /* check MEMVARs */
                  pVar = hb_compVariableGet( pFunc->pMemvars, szVarName, piPos );
                  if( pVar )
                     *piScope = HB_VS_LOCAL_MEMVAR;
               }
            }
         }
      }

      if( pVar )
         break;

      pOutBlock = pFunc;
      pFunc = pFunc->pOwner;
      if( !pFunc && !fGlobal )
      {
         /* instead of making this trick with pGlobal switching it will be
          * much cleaner to set pOwner in each compiled function to first
          * global pseudo function created when -n compiler switch is used
          * [druzus]
          */
         pFunc = pGlobal;
         fGlobal = TRUE;
      }
      ++iLevel;
   }

   if( pVar && fGlobal )
      *piScope |= HB_VS_FILEWIDE;

   return pVar;
}
hbmain.c693
CONST CHAR *hb_compLocalVariableName( PFUNCTION pFunc, USHORT wVar )
const char * hb_compLocalVariableName( PFUNCTION pFunc, USHORT wVar )
{
   PVAR pVar;

   if( pFunc->wParamCount && !( pFunc->bFlags & FUN_USES_LOCAL_PARAMS ) )
      wVar -= pFunc->wParamCount;
   pVar = hb_compVariableGetVar( pFunc->pLocals, wVar );

   return pVar ? pVar->szName : NULL;
}
hbmain.c872
CONST CHAR *hb_compStaticVariableName( HB_COMP_DECL, USHORT wVar )
const char * hb_compStaticVariableName( HB_COMP_DECL, USHORT wVar )
{
   PVAR pVar;
   PFUNCTION pTmp = HB_COMP_PARAM->functions.pFirst;

   while( pTmp->pNext && pTmp->pNext->iStaticsBase < wVar )
      pTmp = pTmp->pNext;
   pVar = hb_compVariableGetVar( pTmp->pStatics, ( USHORT ) ( wVar - pTmp->iStaticsBase ) );

   return pVar ? pVar->szName : NULL;
}
hbmain.c884
INThb_compVariableScope( HB_COMP_DECL, const char * szVarName )
int hb_compVariableScope( HB_COMP_DECL, const char * szVarName )
{
   int iScope;

   hb_compVariableFind( HB_COMP_PARAM, szVarName, NULL, &iScope );

   return iScope;
}
hbmain.c896
BOOLhb_compIsValidMacroText( HB_COMP_DECL, const char * szText, ULONG ulLen )
BOOL hb_compIsValidMacroText( HB_COMP_DECL, const char * szText, ULONG ulLen )
{
   BOOL fFound = FALSE;
   ULONG ul = 0;

   while( ul < ulLen )
   {
      if( szText[ ul++ ] == '&' )
      {
         char szSymName[ HB_SYMBOL_NAME_LEN + 1 ];
         int iSize = 0, iScope;

         /* Check if macro operator is used inside a string
          * Macro operator is ignored if it is the last char or
          * next char is '(' e.g. "this is &(ignored)"
          * (except if strict Clipper compatibility mode is enabled)
          *
          * NOTE: This uses _a-zA-Z pattern to check for
          * beginning of a variable name
          */

         while( ul < ulLen && iSize < HB_SYMBOL_NAME_LEN )
         {
            char ch = szText[ ul ];
            if( ch >= 'a' && ch <= 'z' )
               szSymName[ iSize++ ] = ch - ( 'a' - 'A' );
            else if( ch == '_' || ( ch >= 'A' && ch <= 'Z' ) ||
                                  ( ch >= '0' && ch <= '9' ) )
               szSymName[ iSize++ ] = ch;
            else
               break;
            ++ul;
         }
   
         if( iSize )
         {
            szSymName[ iSize ] = '\0';

            /* NOTE: All variables are assumed memvars in macro compiler -
             * there is no need to check for a valid name but to be Clipper
             * compatible we should check if macrotext variable does not refer
             * to local, static or field and generate error in such case.
             * Only MEMVAR or undeclared (memvar will be assumed)
             * variables can be used in macro text.
             */
            fFound = TRUE;
            iScope = hb_compVariableScope( HB_COMP_PARAM, szSymName );
            if( iScope != HB_VS_UNDECLARED && !( iScope & HB_VS_LOCAL_MEMVAR ) )
            {
               hb_compErrorMacro( HB_COMP_PARAM, szText );
               break;
            }
         }
         else if( ! HB_SUPPORT_HARBOUR )
            fFound = TRUE;    /* always macro substitution in Clipper */
      }
   }

   return fFound;
}
hbmain.c905
PCOMCLASShb_compClassFind( HB_COMP_DECL, const char * szClassName )
PCOMCLASS hb_compClassFind( HB_COMP_DECL, const char * szClassName )
{
   PCOMCLASS pClass = HB_COMP_PARAM->pFirstClass;

   if( HB_COMP_PARAM->iWarnings < 3 )
      return NULL;

   while( pClass )
   {
      if( ! strcmp( pClass->szName, szClassName ) )
         return pClass;
      pClass = pClass->pNext;
   }
   return NULL;
}
hbmain.c972
PCOMCLASShb_compClassAdd( HB_COMP_DECL, const char * szClassName, const char * szClassFunc )
PCOMCLASS hb_compClassAdd( HB_COMP_DECL, const char * szClassName, const char * szClassFunc )
{
   PCOMCLASS pClass;
   PCOMDECLARED pDeclared;

   /*printf( "Declaring Class: %s\n", szClassName );*/

   if( HB_COMP_PARAM->iWarnings < 3 )
      return NULL;

   if( ( pClass = hb_compClassFind( HB_COMP_PARAM, szClassName ) ) != NULL )
   {
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_DUP_DECLARATION, "class", szClassName );
      return pClass;
   }

   pClass = ( PCOMCLASS ) hb_xgrab( sizeof( COMCLASS ) );

   pClass->szName = szClassName;
   pClass->pMethod = NULL;
   pClass->pNext = NULL;

   if( HB_COMP_PARAM->pFirstClass == NULL )
      HB_COMP_PARAM->pFirstClass = pClass;
   else
      HB_COMP_PARAM->pLastClass->pNext = pClass;

   HB_COMP_PARAM->pLastClass = pClass;

   /* Auto declaration for the Class Function. */
   pDeclared = hb_compDeclaredAdd( HB_COMP_PARAM, szClassFunc ? szClassFunc : szClassName );
   pDeclared->cType = 'S';
   pDeclared->pClass = pClass;
   
   return pClass;
}
hbmain.c988
PCOMDECLAREDhb_compMethodFind( PCOMCLASS pClass, const char * szMethodName )
PCOMDECLARED hb_compMethodFind( PCOMCLASS pClass, const char * szMethodName )
{
   if( pClass )
   {
      PCOMDECLARED pMethod = pClass->pMethod;

      while( pMethod )
      {
         if( ! strcmp( pMethod->szName, szMethodName ) )
            return pMethod;
         pMethod = pMethod->pNext;
      }
   }

   return NULL;
}
hbmain.c1025
PCOMDECLAREDhb_compMethodAdd( HB_COMP_DECL, PCOMCLASS pClass, const char * szMethodName )
PCOMDECLARED hb_compMethodAdd( HB_COMP_DECL, PCOMCLASS pClass, const char * szMethodName )
{
   PCOMDECLARED pMethod;

   /*printf( "\nDeclaring Method: %s of Class: %s Pointer: %li\n", szMethodName, pClass->szName, pClass );*/

   if( HB_COMP_PARAM->iWarnings < 3 )
      return NULL;

   if( ( pMethod = hb_compMethodFind( pClass, szMethodName ) ) != NULL )
   {
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_DUP_DECLARATION, "method", szMethodName );

      /* Last Declaration override previous declarations */
      pMethod->iParamCount = 0;
      if( pMethod->cParamTypes )
         hb_xfree( pMethod->cParamTypes );
      pMethod->cParamTypes = NULL;
      if( pMethod->pParamClasses )
         hb_xfree( pMethod->pParamClasses );
      pMethod->pParamClasses = NULL;

      return pMethod;
   }

   pMethod = ( PCOMDECLARED ) hb_xgrab( sizeof( COMDECLARED ) );

   pMethod->szName = szMethodName;
   pMethod->cType = ' '; /* Not known yet */
   pMethod->cParamTypes = NULL;
   pMethod->iParamCount = 0;
   pMethod->pParamClasses = NULL;
   pMethod->pNext = NULL;

   if( pClass->pMethod == NULL )
      pClass->pMethod = pMethod;
   else
      pClass->pLastMethod->pNext = pMethod;

   pClass->pLastMethod = pMethod;

   HB_COMP_PARAM->pLastMethod = pMethod;

   return pMethod;
}
hbmain.c1042
STATIC PCOMDECLAREDhb_compDeclaredFind( HB_COMP_DECL, const char * szDeclaredName )
static PCOMDECLARED hb_compDeclaredFind( HB_COMP_DECL, const char * szDeclaredName )
{
   PCOMDECLARED pSym = HB_COMP_PARAM->pFirstDeclared;

   while( pSym )
   {
      if( ! strcmp( pSym->szName, szDeclaredName ) )
         return pSym;
      pSym = pSym->pNext;
   }
   return NULL;
}
hbmain.c1088
PCOMDECLAREDhb_compDeclaredAdd( HB_COMP_DECL, const char * szDeclaredName )
PCOMDECLARED hb_compDeclaredAdd( HB_COMP_DECL, const char * szDeclaredName )
{
   PCOMDECLARED pDeclared;

   if( HB_COMP_PARAM->iWarnings < 3 )
      return NULL;

   /*printf( "\nDeclaring Function: %s\n", szDeclaredName, NULL );*/

   if( ( pDeclared = hb_compDeclaredFind( HB_COMP_PARAM, szDeclaredName ) ) != NULL )
   {
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_DUP_DECLARATION, "function", szDeclaredName );

      /* Last declaration will take effect. */
      pDeclared->cType = ' '; /* Not known yet */
      pDeclared->iParamCount = 0;
      if( pDeclared->cParamTypes )
         hb_xfree( pDeclared->cParamTypes );
      pDeclared->cParamTypes = NULL;
      if( pDeclared->pParamClasses )
         hb_xfree( pDeclared->pParamClasses );
      pDeclared->pParamClasses = NULL;

      return pDeclared;
   }

   pDeclared = ( PCOMDECLARED ) hb_xgrab( sizeof( COMDECLARED ) );

   pDeclared->szName = szDeclaredName;
   pDeclared->cType = ' '; /* Not known yet */
   pDeclared->cParamTypes = NULL;
   pDeclared->iParamCount = 0;
   pDeclared->pParamClasses = NULL;
   pDeclared->pNext = NULL;

   if( HB_COMP_PARAM->pFirstDeclared == NULL )
      HB_COMP_PARAM->pFirstDeclared = pDeclared;
   else
      HB_COMP_PARAM->pLastDeclared->pNext = pDeclared;

   HB_COMP_PARAM->pLastDeclared = pDeclared;

   return pDeclared;
}
hbmain.c1105
VOIDhb_compDeclaredParameterAdd( HB_COMP_DECL, const char * szVarName, BYTE cValueType )
void hb_compDeclaredParameterAdd( HB_COMP_DECL, const char * szVarName, BYTE cValueType )
{
   /* Nothing to do since no warnings requested.*/
   if( HB_COMP_PARAM->iWarnings < 3 )
   {
      HB_SYMBOL_UNUSED( szVarName );
      return;
   }

   /* Either a Declared Function Parameter or a Declared Method Parameter. */
   if( HB_COMP_PARAM->szDeclaredFun )
   {
      /* Find the Declared Function owner of this parameter. */
      PCOMDECLARED pDeclared = hb_compDeclaredFind( HB_COMP_PARAM, HB_COMP_PARAM->szDeclaredFun );

      if( pDeclared )
      {
         pDeclared->iParamCount++;

         if( pDeclared->cParamTypes )
         {
            pDeclared->cParamTypes = ( BYTE * ) hb_xrealloc( pDeclared->cParamTypes, pDeclared->iParamCount );
            pDeclared->pParamClasses = ( PCOMCLASS * ) hb_xrealloc( pDeclared->pParamClasses, pDeclared->iParamCount * sizeof( PCOMCLASS ) );
         }
         else
         {
            pDeclared->cParamTypes = ( BYTE * ) hb_xgrab( 1 );
            pDeclared->pParamClasses = ( PCOMCLASS * ) hb_xgrab( sizeof( PCOMCLASS ) );
         }

         pDeclared->cParamTypes[ pDeclared->iParamCount - 1 ] = cValueType;

         if( toupper( cValueType ) == 'S' )
         {
            pDeclared->pParamClasses[ pDeclared->iParamCount - 1 ] = hb_compClassFind( HB_COMP_PARAM, HB_COMP_PARAM->szFromClass );

            /* Resetting */
            HB_COMP_PARAM->szFromClass = NULL;
         }
      }
   }
   else /* Declared Method Parameter */
   {
      /* printf( "\nAdding parameter: %s Type: %c In Method: %s Class: %s FROM CLASS: %s\n", szVarName, cValueType, HB_COMP_PARAM->pLastMethod->szName, HB_COMP_PARAM->pLastClass->szName, HB_COMP_PARAM->szFromClass ); */

      HB_COMP_PARAM->pLastMethod->iParamCount++;

      if( HB_COMP_PARAM->pLastMethod->cParamTypes )
      {
         HB_COMP_PARAM->pLastMethod->cParamTypes = ( BYTE * ) hb_xrealloc( HB_COMP_PARAM->pLastMethod->cParamTypes, HB_COMP_PARAM->pLastMethod->iParamCount );
         HB_COMP_PARAM->pLastMethod->pParamClasses = ( PCOMCLASS * ) hb_xrealloc( HB_COMP_PARAM->pLastMethod->pParamClasses, HB_COMP_PARAM->pLastMethod->iParamCount * sizeof( COMCLASS ) );
      }
      else
      {
         HB_COMP_PARAM->pLastMethod->cParamTypes = ( BYTE * ) hb_xgrab( 1 );
         HB_COMP_PARAM->pLastMethod->pParamClasses = ( PCOMCLASS * ) hb_xgrab( sizeof( COMCLASS ) );
      }

      HB_COMP_PARAM->pLastMethod->cParamTypes[ HB_COMP_PARAM->pLastMethod->iParamCount - 1 ] = cValueType;

      if( toupper( cValueType ) == 'S' )
      {
         HB_COMP_PARAM->pLastMethod->pParamClasses[ HB_COMP_PARAM->pLastMethod->iParamCount - 1 ] = hb_compClassFind( HB_COMP_PARAM, HB_COMP_PARAM->szFromClass );

         /* printf( "\nParameter: %s FROM CLASS: %s\n", szVarName, HB_COMP_PARAM->pLastMethod->pParamClasses[ HB_COMP_PARAM->pLastMethod->iParamCount - 1 ]->szName ); */

         /* Resetting */
         HB_COMP_PARAM->szFromClass = NULL;
      }
   }
}
hbmain.c1150
STATIC INThb_compSort_ULONG( const void * pLeft, const void * pRight )
static int hb_compSort_ULONG( const void * pLeft, const void * pRight )
{
    ULONG ulLeft  = *( ( ULONG * ) ( pLeft ) );
    ULONG ulRight = *( ( ULONG * ) ( pRight ) );

    if( ulLeft == ulRight )
       return 0 ;
    else if( ulLeft < ulRight )
       return -1;
    else
       return 1;
}
hbmain.c1227
STATIC VOIDhb_compOptimizeJumps( HB_COMP_DECL )
static void hb_compOptimizeJumps( HB_COMP_DECL )
{
   BYTE * pCode = HB_COMP_PARAM->functions.pLast->pCode;
   ULONG * pNOOPs, * pJumps;
   ULONG ulOptimized, ulNextByte, ulBytes2Copy, ulJumpAddr, iNOOP, iJump;
   BOOL fLineStrip = !HB_COMP_PARAM->fDebugInfo && HB_COMP_PARAM->fLineNumbers;
   int iPass;

   if( ! HB_COMP_ISSUPPORTED(HB_COMPFLAG_OPTJUMP) )
      return;

   hb_compOptimizePCode( HB_COMP_PARAM, HB_COMP_PARAM->functions.pLast );
   hb_compCodeTraceMarkDead( HB_COMP_PARAM, HB_COMP_PARAM->functions.pLast );

   for( iPass = 0; iPass < 4 && !HB_COMP_PARAM->fExit; ++iPass )
   {
      LONG lOffset;

      if( iPass == 3 && fLineStrip )
      {
         hb_compStripFuncLines( HB_COMP_PARAM->functions.pLast );
         fLineStrip = FALSE;
      }

      if( HB_COMP_PARAM->functions.pLast->iJumps > 0 )
      {
         pJumps = HB_COMP_PARAM->functions.pLast->pJumps;
         iJump = HB_COMP_PARAM->functions.pLast->iJumps - 1;

         do
         {
            ulJumpAddr = pJumps[ iJump ];

            /*
             * optimize existing jumps, it will be good to also join
             * unconditional jump chain calculating total jump offset but
             * it will be necessary to add some code to protect against
             * infinite loop which will appear when we add optimization
             * for the PCODE sequences like:
             *
             *    HB_P_{FALSE|TRUE},
             * [ no jump targets or stack modification here ]
             *    HB_P_JUMP{FALSE|TRUE}*,
             *
             * I'll think about sth like that later, [druzus]
             */
            switch( pCode[ ulJumpAddr ] )
            {
               case HB_P_JUMPNEAR:
                  if( ( signed char ) pCode[ ulJumpAddr + 1 ] == 2 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 2, FALSE, FALSE );
                  break;

               case HB_P_JUMPFALSENEAR:
               case HB_P_JUMPTRUENEAR:
                  if( ( signed char ) pCode[ ulJumpAddr + 1 ] == 2 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 2, TRUE, FALSE );
                  break;

               case HB_P_JUMP:
                  lOffset = HB_PCODE_MKSHORT( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 3 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 3, FALSE, FALSE );
                  else if( HB_LIM_INT8( lOffset ) )
                  {
                     pCode[ ulJumpAddr ] = HB_P_JUMPNEAR;
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 1, FALSE, FALSE );
                  }
                  break;

               case HB_P_JUMPFALSE:
                  lOffset = HB_PCODE_MKSHORT( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 3 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 3, TRUE, FALSE );
                  else if( HB_LIM_INT8( lOffset ) )
                  {
                     pCode[ ulJumpAddr ] = HB_P_JUMPFALSENEAR;
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 1, FALSE, FALSE );
                  }
                  break;

               case HB_P_JUMPTRUE:
                  lOffset = HB_PCODE_MKSHORT( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 3 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 3, TRUE, FALSE );
                  else if( HB_LIM_INT8( lOffset ) )
                  {
                     pCode[ ulJumpAddr ] = HB_P_JUMPTRUENEAR;
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 1, FALSE, FALSE );
                  }
                  break;

               case HB_P_JUMPFAR:
                  lOffset = HB_PCODE_MKINT24( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 4 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 4, FALSE, FALSE );
                  else if( iPass > 0 && HB_LIM_INT16( lOffset ) )
                  {
                     if( HB_LIM_INT8( lOffset ) )
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMPNEAR;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 2, FALSE, FALSE );
                     }
                     else
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMP;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 3, 1, FALSE, FALSE );
                     }
                  }
                  break;

               case HB_P_JUMPFALSEFAR:
                  lOffset = HB_PCODE_MKINT24( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 4 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 4, TRUE, FALSE );
                  else if( iPass > 0 && HB_LIM_INT16( lOffset ) )
                  {
                     if( HB_LIM_INT8( lOffset ) )
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMPFALSENEAR;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 2, FALSE, FALSE );
                     }
                     else
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMPFALSE;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 3, 1, FALSE, FALSE );
                     }
                  }
                  break;

               case HB_P_JUMPTRUEFAR:
                  lOffset = HB_PCODE_MKINT24( &pCode[ ulJumpAddr + 1 ] );
                  if( lOffset == 4 )
                     hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr, 4, TRUE, FALSE );
                  else if( iPass > 0 && HB_LIM_INT16( lOffset ) )
                  {
                     if( HB_LIM_INT8( lOffset ) )
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMPTRUENEAR;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 2, 2, FALSE, FALSE );
                     }
                     else
                     {
                        pCode[ ulJumpAddr ] = HB_P_JUMPTRUE;
                        hb_compNOOPfill( HB_COMP_PARAM->functions.pLast, ulJumpAddr + 3, 1, FALSE, FALSE );
                     }
                  }
                  break;
            }

            /* remove dummy jumps (over dead code) */
            if( pCode[ ulJumpAddr ] == HB_P_NOOP ||
                pCode[ ulJumpAddr ] == HB_P_POP )
            {
               if( HB_COMP_PARAM->functions.pLast->iJumps > iJump + 1 )
                  memmove( &pJumps[ iJump ], &pJumps[ iJump + 1 ],
                           ( HB_COMP_PARAM->functions.pLast->iJumps - iJump - 1 ) *
                           sizeof( ULONG ) );
               HB_COMP_PARAM->functions.pLast->iJumps--;
            }
         }
         while( iJump-- );

         if( HB_COMP_PARAM->functions.pLast->iJumps == 0 )
         {
            hb_xfree( HB_COMP_PARAM->functions.pLast->pJumps );
            HB_COMP_PARAM->functions.pLast->pJumps = NULL;
         }
      }

      if( HB_COMP_PARAM->functions.pLast->iNOOPs == 0 )
      {
         if( iPass == 0 )
            continue;
         if( fLineStrip )
            hb_compStripFuncLines( HB_COMP_PARAM->functions.pLast );
         if( HB_COMP_PARAM->functions.pLast->iNOOPs == 0 )
            return;
      }

      pNOOPs = HB_COMP_PARAM->functions.pLast->pNOOPs;

      /* Needed so the pasting of PCODE pieces below will work correctly */
      qsort( ( void * ) pNOOPs, HB_COMP_PARAM->functions.pLast->iNOOPs, sizeof( ULONG ), hb_compSort_ULONG );

      if( HB_COMP_PARAM->functions.pLast->iJumps )
      {
         LONG * plSizes, * plShifts;
         ULONG ulSize;

         pJumps = HB_COMP_PARAM->functions.pLast->pJumps;
         ulSize = sizeof( LONG ) * HB_COMP_PARAM->functions.pLast->iJumps;
         plSizes = ( LONG * ) hb_xgrab( ulSize );
         plShifts = ( LONG * ) hb_xgrab( ulSize );

         for( iJump = 0; iJump < HB_COMP_PARAM->functions.pLast->iJumps; iJump++ )
            plSizes[ iJump ] = plShifts[ iJump ] = 0;

         /* First Scan NOOPS - Adjust Jump addresses. */
         for( iNOOP = 0; iNOOP < HB_COMP_PARAM->functions.pLast->iNOOPs; iNOOP++ )
         {
            /* Adjusting preceding jumps that pooint to code beyond the current NOOP
               or trailing backward jumps pointing to lower address. */
            for( iJump = 0; iJump < HB_COMP_PARAM->functions.pLast->iJumps ; iJump++ )
            {
               ulJumpAddr = pJumps[ iJump ];
               switch( pCode[ ulJumpAddr ] )
               {
                  case HB_P_JUMPNEAR:
                  case HB_P_JUMPFALSENEAR:
                  case HB_P_JUMPTRUENEAR:
                     lOffset = ( signed char ) pCode[ ulJumpAddr + 1 ];
                     break;

                  case HB_P_JUMP:
                  case HB_P_JUMPFALSE:
                  case HB_P_JUMPTRUE:
                     lOffset = HB_PCODE_MKSHORT( &pCode[ ulJumpAddr + 1 ] );
                     break;

                  case HB_P_JUMPFAR:
                  case HB_P_JUMPTRUEFAR:
                  case HB_P_JUMPFALSEFAR:
                  case HB_P_ALWAYSBEGIN:
                  case HB_P_SEQALWAYS:
                  case HB_P_SEQBEGIN:
                  case HB_P_SEQEND:
                     lOffset = HB_PCODE_MKINT24( &pCode[ ulJumpAddr + 1 ] );
                     break;

                  default:
                     hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_JUMP_NOT_FOUND, NULL, NULL );
                     continue;
               }

               /* update jump size */
               if( lOffset > 0 ) /* forward (positive) jump */
               {
                  /* Only if points to code beyond the current fix. */
                  if( pNOOPs[ iNOOP ] > ulJumpAddr &&
                      pNOOPs[ iNOOP ] < ( ULONG ) ( ulJumpAddr + lOffset ) )
                     plSizes[ iJump ]--;
               }
               else /* if( lOffset < 0 ) - backword (negative) jump */
               {
                  /* Only if points to code prior the current fix. */
                  if( pNOOPs[ iNOOP ] < ulJumpAddr &&
                      pNOOPs[ iNOOP ] >= ( ULONG ) ( ulJumpAddr + lOffset ) )
                     plSizes[ iJump ]++;
               }

               /* update jump address */
               if( pNOOPs[ iNOOP ] < ulJumpAddr )
                  plShifts[ iJump ]++;
            }
         }

         for( iJump = 0; iJump < HB_COMP_PARAM->functions.pLast->iJumps; iJump++ )
         {
            lOffset = plSizes[ iJump ];
            if( lOffset != 0 )
            {
               ulJumpAddr = pJumps[ iJump ];
               switch( pCode[ ulJumpAddr ] )
               {
                  case HB_P_JUMPNEAR:
                  case HB_P_JUMPFALSENEAR:
                  case HB_P_JUMPTRUENEAR:
                     lOffset += ( signed char ) pCode[ ulJumpAddr + 1 ];
                     pCode[ ulJumpAddr + 1 ] = HB_LOBYTE( lOffset );
                     break;

                  case HB_P_JUMP:
                  case HB_P_JUMPFALSE:
                  case HB_P_JUMPTRUE:
                     lOffset += HB_PCODE_MKSHORT( &pCode[ ulJumpAddr + 1 ] );
                     HB_PUT_LE_UINT16( &pCode[ ulJumpAddr + 1 ], lOffset );
                     break;

                  default:
                     lOffset += HB_PCODE_MKINT24( &pCode[ ulJumpAddr + 1 ] );
                     HB_PUT_LE_UINT24( &pCode[ ulJumpAddr + 1 ], lOffset );
                     break;
               }
            }
            pJumps[ iJump ] -= plShifts[ iJump ];
         }
         hb_xfree( plSizes );
         hb_xfree( plShifts );
      }

      ulOptimized = ulNextByte = 0;
      /* Second Scan, after all adjustements been made, we can copy the optimized code. */
      for( iNOOP = 0; iNOOP < HB_COMP_PARAM->functions.pLast->iNOOPs; iNOOP++ )
      {
         ulBytes2Copy = ( pNOOPs[ iNOOP ] - ulNextByte ) ;

         memmove( pCode + ulOptimized, pCode + ulNextByte, ulBytes2Copy );

         ulOptimized += ulBytes2Copy;
         ulNextByte  += ulBytes2Copy;

         /* Skip the NOOP and point to next valid byte */
         ulNextByte++;
      }

      ulBytes2Copy = ( HB_COMP_PARAM->functions.pLast->lPCodePos - ulNextByte ) ;
      memmove( pCode + ulOptimized, pCode + ulNextByte, ulBytes2Copy );
      ulOptimized += ulBytes2Copy;

      HB_COMP_PARAM->functions.pLast->lPCodePos  = ulOptimized;
      HB_COMP_PARAM->functions.pLast->lPCodeSize = ulOptimized;

      hb_xfree( HB_COMP_PARAM->functions.pLast->pNOOPs );
      HB_COMP_PARAM->functions.pLast->pNOOPs = NULL;
      HB_COMP_PARAM->functions.pLast->iNOOPs = 0;

      if( iPass <= 1 )
      {
         hb_compOptimizePCode( HB_COMP_PARAM, HB_COMP_PARAM->functions.pLast );
         hb_compCodeTraceMarkDead( HB_COMP_PARAM, HB_COMP_PARAM->functions.pLast );
      }
   }
}
hbmain.c1240
STATIC VOIDhb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc )
static void hb_compOptimizeFrames( HB_COMP_DECL, PFUNCTION pFunc )
{
   USHORT w;

   if( pFunc == NULL )
      return;

   if( pFunc == HB_COMP_PARAM->pInitFunc )
   {
      if( pFunc->pCode[ 0 ] == HB_P_STATICS &&
          pFunc->pCode[ 5 ] == HB_P_SFRAME )
      {
         hb_compSymbolFind( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc->szName, &w, HB_SYM_FUNCNAME );
         pFunc->pCode[ 1 ] = HB_LOBYTE( w );
         pFunc->pCode[ 2 ] = HB_HIBYTE( w );
         pFunc->pCode[ 6 ] = HB_LOBYTE( w );
         pFunc->pCode[ 7 ] = HB_HIBYTE( w );

         /* Remove the SFRAME pcode if there's no global static
            initialization: */

         /* NOTE: For some reason this will not work for the static init
            function, so I'm using an ugly hack instead. [vszakats] */
/*       if( !( pFunc->bFlags & FUN_USES_STATICS ) ) */
         if( pFunc->pCode[ 8 ] == HB_P_ENDPROC )
         {
            pFunc->lPCodePos -= 3;
            memmove( pFunc->pCode + 5, pFunc->pCode + 8, pFunc->lPCodePos - 5 );
         }
         else /* Check Global Statics. */
         {
            /* PVAR pVar = pFunc->pStatics; */
            PVAR pVar = HB_COMP_PARAM->functions.pFirst->pStatics;

            while( pVar )
            {
               /*printf( "\nChecking: %s Used: %i\n", pVar->szName, pVar->iUsed );*/

               if( ! ( pVar->iUsed & VU_USED ) && (pVar->iUsed & VU_INITIALIZED) )
                  hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_VAL_NOT_USED, pVar->szName, NULL );

               /* May have been initialized in previous execution of the function.
                  else if( ( pVar->iUsed & VU_USED ) && ! ( pVar->iUsed & VU_INITIALIZED ) )
                  hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_NOT_INITIALIZED, pVar->szName, NULL );
               */
               pVar = pVar->pNext;
            }
         }
      }
   }
   else if( pFunc->pCode[ 0 ] == HB_P_FRAME && pFunc->pCode[ 3 ] == HB_P_SFRAME )
   {
      PVAR pLocal;
      int iLocals = 0, iOffset = 0;
      BOOL bSkipFRAME;
      BOOL bSkipSFRAME;

      pLocal = pFunc->pLocals;

      while( pLocal )
      {
         pLocal = pLocal->pNext;
         iLocals++;
      }

      if( pFunc->bFlags & FUN_USES_STATICS )
      {
         hb_compSymbolFind( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc->szName, &w, HB_SYM_FUNCNAME );
         pFunc->pCode[ 4 ] = HB_LOBYTE( w );
         pFunc->pCode[ 5 ] = HB_HIBYTE( w );
         bSkipSFRAME = FALSE;
      }
      else
         bSkipSFRAME = TRUE;

      if( iLocals || pFunc->wParamCount )
      {
         /* Parameters declared with PARAMETERS statement are not
          * placed in the local variable list.
          */
         if( pFunc->bFlags & FUN_USES_LOCAL_PARAMS )
            iLocals -= pFunc->wParamCount;

         if( iLocals > 255 )
         {
            /* more then 255 local variables,
             * make a room for HB_P_LARGE[V]FRAME
             */
            hb_compGenPCode1( 0, HB_COMP_PARAM );
            memmove( pFunc->pCode + 4, pFunc->pCode + 3, pFunc->lPCodePos - 4 );
            pFunc->pCode[ 0 ] = HB_P_LARGEFRAME;
            pFunc->pCode[ 1 ] = HB_LOBYTE( iLocals );
            pFunc->pCode[ 2 ] = HB_HIBYTE( iLocals );
            pFunc->pCode[ 3 ] = ( BYTE )( pFunc->wParamCount );
            iOffset = 1;
         }
         else
         {
            pFunc->pCode[ 1 ] = ( BYTE )( iLocals );
            pFunc->pCode[ 2 ] = ( BYTE )( pFunc->wParamCount );
         }
         bSkipFRAME = FALSE;
      }
      else
         /* Skip LOCALs frame only when function is not declared with
          * variable number of parameters (HB_P_[LARGE]VFRAME)
          */
         bSkipFRAME = !pFunc->fVParams;

      /* Remove the frame pcodes if they are not needed */
      if( bSkipFRAME )
      {
         if( bSkipSFRAME )
         {
            pFunc->lPCodePos -= 6;
            memmove( pFunc->pCode, pFunc->pCode + 6, pFunc->lPCodePos );
         }
         else
         {
            pFunc->lPCodePos -= 3;
            memmove( pFunc->pCode, pFunc->pCode + 3, pFunc->lPCodePos );
         }
      }
      else
      {
         if( pFunc->fVParams )
            pFunc->pCode[ 0 ] = iOffset ? HB_P_LARGEVFRAME : HB_P_VFRAME;

         if( bSkipSFRAME )
         {
            pFunc->lPCodePos -= 3;
            memmove( pFunc->pCode + 3 + iOffset, pFunc->pCode + 6 + iOffset,
                     pFunc->lPCodePos - 3 - iOffset );
         }
      }
   }
}
hbmain.c1566
STATIC VOIDhb_compFinalizeFunction( HB_COMP_DECL )
static void hb_compFinalizeFunction( HB_COMP_DECL ) /* fixes all last defined function returns jumps offsets */
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;

   if( pFunc )
   {
      if( ( pFunc->bFlags & FUN_WITH_RETURN ) == 0 )
      {
         /* The last statement in a function/procedure was not a RETURN
          * Generate end-of-procedure pcode
          */
         hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
      }

      hb_compCheckUnclosedStru( HB_COMP_PARAM, pFunc );

      hb_compRTVariableKill( HB_COMP_PARAM, pFunc );
      hb_compSwitchKill( HB_COMP_PARAM, pFunc );
      hb_compElseIfKill( pFunc );
      hb_compLoopKill( pFunc );

      if( !pFunc->bError )
      {
         if( pFunc->wParamCount && !( pFunc->bFlags & FUN_USES_LOCAL_PARAMS ) )
         {
            /* There was a PARAMETERS statement used.
             * NOTE: This fixes local variables references in a case when
             * there is PARAMETERS statement after a LOCAL variable declarations.
             * All local variables are numbered from 1 - which means use first
             * item from the eval stack. However if PARAMETERS statement is used
             * then there are additional items on the eval stack - the
             * function arguments. Then first local variable is at the position
             * (1 + ). We cannot fix this numbering
             * because the PARAMETERS statement can be used even at the end
             * of function body when all local variables are already created.
             */
            hb_compFixFuncPCode( HB_COMP_PARAM, pFunc );
         }

         hb_compOptimizeJumps( HB_COMP_PARAM );
      }

      if( HB_COMP_PARAM->iWarnings )
      {
         PVAR pVar;

         pVar = pFunc->pLocals;
         while( pVar )
         {
            if( pVar->szName && pFunc->szName && pFunc->szName[0] && (! ( pVar->iUsed & VU_USED )) )
            {
               char szFun[ 256 ];
               snprintf( szFun, sizeof( szFun ), "%s(%i)", pFunc->szName, pVar->iDeclLine );
               hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_VAR_NOT_USED, pVar->szName, szFun );
            }

            pVar = pVar->pNext;
         }

         pVar = pFunc->pStatics;
         while( pVar )
         {
            if( pVar->szName && pFunc->szName && pFunc->szName[0] && ! ( pVar->iUsed & VU_USED ) )
            {
               char szFun[ 256 ];
               snprintf( szFun, sizeof( szFun ), "%s(%i)", pFunc->szName, pVar->iDeclLine );
               hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_VAR_NOT_USED, pVar->szName, szFun );
            }

            pVar = pVar->pNext;
         }

         /* Check if the function returned some value
          */
         if( (pFunc->bFlags & FUN_WITH_RETURN) == 0 &&
             (pFunc->bFlags & FUN_PROCEDURE) == 0 )
            hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_FUN_WITH_NO_RETURN,
                               pFunc->szName, NULL );
      }
   }
}
hbmain.c1704
STATIC PFUNCTIONhb_compFunctionNew( HB_COMP_DECL, const char * szName, HB_SYMBOLSCOPE cScope )
static PFUNCTION hb_compFunctionNew( HB_COMP_DECL, const char * szName, HB_SYMBOLSCOPE cScope )
{
   PFUNCTION pFunc;

   pFunc = ( PFUNCTION ) hb_xgrab( sizeof( _FUNC ) );
   memset( pFunc, 0, sizeof( _FUNC ) );

   pFunc->szName          = szName;
   pFunc->cScope          = cScope;
   pFunc->iStaticsBase    = HB_COMP_PARAM->iStaticCnt;
   pFunc->bLateEval       = TRUE;
   pFunc->fVParams        = FALSE;
   pFunc->bError          = FALSE;

   return pFunc;
}
hbmain.c1786
STATIC PINLINEhb_compInlineNew( HB_COMP_DECL, const char * szName, int iLine )
static PINLINE hb_compInlineNew( HB_COMP_DECL, const char * szName, int iLine )
{
   PINLINE pInline;

   pInline = ( PINLINE ) hb_xgrab( sizeof( _INLINE ) );

   pInline->szName     = szName;
   pInline->pCode      = NULL;
   pInline->lPCodeSize = 0;
   pInline->pNext      = NULL;
   pInline->szFileName = hb_compIdentifierNew( HB_COMP_PARAM,
                  hb_pp_fileName( HB_COMP_PARAM->pLex->pPP ), HB_IDENT_COPY );
   pInline->iLine      = iLine;

   return pInline;
}
hbmain.c1806
STATIC PFUNCTIONhb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc )
static PFUNCTION hb_compFunctionKill( HB_COMP_DECL, PFUNCTION pFunc )
{
   PFUNCTION pNext = pFunc->pNext;
   HB_ENUMERATOR_PTR pEVar;
   PVAR pVar;

   hb_compRTVariableKill( HB_COMP_PARAM, pFunc );
   hb_compSwitchKill( HB_COMP_PARAM, pFunc );
   hb_compElseIfKill( pFunc );
   hb_compLoopKill( pFunc );

   while( pFunc->pLocals )
   {
      pVar = pFunc->pLocals;
      pFunc->pLocals = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pStatics )
   {
      pVar = pFunc->pStatics;
      pFunc->pStatics = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pFields )
   {
      pVar = pFunc->pFields;
      pFunc->pFields = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pMemvars )
   {
      pVar = pFunc->pMemvars;
      pFunc->pMemvars = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pDetached )
   {
      pVar = pFunc->pDetached;
      pFunc->pDetached = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pPrivates )
   {
      pVar = pFunc->pPrivates;
      pFunc->pPrivates = pVar->pNext;
      hb_xfree( ( void * ) pVar );
   }

   while( pFunc->pEnum )
   {
      pEVar = pFunc->pEnum;
      pFunc->pEnum = pEVar->pNext;
      hb_xfree( pEVar );      
   }

   /* Release the NOOP array. */
   if( pFunc->pNOOPs )
      hb_xfree( ( void * ) pFunc->pNOOPs );

   /* Release the Jumps array. */
   if( pFunc->pJumps )
      hb_xfree( ( void * ) pFunc->pJumps );

   hb_xfree( ( void * ) pFunc->pCode );
   hb_xfree( ( void * ) pFunc );

   return pNext;
}
hbmain.c1823
STATIC PFUNCALLhb_compFunCallAdd( HB_COMP_DECL, const char * szFunctionName )
static PFUNCALL hb_compFunCallAdd( HB_COMP_DECL, const char * szFunctionName )
{
   PFUNCALL pFunc = ( PFUNCALL ) hb_xgrab( sizeof( _FUNCALL ) );

   pFunc->szName = szFunctionName;
   pFunc->pNext  = NULL;
   if( ! HB_COMP_PARAM->funcalls.iCount )
   {
      HB_COMP_PARAM->funcalls.pFirst = pFunc;
      HB_COMP_PARAM->funcalls.pLast  = pFunc;
   }
   else
   {
      HB_COMP_PARAM->funcalls.pLast->pNext = pFunc;
      HB_COMP_PARAM->funcalls.pLast = pFunc;
   }
   HB_COMP_PARAM->funcalls.iCount++;

   return pFunc;
}
hbmain.c1898
VOIDhb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOLSCOPE cScope )
void hb_compExternAdd( HB_COMP_DECL, const char * szExternName, HB_SYMBOLSCOPE cScope ) /* defines a new extern name */
{
   PEXTERN pExtern = ( PEXTERN ) hb_xgrab( sizeof( _EXTERN ) ), pLast;

   if( strcmp( "_GET_", szExternName ) == 0 )
   {
      /* special function to implement @ GET statement */
      hb_compExternAdd( HB_COMP_PARAM, "__GETA", 0 );
      pExtern->szName = "__GET";
   }
   else
   {
      pExtern->szName = szExternName;
   }
   pExtern->cScope = cScope;
   pExtern->pNext  = NULL;

   if( HB_COMP_PARAM->externs == NULL )
      HB_COMP_PARAM->externs = pExtern;
   else
   {
      pLast = HB_COMP_PARAM->externs;
      while( pLast->pNext )
         pLast = pLast->pNext;
      pLast->pNext = pExtern;
   }
}
hbmain.c1924
STATIC VOIDhb_compAddFunc( HB_COMP_DECL, PFUNCTION pFunc )
static void hb_compAddFunc( HB_COMP_DECL, PFUNCTION pFunc )
{
   while( HB_COMP_PARAM->functions.pLast &&
       !HB_COMP_PARAM->functions.pLast->szName )
   {
      PFUNCTION pBlock = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->functions.pLast = pBlock->pOwner;
      hb_compFunctionKill( HB_COMP_PARAM, pBlock );
   }

   if( HB_COMP_PARAM->functions.iCount == 0 )
      HB_COMP_PARAM->functions.pFirst = pFunc;
   else
      HB_COMP_PARAM->functions.pLast->pNext = pFunc;
   HB_COMP_PARAM->functions.pLast = pFunc;
   HB_COMP_PARAM->functions.iCount++;
}
hbmain.c1957
VOIDhb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cScope, int iType )
void hb_compFunctionAdd( HB_COMP_DECL, const char * szFunName, HB_SYMBOLSCOPE cScope, int iType )
{
   PCOMSYMBOL   pSym;
   PFUNCTION pFunc;
   const char * szFunction;

   hb_compFinalizeFunction( HB_COMP_PARAM );    /* fix all previous function returns offsets */

   if( cScope & (HB_FS_INIT | HB_FS_EXIT) )
   {
      char szNewName[ HB_SYMBOL_NAME_LEN + 1 ];
      int iLen;

      iLen = strlen( szFunName );
      if( iLen >= HB_SYMBOL_NAME_LEN )
         iLen = HB_SYMBOL_NAME_LEN - 1;
      memcpy( szNewName, szFunName, iLen );
      szNewName[ iLen ] ='$';
      szNewName[ iLen + 1 ] = '\0';
      szFunName = hb_compIdentifierNew( HB_COMP_PARAM, szNewName, HB_IDENT_COPY );
   }
   pFunc = hb_compFunctionFind( HB_COMP_PARAM, szFunName );
   if( pFunc )
   {
      /* The name of a function/procedure is already defined */
      if( pFunc != HB_COMP_PARAM->functions.pFirst || HB_COMP_PARAM->fStartProc )
         /* it is not a starting procedure that was automatically created */
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_FUNC_DUPL, szFunName, NULL );
   }

   szFunction = hb_compReservedName( szFunName );
   if( szFunction && !( HB_COMP_PARAM->functions.iCount == 0 && !HB_COMP_PARAM->fStartProc ) )
   {
      /* We are ignoring it when it is the name of PRG file and we are
       * not creating implicit starting procedure
       */
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_FUNC_RESERVED, szFunction, szFunName );
   }

   HB_COMP_PARAM->iFunctionCnt++;

   pSym = hb_compSymbolFind( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME );
   if( ! pSym )
   {
      /* there is not a symbol on the symbol table for this function name */
      pSym = hb_compSymbolAdd( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME );
   }
   if( pSym )
      pSym->cScope |= cScope | HB_FS_LOCAL;

   pFunc = hb_compFunctionNew( HB_COMP_PARAM, szFunName, cScope );
   pFunc->bFlags |= iType;

   hb_compAddFunc( HB_COMP_PARAM, pFunc );

   HB_COMP_PARAM->lastLinePos = 0;  /* optimization of line numbers opcode generation */
   HB_COMP_PARAM->ilastLineErr = 0; /* position of last syntax error (line number) */

   hb_compGenPCode3( HB_P_FRAME, 0, 0, HB_COMP_PARAM );     /* frame for locals and parameters */
   hb_compGenPCode3( HB_P_SFRAME, 0, 0, HB_COMP_PARAM );    /* frame for statics variables */

   if( HB_COMP_PARAM->fDebugInfo )
      hb_compGenModuleName( HB_COMP_PARAM, szFunName );
   else
      HB_COMP_PARAM->lastLine = -1;
}
hbmain.c1975
PINLINEhb_compInlineAdd( HB_COMP_DECL, const char * szFunName, int iLine )
PINLINE hb_compInlineAdd( HB_COMP_DECL, const char * szFunName, int iLine )
{
   PINLINE pInline;
   PCOMSYMBOL   pSym;

   if( szFunName )
   {
      pSym = hb_compSymbolFind( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME );
      if( ! pSym )
      {
         pSym = hb_compSymbolAdd( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME );
      }
      if( pSym )
      {
         pSym->cScope |= HB_FS_STATIC | HB_FS_LOCAL;
      }
   }
   pInline = hb_compInlineNew( pComp, szFunName, iLine );

   if( HB_COMP_PARAM->inlines.iCount == 0 )
   {
      HB_COMP_PARAM->inlines.pFirst = pInline;
      HB_COMP_PARAM->inlines.pLast  = pInline;
   }
   else
   {
      HB_COMP_PARAM->inlines.pLast->pNext = pInline;
      HB_COMP_PARAM->inlines.pLast = pInline;
   }

   HB_COMP_PARAM->inlines.iCount++;

   return pInline;
}
hbmain.c2048
VOIDhb_compAnnounce( HB_COMP_DECL, const char * szFunName )
void hb_compAnnounce( HB_COMP_DECL, const char * szFunName )
{
   PFUNCTION pFunc;

   pFunc = hb_compFunctionFind( HB_COMP_PARAM, szFunName );
   if( pFunc )
   {
      /* there is a function/procedure defined already - ANNOUNCEd procedure
       * have to be a public symbol - check if existing symbol is public
       */
      if( pFunc->cScope & HB_FS_STATIC )
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_FUNC_ANNOUNCE, szFunName, NULL );
   }
   else
   {
      PCOMSYMBOL pSym;

      /* create a new procedure
       */
      pSym = hb_compSymbolAdd( HB_COMP_PARAM, szFunName, NULL, HB_SYM_FUNCNAME );
      pSym->cScope = HB_FS_PUBLIC | HB_FS_LOCAL;

      pFunc = hb_compFunctionNew( HB_COMP_PARAM, szFunName, pSym->cScope );
      pFunc->bFlags |= FUN_PROCEDURE;

      hb_compAddFunc( HB_COMP_PARAM, pFunc );
      HB_COMP_PARAM->iFunctionCnt++;

      /* this function have a very limited functionality
       */
      hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
   }
}
hbmain.c2083
VOIDhb_compGenBreak( HB_COMP_DECL )
void hb_compGenBreak( HB_COMP_DECL )
{
   hb_compGenPushFunCall( "BREAK", HB_COMP_PARAM );
}
hbmain.c2119
VOIDhb_compExternGen( HB_COMP_DECL )
void hb_compExternGen( HB_COMP_DECL ) /* generates the symbols for the EXTERN names */
{
   PEXTERN pDelete;

   if( HB_COMP_PARAM->fDebugInfo )
      hb_compExternAdd( HB_COMP_PARAM, "__DBGENTRY", 0 );

   while( HB_COMP_PARAM->externs )
   {
      PCOMSYMBOL pSym = hb_compSymbolFind( HB_COMP_PARAM, HB_COMP_PARAM->externs->szName, NULL, HB_SYM_FUNCNAME );
      if( pSym )
      {
         if( ! hb_compFunCallFind( HB_COMP_PARAM, HB_COMP_PARAM->externs->szName ) )
            hb_compFunCallAdd( HB_COMP_PARAM, HB_COMP_PARAM->externs->szName );
      }
      else
      {
          pSym = hb_compSymbolAdd( HB_COMP_PARAM, HB_COMP_PARAM->externs->szName, NULL, HB_SYM_FUNCNAME );
          hb_compFunCallAdd( HB_COMP_PARAM, HB_COMP_PARAM->externs->szName );
      }
      pSym->cScope |= HB_COMP_PARAM->externs->cScope;
      pDelete = HB_COMP_PARAM->externs;
      HB_COMP_PARAM->externs = HB_COMP_PARAM->externs->pNext;
      hb_xfree( ( void * ) pDelete );
   }
}
hbmain.c2124
PFUNCALLhb_compFunCallFind( HB_COMP_DECL, const char * szFunctionName )
PFUNCALL hb_compFunCallFind( HB_COMP_DECL, const char * szFunctionName ) /* returns a previously called defined function */
{
   PFUNCALL pFunc = HB_COMP_PARAM->funcalls.pFirst;

   while( pFunc )
   {
      if( ! strcmp( pFunc->szName, szFunctionName ) )
         break;
      pFunc = pFunc->pNext;
   }
   return pFunc;
}
hbmain.c2151
PFUNCTIONhb_compFunctionFind( HB_COMP_DECL, const char * szFunctionName )
PFUNCTION hb_compFunctionFind( HB_COMP_DECL, const char * szFunctionName ) /* returns a previously defined function */
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst;

   while( pFunc )
   {
      if( ! strcmp( pFunc->szName, szFunctionName ) )
         break;
      pFunc = pFunc->pNext;
   }
   return pFunc;
}
hbmain.c2164
PINLINEhb_compInlineFind( HB_COMP_DECL, const char * szFunctionName )
PINLINE hb_compInlineFind( HB_COMP_DECL, const char * szFunctionName )
{
   PINLINE pInline = HB_COMP_PARAM->inlines.pFirst;

   while( pInline )
   {
      if( pInline->szName && strcmp( pInline->szName, szFunctionName ) == 0 )
         break;
      pInline = pInline->pNext;
   }
   return pInline;
}
hbmain.c2177
STATIC BOOLhb_compIsFunction( HB_COMP_DECL, const char * szFunctionName )
static BOOL hb_compIsFunction( HB_COMP_DECL, const char * szFunctionName )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst;

   while( pFunc )
   {
      if( ! hb_stricmp( pFunc->szName, szFunctionName ) )
         break;
      pFunc = pFunc->pNext;
   }
   return pFunc != NULL;
}
hbmain.c2190
STATIC VOIDhb_compNOOPadd( PFUNCTION pFunc, ULONG ulPos )
static void hb_compNOOPadd( PFUNCTION pFunc, ULONG ulPos )
{
   pFunc->pCode[ ulPos ] = HB_P_NOOP;

   if( pFunc->iNOOPs )
      pFunc->pNOOPs = ( ULONG * ) hb_xrealloc( pFunc->pNOOPs, sizeof( ULONG ) * ( pFunc->iNOOPs + 1 ) );
   else
      pFunc->pNOOPs = ( ULONG * ) hb_xgrab( sizeof( ULONG ) );
   pFunc->pNOOPs[ pFunc->iNOOPs++ ] = ulPos;
}
hbmain.c2204
STATIC VOIDhb_compPrepareOptimize( HB_COMP_DECL )
static void hb_compPrepareOptimize( HB_COMP_DECL )
{
   if( HB_COMP_ISSUPPORTED(HB_COMPFLAG_OPTJUMP) )
   {
      PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;

      if( pFunc->iJumps )
         pFunc->pJumps = ( ULONG * ) hb_xrealloc( pFunc->pJumps, sizeof( ULONG ) * ( pFunc->iJumps + 1 ) );
      else
         pFunc->pJumps = ( ULONG * ) hb_xgrab( sizeof( ULONG ) );
      pFunc->pJumps[ pFunc->iJumps++ ] = ( ULONG ) ( pFunc->lPCodePos - 4 );
   }
}
hbmain.c2218
ULONGhb_compGenJump( LONG lOffset, HB_COMP_DECL )
ULONG hb_compGenJump( LONG lOffset, HB_COMP_DECL )
{
   if( !HB_LIM_INT24( lOffset ) )
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_JUMP_TOO_LONG, NULL, NULL );

   hb_compGenPCode4( HB_P_JUMPFAR, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ), ( BYTE ) ( ( lOffset >> 16 ) & 0xFF ), HB_COMP_PARAM );
   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c2232
ULONGhb_compGenJumpFalse( LONG lOffset, HB_COMP_DECL )
ULONG hb_compGenJumpFalse( LONG lOffset, HB_COMP_DECL )
{
   if( !HB_LIM_INT24( lOffset ) )
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_JUMP_TOO_LONG, NULL, NULL );

   hb_compGenPCode4( HB_P_JUMPFALSEFAR, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ), ( BYTE ) ( ( lOffset >> 16 ) & 0xFF ), HB_COMP_PARAM );
   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c2243
ULONGhb_compGenJumpTrue( LONG lOffset, HB_COMP_DECL )
ULONG hb_compGenJumpTrue( LONG lOffset, HB_COMP_DECL )
{
   if( !HB_LIM_INT24( lOffset ) )
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_JUMP_TOO_LONG, NULL, NULL );

   hb_compGenPCode4( HB_P_JUMPTRUEFAR, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ), ( BYTE ) ( ( lOffset >> 16 ) & 0xFF ), HB_COMP_PARAM );
   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c2254
VOIDhb_compGenJumpThere( ULONG ulFrom, ULONG ulTo, HB_COMP_DECL )
void hb_compGenJumpThere( ULONG ulFrom, ULONG ulTo, HB_COMP_DECL )
{
   BYTE * pCode = HB_COMP_PARAM->functions.pLast->pCode;
   LONG lOffset = ulTo - ulFrom + 1;

   if( HB_LIM_INT24( lOffset ) )
   {
      HB_PUT_LE_UINT24( &pCode[ ulFrom ], lOffset );
   }
   else
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_JUMP_TOO_LONG, NULL, NULL );
}
hbmain.c2265
VOIDhb_compGenJumpHere( ULONG ulOffset, HB_COMP_DECL )
void hb_compGenJumpHere( ULONG ulOffset, HB_COMP_DECL )
{
   hb_compGenJumpThere( ulOffset, HB_COMP_PARAM->functions.pLast->lPCodePos, HB_COMP_PARAM );
}
hbmain.c2278
VOIDhb_compLinePush( HB_COMP_DECL )
void hb_compLinePush( HB_COMP_DECL ) /* generates the pcode with the currently compiled source code line */
{
   if( HB_COMP_PARAM->fLineNumbers )
   {
      if( HB_COMP_PARAM->fDebugInfo && HB_COMP_PARAM->lastModule != HB_COMP_PARAM->currModule )
      {
         if( HB_COMP_PARAM->functions.pLast->pCode[ HB_COMP_PARAM->lastLinePos ] == HB_P_LINE &&
             HB_COMP_PARAM->functions.pLast->lPCodePos - HB_COMP_PARAM->lastLinePos == 3 )
            HB_COMP_PARAM->functions.pLast->lPCodePos -= 3;
         hb_compGenModuleName( HB_COMP_PARAM, NULL );
      }

      if( HB_COMP_PARAM->currLine != HB_COMP_PARAM->lastLine )
      {
         if( HB_COMP_PARAM->functions.pLast->lPCodePos - HB_COMP_PARAM->lastLinePos == 3 &&
             HB_COMP_PARAM->functions.pLast->pCode[ HB_COMP_PARAM->lastLinePos ] == HB_P_LINE )
         {
            HB_COMP_PARAM->functions.pLast->pCode[ HB_COMP_PARAM->lastLinePos + 1 ] = HB_LOBYTE( HB_COMP_PARAM->currLine );
            HB_COMP_PARAM->functions.pLast->pCode[ HB_COMP_PARAM->lastLinePos + 2 ] = HB_HIBYTE( HB_COMP_PARAM->currLine );
         }
         else
         {
            HB_COMP_PARAM->lastLinePos = HB_COMP_PARAM->functions.pLast->lPCodePos;
            hb_compGenPCode3( HB_P_LINE, HB_LOBYTE( HB_COMP_PARAM->currLine ),
                                         HB_HIBYTE( HB_COMP_PARAM->currLine ), HB_COMP_PARAM );
         }
         HB_COMP_PARAM->lastLine = HB_COMP_PARAM->currLine;
      }
   }

   if( HB_COMP_PARAM->functions.pLast->bFlags & FUN_BREAK_CODE )
   {
      /* previous line contained RETURN/BREAK/LOOP/EXIT statement */
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_UNREACHABLE, NULL, NULL );
      /* clear RETURN/BREAK flag */
      HB_COMP_PARAM->functions.pLast->bFlags &= ~ ( /*FUN_WITH_RETURN |*/ FUN_BREAK_CODE );
   }
}
hbmain.c2283
VOIDhb_compStatmentStart( HB_COMP_DECL )
void hb_compStatmentStart( HB_COMP_DECL )
{
   if( ( HB_COMP_PARAM->functions.pLast->bFlags & FUN_STATEMENTS ) == 0 )
   {
      if( ! HB_COMP_PARAM->fStartProc && HB_COMP_PARAM->functions.iCount <= 1 &&
          HB_COMP_PARAM->functions.pLast != HB_COMP_PARAM->pInitFunc &&
          HB_COMP_PARAM->functions.pLast->szName )
      {
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OUTSIDE, NULL, NULL );
         return;
      }
      HB_COMP_PARAM->functions.pLast->bFlags |= FUN_STATEMENTS;
   }
}
hbmain.c2322
VOIDhb_compLinePushIfInside( HB_COMP_DECL )
void hb_compLinePushIfInside( HB_COMP_DECL ) /* generates the pcode with the currently compiled source code line */
{
   hb_compStatmentStart( HB_COMP_PARAM );
   hb_compLinePush( HB_COMP_PARAM );
}
hbmain.c2340
VOIDhb_compLinePushIfDebugger( HB_COMP_DECL )
void hb_compLinePushIfDebugger( HB_COMP_DECL )
{
   hb_compStatmentStart( HB_COMP_PARAM );

   if( HB_COMP_PARAM->fDebugInfo )
      hb_compLinePush( HB_COMP_PARAM );
   else
   {
      if( HB_COMP_PARAM->functions.pLast->bFlags & FUN_BREAK_CODE )
      {
         /* previous line contained RETURN/BREAK/LOOP/EXIT statement */
         hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_UNREACHABLE, NULL, NULL );
      }
      HB_COMP_PARAM->functions.pLast->bFlags &= ~ ( /*FUN_WITH_RETURN |*/ FUN_BREAK_CODE );  /* clear RETURN flag */
   }
}
hbmain.c2346
VOIDhb_compGenModuleName( HB_COMP_DECL, const char * szFunName )
void hb_compGenModuleName( HB_COMP_DECL, const char * szFunName )
{
   hb_compGenPCode1( HB_P_MODULENAME, HB_COMP_PARAM );
   hb_compGenPCodeN( ( BYTE * ) HB_COMP_PARAM->currModule,
                     strlen( HB_COMP_PARAM->currModule ), HB_COMP_PARAM );
   hb_compGenPCode1( ':', HB_COMP_PARAM );
   if( szFunName && *szFunName )
      hb_compGenPCodeN( ( BYTE * ) szFunName, strlen( szFunName ) + 1, HB_COMP_PARAM );
   else /* special version "filename:" when the file changes within function */
      hb_compGenPCode1( '\0', HB_COMP_PARAM );
   HB_COMP_PARAM->lastModule = HB_COMP_PARAM->currModule;
   HB_COMP_PARAM->lastLine = -1;
}
hbmain.c2366
VOIDhb_compGenStaticName( const char *szVarName, HB_COMP_DECL )
void hb_compGenStaticName( const char *szVarName, HB_COMP_DECL )
{
  if( HB_COMP_PARAM->fDebugInfo )
  {
      BYTE bGlobal = 0;
      PFUNCTION pFunc;
      int iVar;
      
      if( ! HB_COMP_PARAM->fStartProc && HB_COMP_PARAM->functions.iCount <= 1 )
      {
         /* Variable declaration is outside of function/procedure body.
            File-wide static variable
         */
         hb_compStaticDefStart( HB_COMP_PARAM );
         bGlobal = 1;
      }
      pFunc = HB_COMP_PARAM->functions.pLast;
      iVar = hb_compStaticGetPos( szVarName, pFunc );

      hb_compGenPCode4( HB_P_STATICNAME, bGlobal, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
      hb_compGenPCodeN( ( BYTE * ) szVarName, strlen( szVarName ) + 1, HB_COMP_PARAM );

      if( bGlobal )
         hb_compStaticDefEnd( HB_COMP_PARAM );
   }
}
hbmain.c2382
STATIC VOIDhb_compGenVarPCode( BYTE bPCode, const char * szVarName, HB_COMP_DECL )
static void hb_compGenVarPCode( BYTE bPCode, const char * szVarName, HB_COMP_DECL )
{
   USHORT wVar;
   PCOMSYMBOL pSym;

   /* Check if this variable name is placed into the symbol table
    */
   pSym = hb_compSymbolFind( HB_COMP_PARAM, szVarName, &wVar, HB_SYM_MEMVAR );
   if( ! pSym )
      pSym = hb_compSymbolAdd( HB_COMP_PARAM, szVarName, &wVar, HB_SYM_MEMVAR );
   pSym->cScope |= HB_FS_MEMVAR;

   if( bPCode == HB_P_PUSHALIASEDFIELD && wVar <= 255 )
      hb_compGenPCode2( HB_P_PUSHALIASEDFIELDNEAR, ( BYTE ) wVar, HB_COMP_PARAM );
   else if( bPCode == HB_P_POPALIASEDFIELD && wVar <= 255 )
      hb_compGenPCode2( HB_P_POPALIASEDFIELDNEAR, ( BYTE ) wVar, HB_COMP_PARAM );
   else
      hb_compGenPCode3( bPCode, HB_LOBYTE( wVar ), HB_HIBYTE( wVar ), HB_COMP_PARAM );
}
hbmain.c2410
STATIC VOIDhb_compGenVariablePCode( HB_COMP_DECL, BYTE bPCode, const char * szVarName )
static void hb_compGenVariablePCode( HB_COMP_DECL, BYTE bPCode, const char * szVarName )
{
   BOOL bGenCode;
   /*
    * NOTE:
    * Clipper always assumes a memvar variable if undeclared variable
    * is popped (a value is asssigned to a variable).
    */
   if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_HARBOUR ) )
      bGenCode = HB_COMP_PARAM->fForceMemvars;    /* harbour compatibility */
   else
      bGenCode = ( HB_COMP_PARAM->fForceMemvars || bPCode == HB_P_POPVARIABLE );

   if( bGenCode )
   {
      /* -v switch was used -> assume it is a memvar variable
       */
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_MEMVAR_ASSUMED, szVarName, NULL );

      if( bPCode == HB_P_POPVARIABLE )
         bPCode = HB_P_POPMEMVAR;
      else if( bPCode == HB_P_PUSHVARIABLE )
         bPCode = HB_P_PUSHMEMVAR;
      else
         bPCode = HB_P_PUSHMEMVARREF;
   }
   else
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_AMBIGUOUS_VAR, szVarName, NULL );

   hb_compGenVarPCode( bPCode, szVarName, HB_COMP_PARAM );
}
hbmain.c2434
STATIC VOIDhb_compGenFieldPCode( HB_COMP_DECL, BYTE bPCode, PVAR pField )
static void hb_compGenFieldPCode( HB_COMP_DECL, BYTE bPCode, PVAR pField )
{
   if( pField->szAlias )
   {  /* the alias was specified in FIELD declaration
       * Push alias symbol before the field symbol
       */
      if( bPCode == HB_P_POPFIELD )
         bPCode = HB_P_POPALIASEDFIELD;
      else if( bPCode == HB_P_PUSHFIELD )
         bPCode = HB_P_PUSHALIASEDFIELD;

      hb_compGenPushSymbol( pField->szAlias, HB_SYM_ALIAS, HB_COMP_PARAM );
   }
   hb_compGenVarPCode( bPCode, pField->szName, HB_COMP_PARAM );
}
hbmain.c2469
VOIDhb_compGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL )
void hb_compGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL )
{
   USHORT wSym;
   PCOMSYMBOL pSym;
   
   if( szMsgName )
   {
      pSym = hb_compSymbolFind( HB_COMP_PARAM, szMsgName, &wSym, HB_SYM_MSGNAME );

      if( ! pSym )  /* the symbol was not found on the symbol table */
         pSym = hb_compSymbolAdd( HB_COMP_PARAM, szMsgName, &wSym, HB_SYM_MSGNAME );
      pSym->cScope |= HB_FS_MESSAGE;
      if( bIsObject )
         hb_compGenPCode3( HB_P_MESSAGE, HB_LOBYTE( wSym ), HB_HIBYTE( wSym ), HB_COMP_PARAM );
      else
         hb_compGenPCode3( HB_P_WITHOBJECTMESSAGE, HB_LOBYTE( wSym ), HB_HIBYTE( wSym ), HB_COMP_PARAM );
   }
   else
   {
      wSym = 0xFFFF;
      hb_compGenPCode3( HB_P_WITHOBJECTMESSAGE, HB_LOBYTE( wSym ), HB_HIBYTE( wSym ), HB_COMP_PARAM );
   }
}
hbmain.c2487
VOIDhb_compGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL )
void hb_compGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL ) /* generates an underscore-symbol name for a data assignment */
{
   char szResult[ HB_SYMBOL_NAME_LEN + 1 ];
   int iLen = strlen( szMsg );

   if( iLen >= HB_SYMBOL_NAME_LEN )
      iLen = HB_SYMBOL_NAME_LEN - 1;
   szResult[ 0 ] = '_';
   memcpy( szResult + 1, szMsg, iLen );
   szResult[ iLen + 1 ] = '\0';

   hb_compGenMessage( hb_compIdentifierNew( HB_COMP_PARAM, szResult, HB_IDENT_COPY ), bIsObject, HB_COMP_PARAM );
}
hbmain.c2516
STATIC VOIDhb_compCheckEarlyMacroEval( HB_COMP_DECL, const char *szVarName )
static void hb_compCheckEarlyMacroEval( HB_COMP_DECL, const char *szVarName )
{
   int iScope = hb_compVariableScope( HB_COMP_PARAM, szVarName );

   if( iScope == HB_VS_CBLOCAL_VAR ||
       iScope == HB_VS_STATIC_VAR ||
       iScope == HB_VS_GLOBAL_STATIC ||
       iScope == HB_VS_LOCAL_FIELD ||
       iScope == HB_VS_GLOBAL_FIELD ||
       iScope == HB_VS_LOCAL_MEMVAR ||
       iScope == HB_VS_GLOBAL_MEMVAR )
   {
      hb_compErrorCodeblock( HB_COMP_PARAM, szVarName );
   }
}
hbmain.c2530
VOIDhb_compGenPopVar( const char * szVarName, HB_COMP_DECL )
void hb_compGenPopVar( const char * szVarName, HB_COMP_DECL ) /* generates the pcode to pop a value from the virtual machine stack onto a variable */
{
   int iVar, iScope;
   PVAR pVar;

   if( ! HB_COMP_PARAM->functions.pLast->bLateEval )
   {
      /* pseudo-generation of pcode for a codeblock with macro symbol */
      hb_compCheckEarlyMacroEval( HB_COMP_PARAM, szVarName );
      return;
   }

   pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope );
   if( pVar )
   {
      switch( iScope )
      {
         case HB_VS_LOCAL_VAR:
         case HB_VS_CBLOCAL_VAR:
            /* local variable */
            /* local variables used in a coddeblock will not be adjusted
             * if PARAMETERS statement will be used then it is safe to
             * use 2 bytes for LOCALNEAR
             */
            if( HB_LIM_INT8( iVar ) && !HB_COMP_PARAM->functions.pLast->szName &&
                !( HB_COMP_PARAM->functions.pLast->bFlags & FUN_EXTBLOCK ) )
               hb_compGenPCode2( HB_P_POPLOCALNEAR, ( BYTE ) iVar, HB_COMP_PARAM );
            else
               hb_compGenPCode3( HB_P_POPLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            break;

         case HB_VS_STATIC_VAR:
         case HB_VS_GLOBAL_STATIC:
            /* Static variable */
            hb_compGenPCode3( HB_P_POPSTATIC, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            {
               PFUNCTION pFunc;
               /* Check if we are generating a pop code for static variable
                * initialization function - if YES then we have to switch to a function
                * where the static variable was declared
                */
               pFunc = HB_COMP_PARAM->functions.pLast;
               if( ( HB_COMP_PARAM->functions.pLast->cScope & HB_FS_INITEXIT ) == HB_FS_INITEXIT )
                  pFunc = pFunc->pOwner;
               pFunc->bFlags |= FUN_USES_STATICS;
            }
            break;

         case HB_VS_LOCAL_FIELD:
         case HB_VS_GLOBAL_FIELD:
            /* declared field */
            hb_compGenFieldPCode( HB_COMP_PARAM, HB_P_POPFIELD, pVar );
            break;

         case HB_VS_LOCAL_MEMVAR:
         case HB_VS_GLOBAL_MEMVAR:
            /* declared memvar variable */
            hb_compGenVarPCode( HB_P_POPMEMVAR, szVarName, HB_COMP_PARAM );
            break;

         default:
            /* undeclared variable */
            hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_POPVARIABLE, szVarName );
            break;
      }
   }
   else
   {  /* undeclared variable */
      hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_POPVARIABLE, szVarName );
   }
}
hbmain.c2546
VOIDhb_compGenPopMemvar( const char * szVarName, HB_COMP_DECL )
void hb_compGenPopMemvar( const char * szVarName, HB_COMP_DECL )
{
   if( ( hb_compVariableScope( HB_COMP_PARAM, szVarName ) & HB_VS_LOCAL_MEMVAR ) == 0 )
      hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_MEMVAR_ASSUMED, szVarName, NULL );
   hb_compGenVarPCode( HB_P_POPMEMVAR, szVarName, HB_COMP_PARAM );
}
hbmain.c2628
VOIDhb_compGenPushVar( const char * szVarName, BOOL bMacroVar, HB_COMP_DECL )
void hb_compGenPushVar( const char * szVarName, BOOL bMacroVar, HB_COMP_DECL )
{
   int iVar, iScope;
   PVAR pVar;

   if( ! HB_COMP_PARAM->functions.pLast->bLateEval && ! bMacroVar )
   {
      /* pseudo-generation of pcode for a codeblock with macro symbol */
      hb_compCheckEarlyMacroEval( HB_COMP_PARAM, szVarName );
      return;
   }

   pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope );
   if( pVar )
   {
      switch( iScope )
      {
         case HB_VS_LOCAL_VAR:
         case HB_VS_CBLOCAL_VAR:
            /* local variable */
            /* local variables used in a coddeblock will not be adjusted
             * if PARAMETERS statement will be used then it is safe to
             * use 2 bytes for LOCALNEAR
             */
            if( HB_LIM_INT8( iVar ) && !HB_COMP_PARAM->functions.pLast->szName &&
                !( HB_COMP_PARAM->functions.pLast->bFlags & FUN_EXTBLOCK ) )
               hb_compGenPCode2( HB_P_PUSHLOCALNEAR, ( BYTE ) iVar, HB_COMP_PARAM );
            else
               hb_compGenPCode3( HB_P_PUSHLOCAL, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            break;

         case HB_VS_STATIC_VAR:
         case HB_VS_GLOBAL_STATIC:
            /* Static variable */
            hb_compGenPCode3( HB_P_PUSHSTATIC, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            HB_COMP_PARAM->functions.pLast->bFlags |= FUN_USES_STATICS;
            break;

         case HB_VS_LOCAL_FIELD:
         case HB_VS_GLOBAL_FIELD:
            /* declared field */
            hb_compGenFieldPCode( HB_COMP_PARAM, HB_P_PUSHFIELD, pVar );
            break;

         case HB_VS_LOCAL_MEMVAR:
         case HB_VS_GLOBAL_MEMVAR:
            /* declared memvar variable */
            hb_compGenVarPCode( HB_P_PUSHMEMVAR, szVarName, HB_COMP_PARAM );
            break;

         default:
            /* undeclared variable */
            hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_PUSHVARIABLE, szVarName );
            break;
      }
   }
   else
   {  /* undeclared variable */
      hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_PUSHVARIABLE, szVarName );
   }
}
hbmain.c2636
VOIDhb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL )
void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL ) /* generates the pcode to push a variable by reference to the virtual machine stack */
{
   int iVar, iScope;
   PVAR pVar;

   if( ! HB_COMP_PARAM->functions.pLast->bLateEval )
   {
      /* pseudo-generation of pcode for a codeblock with macro symbol */
      hb_compCheckEarlyMacroEval( HB_COMP_PARAM, szVarName );
      return;
   }

   pVar = hb_compVariableFind( HB_COMP_PARAM, szVarName, &iVar, &iScope );
   if( pVar )
   {
      switch( iScope )
      {
         case HB_VS_LOCAL_VAR:
         case HB_VS_CBLOCAL_VAR:
            /* local variable */
            hb_compGenPCode3( HB_P_PUSHLOCALREF, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            break;

         case HB_VS_STATIC_VAR:
         case HB_VS_GLOBAL_STATIC:
            /* Static variable */
            hb_compGenPCode3( HB_P_PUSHSTATICREF, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
            HB_COMP_PARAM->functions.pLast->bFlags |= FUN_USES_STATICS;
            break;

         case HB_VS_LOCAL_FIELD:
         case HB_VS_GLOBAL_FIELD:
            /* pushing fields by reference is not allowed */
            hb_compErrorRefer( HB_COMP_PARAM, NULL, szVarName );
            break;

         case HB_VS_LOCAL_MEMVAR:
         case HB_VS_GLOBAL_MEMVAR:
            /* declared memvar variable */
            hb_compGenVarPCode( HB_P_PUSHMEMVARREF, szVarName, HB_COMP_PARAM );
            break;

         default:
            /* undeclared variable */
            /* field cannot be passed by the reference - assume the memvar */
            hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_PUSHMEMVARREF, szVarName );
            break;
      }
   }
   else
   {  /* undeclared variable */
      /* field cannot be passed by the reference - assume the memvar */
      hb_compGenVariablePCode( HB_COMP_PARAM, HB_P_PUSHMEMVARREF, szVarName );
   }
}
hbmain.c2702
VOIDhb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL )
void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ) /* generates the pcode to push memvar variable by reference to the virtual machine stack */
{
   hb_compGenVarPCode( HB_P_PUSHMEMVARREF, szVarName, HB_COMP_PARAM );
}
hbmain.c2758
VOIDhb_compGenPopAliasedVar( const char * szVarName, BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL )
void hb_compGenPopAliasedVar( const char * szVarName,
                              BOOL bPushAliasValue,
                              const char * szAlias,
                              HB_LONG lWorkarea,
                              HB_COMP_DECL )
{
   if( bPushAliasValue )
   {
      if( szAlias )
      {
         int iLen = strlen( szAlias );
         if( szAlias[ 0 ] == 'M' && ( iLen == 1 ||
             ( iLen >= 4 && iLen <= 6 &&
               memcmp( szAlias, "MEMVAR", iLen ) == 0 ) ) )
         {  /* M->variable or MEMV[A[R]]->variable */
            hb_compGenVarPCode( HB_P_POPMEMVAR, szVarName, HB_COMP_PARAM );
         }
         else if( iLen >= 4 && iLen <= 5 &&
                  memcmp( szAlias, "FIELD", iLen ) == 0 )
         {  /* FIEL[D]->variable */
            hb_compGenVarPCode( HB_P_POPFIELD, szVarName, HB_COMP_PARAM );
         }
         else
         {  /* database alias */
            hb_compGenPushSymbol( szAlias, HB_SYM_ALIAS, HB_COMP_PARAM );
            hb_compGenVarPCode( HB_P_POPALIASEDFIELD, szVarName, HB_COMP_PARAM );
         }
      }
      else
      {
         hb_compGenPushLong( lWorkarea, HB_COMP_PARAM );
         hb_compGenVarPCode( HB_P_POPALIASEDFIELD, szVarName, HB_COMP_PARAM );
      }
   }
   else
      /* Alias is already placed on stack
       * NOTE: An alias will be determined at runtime then we cannot decide
       * here if passed name is either a field or a memvar
       */
      hb_compGenVarPCode( HB_P_POPALIASEDVAR, szVarName, HB_COMP_PARAM );
}
hbmain.c2763
VOIDhb_compGenPushAliasedVar( const char * szVarName, BOOL bPushAliasValue, const char * szAlias, HB_LONG lWorkarea, HB_COMP_DECL )
void hb_compGenPushAliasedVar( const char * szVarName,
                               BOOL bPushAliasValue,
                               const char * szAlias,
                               HB_LONG lWorkarea,
                               HB_COMP_DECL )
{
   if( bPushAliasValue )
   {
      if( szAlias )
      {
         int iLen = strlen( szAlias );
         /* myalias->var
          * FIELD->var
          * MEMVAR->var
          */
         if( szAlias[ 0 ] == 'M' && ( iLen == 1 ||
             ( iLen >= 4 && iLen <= 6 &&
               memcmp( szAlias, "MEMVAR", iLen ) == 0 ) ) )
         {  /* M->variable or MEMV[A[R]]->variable */
            hb_compGenVarPCode( HB_P_PUSHMEMVAR, szVarName, HB_COMP_PARAM );
         }
         else if( iLen >= 4 && iLen <= 5 &&
                  memcmp( szAlias, "FIELD", iLen ) == 0 )
         {  /* FIEL[D]->variable */
            hb_compGenVarPCode( HB_P_PUSHFIELD, szVarName, HB_COMP_PARAM );
         }
         else
         {  /* database alias */
            hb_compGenPushSymbol( szAlias, HB_SYM_ALIAS, HB_COMP_PARAM );
            hb_compGenVarPCode( HB_P_PUSHALIASEDFIELD, szVarName, HB_COMP_PARAM );
         }
      }
      else
      {
         hb_compGenPushLong( lWorkarea, HB_COMP_PARAM );
         hb_compGenVarPCode( HB_P_PUSHALIASEDFIELD, szVarName, HB_COMP_PARAM );
      }
   }
   else
      /* Alias is already placed on stack
       * NOTE: An alias will be determined at runtime then we cannot decide
       * here if passed name is either a field or a memvar
       */
      hb_compGenVarPCode( HB_P_PUSHALIASEDVAR, szVarName, HB_COMP_PARAM );
}
hbmain.c2808
VOIDhb_compGenPushLogical( int iTrueFalse, HB_COMP_DECL )
void hb_compGenPushLogical( int iTrueFalse, HB_COMP_DECL ) /* pushes a logical value on the virtual machine stack */
{
   hb_compGenPCode1( ( BYTE ) ( iTrueFalse ? HB_P_TRUE : HB_P_FALSE ), HB_COMP_PARAM );
}
hbmain.c2858
VOIDhb_compGenPushNil( HB_COMP_DECL )
void hb_compGenPushNil( HB_COMP_DECL )
{
   hb_compGenPCode1( HB_P_PUSHNIL, HB_COMP_PARAM );
}
hbmain.c2863
VOIDhb_compGenPushDouble( double dNumber, BYTE bWidth, BYTE bDec, HB_COMP_DECL )
void hb_compGenPushDouble( double dNumber, BYTE bWidth, BYTE bDec, HB_COMP_DECL )
{
   BYTE pBuffer[ sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ) + 1 ];

   pBuffer[ 0 ] = HB_P_PUSHDOUBLE;
   HB_PUT_LE_DOUBLE( &( pBuffer[ 1 ] ), dNumber );

   pBuffer[ 1 + sizeof( double ) ] = bWidth;
   pBuffer[ 1 + sizeof( double ) + sizeof( BYTE ) ] = bDec;

   hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
}
hbmain.c2868
VOIDhb_compGenPushFunCall( const char * szFunName, HB_COMP_DECL )
void hb_compGenPushFunCall( const char * szFunName, HB_COMP_DECL )
{
   const char * szFunction;
   USHORT wSym;

   /* if abbreviated function name was used - change it for whole name */
   szFunction = hb_compReservedName( szFunName );
   if( szFunction )
      szFunName = szFunction;

   if( hb_compSymbolFind( HB_COMP_PARAM, szFunName, &wSym, HB_SYM_FUNCNAME ) != NULL )
   {
      if( ! hb_compFunCallFind( HB_COMP_PARAM, szFunName ) )
         hb_compFunCallAdd( HB_COMP_PARAM, szFunName );
   }
   else
   {
      hb_compSymbolAdd( HB_COMP_PARAM, szFunName, &wSym, HB_SYM_FUNCNAME );
      hb_compFunCallAdd( HB_COMP_PARAM, szFunName );
   }
   hb_compGenPCode3( HB_P_PUSHFUNCSYM, HB_LOBYTE( wSym ), HB_HIBYTE( wSym ), HB_COMP_PARAM );
}
hbmain.c2882
VOIDhb_compGenPushFunSym( const char * szFunName, HB_COMP_DECL )
void hb_compGenPushFunSym( const char * szFunName, HB_COMP_DECL )
{
   const char * szFunction;

   /* if abbreviated function name was used - change it for whole name */
   szFunction = hb_compReservedName( szFunName );
   hb_compGenPushSymbol( szFunction ? szFunction : szFunName,
                         HB_SYM_FUNCNAME, HB_COMP_PARAM );
}
hbmain.c2905
VOIDhb_compGenPushFunRef( const char * szFunName, HB_COMP_DECL )
void hb_compGenPushFunRef( const char * szFunName, HB_COMP_DECL )
{
   const char * szFunction;

   /* if abbreviated function name was used - change it for whole name */
   szFunction = hb_compReservedName( szFunName );
   hb_compGenPushSymbol( szFunction ? szFunction : szFunName,
                         HB_SYM_FUNCNAME, HB_COMP_PARAM );
}
hbmain.c2915
VOIDhb_compGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL )
void hb_compGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL )
{
   USHORT wSym;

   if( hb_compSymbolFind( HB_COMP_PARAM, szSymbolName, &wSym, bFunction ) != NULL )  /* the symbol was found on the symbol table */
   {
      if( bFunction && ! hb_compFunCallFind( HB_COMP_PARAM, szSymbolName ) )
         hb_compFunCallAdd( HB_COMP_PARAM, szSymbolName );
   }
   else
   {
      hb_compSymbolAdd( HB_COMP_PARAM, szSymbolName, &wSym, bFunction );
      if( bFunction )
         hb_compFunCallAdd( HB_COMP_PARAM, szSymbolName );
   }

   if( wSym > 255 )
      hb_compGenPCode3( HB_P_PUSHSYM, HB_LOBYTE( wSym ), HB_HIBYTE( wSym ), HB_COMP_PARAM );
   else
      hb_compGenPCode2( HB_P_PUSHSYMNEAR, ( BYTE ) wSym, HB_COMP_PARAM );
}
hbmain.c2925
VOIDhb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL )
void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL )
{
   if( HB_COMP_PARAM->fLongOptimize )
   {
      if( lNumber == 0 )
         hb_compGenPCode1( HB_P_ZERO, HB_COMP_PARAM );
      else if( lNumber == 1 )
         hb_compGenPCode1( HB_P_ONE, HB_COMP_PARAM );
      else if( HB_LIM_INT8( lNumber ) )
         hb_compGenPCode2( HB_P_PUSHBYTE, (BYTE) lNumber, HB_COMP_PARAM );
      else if( HB_LIM_INT16( lNumber ) )
         hb_compGenPCode3( HB_P_PUSHINT, HB_LOBYTE( lNumber ), HB_HIBYTE( lNumber ), HB_COMP_PARAM );
      else if( HB_LIM_INT32( lNumber ) )
      {
         BYTE pBuffer[ 5 ];
         pBuffer[ 0 ] = HB_P_PUSHLONG;
         HB_PUT_LE_UINT32( pBuffer + 1, lNumber );
         hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
      }
      else
      {
         BYTE pBuffer[ 9 ];
         pBuffer[ 0 ] = HB_P_PUSHLONGLONG;
         HB_PUT_LE_UINT64( pBuffer + 1, lNumber );
         hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
      }
   }
   else
   {
      if( HB_LIM_INT32( lNumber ) )
      {
         BYTE pBuffer[ 5 ];
         pBuffer[ 0 ] = HB_P_PUSHLONG;
         HB_PUT_LE_UINT32( pBuffer + 1, lNumber );
         hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
      }
      else
      {
         BYTE pBuffer[ 9 ];
         pBuffer[ 0 ] = HB_P_PUSHLONGLONG;
         HB_PUT_LE_UINT64( pBuffer + 1, lNumber );
         hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
      }
   }
}
hbmain.c2948
VOIDhb_compGenPushDate( HB_LONG lNumber, HB_COMP_DECL )
void hb_compGenPushDate( HB_LONG lNumber, HB_COMP_DECL )
{
   BYTE pBuffer[ 5 ];

   pBuffer[ 0 ] = HB_P_PUSHDATE;
   HB_PUT_LE_UINT32( pBuffer + 1, lNumber );
   hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM );
}
hbmain.c2995
VOIDhb_compGenPushString( const char * szText, ULONG ulStrLen, HB_COMP_DECL )
void hb_compGenPushString( const char * szText, ULONG ulStrLen, HB_COMP_DECL )
{
   if( HB_COMP_PARAM->iHidden )
   {
      char * szTemp;
      --ulStrLen;
      szTemp = hb_compEncodeString( HB_COMP_PARAM->iHidden, szText, &ulStrLen );
      hb_compGenPCode4( HB_P_PUSHSTRHIDDEN, ( BYTE ) HB_COMP_PARAM->iHidden,
                        HB_LOBYTE( ulStrLen ), HB_HIBYTE( ulStrLen ), HB_COMP_PARAM );
      hb_compGenPCodeN( ( BYTE * ) szTemp, ulStrLen, HB_COMP_PARAM );
      hb_xfree( szTemp );
   }
   else
   {
      if( ulStrLen > UINT24_MAX )
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_STRING_TOO_LONG, NULL, NULL );
      else
      {
         if( ulStrLen > USHRT_MAX )
            hb_compGenPCode4( HB_P_PUSHSTRLARGE, HB_LOBYTE( ulStrLen ), HB_HIBYTE( ulStrLen ), HB_ULBYTE( ulStrLen ), HB_COMP_PARAM );
         else if( ulStrLen > UCHAR_MAX )
            hb_compGenPCode3( HB_P_PUSHSTR, HB_LOBYTE( ulStrLen ), HB_HIBYTE( ulStrLen ), HB_COMP_PARAM );
         else
            hb_compGenPCode2( HB_P_PUSHSTRSHORT, ( BYTE ) ulStrLen, HB_COMP_PARAM );
         hb_compGenPCodeN( ( BYTE * ) szText, ulStrLen, HB_COMP_PARAM );
      }
   }
}
hbmain.c3004
VOIDhb_compNOOPfill( PFUNCTION pFunc, ULONG ulFrom, int iCount, BOOL fPop, BOOL fCheck )
void hb_compNOOPfill( PFUNCTION pFunc, ULONG ulFrom, int iCount, BOOL fPop, BOOL fCheck )
{
   ULONG ul;

   while( iCount-- )
   {
      if( fPop )
      {
         pFunc->pCode[ ulFrom ] = HB_P_POP;
         fPop = FALSE;
      }
      else if( fCheck && pFunc->pCode[ ulFrom ] == HB_P_NOOP && pFunc->iNOOPs )
      {
         for( ul = 0; ul < pFunc->iNOOPs; ++ul )
         {
            if( pFunc->pNOOPs[ ul ] == ulFrom )
               break;
         }
         if( ul == pFunc->iNOOPs )
            hb_compNOOPadd( pFunc, ulFrom );
      }
      else
         hb_compNOOPadd( pFunc, ulFrom );
      ++ulFrom;
   }
}
hbmain.c3034
STATIC VOIDhb_compRemovePCODE( HB_COMP_DECL, ULONG ulPos, ULONG ulCount, BOOL fCanMove )
static void hb_compRemovePCODE( HB_COMP_DECL, ULONG ulPos, ULONG ulCount,
                                BOOL fCanMove )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;
   ULONG ul;

   if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_OPTJUMP ) || !fCanMove )
   {
      /*
       * We can safely remove the dead code when Jump Optimization
       * is enabled by replacing it with HB_P_NOOP opcodes - which
       * will be later eliminated and jump data updated.
       */
      hb_compNOOPfill( pFunc, ulPos, ulCount, FALSE, TRUE );
   }
   else
   {
      memmove( pFunc->pCode + ulPos, pFunc->pCode + ulPos + ulCount,
               pFunc->lPCodePos - ulPos - ulCount );
      pFunc->lPCodePos -= ulCount;

      for( ul = pFunc->iNOOPs; ul; --ul )
      {
         if( pFunc->pNOOPs[ ul ] >= ulPos )
         {
            if( pFunc->pNOOPs[ ul ] < ulPos + ulCount )
            {
               memmove( &pFunc->pNOOPs[ ul ], &pFunc->pNOOPs[ ul + 1 ],
                        pFunc->iNOOPs - ul );
               pFunc->iNOOPs--;
            }
            else
            {
               pFunc->pNOOPs[ ul ] -= ulCount;
            }
         }
      }
   }
}
hbmain.c3061
BOOLhb_compIsJump( HB_COMP_DECL, PFUNCTION pFunc, ULONG ulPos )
BOOL hb_compIsJump( HB_COMP_DECL, PFUNCTION pFunc, ULONG ulPos )
{
   ULONG iJump;
   /*
    * Do not allow any optimization (code striping) when Jump Optimization
    * is disabled and we do not have any information about jump addreses
    */
   if( ! HB_COMP_ISSUPPORTED( HB_COMPFLAG_OPTJUMP ) )
      return TRUE;

   for( iJump = 0; iJump < pFunc->iJumps; iJump++ )
   {
      ULONG ulJumpAddr = pFunc->pJumps[ iJump ];
      switch( pFunc->pCode[ ulJumpAddr ] )
      {
         case HB_P_JUMPNEAR:
         case HB_P_JUMPFALSENEAR:
         case HB_P_JUMPTRUENEAR:
            ulJumpAddr += ( signed char ) pFunc->pCode[ ulJumpAddr + 1 ];
            break;

         case HB_P_JUMP:
         case HB_P_JUMPFALSE:
         case HB_P_JUMPTRUE:
            ulJumpAddr += HB_PCODE_MKSHORT( &pFunc->pCode[ ulJumpAddr + 1 ] );
            break;

         /* Jump can be replaced by series of NOOPs or POP and NOOPs
          * and not stripped yet
          */
         case HB_P_NOOP:
         case HB_P_POP:
            ulJumpAddr = ulPos + 1;
            break;

         default:
            ulJumpAddr += HB_PCODE_MKINT24( &pFunc->pCode[ ulJumpAddr + 1 ] );
            break;
      }
      if( ulJumpAddr == ulPos )
         return TRUE;
   }

   return FALSE;
}
hbmain.c3106
ULONGhb_compSequenceBegin( HB_COMP_DECL )
ULONG hb_compSequenceBegin( HB_COMP_DECL )
{
   hb_compGenPCode4( HB_P_SEQALWAYS, 0, 0, 0, HB_COMP_PARAM );
   hb_compPrepareOptimize( HB_COMP_PARAM );

   hb_compGenPCode4( HB_P_SEQBEGIN, 0, 0, 0, HB_COMP_PARAM );
   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c3152
ULONGhb_compSequenceEnd( HB_COMP_DECL )
ULONG hb_compSequenceEnd( HB_COMP_DECL )
{
   hb_compGenPCode4( HB_P_SEQEND, 0, 0, 0, HB_COMP_PARAM );

   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c3168
ULONGhb_compSequenceAlways( HB_COMP_DECL )
ULONG hb_compSequenceAlways( HB_COMP_DECL )
{
   hb_compGenPCode4( HB_P_ALWAYSBEGIN, 0, 0, 0, HB_COMP_PARAM );

   hb_compPrepareOptimize( HB_COMP_PARAM );

   return HB_COMP_PARAM->functions.pLast->lPCodePos - 3;
}
hbmain.c3184
VOIDhb_compSequenceFinish( HB_COMP_DECL, ULONG ulStartPos, ULONG ulEndPos, ULONG ulAlways, BOOL fUsualStmts, BOOL fRecover, BOOL fCanMove )
void hb_compSequenceFinish( HB_COMP_DECL, ULONG ulStartPos, ULONG ulEndPos,
                            ULONG ulAlways, BOOL fUsualStmts, BOOL fRecover,
                            BOOL fCanMove )
{
   --ulStartPos;  /* HB_P_SEQBEGIN address */

   if( !fUsualStmts && fCanMove && !HB_COMP_PARAM->fDebugInfo )
   {
      ulStartPos -= 4;
      if( ulAlways )
      {
         /* remove HB_P_ALWAYSEND opcode */
         HB_COMP_PARAM->functions.pLast->lPCodePos--;
         /* remove HB_P_SEQALWAYS ... HB_P_ALWAYSBEGIN opcodes */
         hb_compRemovePCODE( HB_COMP_PARAM, ulStartPos,
                             ulAlways - ulStartPos + 4, fCanMove );
      }
      else
      {
         hb_compRemovePCODE( HB_COMP_PARAM, ulStartPos,
                             HB_COMP_PARAM->functions.pLast->lPCodePos -
                             ulStartPos, fCanMove );
      }
      HB_COMP_PARAM->lastLinePos = ulStartPos - 3;
   }
   else if( !ulAlways )
   {
      /* remove HB_P_SEQALWAYS opcode */
      hb_compRemovePCODE( HB_COMP_PARAM, ulStartPos - 4, 4, fCanMove );
   }
   else
   {
      if( !fRecover )
      {
         /* remove HB_P_SEQBEGIN and HB_P_SEQEND */
         hb_compRemovePCODE( HB_COMP_PARAM, ulEndPos - 1, 4, fCanMove );
         hb_compRemovePCODE( HB_COMP_PARAM, ulStartPos, 4, fCanMove );
         if( ! HB_COMP_ISSUPPORTED( HB_COMPFLAG_OPTJUMP ) )
         {
            /* Fix ALWAYS address in HB_P_SEQALWAYS opcode */
            ulAlways -= 8;
            hb_compGenJumpThere( ulStartPos - 3, ulAlways, HB_COMP_PARAM );
         }
      }
      /* empty always block? */
      if( HB_COMP_PARAM->functions.pLast->lPCodePos - ulAlways == 5 &&
          !HB_COMP_PARAM->fDebugInfo )
      {
         /* remove HB_P_ALWAYSBEGIN and HB_P_ALWAYSEND opcodes */
         hb_compRemovePCODE( HB_COMP_PARAM, ulAlways, 5, TRUE );
         /* remove HB_P_SEQALWAYS opcode */
         hb_compRemovePCODE( HB_COMP_PARAM, ulStartPos - 4, 4, fCanMove );
      }
   }
}
hbmain.c3193
VOIDhb_compStaticDefStart( HB_COMP_DECL )
void hb_compStaticDefStart( HB_COMP_DECL )
{
   HB_COMP_PARAM->functions.pLast->bFlags |= FUN_USES_STATICS;
   if( ! HB_COMP_PARAM->pInitFunc )
   {
      BYTE pBuffer[ 5 ];

      HB_COMP_PARAM->pInitFunc = hb_compFunctionNew( HB_COMP_PARAM, "(_INITSTATICS)", HB_FS_INITEXIT );
      HB_COMP_PARAM->pInitFunc->pOwner = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->pInitFunc->bFlags = FUN_USES_STATICS | FUN_PROCEDURE;
      HB_COMP_PARAM->pInitFunc->cScope = HB_FS_INITEXIT | HB_FS_LOCAL;
      HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc;

      pBuffer[ 0 ] = HB_P_STATICS;
      pBuffer[ 1 ] = 0;
      pBuffer[ 2 ] = 0;
      pBuffer[ 3 ] = 1; /* the number of static variables is unknown now */
      pBuffer[ 4 ] = 0;

      hb_compGenPCodeN( pBuffer, 5, HB_COMP_PARAM );

      hb_compGenPCode3( HB_P_SFRAME, 0, 0, HB_COMP_PARAM );     /* frame for statics variables */
      
      if( HB_COMP_PARAM->fDebugInfo )
      {
         /* uncomment this if you want to always set main module name
            not the one where first static variable was declared */
         /* HB_COMP_PARAM->currModule = HB_COMP_PARAM->szFile; */
         hb_compGenModuleName( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc->szName );
      }
   }
   else
   {
      HB_COMP_PARAM->pInitFunc->pOwner = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc;
   }
}
hbmain.c3252
VOIDhb_compStaticDefEnd( HB_COMP_DECL, const char * szVarName )
void hb_compStaticDefEnd( HB_COMP_DECL, const char * szVarName )
{
   HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc->pOwner;
   HB_COMP_PARAM->pInitFunc->pOwner = NULL;
   ++HB_COMP_PARAM->iStaticCnt;
   if( HB_COMP_PARAM->fDebugInfo )
   {
      BYTE bGlobal = 0;
      int iVar;

      if( ! HB_COMP_PARAM->fStartProc && HB_COMP_PARAM->functions.iCount <= 1 )
      {
         /* Variable declaration is outside of function/procedure body.
          * File-wide static variable
          */
         HB_COMP_PARAM->pInitFunc->pOwner = HB_COMP_PARAM->functions.pLast;
         HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc;
         bGlobal = 1;
      }

      iVar = HB_COMP_PARAM->iStaticCnt;
      hb_compGenPCode4( HB_P_STATICNAME, bGlobal, HB_LOBYTE( iVar ), HB_HIBYTE( iVar ), HB_COMP_PARAM );
      hb_compGenPCodeN( ( BYTE * ) szVarName, strlen( szVarName ) + 1, HB_COMP_PARAM );
      if( bGlobal )
      {
         HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc->pOwner;
         HB_COMP_PARAM->pInitFunc->pOwner = NULL;
      }
   }
}
hbmain.c3297
STATIC VOIDhb_compStaticDefThreadSet( HB_COMP_DECL )
static void hb_compStaticDefThreadSet( HB_COMP_DECL )
{
   if( HB_COMP_PARAM->pInitFunc )
   {
      USHORT uiCount = 0, uiVar = 0;
      PFUNCTION pFunc;
      PVAR pVar;

      pFunc = HB_COMP_PARAM->functions.pFirst;
      while( pFunc )
      {
         pVar = pFunc->pStatics;
         while( pVar )
         {
            if( pVar->uiFlags & VS_THREAD )
               ++uiCount;
            pVar = pVar->pNext;
         }
         pFunc = pFunc->pNext;
      }
      if( uiCount )
      {
         ULONG ulSize = ( ( ULONG ) uiCount << 1 ) + 3;
         BYTE * pBuffer = ( BYTE * ) hb_xgrab( ulSize ), *ptr;
         pBuffer[ 0 ] = HB_P_THREADSTATICS;
         pBuffer[ 1 ] = HB_LOBYTE( uiCount );
         pBuffer[ 2 ] = HB_HIBYTE( uiCount );
         ptr = pBuffer + 3;
         pFunc = HB_COMP_PARAM->functions.pFirst;
         while( pFunc && uiCount )
         {
            pVar = pFunc->pStatics;
            while( pVar && uiCount )
            {
               ++uiVar;
               if( pVar->uiFlags & VS_THREAD )
               {
                  HB_PUT_LE_UINT16( ptr, uiVar );
                  ptr += 2;
                  --uiCount;
               }
               pVar = pVar->pNext;
            }
            pFunc = pFunc->pNext;
         }

         HB_COMP_PARAM->pInitFunc->pOwner = HB_COMP_PARAM->functions.pLast;
         HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc;

         hb_compGenPCodeN( pBuffer, ulSize, HB_COMP_PARAM );

         HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pInitFunc->pOwner;
         HB_COMP_PARAM->pInitFunc->pOwner = NULL;

         hb_xfree( pBuffer );
      }
   }
}
hbmain.c3332
STATIC VOIDhb_compLineNumberDefStart( HB_COMP_DECL )
static void hb_compLineNumberDefStart( HB_COMP_DECL )
{
   if( ! HB_COMP_PARAM->pLineFunc )
   {
      HB_COMP_PARAM->pLineFunc = hb_compFunctionNew( HB_COMP_PARAM, "(_INITLINES)", HB_FS_INITEXIT );
      HB_COMP_PARAM->pLineFunc->pOwner = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->pLineFunc->bFlags = 0;
      HB_COMP_PARAM->pLineFunc->cScope = HB_FS_INITEXIT | HB_FS_LOCAL;
      HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pLineFunc;

      if( HB_COMP_PARAM->fDebugInfo )
      {
         /* set main module name */
         HB_COMP_PARAM->currModule = HB_COMP_PARAM->szFile;
         hb_compGenModuleName( HB_COMP_PARAM, HB_COMP_PARAM->pLineFunc->szName );
      }
   }
   else
   {
      HB_COMP_PARAM->pLineFunc->pOwner = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pLineFunc;
   }
}
hbmain.c3394
STATIC VOIDhb_compLineNumberDefEnd( HB_COMP_DECL )
static void hb_compLineNumberDefEnd( HB_COMP_DECL )
{
   HB_COMP_PARAM->functions.pLast = HB_COMP_PARAM->pLineFunc->pOwner;
   HB_COMP_PARAM->pLineFunc->pOwner = NULL;
}
hbmain.c3421
VOIDhb_compCodeBlockStart( HB_COMP_DECL, BOOL bLateEval )
void hb_compCodeBlockStart( HB_COMP_DECL, BOOL bLateEval )
{
   PFUNCTION pBlock;

   pBlock               = hb_compFunctionNew( HB_COMP_PARAM, NULL, HB_FS_STATIC | HB_FS_LOCAL );
   pBlock->pOwner       = HB_COMP_PARAM->functions.pLast;
   pBlock->bLateEval    = bLateEval;

   HB_COMP_PARAM->functions.pLast = pBlock;
   HB_COMP_PARAM->lastLinePos = 0;
}
hbmain.c3431
VOIDhb_compCodeBlockEnd( HB_COMP_DECL )
void hb_compCodeBlockEnd( HB_COMP_DECL )
{
   PFUNCTION pCodeblock;   /* pointer to the current codeblock */
   PFUNCTION pFunc;        /* pointer to a function that owns a codeblock */
   const char * pFuncName;
   ULONG  ulSize;
   USHORT wLocals = 0;     /* number of referenced local variables */
   USHORT wLocalsCnt, wLocalsLen;
   USHORT wPos;
   int iLocalPos;
   PVAR pVar;

   pCodeblock = HB_COMP_PARAM->functions.pLast;

   /* Check if the extended codeblock has return statement */
   if( ( pCodeblock->bFlags & FUN_EXTBLOCK ) &&
       !( pCodeblock->bFlags & FUN_WITH_RETURN ) )
   {
      if( HB_COMP_PARAM->iWarnings >= 1 )
         hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_FUN_WITH_NO_RETURN,
                            "{||...}", NULL );
      /* finish the codeblock without popping the return value from HVM stack */
      hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
   }

   hb_compGenPCode1( HB_P_ENDBLOCK, HB_COMP_PARAM ); /* finish the codeblock */

   if( !pCodeblock->bError )
   {
      if( pCodeblock->wParamCount && !( pCodeblock->bFlags & FUN_USES_LOCAL_PARAMS ) )
         /* PARAMETERs were used after LOCALs in extended codeblock
          * fix generated local indexes
          */
         hb_compFixFuncPCode( HB_COMP_PARAM, pCodeblock );
      hb_compOptimizeJumps( HB_COMP_PARAM );
   }

   /* return to pcode buffer of function/codeblock in which the current
    * codeblock was defined
    */
   HB_COMP_PARAM->functions.pLast = pCodeblock->pOwner;

   /* find the function that owns the codeblock */
   pFunc = pCodeblock->pOwner;
   pFuncName = pFunc->szName;
   while( pFunc->pOwner )
   {
      pFunc = pFunc->pOwner;
      if( pFunc->szName && *pFunc->szName )
         pFuncName = pFunc->szName;
   }
   pFunc->bFlags |= ( pCodeblock->bFlags & FUN_USES_STATICS );

   /* generate a proper codeblock frame with a codeblock size and with
    * a number of expected parameters
    */

   /* Count the number of referenced local variables */
   wLocalsLen = 0;
   pVar = pCodeblock->pDetached;
   while( pVar )
   {
      if( HB_COMP_PARAM->fDebugInfo )
         wLocalsLen += 4 + strlen( pVar->szName );
      pVar = pVar->pNext;
      ++wLocals;
   }
   wLocalsCnt = wLocals;
   
   ulSize = pCodeblock->lPCodePos + 2;
   if( HB_COMP_PARAM->fDebugInfo )
   {
      ulSize += 3 + strlen( HB_COMP_PARAM->currModule ) + strlen( pFuncName );
      ulSize += wLocalsLen;
   }

   if( ulSize <= 255 && pCodeblock->wParamCount == 0 && wLocals == 0 )
   {
      /* NOTE: 2 = HB_P_PUSHBLOCK + BYTE( size ) */
      hb_compGenPCode2( HB_P_PUSHBLOCKSHORT, ( BYTE ) ulSize, HB_COMP_PARAM );
   }
   else
   {
      /* NOTE: 8 = HB_P_PUSHBLOCK + USHORT( size ) + USHORT( wParams ) + USHORT( wLocals ) + _ENDBLOCK */
      ulSize += 5 + wLocals * 2;
      if( ulSize <= USHRT_MAX )
         hb_compGenPCode3( HB_P_PUSHBLOCK, HB_LOBYTE( ulSize ), HB_HIBYTE( ulSize ), HB_COMP_PARAM );
      else if( ulSize < UINT24_MAX )
      {
         ++ulSize;
         hb_compGenPCode4( HB_P_PUSHBLOCKLARGE, HB_LOBYTE( ulSize ), HB_HIBYTE( ulSize ), HB_ULBYTE( ulSize ), HB_COMP_PARAM );
      }
      else
         hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_BLOCK_TOO_BIG, NULL, NULL );

      /* generate the number of local parameters */
      hb_compGenPCode2( HB_LOBYTE( pCodeblock->wParamCount ), HB_HIBYTE( pCodeblock->wParamCount ), HB_COMP_PARAM );
      /* generate the number of referenced local variables */
      hb_compGenPCode2( HB_LOBYTE( wLocals ), HB_HIBYTE( wLocals ), HB_COMP_PARAM );

      /* generate the table of referenced local variables */
      pVar = pCodeblock->pDetached;
      while( wLocals-- )
      {
         wPos = hb_compVariableGetPos( pFunc->pLocals, pVar->szName );
         hb_compGenPCode2( HB_LOBYTE( wPos ), HB_HIBYTE( wPos ), HB_COMP_PARAM );
         pVar = pVar->pNext;
      }
   }

   if( HB_COMP_PARAM->fDebugInfo )
   {
      hb_compGenModuleName( HB_COMP_PARAM, pFuncName );

      /* generate the name of referenced local variables */
      pVar = pCodeblock->pDetached;
      iLocalPos = -1;
      while( wLocalsCnt-- )
      {
         hb_compGenPCode3( HB_P_LOCALNAME, HB_LOBYTE( iLocalPos ), HB_HIBYTE( iLocalPos ), HB_COMP_PARAM );
         hb_compGenPCodeN( ( BYTE * ) pVar->szName, strlen( pVar->szName ) + 1, HB_COMP_PARAM );
         iLocalPos--;
         pVar = pVar->pNext;
      }

   }

   hb_compGenPCodeN( pCodeblock->pCode, pCodeblock->lPCodePos, HB_COMP_PARAM );

   if( HB_COMP_PARAM->iWarnings )
   {
      pVar = pCodeblock->pLocals;
      while( pVar )
      {
         if( HB_COMP_PARAM->iWarnings && pFunc->szName && pVar->szName && ! ( pVar->iUsed & VU_USED ) )
            hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_BLOCKVAR_NOT_USED, pVar->szName, pFunc->szName );
         pVar = pVar->pNext;
      }
      pVar = pCodeblock->pStatics;
      while( pVar )
      {
         if( HB_COMP_PARAM->iWarnings && pFunc->szName && pVar->szName && ! ( pVar->iUsed & VU_USED ) )
            hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_VAR_NOT_USED, pVar->szName, "{||...}" );
         pVar = pVar->pNext;
      }
   }

   hb_compFunctionKill( HB_COMP_PARAM, pCodeblock );
}
hbmain.c3446
VOIDhb_compCodeBlockStop( HB_COMP_DECL )
void hb_compCodeBlockStop( HB_COMP_DECL )
{
   PFUNCTION pCodeblock;   /* pointer to the current codeblock */

   pCodeblock = HB_COMP_PARAM->functions.pLast;

   /* return to pcode buffer of function/codeblock in which the current
    * codeblock was defined
    */
   HB_COMP_PARAM->functions.pLast = pCodeblock->pOwner;
   hb_compGenPCodeN( pCodeblock->pCode, pCodeblock->lPCodePos, HB_COMP_PARAM );

   if( HB_COMP_PARAM->iWarnings )
   {
      PVAR pVar = pCodeblock->pLocals;
      /* find the function that owns the codeblock */
      PFUNCTION pFunc = pCodeblock->pOwner;
      while( pFunc->pOwner )
         pFunc = pFunc->pOwner;
      while( pVar )
      {
         if( pFunc->szName && pVar->szName && ! ( pVar->iUsed & VU_USED ) )
            hb_compGenWarning( HB_COMP_PARAM, hb_comp_szWarnings, 'W', HB_COMP_WARN_BLOCKVAR_NOT_USED, pVar->szName, pFunc->szName );
         pVar = pVar->pNext;
      }
   }

   hb_compFunctionKill( HB_COMP_PARAM, pCodeblock );
}
hbmain.c3596
VOIDhb_compCodeBlockRewind( HB_COMP_DECL )
void hb_compCodeBlockRewind( HB_COMP_DECL )
{
   PFUNCTION pCodeblock;   /* pointer to the current codeblock */

   pCodeblock = HB_COMP_PARAM->functions.pLast;
   pCodeblock->lPCodePos = 0;

   /* Release the NOOP array. */
   if( pCodeblock->pNOOPs )
   {
      hb_xfree( ( void * ) pCodeblock->pNOOPs );
      pCodeblock->pNOOPs = NULL;
      pCodeblock->iNOOPs = 0;
   }
   /* Release the Jumps array. */
   if( pCodeblock->pJumps )
   {
      hb_xfree( ( void * ) pCodeblock->pJumps );
      pCodeblock->pJumps = NULL;
      pCodeblock->iJumps = 0;
   }
}
hbmain.c3626
STATIC PHB_I18NTABLEhb_compI18nCreate( void )
static PHB_I18NTABLE hb_compI18nCreate( void )
{
   PHB_I18NTABLE  pI18n;

   pI18n = ( PHB_I18NTABLE ) hb_xgrab( sizeof( HB_I18NTABLE ) );
   pI18n->pString = NULL;
   pI18n->uiCount = 0;
   pI18n->uiAllocated = 0;
   return pI18n;
}
hbmain.c3649
STATIC VOIDhb_compI18nFree( PHB_I18NTABLE pI18n )
static void hb_compI18nFree( PHB_I18NTABLE pI18n )
{
   UINT    ui;

   if( pI18n->pString )
   {
      for( ui = 0; ui < pI18n->uiCount; ui++ )
      {
         if( pI18n->pString[ ui ].szText )
            hb_xfree( pI18n->pString[ ui ].szText );
      
         if( pI18n->pString[ ui ].szContext )
            hb_xfree( pI18n->pString[ ui ].szContext );
      
         if( pI18n->pString[ ui ].pLine )
            hb_xfree( pI18n->pString[ ui ].pLine );
      }
      hb_xfree( pI18n->pString );
   }
   hb_xfree( pI18n );
}
hbmain.c3661
STATIC INThb_compI18nCompare( PHB_I18NSTRING pString, const char* pText, const char* pContext )
static int hb_compI18nCompare( PHB_I18NSTRING pString, const char* pText, const char* pContext )
{
   int  i;

   i = strcmp( pString->szText, pText );

   if( i == 0 )
   {
      if( pContext )
      {
         if( pString->szContext )
            return strcmp( pString->szContext, pContext );
         else
            return -1;
      }
      else
      {
         if( pString->szContext )
            return 1;
         else 
            return 0;
      }
   }
   return i;
}
hbmain.c3683
VOIDhb_compI18nAdd( HB_COMP_DECL, const char* szText, const char* szContext, UINT uiLine )
void hb_compI18nAdd( HB_COMP_DECL, const char* szText, const char* szContext, UINT uiLine )
{
   PHB_I18NTABLE    pI18n;
   PHB_I18NSTRING   pString;
   UINT             uiLeft, uiRight, uiMiddle;
   int              iCompare;

   pI18n = HB_COMP_PARAM->pI18n;

   if( ! pI18n )
      return;

   if( pI18n->uiCount >= pI18n->uiAllocated )
   {
      if( pI18n->pString )
      {
         pI18n->uiAllocated += 32;
         pI18n->pString = ( PHB_I18NSTRING ) hb_xrealloc( pI18n->pString, sizeof( HB_I18NSTRING ) 
                                                                          * pI18n->uiAllocated );
      }
      else
      {
         pI18n->pString = ( PHB_I18NSTRING ) hb_xgrab( sizeof( HB_I18NSTRING ) * 32 );
         pI18n->uiAllocated = 32;
      }
   }

   uiLeft = 0;
   uiRight = pI18n->uiCount;

   while( uiLeft < uiRight )
   {
      uiMiddle = ( uiLeft + uiRight ) >> 1;

      iCompare = hb_compI18nCompare( & pI18n->pString[ uiMiddle ], szText, szContext );

      if( iCompare == 0 )
      {
         pString = & pI18n->pString[ uiMiddle ];

         if( pString->pLine )
         {
            pString->pLine = ( UINT* ) hb_xrealloc( pString->pLine, ( pString->uiLineCount + 1 ) * sizeof( UINT ) );
            pString->pLine[ pString->uiLineCount ] = uiLine;
            pString->uiLineCount++;
         }
         else
         {
            pString->pLine = ( UINT* ) hb_xgrab( sizeof( UINT ) );
            pString->pLine[ 0 ] = uiLine;
            pString->uiLineCount = 1;
         }
         return;
      }
      else if( iCompare < 0 )
         uiLeft = uiMiddle + 1;
      else
         uiRight = uiMiddle;
   }

   memmove( &pI18n->pString[ uiLeft + 1 ], &pI18n->pString[ uiLeft ],
            ( pI18n->uiCount - uiLeft ) * sizeof( HB_I18NSTRING ) );

   pString = & pI18n->pString[ uiLeft ];
   pString->szText = hb_strdup( szText );
   if( szContext )
      pString->szContext = hb_strdup( szContext );
   else
      pString->szContext = NULL;
   pString->uiLine = uiLine;
   pString->pLine = NULL;
   pString->uiLineCount = 0;

   pI18n->uiCount++;
}
hbmain.c3709
STATIC VOIDhb_compI18nEscapeString( FILE* file, char* szText )
static void hb_compI18nEscapeString( FILE* file, char* szText )
{
   while( * szText )
   {
      if( (unsigned char) * szText < ' ' )
      {
        if( * szText == '\t' )
           fprintf( file, "\\t" );
        else if( * szText == '\n' )
           fprintf( file, "\\n" );
        else if( * szText == '\r' )
           fprintf( file, "\\r" );
        else
           fprintf( file, "\\x%02X", * szText );
      }
      else if( * szText == '"' )
      {
        fprintf( file, "\\\"" );
      }
      else if( * szText == '\\' )
      {
        fprintf( file, "\\\\" );
      }
      else
      {
        fprintf( file, "%c", * szText );
      }

      szText++;
   }
}
hbmain.c3786
STATIC BOOLhb_compI18nSave( HB_COMP_DECL )
static BOOL hb_compI18nSave( HB_COMP_DECL )
{
   PHB_I18NTABLE    pI18n;
   PHB_I18NSTRING   pString;
   HB_FNAME         FileName;
   char             szFileName[ _POSIX_PATH_MAX + 1 ];
   char*            szText;
   UINT             uiIndex, uiLine;
   FILE*            file; 

   pI18n = HB_COMP_PARAM->pI18n;

   FileName.szPath = FileName.szName = FileName.szExtension = FileName.szDrive = NULL;

   if( HB_COMP_PARAM->pOutPath )
   {
      FileName.szDrive = HB_COMP_PARAM->pOutPath->szDrive;
      FileName.szPath = HB_COMP_PARAM->pOutPath->szPath;
   }

   if( HB_COMP_PARAM->pI18nFileName )
   {
      if( HB_COMP_PARAM->pI18nFileName->szName )
         FileName.szName = HB_COMP_PARAM->pI18nFileName->szName;

      if( HB_COMP_PARAM->pI18nFileName->szExtension )
         FileName.szExtension = HB_COMP_PARAM->pI18nFileName->szExtension;

      if( HB_COMP_PARAM->pI18nFileName->szPath )
      {
         FileName.szDrive = HB_COMP_PARAM->pI18nFileName->szDrive;
         FileName.szPath = HB_COMP_PARAM->pI18nFileName->szPath;
      }
   }

   if( ! FileName.szName )
      FileName.szName = HB_COMP_PARAM->pFileName->szName;

   if( ! FileName.szExtension )
      FileName.szExtension = ".pot";

   hb_fsFNameMerge( szFileName, &FileName );

   file = hb_fopen( szFileName, "wb" );

   if( ! file )
   {
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_CREATE_OUTPUT, szFileName, NULL );
      return FALSE;
   }

   szText = hb_verHarbour();
   fprintf( file, "#\n# This file is generated by %s\n#\n\n", szText );
   hb_xfree( szText );

   hb_strncpy( szFileName, HB_COMP_PARAM->pFileName->szName, sizeof( szFileName ) - 1 );

   for( uiIndex = 0; uiIndex < pI18n->uiCount; uiIndex++ )
   {
      pString = & pI18n->pString[ uiIndex ];

      fprintf( file, "#: %s:%d", szFileName, pString->uiLine );

      for( uiLine = 0; uiLine < pString->uiLineCount; uiLine++ )
         fprintf( file, " %s:%d", szFileName, pString->pLine[ uiLine ] );

      fprintf( file, "\n#, c-format\n" );

      if( pString->szContext )
      {
         fprintf( file, "msgctxt \"" );
         hb_compI18nEscapeString( file, pString->szContext );
         fprintf( file, "\"\n" );
      }

      fprintf( file, "msgid \"" );
      hb_compI18nEscapeString( file, pString->szText );
      fprintf( file, "\"\nmsgstr \"\"\n\n" );
   }

   fclose( file );
   return TRUE;
}
hbmain.c3819
STATIC VOIDhb_compInitVars( HB_COMP_DECL )
static void hb_compInitVars( HB_COMP_DECL )
{
   if( HB_COMP_PARAM->iErrorCount != 0 )
      hb_compExprLstDealloc( HB_COMP_PARAM );

   HB_COMP_PARAM->functions.iCount = 0;
   HB_COMP_PARAM->functions.pFirst = NULL;
   HB_COMP_PARAM->functions.pLast  = NULL;
   HB_COMP_PARAM->funcalls.iCount  = 0;
   HB_COMP_PARAM->funcalls.pFirst  = NULL;
   HB_COMP_PARAM->funcalls.pLast   = NULL;
   HB_COMP_PARAM->szAnnounce       = NULL;
   HB_COMP_PARAM->fTextSubst       = ( HB_COMP_PARAM->supported & HB_COMPFLAG_MACROTEXT ) != 0;
   HB_COMP_PARAM->fLongOptimize    = TRUE;

   HB_COMP_PARAM->symbols.iCount   = 0;
   HB_COMP_PARAM->symbols.pFirst   = NULL;
   HB_COMP_PARAM->symbols.pLast    = NULL;
   HB_COMP_PARAM->pInitFunc        = NULL;
   HB_COMP_PARAM->pLineFunc        = NULL;
   HB_COMP_PARAM->fAnyWarning      = FALSE;

   HB_COMP_PARAM->iFunctionCnt     = 0;
   HB_COMP_PARAM->iErrorCount      = 0;
   HB_COMP_PARAM->cVarType         = ' ';
   HB_COMP_PARAM->lastLinePos      = 0;
   HB_COMP_PARAM->iStaticCnt       = 0;
   HB_COMP_PARAM->iVarScope        = VS_LOCAL;

   HB_COMP_PARAM->inlines.iCount   = 0;
   HB_COMP_PARAM->inlines.pFirst   = NULL;
   HB_COMP_PARAM->inlines.pLast    = NULL;
}
hbmain.c3905
STATIC VOIDhb_compGenOutput( HB_COMP_DECL, int iLanguage )
static void hb_compGenOutput( HB_COMP_DECL, int iLanguage )
{
   HB_TRACE(HB_TR_DEBUG, ("hb_compGenOutput()"));

   switch( iLanguage )
   {
      case HB_LANG_C:
         hb_compGenCCode( HB_COMP_PARAM, HB_COMP_PARAM->pFileName );
         break;

#ifdef HB_GEN_W32_OBJ
      case HB_LANG_OBJ32:
         hb_compGenObj32( HB_COMP_PARAM, HB_COMP_PARAM->pFileName );
         break;
#endif

      case HB_LANG_PORT_OBJ:
         hb_compGenPortObj( HB_COMP_PARAM, HB_COMP_PARAM->pFileName );
         break;

      case HB_LANG_PORT_OBJ_BUF:
         hb_compGenBufPortObj( HB_COMP_PARAM, &HB_COMP_PARAM->pOutBuf, &HB_COMP_PARAM->ulOutBufSize );
         break;

      case HB_LANG_OBJ_MODULE:
         hb_compGenCObj( HB_COMP_PARAM, HB_COMP_PARAM->pFileName );
         break;
   }
}
hbmain.c3940
STATIC VOIDhb_compPpoFile( HB_COMP_DECL, const char * szPrg, const char * szExt, char * szPpoName )
static void hb_compPpoFile( HB_COMP_DECL, const char * szPrg, const char * szExt,
                            char * szPpoName )
{
   PHB_FNAME pFilePpo = hb_fsFNameSplit( szPrg );

   pFilePpo->szExtension = szExt;
   if( HB_COMP_PARAM->pPpoPath )
   {
      pFilePpo->szPath = HB_COMP_PARAM->pPpoPath->szPath;
      if( HB_COMP_PARAM->pPpoPath->szName )
      {
         pFilePpo->szName = HB_COMP_PARAM->pPpoPath->szName;
         pFilePpo->szExtension = HB_COMP_PARAM->pPpoPath->szExtension;
      }
   }
   hb_fsFNameMerge( szPpoName, pFilePpo );
   hb_xfree( pFilePpo );
}
hbmain.c3970
STATIC VOIDhb_compOutputFile( HB_COMP_DECL )
static void hb_compOutputFile( HB_COMP_DECL )
{
   HB_TRACE(HB_TR_DEBUG, ("hb_compOutputFile()"));

   HB_COMP_PARAM->pFileName->szPath = NULL;
   HB_COMP_PARAM->pFileName->szExtension = NULL;

   /* we create the output file name */
   if( HB_COMP_PARAM->pOutPath )
   {
      if( HB_COMP_PARAM->pOutPath->szPath )
         HB_COMP_PARAM->pFileName->szPath = HB_COMP_PARAM->pOutPath->szPath;

      if( HB_COMP_PARAM->pOutPath->szName )
      {
         HB_COMP_PARAM->pFileName->szName = HB_COMP_PARAM->pOutPath->szName;
         if( HB_COMP_PARAM->pOutPath->szExtension )
            HB_COMP_PARAM->pFileName->szExtension = HB_COMP_PARAM->pOutPath->szExtension;
      }
   }
}
hbmain.c3989
STATIC VOIDhb_compAddInitFunc( HB_COMP_DECL, PFUNCTION pFunc )
static void hb_compAddInitFunc( HB_COMP_DECL, PFUNCTION pFunc )
{
   PCOMSYMBOL pSym = hb_compSymbolAdd( HB_COMP_PARAM, pFunc->szName, NULL, HB_SYM_FUNCNAME );

   pSym->cScope |= pFunc->cScope;
   hb_compAddFunc( HB_COMP_PARAM, pFunc );
   hb_compGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
}
hbmain.c4011
VOIDhb_compCompileEnd( HB_COMP_DECL )
void hb_compCompileEnd( HB_COMP_DECL )
{
   if( HB_COMP_PARAM->pI18n )
   {
      hb_compI18nFree( HB_COMP_PARAM->pI18n );
      HB_COMP_PARAM->pI18n = NULL;
   }

   if( HB_COMP_PARAM->pI18nFileName )
   {
      hb_xfree( HB_COMP_PARAM->pI18nFileName );
      HB_COMP_PARAM->pI18nFileName = NULL;
   }

   if( HB_COMP_PARAM->pMainFileName )
   {
      if( HB_COMP_PARAM->pFileName != HB_COMP_PARAM->pMainFileName )
         /* currently compiled file was autoopened - close also
          * the main module
          */
         hb_xfree( HB_COMP_PARAM->pMainFileName );
      HB_COMP_PARAM->pMainFileName = NULL;
   }

   if( HB_COMP_PARAM->pFileName )
   {
      hb_xfree( HB_COMP_PARAM->pFileName );
      HB_COMP_PARAM->pFileName = NULL;
   }

   while( HB_COMP_PARAM->functions.pLast &&
          !HB_COMP_PARAM->functions.pLast->szName )
   {
      PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;
      HB_COMP_PARAM->functions.pLast = pFunc->pOwner;
      hb_compFunctionKill( HB_COMP_PARAM, pFunc );
   }
   HB_COMP_PARAM->functions.pLast = NULL;

   if( HB_COMP_PARAM->functions.pFirst )
   {
      PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst;

      while( pFunc )
         pFunc = hb_compFunctionKill( HB_COMP_PARAM, pFunc );
      HB_COMP_PARAM->functions.pFirst = NULL;
   }

   while( HB_COMP_PARAM->funcalls.pFirst )
   {
      PFUNCALL pFunc = HB_COMP_PARAM->funcalls.pFirst;

      HB_COMP_PARAM->funcalls.pFirst = pFunc->pNext;
      hb_xfree( ( void * ) pFunc );
   }

   while( HB_COMP_PARAM->externs )
   {
      PEXTERN pExtern = HB_COMP_PARAM->externs;

      HB_COMP_PARAM->externs = HB_COMP_PARAM->externs->pNext;
      hb_xfree( pExtern );
   }

   while( HB_COMP_PARAM->inlines.pFirst )
   {
      PINLINE pInline = HB_COMP_PARAM->inlines.pFirst;

      HB_COMP_PARAM->inlines.pFirst = pInline->pNext;
      if( pInline->pCode )
         hb_xfree( pInline->pCode );
      hb_xfree( ( void * ) pInline );
   }

   while( HB_COMP_PARAM->pFirstDeclared )
   {
      PCOMDECLARED pDeclared = HB_COMP_PARAM->pFirstDeclared;
      HB_COMP_PARAM->pFirstDeclared = pDeclared->pNext;
      if( pDeclared->cParamTypes )
         hb_xfree( ( void * ) pDeclared->cParamTypes );
      if( pDeclared->pParamClasses )
         hb_xfree( ( void * ) pDeclared->pParamClasses );
      hb_xfree( ( void * ) pDeclared );
   }
   HB_COMP_PARAM->pLastDeclared = NULL;

   while( HB_COMP_PARAM->pFirstClass )
   {
      PCOMCLASS pClass = HB_COMP_PARAM->pFirstClass;
      HB_COMP_PARAM->pFirstClass = pClass->pNext;
      while( pClass->pMethod )
      {
         PCOMDECLARED pDeclared = pClass->pMethod;
         pClass->pMethod = pDeclared->pNext;
         if( pDeclared->cParamTypes )
            hb_xfree( ( void * ) pDeclared->cParamTypes );
         if( pDeclared->pParamClasses )
            hb_xfree( ( void * ) pDeclared->pParamClasses );
         hb_xfree( ( void * ) pDeclared );
      }
      hb_xfree( ( void * ) pClass );
   }
   HB_COMP_PARAM->pLastClass = NULL;

   if( HB_COMP_PARAM->symbols.pFirst )
   {
      PCOMSYMBOL pSym = HB_COMP_PARAM->symbols.pFirst;
      while( pSym )
         pSym = hb_compSymbolKill( pSym );
      HB_COMP_PARAM->symbols.pFirst = NULL;
   }
}
hbmain.c4020
STATIC INThb_compCompile( HB_COMP_DECL, const char * szPrg, int iFileType )
static int hb_compCompile( HB_COMP_DECL, const char * szPrg, int iFileType )
{
   const char * szBuffer = NULL;
   int iStatus = EXIT_SUCCESS;

   HB_TRACE(HB_TR_DEBUG, ("hb_compCompile(%s,%d)", szPrg, iFileType));

   if( iFileType == HB_COMP_MEMBUFFER )
   {
      szBuffer = szPrg;
      szPrg = "{SOURCE}";
   }

   HB_COMP_PARAM->pMainFileName = hb_fsFNameSplit( szPrg );
   HB_COMP_PARAM->pFileName = HB_COMP_PARAM->pMainFileName;

   if( HB_COMP_PARAM->pFileName->szName )
   {
      char szFileName[ _POSIX_PATH_MAX + 1 ];    /* filename to parse */
      char szPpoName[ _POSIX_PATH_MAX + 1 ];
      char buffer[ _POSIX_PATH_MAX * 2 + 80 ];

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

      /* Initialize support variables */
      hb_compInitVars( HB_COMP_PARAM );

      /* Clear and reinitialize preprocessor state */
      hb_pp_reset( HB_COMP_PARAM->pLex->pPP );

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

      if( iFileType == HB_COMP_MEMBUFFER )
      {
         if( !hb_pp_inBuffer( HB_COMP_PARAM->pLex->pPP, szBuffer, strlen( szBuffer ) ) )
         {
            hb_compOutErr( HB_COMP_PARAM, "Cannot create preprocessor buffer." );
            iStatus = EXIT_FAILURE;
         }
      }
      else if( !hb_pp_inFile( HB_COMP_PARAM->pLex->pPP, szFileName, FALSE, NULL, FALSE ) )
      {
         snprintf( buffer, sizeof( buffer ),
                   "Cannot open input file: %s\n", szFileName );
         hb_compOutErr( HB_COMP_PARAM, buffer );
         iStatus = EXIT_FAILURE;
      }
      else if( iFileType == HB_COMP_SINGLEFILE )
      {
         if( HB_COMP_PARAM->fPPT )
         {
            hb_compPpoFile( HB_COMP_PARAM, szPrg, ".ppt", szPpoName );
            if( !hb_pp_traceFile( HB_COMP_PARAM->pLex->pPP, szPpoName, NULL ) )
               iStatus = EXIT_FAILURE;
         }

         if( HB_COMP_PARAM->fPPO && iStatus == EXIT_SUCCESS )
         {
            hb_compPpoFile( HB_COMP_PARAM, szPrg, ".ppo", szPpoName );
            if( !hb_pp_outFile( HB_COMP_PARAM->pLex->pPP, szPpoName, NULL ) )
               iStatus = EXIT_FAILURE;
         }
      }

      if( iStatus == EXIT_SUCCESS && !HB_COMP_PARAM->fExit )
      {
         BOOL bSkipGen = FALSE ;

         HB_COMP_PARAM->szFile = HB_COMP_PARAM->currModule =
            hb_compIdentifierNew( HB_COMP_PARAM, szFileName, HB_IDENT_COPY );
         HB_COMP_PARAM->currLine = 1;

         if( iFileType == HB_COMP_MEMBUFFER )
         {
            hb_compFunctionAdd( HB_COMP_PARAM, "", 0, FUN_PROCEDURE );
            hb_compparse( HB_COMP_PARAM );
         }
         else if( iFileType == HB_COMP_SINGLEFILE )
         {
            if( ! HB_COMP_PARAM->fQuiet )
            {
               if( HB_COMP_PARAM->fPPO )
                  snprintf( buffer, sizeof( buffer ),
                            "Compiling '%s' and generating preprocessed output to '%s'...\n",
                            szFileName, szPpoName );
               else
                  snprintf( buffer, sizeof( buffer ), "Compiling '%s'...\n", szFileName );
               hb_compOutStd( HB_COMP_PARAM, buffer );
            }

            if( HB_COMP_PARAM->fI18n )
            {
               HB_COMP_PARAM->pI18n = hb_compI18nCreate();
            }

            /* Generate the starting procedure frame */
            if( HB_COMP_PARAM->fStartProc )
            {
               hb_compFunctionAdd( HB_COMP_PARAM, hb_compIdentifierNew( HB_COMP_PARAM, hb_strupr( hb_strdup( HB_COMP_PARAM->pFileName->szName ) ), HB_IDENT_FREE ), HB_FS_PUBLIC, FUN_PROCEDURE );
            }
            else
            {
               /* Don't pass the name of module if the code for starting procedure
               * will be not generated. The name cannot be placed as first symbol
               * because this symbol can be used as function call or memvar's name.
               */
               hb_compFunctionAdd( HB_COMP_PARAM, "", 0, FUN_PROCEDURE );
            }

            if( !HB_COMP_PARAM->fExit )
            {
               hb_compparse( HB_COMP_PARAM );
            }
         }
         else
         {
            snprintf( buffer, sizeof( buffer ), "Reading '%s'...\n", szFileName );
            hb_compOutStd( HB_COMP_PARAM, buffer );
         }

         /* Open refernced modules (using DO ... WITh statement
          * or from @.clp command line option
         */
         while( HB_COMP_PARAM->autoopen && !HB_COMP_PARAM->fExit )
         {
            PAUTOOPEN pAutoOpen = HB_COMP_PARAM->autoopen;

            if( ! hb_compIsFunction( HB_COMP_PARAM, pAutoOpen->szName ) )
               hb_compAutoOpen( HB_COMP_PARAM, pAutoOpen->szName, &bSkipGen, iFileType );

            HB_COMP_PARAM->autoopen = HB_COMP_PARAM->autoopen->pNext;
            hb_xfree( pAutoOpen );
         }

         /* Begin of finalization phase. */

         /* fix all previous function returns offsets */
         hb_compFinalizeFunction( HB_COMP_PARAM );

         hb_compExternGen( HB_COMP_PARAM );       /* generates EXTERN symbols names */

         if( HB_COMP_PARAM->pInitFunc )
         {
            char szNewName[ 25 ];

            /* Mark thread static variables */
            hb_compStaticDefThreadSet( HB_COMP_PARAM );
            /* Fix the number of static variables */
            HB_COMP_PARAM->pInitFunc->pCode[ 3 ] = HB_LOBYTE( HB_COMP_PARAM->iStaticCnt );
            HB_COMP_PARAM->pInitFunc->pCode[ 4 ] = HB_HIBYTE( HB_COMP_PARAM->iStaticCnt );
            HB_COMP_PARAM->pInitFunc->iStaticsBase = HB_COMP_PARAM->iStaticCnt;
            /* Update pseudo function name */
            snprintf( szNewName, sizeof( szNewName ), "(_INITSTATICS%05d)", HB_COMP_PARAM->iStaticCnt );
            HB_COMP_PARAM->pInitFunc->szName = hb_compIdentifierNew( HB_COMP_PARAM, szNewName, HB_IDENT_COPY );

            hb_compAddInitFunc( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc );
         }

         if( HB_COMP_PARAM->fLineNumbers && HB_COMP_PARAM->fDebugInfo )
         {
            PHB_DEBUGINFO pInfo = hb_compGetDebugInfo( HB_COMP_PARAM ), pNext;
            if( pInfo )
            {
               int iModules = 0;
               hb_compLineNumberDefStart( HB_COMP_PARAM );
               do
               {
                  ULONG ulSkip = pInfo->ulFirstLine >> 3;
                  ULONG ulLen = ( ( pInfo->ulLastLine + 7 ) >> 3 ) - ulSkip;

                  hb_compGenPushString( pInfo->pszModuleName, strlen( pInfo->pszModuleName ) + 1, HB_COMP_PARAM );
                  hb_compGenPushLong( ulSkip << 3, HB_COMP_PARAM );
                  hb_compGenPushString( ( char * ) pInfo->pLineMap + ulSkip, ulLen + 1, HB_COMP_PARAM );
                  hb_compGenPCode3( HB_P_ARRAYGEN, 3, 0, HB_COMP_PARAM );
                  iModules++;

                  pNext = pInfo->pNext;
                  hb_xfree( pInfo->pszModuleName );
                  hb_xfree( pInfo->pLineMap );
                  hb_xfree( pInfo );
                  pInfo = pNext;
               }
               while( pInfo );

               hb_compGenPCode3( HB_P_ARRAYGEN, HB_LOBYTE( iModules ), HB_HIBYTE( iModules ), HB_COMP_PARAM );
               hb_compGenPCode1( HB_P_RETVALUE, HB_COMP_PARAM );
               hb_compLineNumberDefEnd( HB_COMP_PARAM );
               hb_compAddInitFunc( HB_COMP_PARAM, HB_COMP_PARAM->pLineFunc );
            }
         }

         if( HB_COMP_PARAM->szAnnounce )
            hb_compAnnounce( HB_COMP_PARAM, HB_COMP_PARAM->szAnnounce );

         /* End of finalization phase. */

         if( HB_COMP_PARAM->iErrorCount || HB_COMP_PARAM->fAnyWarning )
         {
            if( HB_COMP_PARAM->iErrorCount )
            {
               iStatus = EXIT_FAILURE;
               bSkipGen = TRUE;
               snprintf( buffer, sizeof( buffer ),
                         "\r%i error%s\n\nNo code generated\n",
                         HB_COMP_PARAM->iErrorCount,
                         HB_COMP_PARAM->iErrorCount > 1 ? "s" : "" );
               hb_compOutStd( HB_COMP_PARAM, buffer );
            }
            else if( HB_COMP_PARAM->iExitLevel == HB_EXITLEVEL_SETEXIT )
            {
               iStatus = EXIT_FAILURE;
            }
            else if( HB_COMP_PARAM->iExitLevel == HB_EXITLEVEL_DELTARGET )
            {
               iStatus = EXIT_FAILURE;
               bSkipGen = TRUE;
               hb_compOutStd( HB_COMP_PARAM, "\nNo code generated.\n" );
            }
         }

         if( ! HB_COMP_PARAM->fSyntaxCheckOnly && ! bSkipGen &&
             HB_COMP_PARAM->iErrorCount == 0 )
         {
            const char * szFirstFunction = NULL;
            PFUNCTION *pFunPtr;

            /* we create the output file name */
            hb_compOutputFile( HB_COMP_PARAM );

            pFunPtr = &HB_COMP_PARAM->functions.pFirst;
            if( ! HB_COMP_PARAM->fStartProc )
            {
               /* skip first non-startup procedure */
               hb_compOptimizeFrames( HB_COMP_PARAM, *pFunPtr );
               pFunPtr = &(*pFunPtr)->pNext;
               HB_COMP_PARAM->iFunctionCnt--;
            }

            while( *pFunPtr && !HB_COMP_PARAM->fExit )
            {
               /* remove function frames with no names */
               if( ! HB_COMP_PARAM->fStartProc && ! (*pFunPtr)->szName[0] )
               {
                  *pFunPtr = hb_compFunctionKill( HB_COMP_PARAM, *pFunPtr );
                  HB_COMP_PARAM->functions.iCount--;
                  HB_COMP_PARAM->iFunctionCnt--;
               }
               else
               {
                  hb_compOptimizeFrames( HB_COMP_PARAM, *pFunPtr );

                  if( szFirstFunction == NULL && 
                     ! ( ( *pFunPtr )->cScope & (HB_FS_INIT | HB_FS_EXIT) ) )
                  {
                     szFirstFunction = ( *pFunPtr )->szName;
                  }
                  pFunPtr = &(*pFunPtr)->pNext;
               }
            }

            if( szFirstFunction )
            {
               PCOMSYMBOL pSym = hb_compSymbolFind( HB_COMP_PARAM, szFirstFunction,
                                                    NULL, HB_SYM_FUNCNAME );
               if( pSym )
                  pSym->cScope |= HB_FS_FIRST;
            }

            if( ! HB_COMP_PARAM->fQuiet )
            {
               snprintf( buffer, sizeof( buffer ),
                         "\rLines %i, Functions/Procedures %i\n",
                         hb_pp_lineTot( HB_COMP_PARAM->pLex->pPP ),
                         HB_COMP_PARAM->iFunctionCnt );
               hb_compOutStd( HB_COMP_PARAM, buffer );
            }

            hb_compGenOutput( HB_COMP_PARAM, HB_COMP_PARAM->iLanguage );
            if( HB_COMP_PARAM->pI18n )
            {
               hb_compI18nSave( HB_COMP_PARAM );
            }
         }
      }
   }
   else
   {
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADFILENAME, szPrg, NULL );
      iStatus = EXIT_FAILURE;
   }
   hb_compCompileEnd( HB_COMP_PARAM );

   return HB_COMP_PARAM->fExit ? EXIT_FAILURE : iStatus;
}
hbmain.c4133
STATIC BOOLhb_compAutoOpenFind( HB_COMP_DECL, const char * szName )
static BOOL hb_compAutoOpenFind( HB_COMP_DECL, const char * szName )
{
   PAUTOOPEN pLast = HB_COMP_PARAM->autoopen;

   HB_TRACE(HB_TR_DEBUG, ("hb_compAutoOpenFind(%s)", szName));

   if( pLast == NULL )
      return FALSE;

   if( hb_stricmp( pLast->szName, szName ) == 0 )
      return TRUE;
   else
   {
      while( pLast->pNext )
      {
         pLast = pLast->pNext;

         if( strcmp( pLast->szName, szName ) == 0 )
            return TRUE;
      }
   }
   return FALSE;
}
hbmain.c4431
VOIDhb_compAutoOpenAdd( HB_COMP_DECL, const char * szName )
void hb_compAutoOpenAdd( HB_COMP_DECL, const char * szName )
{
   HB_TRACE(HB_TR_DEBUG, ("hb_compAutoOpenAdd(%p,%s)", HB_COMP_PARAM, szName));

   if( HB_COMP_PARAM->fAutoOpen && ! hb_compAutoOpenFind( HB_COMP_PARAM, szName ) )
   {
      PAUTOOPEN pAutoOpen = ( PAUTOOPEN ) hb_xgrab( sizeof( AUTOOPEN ) ), pLast;

      pAutoOpen->szName = ( char * ) szName;
      pAutoOpen->pNext  = NULL;

      if( HB_COMP_PARAM->autoopen == NULL )
         HB_COMP_PARAM->autoopen = pAutoOpen;
      else
      {
         pLast = HB_COMP_PARAM->autoopen;
         while( pLast->pNext )
            pLast = pLast->pNext;

         pLast->pNext = pAutoOpen;
      }
   }
}
hbmain.c4455
STATIC INThb_compAutoOpen( HB_COMP_DECL, const char * szPrg, BOOL * pbSkipGen, int iFileType )
static int hb_compAutoOpen( HB_COMP_DECL, const char * szPrg, BOOL * pbSkipGen, int iFileType )
{
   int iStatus = EXIT_SUCCESS;
   PHB_FNAME pMainFileName = HB_COMP_PARAM->pFileName;

   HB_COMP_PARAM->pFileName = hb_fsFNameSplit( szPrg );

   if( HB_COMP_PARAM->pFileName->szName )
   {
      char szFileName[ _POSIX_PATH_MAX + 1 ];    /* filename to parse */
      char szPpoName[ _POSIX_PATH_MAX + 1 ];
      char buffer[ _POSIX_PATH_MAX * 2 + 80 ];

      /* Clear and reinitialize preprocessor state */
      hb_pp_reset( HB_COMP_PARAM->pLex->pPP );

      if( !HB_COMP_PARAM->pFileName->szExtension )
         HB_COMP_PARAM->pFileName->szExtension = ".prg";

      hb_fsFNameMerge( szFileName, HB_COMP_PARAM->pFileName );

      if( !hb_pp_inFile( HB_COMP_PARAM->pLex->pPP, szFileName, FALSE, NULL, FALSE ) )
      {
         snprintf( buffer, sizeof( buffer ),
                   "Cannot open %s, assumed external\n", szFileName );
         hb_compOutErr( HB_COMP_PARAM, buffer );
         iStatus = EXIT_FAILURE;
      }
      else if( HB_COMP_PARAM->fPPT )
      {
         HB_COMP_PARAM->pFileName->szExtension = ".ppt";
         hb_fsFNameMerge( szPpoName, HB_COMP_PARAM->pFileName );
         if( !hb_pp_traceFile( HB_COMP_PARAM->pLex->pPP, szPpoName, NULL ) )
            iStatus = EXIT_FAILURE;
      }
      if( HB_COMP_PARAM->fPPO && iStatus == EXIT_SUCCESS )
      {
         HB_COMP_PARAM->pFileName->szExtension = ".ppo";
         hb_fsFNameMerge( szPpoName, HB_COMP_PARAM->pFileName );
         if( !hb_pp_outFile( HB_COMP_PARAM->pLex->pPP, szPpoName, NULL ) )
            iStatus = EXIT_FAILURE;
      }

      if( iStatus == EXIT_SUCCESS && !HB_COMP_PARAM->fExit )
      {
         HB_COMP_PARAM->currModule =
            hb_compIdentifierNew( HB_COMP_PARAM, szFileName, HB_IDENT_COPY );
         HB_COMP_PARAM->currLine = 1;

         if( ! HB_COMP_PARAM->fQuiet )
         {
            if( HB_COMP_PARAM->fPPO )
               snprintf( buffer, sizeof( buffer ),
                         "Compiling module '%s' and generating preprocessed output to '%s'...\n",
                         szFileName, szPpoName );
            else
               snprintf( buffer, sizeof( buffer ),
                         "Compiling module '%s'...\n", szFileName );
            hb_compOutStd( HB_COMP_PARAM, buffer );
         }

         /* Generate the starting procedure frame */
         if( HB_COMP_PARAM->fStartProc )
            hb_compFunctionAdd( HB_COMP_PARAM, hb_compIdentifierNew( HB_COMP_PARAM, hb_strupr( hb_strdup( HB_COMP_PARAM->pFileName->szName ) ), HB_IDENT_FREE ), HB_FS_PUBLIC, FUN_PROCEDURE );
         else if( iFileType != HB_COMP_SINGLEFILE )
            hb_compFunctionAdd( HB_COMP_PARAM, "", 0, FUN_PROCEDURE );

         if( !HB_COMP_PARAM->fExit )
         {
            int i = HB_COMP_PARAM->iExitLevel ;
            BOOL b = HB_COMP_PARAM->fAnyWarning;

            hb_compparse( HB_COMP_PARAM );

            HB_COMP_PARAM->iExitLevel = ( i > HB_COMP_PARAM->iExitLevel ? i : HB_COMP_PARAM->iExitLevel );
            HB_COMP_PARAM->fAnyWarning = ( b ? b : HB_COMP_PARAM->fAnyWarning );
         }

         if( HB_COMP_PARAM->fAnyWarning )
         {
            if( HB_COMP_PARAM->iExitLevel == HB_EXITLEVEL_SETEXIT )
            {
               iStatus = EXIT_FAILURE;
            }
            else if( HB_COMP_PARAM->iExitLevel == HB_EXITLEVEL_DELTARGET )
            {
               iStatus = EXIT_FAILURE;
               *pbSkipGen = TRUE;
               hb_compOutStd( HB_COMP_PARAM, "\nNo code generated.\n" );
            }
         }
      }
   }
   else
   {
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADFILENAME, szPrg, NULL );
      iStatus = EXIT_FAILURE;
   }

   hb_xfree( HB_COMP_PARAM->pFileName );
   HB_COMP_PARAM->pFileName = pMainFileName;

   return HB_COMP_PARAM->fExit ? EXIT_FAILURE : iStatus;
}
hbmain.c4479
hbopt.c
TypeFunctionSourceLine
STATIC HB_OPT_FUNC(hb_p_poplocal )
static HB_OPT_FUNC( hb_p_poplocal )
{
   BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
   SHORT iVar = HB_PCODE_MKSHORT( pVar );

   HB_SYMBOL_UNUSED( cargo );

   if( HB_LIM_INT8( iVar ) )
   {
      pFunc->pCode[ lPCodePos ] = HB_P_POPLOCALNEAR;
      hb_compNOOPfill( pFunc, lPCodePos + 2, 1, FALSE, FALSE );
   }

   return 3;
}
hbopt.c66
STATIC HB_OPT_FUNC(hb_p_pushlocal )
static HB_OPT_FUNC( hb_p_pushlocal )
{
   BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
   SHORT iVar = HB_PCODE_MKSHORT( pVar );

   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POPLOCAL &&
      HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 4 ] ) == iVar &&
      ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 6, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POPLOCALNEAR &&
            ( SCHAR ) pFunc->pCode[ lPCodePos + 4 ] == iVar &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 5, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POP &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
   }
   else if( HB_LIM_INT8( iVar ) )
   {
      pFunc->pCode[ lPCodePos ] = HB_P_PUSHLOCALNEAR;
      hb_compNOOPfill( pFunc, lPCodePos + 2, 1, FALSE, FALSE );
   }

   return 3;
}
hbopt.c82
STATIC HB_OPT_FUNC(hb_p_pushlocalnear )
static HB_OPT_FUNC( hb_p_pushlocalnear )
{
   if( pFunc->pCode[ lPCodePos + 2 ] == HB_P_POPLOCAL &&
      ( SCHAR ) pFunc->pCode[ lPCodePos + 1 ] ==
      HB_PCODE_MKSHORT( &pFunc->pCode[ lPCodePos + 3 ] ) &&
      ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 2 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 5, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 2 ] == HB_P_POPLOCALNEAR &&
            pFunc->pCode[ lPCodePos + 1 ] == pFunc->pCode[ lPCodePos + 3 ] &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 2 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 2 ] == HB_P_POP &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 2 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 3, FALSE, FALSE );
   }

   return 2;
}
hbopt.c113
STATIC HB_OPT_FUNC(hb_p_localaddint )
static HB_OPT_FUNC( hb_p_localaddint )
{
   BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
   SHORT iVar = HB_PCODE_MKSHORT( pVar );

   HB_SYMBOL_UNUSED( cargo );

   if( HB_LIM_INT8( iVar ) )
   {
      pVar[ 0 ] = HB_P_LOCALNEARADDINT;
      pVar[ 1 ] = HB_LOBYTE( iVar );
      hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
   }

   return 5;
}
hbopt.c137
STATIC HB_OPT_FUNC(hb_p_pushstatic )
static HB_OPT_FUNC( hb_p_pushstatic )
{
   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POPSTATIC &&
       HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ==
       HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 4 ] ) &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 6, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POP &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
   }

   return 3;
}
hbopt.c154
STATIC HB_OPT_FUNC(hb_p_pushmemvar )
static HB_OPT_FUNC( hb_p_pushmemvar )
{
   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POPMEMVAR &&
       HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) ==
       HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 4 ] ) &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 6, FALSE, FALSE );
   }
   else if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_POP &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
   }

   return 3;
}
hbopt.c172
STATIC HB_OPT_FUNC(hb_p_pushnil )
static HB_OPT_FUNC( hb_p_pushnil )
{
   if( pFunc->pCode[ lPCodePos + 1 ] == HB_P_POP &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 2, FALSE, FALSE );
   }

   return 1;
}
hbopt.c190
STATIC HB_OPT_FUNC(hb_p_false )
static HB_OPT_FUNC( hb_p_false )
{
   switch( pFunc->pCode[ lPCodePos + 1 ] )
   {
      case HB_P_POP:
      case HB_P_NOT:
      case HB_P_JUMPFALSENEAR:
      case HB_P_JUMPFALSE:
      case HB_P_JUMPFALSEFAR:
      case HB_P_JUMPTRUENEAR:
      case HB_P_JUMPTRUE:
      case HB_P_JUMPTRUEFAR:
         if( ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) )
         {
            int iCount = 1;

            switch( pFunc->pCode[ lPCodePos + 1 ] )
            {
               case HB_P_JUMPFALSENEAR:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMPNEAR;
                  break;
               case HB_P_JUMPFALSE:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMP;
                  break;
               case HB_P_JUMPFALSEFAR:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMPFAR;
                  break;
               case HB_P_NOT:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_TRUE;
                  break;
               case HB_P_POP:
                  iCount = 2;
                  break;
               case HB_P_JUMPTRUENEAR:
                  iCount = 3;
                  break;
               case HB_P_JUMPTRUE:
                  iCount = 4;
                  break;
               case HB_P_JUMPTRUEFAR:
                  iCount = 5;
                  break;
            }
            hb_compNOOPfill( pFunc, lPCodePos, iCount, FALSE, FALSE );
         }
         break;
   }
   return 1;
}
hbopt.c201
STATIC HB_OPT_FUNC(hb_p_true )
static HB_OPT_FUNC( hb_p_true )
{
   switch( pFunc->pCode[ lPCodePos + 1 ] )
   {
      case HB_P_POP:
      case HB_P_NOT:
      case HB_P_JUMPTRUENEAR:
      case HB_P_JUMPTRUE:
      case HB_P_JUMPTRUEFAR:
      case HB_P_JUMPFALSENEAR:
      case HB_P_JUMPFALSE:
      case HB_P_JUMPFALSEFAR:
         if( ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) )
         {
            int iCount = 1;
   
            switch( pFunc->pCode[ lPCodePos + 1 ] )
            {
               case HB_P_JUMPTRUENEAR:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMPNEAR;
                  break;
               case HB_P_JUMPTRUE:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMP;
                  break;
               case HB_P_JUMPTRUEFAR:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_JUMPFAR;
                  break;
               case HB_P_NOT:
                  pFunc->pCode[ lPCodePos + 1 ] = HB_P_FALSE;
                  break;
               case HB_P_POP:
                  iCount = 2;
                  break;
               case HB_P_JUMPFALSENEAR:
                  iCount = 3;
                  break;
               case HB_P_JUMPFALSE:
                  iCount = 4;
                  break;
               case HB_P_JUMPFALSEFAR:
                  iCount = 5;
                  break;
            }
            hb_compNOOPfill( pFunc, lPCodePos, iCount, FALSE, FALSE );
         }
         break;
   }
   return 1;
}
hbopt.c251
STATIC HB_OPT_FUNC(hb_p_duplicate )
static HB_OPT_FUNC( hb_p_duplicate )
{
   switch( pFunc->pCode[ lPCodePos + 1 ] )
   {
      case HB_P_JUMPTRUEFAR:
      case HB_P_JUMPFALSEFAR:
         if( pFunc->pCode[ lPCodePos + 5 ] == HB_P_POP )
         {
            BYTE * pAddr = &pFunc->pCode[ lPCodePos + 2 ];
            LONG lOffset = HB_PCODE_MKINT24( pAddr ), lLastOffset = 0;
            ULONG ulNewPos = lPCodePos + 1 + lOffset;
            BOOL fNot = FALSE, fRepeat = TRUE;

            do
            {
               if( pFunc->pCode[ ulNewPos ] == HB_P_DUPLICATE )
               {
                  if( lOffset > 0 )
                     hb_p_duplicate( pFunc, ulNewPos, cargo );
               }

               if( pFunc->pCode[ ulNewPos ] == HB_P_NOOP )
               {
                  ulNewPos++;
                  lOffset++;
               }
               else if( pFunc->pCode[ ulNewPos ] == HB_P_NOT )
               {
                  ulNewPos++;
                  lOffset++;
                  fNot = !fNot;
               }
               else if( pFunc->pCode[ ulNewPos ] == HB_P_DUPLICATE &&
                        ( pFunc->pCode[ ulNewPos + 1 ] == HB_P_JUMPTRUEFAR ||
                          pFunc->pCode[ ulNewPos + 1 ] == HB_P_JUMPFALSEFAR ) )
               {
                  LONG lJump;
                  if( pFunc->pCode[ ulNewPos + 1 ] != pFunc->pCode[ lPCodePos + 1 ] )
                     fNot = !fNot;
                  lJump = fNot ? 4 : HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 2 ] );
                  lOffset += lJump + 1;
                  ulNewPos = lPCodePos + 1 + lOffset;
                  fRepeat = lJump > 0;
               }
               else
                  fRepeat = FALSE;

               if( !fNot )
                  lLastOffset = lOffset;
            }
            while( fRepeat );

            if( ( pFunc->pCode[ ulNewPos ] == HB_P_JUMPTRUEFAR ||
                  pFunc->pCode[ ulNewPos ] == HB_P_JUMPFALSEFAR ) &&
                !hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) &&
                !hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 5 ) )
            {
               if( pFunc->pCode[ ulNewPos ] != pFunc->pCode[ lPCodePos + 1 ] )
                  fNot = !fNot;
               if( fNot )
                  lOffset += 4;
               else
                  lOffset += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );

               HB_PUT_LE_UINT24( pAddr, lOffset );
               hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
               hb_compNOOPfill( pFunc, lPCodePos + 5, 1, FALSE, FALSE );
            }
            else if( lLastOffset )
            {
               HB_PUT_LE_UINT24( pAddr, lLastOffset );
            }
         }
         break;
   }
   return 1;
}
hbopt.c301
STATIC HB_OPT_FUNC(hb_p_not )
static HB_OPT_FUNC( hb_p_not )
{
   BYTE opcode;

   switch( pFunc->pCode[ lPCodePos + 1 ] )
   {
      case HB_P_NOT:
         opcode = HB_P_NOOP;
         break;
      case HB_P_JUMPTRUENEAR:
         opcode = HB_P_JUMPFALSENEAR;
         break;
      case HB_P_JUMPTRUE:
         opcode = HB_P_JUMPFALSE;
         break;
      case HB_P_JUMPTRUEFAR:
         opcode = HB_P_JUMPFALSEFAR;
         break;
      case HB_P_JUMPFALSENEAR:
         opcode = HB_P_JUMPTRUENEAR;
         break;
      case HB_P_JUMPFALSE:
         opcode = HB_P_JUMPTRUE;
         break;
      case HB_P_JUMPFALSEFAR:
         opcode = HB_P_JUMPTRUEFAR;
         break;
/* This optimization will be enabled in the future in a little bit differ form */
#if 0
      case HB_P_DUPLICATE:
         if( ( pFunc->pCode[ lPCodePos + 2 ] == HB_P_JUMPTRUEFAR ||
               pFunc->pCode[ lPCodePos + 2 ] == HB_P_JUMPFALSEFAR ) &&
             pFunc->pCode[ lPCodePos + 6 ] == HB_P_POP )
         {
            BYTE * pAddr = &pFunc->pCode[ lPCodePos + 3 ];
            LONG lOffset = HB_PCODE_MKINT24( pAddr );

            if( lOffset > 0 )
            {
               hb_p_duplicate( pFunc, lPCodePos + 1, cargo );
               lOffset = HB_PCODE_MKINT24( pAddr );
            }

            if( ( pFunc->pCode[ lPCodePos + 1 ] == HB_P_NOT ||
                  ( pFunc->pCode[ lPCodePos + 1 ] == HB_P_DUPLICATE &&
                    pFunc->pCode[ lPCodePos + lOffset + 2 ] == HB_P_NOT ) ) &&
                ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) )
            {
               hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
               if( pFunc->pCode[ lPCodePos + 2 ] == HB_P_JUMPTRUEFAR )
                  pFunc->pCode[ lPCodePos + 2 ] = HB_P_JUMPFALSEFAR;
               else
                  pFunc->pCode[ lPCodePos + 2 ] = HB_P_JUMPTRUEFAR;
               if( pFunc->pCode[ lPCodePos + 1 ] == HB_P_DUPLICATE )
               {
                  ++lOffset;
                  HB_PUT_LE_UINT24( pAddr, lOffset );
               }
            }
         }
         /* no break; */
#endif
      default:
         opcode = HB_P_LAST_PCODE;
         break;
   }

   if( opcode < HB_P_LAST_PCODE &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
      if( opcode == HB_P_NOOP )
         hb_compNOOPfill( pFunc, lPCodePos + 1, 1, FALSE, FALSE );
      else
         pFunc->pCode[ lPCodePos + 1 ] = opcode;
   }
   return 1;
}
hbopt.c379
STATIC HB_OPT_FUNC(hb_p_jumpfar )
static HB_OPT_FUNC( hb_p_jumpfar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   LONG lOffset = HB_PCODE_MKINT24( pAddr );
   ULONG ulNewPos = lPCodePos + lOffset;
   BOOL fLine = FALSE;

   HB_SYMBOL_UNUSED( cargo );

   if( lOffset == 4 )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
   }
   else
   {
      if( pFunc->pCode[ ulNewPos ] == HB_P_LINE )
      {
         fLine = TRUE;
         ulNewPos += 3;
         lOffset += 3;
      }
      switch( pFunc->pCode[ ulNewPos ] )
      {
         case HB_P_JUMPFAR:
            lOffset += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );
            if( !fLine || pFunc->pCode[ lPCodePos + lOffset ] == HB_P_LINE )
               HB_PUT_LE_UINT24( pAddr, lOffset );
            break;

         case HB_P_JUMPFALSEFAR:
            ulNewPos += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );
            if( ulNewPos == lPCodePos + 4 && ( !fLine ||
                ( pFunc->pCode[ ulNewPos ] == HB_P_LINE &&
                  pFunc->pCode[ lPCodePos + lOffset + 4 ] == HB_P_LINE ) ) )
            {
               pFunc->pCode[ lPCodePos ] = HB_P_JUMPTRUEFAR;
               HB_PUT_LE_UINT24( pAddr, lOffset + 4 );
            }
            break;

         case HB_P_JUMPTRUEFAR:
            ulNewPos += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );
            if( ulNewPos == lPCodePos + 4 && ( !fLine ||
                ( pFunc->pCode[ ulNewPos ] == HB_P_LINE &&
                  pFunc->pCode[ lPCodePos + lOffset + 4 ] == HB_P_LINE ) ) )
            {
               pFunc->pCode[ lPCodePos ] = HB_P_JUMPFALSEFAR;
               HB_PUT_LE_UINT24( pAddr, lOffset + 4 );
            }
            break;
      }
   }
   return 4;
}
hbopt.c458
STATIC HB_OPT_FUNC(hb_p_jumpfalsefar )
static HB_OPT_FUNC( hb_p_jumpfalsefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   LONG lOffset = HB_PCODE_MKINT24( pAddr );
   ULONG ulNewPos = lPCodePos + lOffset;
   BOOL fLine = FALSE;

   HB_SYMBOL_UNUSED( cargo );

   if( lOffset == 8 && pFunc->pCode[ lPCodePos + 4 ] == HB_P_JUMPFAR &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 4 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
      pFunc->pCode[ lPCodePos + 4 ] = HB_P_JUMPTRUEFAR;
   }
   else if( lOffset == 11 && pFunc->pCode[ lPCodePos + 4 ] == HB_P_LINE &&
            pFunc->pCode[ lPCodePos + 11 ] == HB_P_LINE &&
            pFunc->pCode[ lPCodePos + 7 ] == HB_P_JUMPFAR &&
            pFunc->pCode[ lPCodePos + 7 +
               HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 8 ] ) ] == HB_P_LINE &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 4 ) &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 7 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 7, FALSE, FALSE );
      pFunc->pCode[ lPCodePos + 7 ] = HB_P_JUMPTRUEFAR;
   }
   else
   {
      if( pFunc->pCode[ ulNewPos ] == HB_P_LINE )
      {
         fLine = TRUE;
         ulNewPos += 3;
         lOffset += 3;
      }
      if( pFunc->pCode[ ulNewPos ] == HB_P_JUMPFAR )
      {
         lOffset += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );
         if( !fLine || pFunc->pCode[ lPCodePos + lOffset ] == HB_P_LINE )
            HB_PUT_LE_UINT24( pAddr, lOffset );
      }
   }
   return 4;
}
hbopt.c513
STATIC HB_OPT_FUNC(hb_p_jumptruefar )
static HB_OPT_FUNC( hb_p_jumptruefar )
{
   BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ];
   LONG lOffset = HB_PCODE_MKINT24( pAddr );
   ULONG ulNewPos = lPCodePos + lOffset;
   BOOL fLine = FALSE;

   HB_SYMBOL_UNUSED( cargo );

   if( lOffset == 8 && pFunc->pCode[ lPCodePos + 4 ] == HB_P_JUMPFAR &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 4 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 4, FALSE, FALSE );
      pFunc->pCode[ lPCodePos + 4 ] = HB_P_JUMPFALSEFAR;
   }
   else if( lOffset == 11 && pFunc->pCode[ lPCodePos + 4 ] == HB_P_LINE &&
            pFunc->pCode[ lPCodePos + 11 ] == HB_P_LINE &&
            pFunc->pCode[ lPCodePos + 7 ] == HB_P_JUMPFAR &&
            pFunc->pCode[ lPCodePos + 7 +
               HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 8 ] ) ] == HB_P_LINE &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 4 ) &&
            ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 7 ) )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 7, FALSE, FALSE );
      pFunc->pCode[ lPCodePos + 7 ] = HB_P_JUMPFALSEFAR;
   }
   else
   {
      if( pFunc->pCode[ ulNewPos ] == HB_P_LINE )
      {
         fLine = TRUE;
         ulNewPos += 3;
         lOffset += 3;
      }
      if( pFunc->pCode[ ulNewPos ] == HB_P_JUMPFAR )
      {
         lOffset += HB_PCODE_MKINT24( &pFunc->pCode[ ulNewPos + 1 ] );
         if( !fLine || pFunc->pCode[ lPCodePos + lOffset ] == HB_P_LINE )
            HB_PUT_LE_UINT24( pAddr, lOffset );
      }
   }
   return 4;
}
hbopt.c557
STATIC HB_OPT_FUNC(hb_p_switch )
static HB_OPT_FUNC( hb_p_switch )
{
   USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ), us;
   ULONG ulStart = lPCodePos;

   HB_SYMBOL_UNUSED( cargo );

   lPCodePos += 3;
   for( us = 0; us < usCases; ++us )
   {
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_PUSHBYTE:
            lPCodePos += 2;
            break;
         case HB_P_PUSHINT:
            lPCodePos += 3;
            break;
         case HB_P_PUSHLONG:
         case HB_P_PUSHDATE:
            lPCodePos += 5;
            break;
         case HB_P_PUSHLONGLONG:
            lPCodePos += 9;
            break;
         case HB_P_PUSHSTRSHORT:
            lPCodePos += 2 + pFunc->pCode[ lPCodePos + 1 ];
            break;
         case HB_P_PUSHSTR:
            lPCodePos += 3 + HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
            break;
         case HB_P_PUSHSTRLARGE:
            lPCodePos += 4 + HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );
            break;
         case HB_P_PUSHNIL:
            /* default clause */
            us = usCases;
            lPCodePos++;
            break;
      }
      switch( pFunc->pCode[ lPCodePos ] )
      {
         case HB_P_JUMPNEAR:
            lPCodePos += 2;
            break;
         case HB_P_JUMP:
            lPCodePos += 3;
            break;
         /*case HB_P_JUMPFAR:*/
         default:
            lPCodePos += 4;
            break;
      }
   }

   return lPCodePos - ulStart;
}
hbopt.c601
STATIC HB_OPT_FUNC(hb_p_function )
static HB_OPT_FUNC( hb_p_function )
{
   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_RETVALUE &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      pFunc->pCode[ lPCodePos ] = HB_P_DO;
      hb_compNOOPfill( pFunc, lPCodePos + 3, 1, FALSE, FALSE );
   }
   return 3;
}
hbopt.c659
STATIC HB_OPT_FUNC(hb_p_functionshort )
static HB_OPT_FUNC( hb_p_functionshort )
{
   if( pFunc->pCode[ lPCodePos + 2 ] == HB_P_RETVALUE &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 2 ) )
   {
      pFunc->pCode[ lPCodePos ] = HB_P_DOSHORT;
      hb_compNOOPfill( pFunc, lPCodePos + 2, 1, FALSE, FALSE );
   }
   return 2;
}
hbopt.c670
STATIC HB_OPT_FUNC(hb_p_macrofunc )
static HB_OPT_FUNC( hb_p_macrofunc )
{
   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_RETVALUE &&
       ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) )
   {
      pFunc->pCode[ lPCodePos ] = HB_P_MACRODO;
      hb_compNOOPfill( pFunc, lPCodePos + 3, 1, FALSE, FALSE );
   }
   return 3;
}
hbopt.c681
STATIC HB_OPT_FUNC(hb_p_endblock )
static HB_OPT_FUNC( hb_p_endblock )
{
   HB_SYMBOL_UNUSED( cargo );

   if( lPCodePos + 1 < pFunc->lPCodePos &&
       pFunc->pCode[ lPCodePos + 1 ] == HB_P_ENDBLOCK )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
   }
   return 1;
}
hbopt.c692
STATIC HB_OPT_FUNC(hb_p_endproc )
static HB_OPT_FUNC( hb_p_endproc )
{
   HB_SYMBOL_UNUSED( cargo );

   if( lPCodePos + 1 < pFunc->lPCodePos &&
       pFunc->pCode[ lPCodePos + 1 ] == HB_P_ENDPROC )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 1, FALSE, FALSE );
   }
   return 1;
}

/* NOTE: The  order of functions have to match the order of opcodes mnemonics
 */
static const HB_OPT_FUNC_PTR s_opt_table[] =
{
   NULL,                       /* HB_P_AND,                  */
   NULL,                       /* HB_P_ARRAYPUSH,            */
   NULL,                       /* HB_P_ARRAYPOP,             */
   NULL,                       /* HB_P_ARRAYDIM,             */
   NULL,                       /* HB_P_ARRAYGEN,             */
   NULL,                       /* HB_P_EQUAL,                */
   hb_p_endblock,              /* HB_P_ENDBLOCK,             */
   hb_p_endproc,               /* HB_P_ENDPROC,              */
   NULL,                       /* HB_P_EXACTLYEQUAL,         */
   hb_p_false,                 /* HB_P_FALSE,                */
   NULL,                       /* HB_P_FORTEST,              */
   hb_p_function,              /* HB_P_FUNCTION,             */
   hb_p_functionshort,         /* HB_P_FUNCTIONSHORT,        */
   NULL,                       /* HB_P_FRAME,                */
   NULL,                       /* HB_P_FUNCPTR,              */
   NULL,                       /* HB_P_GREATER,              */
   NULL,                       /* HB_P_GREATEREQUAL,         */
   NULL,                       /* HB_P_DEC,                  */
   NULL,                       /* HB_P_DIVIDE,               */
   NULL,                       /* HB_P_DO,                   */
   NULL,                       /* HB_P_DOSHORT,              */
   hb_p_duplicate,             /* HB_P_DUPLICATE,            */
   NULL,                       /* HB_P_DUPLTWO,              */
   NULL,                       /* HB_P_INC,                  */
   NULL,                       /* HB_P_INSTRING,             */
   NULL,                       /* HB_P_JUMPNEAR,             */
   NULL,                       /* HB_P_JUMP,                 */
   hb_p_jumpfar,               /* HB_P_JUMPFAR,              */
   NULL,                       /* HB_P_JUMPFALSENEAR,        */
   NULL,                       /* HB_P_JUMPFALSE,            */
   hb_p_jumpfalsefar,          /* HB_P_JUMPFALSEFAR,         */
   NULL,                       /* HB_P_JUMPTRUENEAR,         */
   NULL,                       /* HB_P_JUMPTRUE,             */
   hb_p_jumptruefar,           /* HB_P_JUMPTRUEFAR,          */
   NULL,                       /* HB_P_LESSEQUAL,            */
   NULL,                       /* HB_P_LESS,                 */
   NULL,                       /* HB_P_LINE,                 */
   NULL,                       /* HB_P_LOCALNAME,            */
   NULL,                       /* HB_P_MACROPOP,             */
   NULL,                       /* HB_P_MACROPOPALIASED,      */
   NULL,                       /* HB_P_MACROPUSH,            */
   NULL,                       /* HB_P_MACROARRAYGEN,        */
   NULL,                       /* HB_P_MACROPUSHLIST,        */
   NULL,                       /* HB_P_MACROPUSHINDEX,       */
   NULL,                       /* HB_P_MACROPUSHPARE,        */
   NULL,                       /* HB_P_MACROPUSHALIASED,     */
   NULL,                       /* HB_P_MACROSYMBOL,          */
   NULL,                       /* HB_P_MACROTEXT,            */
   NULL,                       /* HB_P_MESSAGE,              */
   NULL,                       /* HB_P_MINUS,                */
   NULL,                       /* HB_P_MODULUS,              */
   NULL,                       /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   NULL,                       /* HB_P_MMESSAGE,             */
   NULL,                       /* HB_P_MPOPALIASEDFIELD,     */
   NULL,                       /* HB_P_MPOPALIASEDVAR,       */
   NULL,                       /* HB_P_MPOPFIELD,            */
   NULL,                       /* HB_P_MPOPMEMVAR,           */
   NULL,                       /* HB_P_MPUSHALIASEDFIELD,    */
   NULL,                       /* HB_P_MPUSHALIASEDVAR,      */
   NULL,                       /* HB_P_MPUSHBLOCK,           */
   NULL,                       /* HB_P_MPUSHFIELD,           */
   NULL,                       /* HB_P_MPUSHMEMVAR,          */
   NULL,                       /* HB_P_MPUSHMEMVARREF,       */
   NULL,                       /* HB_P_MPUSHSYM,             */
   NULL,                       /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   NULL,                       /* HB_P_MULT,                 */
   NULL,                       /* HB_P_NEGATE,               */
   NULL,                       /* HB_P_NOOP,                 */
   hb_p_not,                   /* HB_P_NOT,                  */
   NULL,                       /* HB_P_NOTEQUAL,             */
   NULL,                       /* HB_P_OR,                   */
   NULL,                       /* HB_P_PARAMETER,            */
   NULL,                       /* HB_P_PLUS,                 */
   NULL,                       /* HB_P_POP,                  */
   NULL,                       /* HB_P_POPALIAS,             */
   NULL,                       /* HB_P_POPALIASEDFIELD,      */
   NULL,                       /* HB_P_POPALIASEDFIELDNEAR,  */
   NULL,                       /* HB_P_POPALIASEDVAR,        */
   NULL,                       /* HB_P_POPFIELD,             */
   hb_p_poplocal,              /* HB_P_POPLOCAL,             */
   NULL,                       /* HB_P_POPLOCALNEAR,         */
   NULL,                       /* HB_P_POPMEMVAR,            */
   NULL,                       /* HB_P_POPSTATIC,            */
   NULL,                       /* HB_P_POPVARIABLE,          */
   NULL,                       /* HB_P_POWER,                */
   NULL,                       /* HB_P_PUSHALIAS,            */
   NULL,                       /* HB_P_PUSHALIASEDFIELD,     */
   NULL,                       /* HB_P_PUSHALIASEDFIELDNEAR, */
   NULL,                       /* HB_P_PUSHALIASEDVAR,       */
   NULL,                       /* HB_P_PUSHBLOCK,            */
   NULL,                       /* HB_P_PUSHBLOCKSHORT,       */
   NULL,                       /* HB_P_PUSHFIELD,            */
   NULL,                       /* HB_P_PUSHBYTE,             */
   NULL,                       /* HB_P_PUSHINT,              */
   hb_p_pushlocal,             /* HB_P_PUSHLOCAL,            */
   hb_p_pushlocalnear,         /* HB_P_PUSHLOCALNEAR,        */
   NULL,                       /* HB_P_PUSHLOCALREF,         */
   NULL,                       /* HB_P_PUSHLONG,             */
   hb_p_pushmemvar,            /* HB_P_PUSHMEMVAR,           */
   NULL,                       /* HB_P_PUSHMEMVARREF,        */
   hb_p_pushnil,               /* HB_P_PUSHNIL,              */
   NULL,                       /* HB_P_PUSHDOUBLE,           */
   NULL,                       /* HB_P_PUSHSELF,             */
   hb_p_pushstatic,            /* HB_P_PUSHSTATIC,           */
   NULL,                       /* HB_P_PUSHSTATICREF,        */
   NULL,                       /* HB_P_PUSHSTR,              */
   NULL,                       /* HB_P_PUSHSTRSHORT,         */
   NULL,                       /* HB_P_PUSHSYM,              */
   NULL,                       /* HB_P_PUSHSYMNEAR,          */
   NULL,                       /* HB_P_PUSHVARIABLE,         */
   NULL,                       /* HB_P_RETVALUE,             */
   NULL,                       /* HB_P_SEND,                 */
   NULL,                       /* HB_P_SENDSHORT,            */
   NULL,                       /* HB_P_SEQBEGIN,             */
   NULL,                       /* HB_P_SEQEND,               */
   NULL,                       /* HB_P_SEQRECOVER,           */
   NULL,                       /* HB_P_SFRAME,               */
   NULL,                       /* HB_P_STATICS,              */
   NULL,                       /* HB_P_STATICNAME,           */
   NULL,                       /* HB_P_SWAPALIAS,            */
   hb_p_true,                  /* HB_P_TRUE,                 */
   NULL,                       /* HB_P_ZERO,                 */
   NULL,                       /* HB_P_ONE,                  */
   hb_p_macrofunc,             /* HB_P_MACROFUNC,            */
   NULL,                       /* HB_P_MACRODO,              */
   NULL,                       /* HB_P_MPUSHSTR,             */
   NULL,                       /* HB_P_LOCALNEARADDINT,      */
   NULL,                       /* HB_P_MACROPUSHREF          */
   NULL,                       /* HB_P_PUSHLONGLONG          */
   NULL,                       /* HB_P_ENUMSTART             */
   NULL,                       /* HB_P_ENUMNEXT              */
   NULL,                       /* HB_P_ENUMPREV              */
   NULL,                       /* HB_P_ENUMEND               */
   hb_p_switch,                /* HB_P_SWITCH                */
   NULL,                       /* HB_P_PUSHDATE              */
   NULL,                       /* HB_P_PLUSEQPOP             */
   NULL,                       /* HB_P_MINUSEQPOP            */
   NULL,                       /* HB_P_MULTEQPOP             */
   NULL,                       /* HB_P_DIVEQPOP              */
   NULL,                       /* HB_P_PLUSEQ                */
   NULL,                       /* HB_P_MINUSEQ               */
   NULL,                       /* HB_P_MULTEQ                */
   NULL,                       /* HB_P_DIVEQ                 */
   NULL,                       /* HB_P_WITHOBJECTSTART       */
   NULL,                       /* HB_P_WITHOBJECTMESSAGE     */
   NULL,                       /* HB_P_WITHOBJECTEND         */
   NULL,                       /* HB_P_MACROSEND             */
   NULL,                       /* HB_P_PUSHOVARREF           */
   NULL,                       /* HB_P_ARRAYPUSHREF          */
   NULL,                       /* HB_P_VFRAME                */
   NULL,                       /* HB_P_LARGEFRAME            */
   NULL,                       /* HB_P_LARGEVFRAME           */
   NULL,                       /* HB_P_PUSHSTRHIDDEN         */
   hb_p_localaddint,           /* HB_P_LOCALADDINT           */
   NULL,                       /* HB_P_MODEQPOP              */
   NULL,                       /* HB_P_EXPEQPOP              */
   NULL,                       /* HB_P_MODEQ                 */
   NULL,                       /* HB_P_EXPEQ                 */
   NULL,                       /* HB_P_DUPLUNREF             */
   NULL,                       /* HB_P_MPUSHBLOCKLARGE       */
   NULL,                       /* HB_P_MPUSHSTRLARGE         */
   NULL,                       /* HB_P_PUSHBLOCKLARGE        */
   NULL,                       /* HB_P_PUSHSTRLARGE          */
   NULL,                       /* HB_P_SWAP                  */
   NULL,                       /* HB_P_PUSHVPARAMS           */
   NULL,                       /* HB_P_PUSHUNREF             */
   NULL,                       /* HB_P_SEQALWAYS             */
   NULL,                       /* HB_P_ALWAYSBEGIN           */
   NULL,                       /* HB_P_ALWAYSEND             */
   NULL,                       /* HB_P_DECEQPOP              */
   NULL,                       /* HB_P_INCEQPOP              */
   NULL,                       /* HB_P_DECEQ                 */
   NULL,                       /* HB_P_INCEQ                 */
   NULL,                       /* HB_P_LOCALDEC              */
   NULL,                       /* HB_P_LOCALINC              */
   NULL,                       /* HB_P_LOCALINCPUSH          */
   NULL,                       /* HB_P_PUSHFUNCSYM           */
   NULL,                       /* HB_P_HASHGEN               */
   NULL,                       /* HB_P_SEQBLOCK              */
   NULL                        /* HB_P_THREADSTATICS         */
};
hbopt.c704
VOIDhb_compOptimizePCode( HB_COMP_DECL, PFUNCTION pFunc )
void hb_compOptimizePCode( HB_COMP_DECL, PFUNCTION pFunc )
{
   const HB_OPT_FUNC_PTR * pFuncTable = s_opt_table;
   HB_OPT_INFO opt_info;

   opt_info.HB_COMP_PARAM = HB_COMP_PARAM;
   assert( HB_P_LAST_PCODE == sizeof( s_opt_table ) / sizeof( HB_OPT_FUNC_PTR ) );

   hb_compPCodeEval( pFunc, ( const HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) &opt_info );
}
hbopt.c904
hbpcode.c
TypeFunctionSourceLine
STATIC HB_PSIZE_FUNC(hb_p_pushstrshort )
static HB_PSIZE_FUNC( hb_p_pushstrshort )
{
   HB_SYMBOL_UNUSED( cargo );
   return 2 + pFunc->pCode[ lPCodePos + 1 ];
}
hbpcode.c45
STATIC HB_PSIZE_FUNC(hb_p_pushstr )
static HB_PSIZE_FUNC( hb_p_pushstr )
{
   HB_SYMBOL_UNUSED( cargo );
   return 3 + HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbpcode.c54
STATIC HB_PSIZE_FUNC(hb_p_pushstrlarge )
static HB_PSIZE_FUNC( hb_p_pushstrlarge )
{
   HB_SYMBOL_UNUSED( cargo );
   return 4 + HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbpcode.c60
STATIC HB_PSIZE_FUNC(hb_p_pushstrhidden )
static HB_PSIZE_FUNC( hb_p_pushstrhidden )
{
   HB_SYMBOL_UNUSED( cargo );
   return 4 + HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 2 ] );
}
hbpcode.c66
STATIC HB_PSIZE_FUNC(hb_p_pushblock )
static HB_PSIZE_FUNC( hb_p_pushblock )
{
   HB_SYMBOL_UNUSED( cargo );
   return HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbpcode.c72
STATIC HB_PSIZE_FUNC(hb_p_pushblockshort )
static HB_PSIZE_FUNC( hb_p_pushblockshort )
{
   HB_SYMBOL_UNUSED( cargo );
   return pFunc->pCode[ lPCodePos + 1 ];
}
hbpcode.c78
STATIC HB_PSIZE_FUNC(hb_p_pushblocklarge )
static HB_PSIZE_FUNC( hb_p_pushblocklarge )
{
   HB_SYMBOL_UNUSED( cargo );
   return HB_PCODE_MKUINT24( &pFunc->pCode[ lPCodePos + 1 ] );
}
hbpcode.c84
STATIC HB_PSIZE_FUNC(hb_p_localname )
static HB_PSIZE_FUNC( hb_p_localname )
{
   ULONG ulStart = lPCodePos;

   HB_SYMBOL_UNUSED( cargo );
   lPCodePos += 3;
   while( pFunc->pCode[ lPCodePos++ ] ) {};

   return ( lPCodePos - ulStart );
}
hbpcode.c90
STATIC HB_PSIZE_FUNC(hb_p_modulename )
static HB_PSIZE_FUNC( hb_p_modulename )
{
   ULONG ulStart = lPCodePos;

   HB_SYMBOL_UNUSED( cargo );
   lPCodePos += 3;
   while( pFunc->pCode[ lPCodePos++ ]) {};

   return ( lPCodePos - ulStart );
}
hbpcode.c101
STATIC HB_PSIZE_FUNC(hb_p_staticname )
static HB_PSIZE_FUNC( hb_p_staticname )
{
   ULONG ulStart = lPCodePos;

   HB_SYMBOL_UNUSED( cargo );
   lPCodePos += 4;
   while( pFunc->pCode[ lPCodePos++ ] ) {};

   return ( lPCodePos - ulStart );
}
hbpcode.c112
STATIC HB_PSIZE_FUNC(hb_p_threadstatics )
static HB_PSIZE_FUNC( hb_p_threadstatics )
{
   HB_SYMBOL_UNUSED( cargo );
   return 3 + ( ( ULONG ) HB_PCODE_MKUSHORT( &pFunc->pCode[ lPCodePos + 1 ] ) << 1 );
}

const BYTE hb_comp_pcode_len[] = {
   1,        /* HB_P_AND,                  */
   1,        /* HB_P_ARRAYPUSH,            */
   1,        /* HB_P_ARRAYPOP,             */
   3,        /* HB_P_ARRAYDIM,             */
   3,        /* HB_P_ARRAYGEN,             */
   1,        /* HB_P_EQUAL,                */
   1,        /* HB_P_ENDBLOCK,             */
   1,        /* HB_P_ENDPROC,              */
   1,        /* HB_P_EXACTLYEQUAL,         */
   1,        /* HB_P_FALSE,                */
   1,        /* HB_P_FORTEST,              */
   3,        /* HB_P_FUNCTION,             */
   2,        /* HB_P_FUNCTIONSHORT,        */
   3,        /* HB_P_FRAME,                */
   1,        /* HB_P_FUNCPTR,              */
   1,        /* HB_P_GREATER,              */
   1,        /* HB_P_GREATEREQUAL,         */
   1,        /* HB_P_DEC,                  */
   1,        /* HB_P_DIVIDE,               */
   3,        /* HB_P_DO,                   */
   2,        /* HB_P_DOSHORT,              */
   1,        /* HB_P_DUPLICATE,            */
   1,        /* HB_P_DUPLTWO,              */
   1,        /* HB_P_INC,                  */
   1,        /* HB_P_INSTRING,             */
   2,        /* HB_P_JUMPNEAR,             */
   3,        /* HB_P_JUMP,                 */
   4,        /* HB_P_JUMPFAR,              */
   2,        /* HB_P_JUMPFALSENEAR,        */
   3,        /* HB_P_JUMPFALSE,            */
   4,        /* HB_P_JUMPFALSEFAR,         */
   2,        /* HB_P_JUMPTRUENEAR,         */
   3,        /* HB_P_JUMPTRUE,             */
   4,        /* HB_P_JUMPTRUEFAR,          */
   1,        /* HB_P_LESSEQUAL,            */
   1,        /* HB_P_LESS,                 */
   3,        /* HB_P_LINE,                 */
   0,        /* HB_P_LOCALNAME,            */
   2,        /* HB_P_MACROPOP,             */
   2,        /* HB_P_MACROPOPALIASED,      */
   2,        /* HB_P_MACROPUSH,            */
   3,        /* HB_P_MACROARRAYGEN,        */
   2,        /* HB_P_MACROPUSHLIST,        */
   1,        /* HB_P_MACROPUSHINDEX,       */
   2,        /* HB_P_MACROPUSHPARE,        */
   2,        /* HB_P_MACROPUSHALIASED,     */
   1,        /* HB_P_MACROSYMBOL,          */
   1,        /* HB_P_MACROTEXT,            */
   3,        /* HB_P_MESSAGE,              */
   1,        /* HB_P_MINUS,                */
   1,        /* HB_P_MODULUS,              */
   0,        /* HB_P_MODULENAME,           */
             /* start: pcodes generated by macro compiler */
   3,        /* HB_P_MMESSAGE,             */
   3,        /* HB_P_MPOPALIASEDFIELD,     */
   3,        /* HB_P_MPOPALIASEDVAR,       */
   3,        /* HB_P_MPOPFIELD,            */
   3,        /* HB_P_MPOPMEMVAR,           */
   3,        /* HB_P_MPUSHALIASEDFIELD,    */
   3,        /* HB_P_MPUSHALIASEDVAR,      */
   0,        /* HB_P_MPUSHBLOCK,           */
   3,        /* HB_P_MPUSHFIELD,           */
   3,        /* HB_P_MPUSHMEMVAR,          */
   3,        /* HB_P_MPUSHMEMVARREF,       */
   3,        /* HB_P_MPUSHSYM,             */
   3,        /* HB_P_MPUSHVARIABLE,        */
             /* end: */
   1,        /* HB_P_MULT,                 */
   1,        /* HB_P_NEGATE,               */
   1,        /* HB_P_NOOP,                 */
   1,        /* HB_P_NOT,                  */
   1,        /* HB_P_NOTEQUAL,             */
   1,        /* HB_P_OR,                   */
   4,        /* HB_P_PARAMETER,            */
   1,        /* HB_P_PLUS,                 */
   1,        /* HB_P_POP,                  */
   1,        /* HB_P_POPALIAS,             */
   3,        /* HB_P_POPALIASEDFIELD,      */
   2,        /* HB_P_POPALIASEDFIELDNEAR,  */
   3,        /* HB_P_POPALIASEDVAR,        */
   3,        /* HB_P_POPFIELD,             */
   3,        /* HB_P_POPLOCAL,             */
   2,        /* HB_P_POPLOCALNEAR,         */
   3,        /* HB_P_POPMEMVAR,            */
   3,        /* HB_P_POPSTATIC,            */
   3,        /* HB_P_POPVARIABLE,          */
   1,        /* HB_P_POWER,                */
   1,        /* HB_P_PUSHALIAS,            */
   3,        /* HB_P_PUSHALIASEDFIELD,     */
   2,        /* HB_P_PUSHALIASEDFIELDNEAR, */
   3,        /* HB_P_PUSHALIASEDVAR,       */
   0,        /* HB_P_PUSHBLOCK,            */
   0,        /* HB_P_PUSHBLOCKSHORT,       */
   3,        /* HB_P_PUSHFIELD,            */
   2,        /* HB_P_PUSHBYTE,             */
   3,        /* HB_P_PUSHINT,              */
   3,        /* HB_P_PUSHLOCAL,            */
   2,        /* HB_P_PUSHLOCALNEAR,        */
   3,        /* HB_P_PUSHLOCALREF,         */
   5,        /* HB_P_PUSHLONG,             */
   3,        /* HB_P_PUSHMEMVAR,           */
   3,        /* HB_P_PUSHMEMVARREF,        */
   1,        /* HB_P_PUSHNIL,              */
   1 + sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE ),        /* HB_P_PUSHDOUBLE,           */
   1,        /* HB_P_PUSHSELF,             */
   3,        /* HB_P_PUSHSTATIC,           */
   3,        /* HB_P_PUSHSTATICREF,        */
   0,        /* HB_P_PUSHSTR,              */
   0,        /* HB_P_PUSHSTRSHORT,         */
   3,        /* HB_P_PUSHSYM,              */
   2,        /* HB_P_PUSHSYMNEAR,          */
   3,        /* HB_P_PUSHVARIABLE,         */
   1,        /* HB_P_RETVALUE,             */
   3,        /* HB_P_SEND,                 */
   2,        /* HB_P_SENDSHORT,            */
   4,        /* HB_P_SEQBEGIN,             */
   4,        /* HB_P_SEQEND,               */
   1,        /* HB_P_SEQRECOVER,           */
   3,        /* HB_P_SFRAME,               */
   5,        /* HB_P_STATICS,              */
   0,        /* HB_P_STATICNAME,           */
   1,        /* HB_P_SWAPALIAS,            */
   1,        /* HB_P_TRUE,                 */
   1,        /* HB_P_ZERO,                 */
   1,        /* HB_P_ONE,                  */
   3,        /* HB_P_MACROFUNC,            */
   3,        /* HB_P_MACRODO,              */
   0,        /* HB_P_MPUSHSTR              */
   4,        /* HB_P_LOCALNEARADDINT,      */
   1,        /* HB_P_MACROPUSHREF          */
   9,        /* HB_P_PUSHLONGLONG          */
   3,        /* HB_P_ENUMSTART             */
   1,        /* HB_P_ENUMNEXT              */
   1,        /* HB_P_ENUMPREV              */
   1,        /* HB_P_ENUMEND               */
   3,        /* HB_P_SWITCH                */
   5,        /* HB_P_PUSHDATE,             */
             /* optimalization of inlined math operations */
   1,        /* HB_P_PLUSEQPOP,            */
   1,        /* HB_P_MINUSEQPOP,           */
   1,        /* HB_P_MULTEQPOP,            */
   1,        /* HB_P_DIVEQPOP,             */
   1,        /* HB_P_PLUSEQ,               */
   1,        /* HB_P_MINUSEQ,              */
   1,        /* HB_P_MULTEQ,               */
   1,        /* HB_P_DIVEQ,                */
   1,        /* HB_P_WITHOBJECTSTART,      */
   3,        /* HB_P_WITHOBJECTMESSAGE,    */
   1,        /* HB_P_WITHOBJECTEND,        */
   3,        /* HB_P_MACROSEND,            */
   1,        /* HB_P_PUSHOVARREF,          */
   1,        /* HB_P_ARRAYPUSHREF          */
   3,        /* HB_P_VFRAME                */
   4,        /* HB_P_LARGEFRAME            */
   4,        /* HB_P_LARGEVFRAME           */
   0,        /* HB_P_PUSHSTRHIDDEN         */
   5,        /* HB_P_LOCALADDINT           */
   1,        /* HB_P_MODEQPOP              */
   1,        /* HB_P_EXPEQPOP              */
   1,        /* HB_P_MODEQ                 */
   1,        /* HB_P_EXPEQ                 */
   1,        /* HB_P_DUPLUNREF             */
   0,        /* HB_P_MPUSHBLOCKLARGE,      */
   0,        /* HB_P_MPUSHSTRLARGE         */
   0,        /* HB_P_PUSHBLOCKLAREG,       */
   0,        /* HB_P_PUSHSTRLARGE          */
   2,        /* HB_P_SWAP                  */
   1,        /* HB_P_PUSHVPARAMS           */
   1,        /* HB_P_PUSHUNREF             */
   4,        /* HB_P_SEQALWAYS             */
   4,        /* HB_P_ALWAYSBEGIN           */
   1,        /* HB_P_ALWAYSEND             */
   1,        /* HB_P_DECEQPOP              */
   1,        /* HB_P_INCEQPOP              */
   1,        /* HB_P_DECEQ                 */
   1,        /* HB_P_INCEQ                 */
   3,        /* HB_P_LOCALDEC              */
   3,        /* HB_P_LOCALINC              */
   3,        /* HB_P_LOCALINCPUSH          */
   3,        /* HB_P_PUSHFUNCSYM           */
   3,        /* HB_P_HASHGEN               */
   1,        /* HB_P_SEQBLOCK              */
   0         /* HB_P_THREADSTATICS         */
};

/*
 * this table has pointers to functions which count
 * real size of variable size PCODEs
 */
static HB_PCODE_FUNC_PTR s_psize_table[] =
{
   NULL,                       /* HB_P_AND,                  */
   NULL,                       /* HB_P_ARRAYPUSH,            */
   NULL,                       /* HB_P_ARRAYPOP,             */
   NULL,                       /* HB_P_ARRAYDIM,             */
   NULL,                       /* HB_P_ARRAYGEN,             */
   NULL,                       /* HB_P_EQUAL,                */
   NULL,                       /* HB_P_ENDBLOCK,             */
   NULL,                       /* HB_P_ENDPROC,              */
   NULL,                       /* HB_P_EXACTLYEQUAL,         */
   NULL,                       /* HB_P_FALSE,                */
   NULL,                       /* HB_P_FORTEST,              */
   NULL,                       /* HB_P_FUNCTION,             */
   NULL,                       /* HB_P_FUNCTIONSHORT,        */
   NULL,                       /* HB_P_FRAME,                */
   NULL,                       /* HB_P_FUNCPTR,              */
   NULL,                       /* HB_P_GREATER,              */
   NULL,                       /* HB_P_GREATEREQUAL,         */
   NULL,                       /* HB_P_DEC,                  */
   NULL,                       /* HB_P_DIVIDE,               */
   NULL,                       /* HB_P_DO,                   */
   NULL,                       /* HB_P_DOSHORT,              */
   NULL,                       /* HB_P_DUPLICATE,            */
   NULL,                       /* HB_P_DUPLTWO,              */
   NULL,                       /* HB_P_INC,                  */
   NULL,                       /* HB_P_INSTRING,             */
   NULL,                       /* HB_P_JUMPNEAR,             */
   NULL,                       /* HB_P_JUMP,                 */
   NULL,                       /* HB_P_JUMPFAR,              */
   NULL,                       /* HB_P_JUMPFALSENEAR,        */
   NULL,                       /* HB_P_JUMPFALSE,            */
   NULL,                       /* HB_P_JUMPFALSEFAR,         */
   NULL,                       /* HB_P_JUMPTRUENEAR,         */
   NULL,                       /* HB_P_JUMPTRUE,             */
   NULL,                       /* HB_P_JUMPTRUEFAR,          */
   NULL,                       /* HB_P_LESSEQUAL,            */
   NULL,                       /* HB_P_LESS,                 */
   NULL,                       /* HB_P_LINE,                 */
   hb_p_localname,             /* HB_P_LOCALNAME,            */
   NULL,                       /* HB_P_MACROPOP,             */
   NULL,                       /* HB_P_MACROPOPALIASED,      */
   NULL,                       /* HB_P_MACROPUSH,            */
   NULL,                       /* HB_P_MACROARRAYGEN,        */
   NULL,                       /* HB_P_MACROPUSHLIST,        */
   NULL,                       /* HB_P_MACROPUSHINDEX,       */
   NULL,                       /* HB_P_MACROPUSHPARE,        */
   NULL,                       /* HB_P_MACROPUSHALIASED,     */
   NULL,                       /* HB_P_MACROSYMBOL,          */
   NULL,                       /* HB_P_MACROTEXT,            */
   NULL,                       /* HB_P_MESSAGE,              */
   NULL,                       /* HB_P_MINUS,                */
   NULL,                       /* HB_P_MODULUS,              */
   hb_p_modulename,            /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   NULL,                       /* HB_P_MMESSAGE,             */
   NULL,                       /* HB_P_MPOPALIASEDFIELD,     */
   NULL,                       /* HB_P_MPOPALIASEDVAR,       */
   NULL,                       /* HB_P_MPOPFIELD,            */
   NULL,                       /* HB_P_MPOPMEMVAR,           */
   NULL,                       /* HB_P_MPUSHALIASEDFIELD,    */
   NULL,                       /* HB_P_MPUSHALIASEDVAR,      */
   NULL,                       /* HB_P_MPUSHBLOCK,           */
   NULL,                       /* HB_P_MPUSHFIELD,           */
   NULL,                       /* HB_P_MPUSHMEMVAR,          */
   NULL,                       /* HB_P_MPUSHMEMVARREF,       */
   NULL,                       /* HB_P_MPUSHSYM,             */
   NULL,                       /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   NULL,                       /* HB_P_MULT,                 */
   NULL,                       /* HB_P_NEGATE,               */
   NULL,                       /* HB_P_NOOP,                 */
   NULL,                       /* HB_P_NOT,                  */
   NULL,                       /* HB_P_NOTEQUAL,             */
   NULL,                       /* HB_P_OR,                   */
   NULL,                       /* HB_P_PARAMETER,            */
   NULL,                       /* HB_P_PLUS,                 */
   NULL,                       /* HB_P_POP,                  */
   NULL,                       /* HB_P_POPALIAS,             */
   NULL,                       /* HB_P_POPALIASEDFIELD,      */
   NULL,                       /* HB_P_POPALIASEDFIELDNEAR,  */
   NULL,                       /* HB_P_POPALIASEDVAR,        */
   NULL,                       /* HB_P_POPFIELD,             */
   NULL,                       /* HB_P_POPLOCAL,             */
   NULL,                       /* HB_P_POPLOCALNEAR,         */
   NULL,                       /* HB_P_POPMEMVAR,            */
   NULL,                       /* HB_P_POPSTATIC,            */
   NULL,                       /* HB_P_POPVARIABLE,          */
   NULL,                       /* HB_P_POWER,                */
   NULL,                       /* HB_P_PUSHALIAS,            */
   NULL,                       /* HB_P_PUSHALIASEDFIELD,     */
   NULL,                       /* HB_P_PUSHALIASEDFIELDNEAR, */
   NULL,                       /* HB_P_PUSHALIASEDVAR,       */
   hb_p_pushblock,             /* HB_P_PUSHBLOCK,            */
   hb_p_pushblockshort,        /* HB_P_PUSHBLOCKSHORT,       */
   NULL,                       /* HB_P_PUSHFIELD,            */
   NULL,                       /* HB_P_PUSHBYTE,             */
   NULL,                       /* HB_P_PUSHINT,              */
   NULL,                       /* HB_P_PUSHLOCAL,            */
   NULL,                       /* HB_P_PUSHLOCALNEAR,        */
   NULL,                       /* HB_P_PUSHLOCALREF,         */
   NULL,                       /* HB_P_PUSHLONG,             */
   NULL,                       /* HB_P_PUSHMEMVAR,           */
   NULL,                       /* HB_P_PUSHMEMVARREF,        */
   NULL,                       /* HB_P_PUSHNIL,              */
   NULL,                       /* HB_P_PUSHDOUBLE,           */
   NULL,                       /* HB_P_PUSHSELF,             */
   NULL,                       /* HB_P_PUSHSTATIC,           */
   NULL,                       /* HB_P_PUSHSTATICREF,        */
   hb_p_pushstr,               /* HB_P_PUSHSTR,              */
   hb_p_pushstrshort,          /* HB_P_PUSHSTRSHORT,         */
   NULL,                       /* HB_P_PUSHSYM,              */
   NULL,                       /* HB_P_PUSHSYMNEAR,          */
   NULL,                       /* HB_P_PUSHVARIABLE,         */
   NULL,                       /* HB_P_RETVALUE,             */
   NULL,                       /* HB_P_SEND,                 */
   NULL,                       /* HB_P_SENDSHORT,            */
   NULL,                       /* HB_P_SEQBEGIN,             */
   NULL,                       /* HB_P_SEQEND,               */
   NULL,                       /* HB_P_SEQRECOVER,           */
   NULL,                       /* HB_P_SFRAME,               */
   NULL,                       /* HB_P_STATICS,              */
   hb_p_staticname,            /* HB_P_STATICNAME,           */
   NULL,                       /* HB_P_SWAPALIAS,            */
   NULL,                       /* HB_P_TRUE,                 */
   NULL,                       /* HB_P_ZERO,                 */
   NULL,                       /* HB_P_ONE,                  */
   NULL,                       /* HB_P_MACROFUNC,            */
   NULL,                       /* HB_P_MACRODO,              */
   NULL,                       /* HB_P_MPUSHSTR,             */
   NULL,                       /* HB_P_LOCALNEARADDINT,      */
   NULL,                       /* HB_P_MACROPUSHREF          */
   NULL,                       /* HB_P_PUSHLONGLONG          */
   NULL,                       /* HB_P_ENUMSTART             */
   NULL,                       /* HB_P_ENUMNEXT              */
   NULL,                       /* HB_P_ENUMPREV              */
   NULL,                       /* HB_P_ENUMEND               */
   NULL,                       /* HB_P_SWITCH                */
   NULL,                       /* HB_P_PUSHDATE              */
                               /* optimalization of inlined math operations */
   NULL,                       /* HB_P_PLUSEQPOP             */
   NULL,                       /* HB_P_MINUSEQPOP            */
   NULL,                       /* HB_P_MULTEQPOP             */
   NULL,                       /* HB_P_DIVEQPOP              */
   NULL,                       /* HB_P_PLUSEQ                */
   NULL,                       /* HB_P_MINUSEQ               */
   NULL,                       /* HB_P_MULTEQ                */
   NULL,                       /* HB_P_DIVEQ                 */
   NULL,                       /* HB_P_WITHOBJECTSTART       */
   NULL,                       /* HB_P_WITHOBJECTMESSAGE     */
   NULL,                       /* HB_P_WITHOBJECTEND         */
   NULL,                       /* HB_P_MACROSEND             */
   NULL,                       /* HB_P_PUSHOVARREF           */
   NULL,                       /* HB_P_ARRAYPUSHREF          */
   NULL,                       /* HB_P_VFRAME                */
   NULL,                       /* HB_P_LARGEFRAME            */
   NULL,                       /* HB_P_LARGEVFRAME           */
   hb_p_pushstrhidden,         /* HB_P_PUSHSTRHIDDEN         */
   NULL,                       /* HB_P_LOCALADDINT           */
   NULL,                       /* HB_P_MODEQPOP              */
   NULL,                       /* HB_P_EXPEQPOP              */
   NULL,                       /* HB_P_MODEQ                 */
   NULL,                       /* HB_P_EXPEQ                 */
   NULL,                       /* HB_P_DUPLUNREF             */
   NULL,                       /* HB_P_MPUSHBLOCKLARGE       */
   NULL,                       /* HB_P_MPUSHSTRLARGE         */
   hb_p_pushblocklarge,        /* HB_P_PUSHBLOCKLARGE,       */
   hb_p_pushstrlarge,          /* HB_P_PUSHSTRLARGE          */
   NULL,                       /* HB_P_SWAP                  */
   NULL,                       /* HB_P_PUSHVPARAMS           */
   NULL,                       /* HB_P_PUSHUNREF             */
   NULL,                       /* HB_P_SEQALWAYS             */
   NULL,                       /* HB_P_ALWAYSBEGIN           */
   NULL,                       /* HB_P_ALWAYSEND             */
   NULL,                       /* HB_P_DECEQPOP              */
   NULL,                       /* HB_P_INCEQPOP              */
   NULL,                       /* HB_P_DECEQ                 */
   NULL,                       /* HB_P_INCEQ                 */
   NULL,                       /* HB_P_LOCALDEC              */
   NULL,                       /* HB_P_LOCALINC              */
   NULL,                       /* HB_P_LOCALINCPUSH          */
   NULL,                       /* HB_P_PUSHFUNCSYM           */
   NULL,                       /* HB_P_HASHGEN               */
   NULL,                       /* HB_P_SEQBLOCK              */
   hb_p_threadstatics          /* HB_P_THREADSTATICS         */
};
hbpcode.c123
LONGhb_compPCodeSize( PFUNCTION pFunc, ULONG ulOffset )
LONG hb_compPCodeSize( PFUNCTION pFunc, ULONG ulOffset )
{
   LONG lSize = 0;
   BYTE opcode = pFunc->pCode[ ulOffset ];

   if( opcode < HB_P_LAST_PCODE )
   {
      lSize = hb_comp_pcode_len[ opcode ];

      if( lSize == 0 )
      {
         HB_PCODE_FUNC_PTR pCall = s_psize_table[ opcode ];

         if( pCall != NULL )
            lSize = pCall( pFunc, ulOffset, NULL );
      }
   }
   return lSize;
}
hbpcode.c506
VOIDhb_compPCodeEval( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo )
void hb_compPCodeEval( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo )
{
   ULONG ulPos = 0;
   ULONG ulSkip;
   BYTE opcode;

   /* Make sure that table is correct */
   assert( sizeof( hb_comp_pcode_len ) == HB_P_LAST_PCODE );
   assert( sizeof( s_psize_table ) / sizeof( HB_PCODE_FUNC_PTR ) == HB_P_LAST_PCODE );

   while( ulPos < pFunc->lPCodePos )
   {
      opcode = pFunc->pCode[ ulPos ];
      if( opcode < HB_P_LAST_PCODE )
      {
         HB_PCODE_FUNC_PTR pCall = pFunctions[ opcode ];
         ulSkip = pCall ? pCall( pFunc, ulPos, cargo ) : 0;
         if( ulSkip == 0 )
         {
            ulSkip = hb_comp_pcode_len[ opcode ];
            if( ulSkip == 0 )
            {
               pCall = s_psize_table[ opcode ];
               if( pCall != NULL )
                  ulSkip = pCall( pFunc, ulPos, NULL );
            }
         }

         if( ulSkip == 0 )
         {
            char szOpcode[ 16 ];
            snprintf( szOpcode, sizeof( szOpcode ), "%i", opcode );
            hb_errInternal( HB_EI_COMPBADOPSIZE, "Invalid (zero) opcode %s size in hb_compPCodeEval()", szOpcode, NULL );
            ++ulPos;
         }
#if 0
         /*
          * Test code to validate return values by PCODE eval functions,
          * in some cases the eval functions can return intentionally differ
          * values so it's not enabled by default. [druzus]
          */
         if( hb_comp_pcode_len[ opcode ] != 0 && hb_comp_pcode_len[ opcode ] != ulSkip )
         {
            char szMsg[ 100 ];
            snprintf( szMsg, sizeof( szMsg ), "Wrong PCODE (%d) size (%ld!=%d)", opcode, ulSkip, hb_comp_pcode_len[ opcode ] );
            hb_errInternal( HB_EI_COMPBADOPSIZE, szMsg, NULL, NULL );
         }
#endif
         ulPos += ulSkip;
      }
      else
      {
         char szOpcode[ 16 ];
         snprintf( szOpcode, sizeof( szOpcode ), "%i", opcode );
         hb_errInternal( HB_EI_COMPBADOPCODE, "Invalid opcode: %s in hb_compPCodeEval()", szOpcode, NULL );
         ++ulPos;
      }
   }
}
hbpcode.c526
VOIDhb_compPCodeTrace( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo )
void hb_compPCodeTrace( PFUNCTION pFunc, const HB_PCODE_FUNC_PTR * pFunctions, void * cargo )
{
   ULONG ulPos = 0;

   /* Make sure that table is correct */
   assert( sizeof( hb_comp_pcode_len ) == HB_P_LAST_PCODE );

   while( ulPos < pFunc->lPCodePos )
   {
      BYTE opcode = pFunc->pCode[ ulPos ];
      if( opcode < HB_P_LAST_PCODE )
      {
         HB_PCODE_FUNC_PTR pCall = pFunctions[ opcode ];
         if( pCall )
            ulPos = pCall( pFunc, ulPos, cargo );
         else
            ulPos += hb_comp_pcode_len[ opcode ];
      }
      else
      {
         char szOpcode[ 16 ];
         snprintf( szOpcode, sizeof( szOpcode ), "%i", opcode );
         hb_errInternal( HB_EI_COMPBADOPCODE, "Invalid opcode: %s in hb_compPCodeTrace()", szOpcode, NULL );
         ++ulPos;
      }
   }
}
hbpcode.c586
VOIDhb_compGenPCode1( BYTE byte, HB_COMP_DECL )
void hb_compGenPCode1( BYTE byte, HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;   /* get the currently defined Clipper function */

   if( ! pFunc->pCode )   /* has been created the memory block to hold the pcode ? */
   {
      pFunc->pCode      = ( BYTE * ) hb_xgrab( HB_PCODE_CHUNK );
      pFunc->lPCodeSize = HB_PCODE_CHUNK;
      pFunc->lPCodePos  = 0;
   }
   else if( ( pFunc->lPCodeSize - pFunc->lPCodePos ) < 1 )
      pFunc->pCode = ( BYTE * ) hb_xrealloc( pFunc->pCode, pFunc->lPCodeSize += HB_PCODE_CHUNK );

   pFunc->pCode[ pFunc->lPCodePos++ ] = byte;
}
hbpcode.c614
VOIDhb_compGenPCode2( BYTE byte1, BYTE byte2, HB_COMP_DECL )
void hb_compGenPCode2( BYTE byte1, BYTE byte2, HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;   /* get the currently defined Clipper function */

   if( ! pFunc->pCode )   /* has been created the memory block to hold the pcode ? */
   {
      pFunc->pCode      = ( BYTE * ) hb_xgrab( HB_PCODE_CHUNK );
      pFunc->lPCodeSize = HB_PCODE_CHUNK;
      pFunc->lPCodePos  = 0;
   }
   else if( ( pFunc->lPCodeSize - pFunc->lPCodePos ) < 2 )
      pFunc->pCode = ( BYTE * ) hb_xrealloc( pFunc->pCode, pFunc->lPCodeSize += HB_PCODE_CHUNK );

   pFunc->pCode[ pFunc->lPCodePos++ ] = byte1;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte2;
}
hbpcode.c630
VOIDhb_compGenPCode3( BYTE byte1, BYTE byte2, BYTE byte3, HB_COMP_DECL )
void hb_compGenPCode3( BYTE byte1, BYTE byte2, BYTE byte3, HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;   /* get the currently defined Clipper function */

   if( ! pFunc->pCode )   /* has been created the memory block to hold the pcode ? */
   {
      pFunc->pCode      = ( BYTE * ) hb_xgrab( HB_PCODE_CHUNK );
      pFunc->lPCodeSize = HB_PCODE_CHUNK;
      pFunc->lPCodePos  = 0;
   }
   else if( ( pFunc->lPCodeSize - pFunc->lPCodePos ) < 3 )
      pFunc->pCode = ( BYTE * ) hb_xrealloc( pFunc->pCode, pFunc->lPCodeSize += HB_PCODE_CHUNK );

   pFunc->pCode[ pFunc->lPCodePos++ ] = byte1;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte2;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte3;
}
hbpcode.c647
VOIDhb_compGenPCode4( BYTE byte1, BYTE byte2, BYTE byte3, BYTE byte4, HB_COMP_DECL )
void hb_compGenPCode4( BYTE byte1, BYTE byte2, BYTE byte3, BYTE byte4, HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;   /* get the currently defined Clipper function */

   if( ! pFunc->pCode )   /* has been created the memory block to hold the pcode ? */
   {
      pFunc->pCode      = ( BYTE * ) hb_xgrab( HB_PCODE_CHUNK );
      pFunc->lPCodeSize = HB_PCODE_CHUNK;
      pFunc->lPCodePos  = 0;
   }
   else if( ( pFunc->lPCodeSize - pFunc->lPCodePos ) < 4 )
      pFunc->pCode = ( BYTE * ) hb_xrealloc( pFunc->pCode, pFunc->lPCodeSize += HB_PCODE_CHUNK );

   pFunc->pCode[ pFunc->lPCodePos++ ] = byte1;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte2;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte3;
   pFunc->pCode[ pFunc->lPCodePos++ ] = byte4;
}
hbpcode.c665
VOIDhb_compGenPCodeN( BYTE * pBuffer, ULONG ulSize, HB_COMP_DECL )
void hb_compGenPCodeN( BYTE * pBuffer, ULONG ulSize, HB_COMP_DECL )
{
   PFUNCTION pFunc = HB_COMP_PARAM->functions.pLast;   /* get the currently defined Clipper function */

   if( ! pFunc->pCode )   /* has been created the memory block to hold the pcode ? */
   {
      pFunc->lPCodeSize = ( ( ulSize / HB_PCODE_CHUNK ) + 1 ) * HB_PCODE_CHUNK;
      pFunc->pCode      = ( BYTE * ) hb_xgrab( pFunc->lPCodeSize );
      pFunc->lPCodePos  = 0;
   }
   else if( pFunc->lPCodePos + ulSize > pFunc->lPCodeSize )
   {
      /* not enough free space in pcode buffer - increase it */
      pFunc->lPCodeSize += ( ( ( ulSize / HB_PCODE_CHUNK ) + 1 ) * HB_PCODE_CHUNK );
      pFunc->pCode = ( BYTE * ) hb_xrealloc( pFunc->pCode, pFunc->lPCodeSize );
   }

   memcpy( pFunc->pCode + pFunc->lPCodePos, pBuffer, ulSize );
   pFunc->lPCodePos += ulSize;
}
hbpcode.c684
hbstripl.c
TypeFunctionSourceLine
STATIC HB_STRIP_FUNC(hb_p_line )
static HB_STRIP_FUNC( hb_p_line )
{
   HB_SYMBOL_UNUSED( cargo );
   if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_LINE )
   {
      hb_compNOOPfill( pFunc, lPCodePos, 3, FALSE, FALSE );
   }

   return 3;
}

/* NOTE: The  order of functions have to match the order of opcodes
 *       mnemonics
 */
static const PHB_STRIP_FUNC s_stripLines_table[] =
{
   NULL,                       /* HB_P_AND,                  */
   NULL,                       /* HB_P_ARRAYPUSH,            */
   NULL,                       /* HB_P_ARRAYPOP,             */
   NULL,                       /* HB_P_ARRAYDIM,             */
   NULL,                       /* HB_P_ARRAYGEN,             */
   NULL,                       /* HB_P_EQUAL,                */
   NULL,                       /* HB_P_ENDBLOCK,             */
   NULL,                       /* HB_P_ENDPROC,              */
   NULL,                       /* HB_P_EXACTLYEQUAL,         */
   NULL,                       /* HB_P_FALSE,                */
   NULL,                       /* HB_P_FORTEST,              */
   NULL,                       /* HB_P_FUNCTION,             */
   NULL,                       /* HB_P_FUNCTIONSHORT,        */
   NULL,                       /* HB_P_FRAME,                */
   NULL,                       /* HB_P_FUNCPTR,              */
   NULL,                       /* HB_P_GREATER,              */
   NULL,                       /* HB_P_GREATEREQUAL,         */
   NULL,                       /* HB_P_DEC,                  */
   NULL,                       /* HB_P_DIVIDE,               */
   NULL,                       /* HB_P_DO,                   */
   NULL,                       /* HB_P_DOSHORT,              */
   NULL,                       /* HB_P_DUPLICATE,            */
   NULL,                       /* HB_P_DUPLTWO,              */
   NULL,                       /* HB_P_INC,                  */
   NULL,                       /* HB_P_INSTRING,             */
   NULL,                       /* HB_P_JUMPNEAR,             */
   NULL,                       /* HB_P_JUMP,                 */
   NULL,                       /* HB_P_JUMPFAR,              */
   NULL,                       /* HB_P_JUMPFALSENEAR,        */
   NULL,                       /* HB_P_JUMPFALSE,            */
   NULL,                       /* HB_P_JUMPFALSEFAR,         */
   NULL,                       /* HB_P_JUMPTRUENEAR,         */
   NULL,                       /* HB_P_JUMPTRUE,             */
   NULL,                       /* HB_P_JUMPTRUEFAR,          */
   NULL,                       /* HB_P_LESSEQUAL,            */
   NULL,                       /* HB_P_LESS,                 */
   hb_p_line,                  /* HB_P_LINE,                 */
   NULL,                       /* HB_P_LOCALNAME,            */
   NULL,                       /* HB_P_MACROPOP,             */
   NULL,                       /* HB_P_MACROPOPALIASED,      */
   NULL,                       /* HB_P_MACROPUSH,            */
   NULL,                       /* HB_P_MACROARRAYGEN,        */
   NULL,                       /* HB_P_MACROPUSHLIST,        */
   NULL,                       /* HB_P_MACROPUSHINDEX,       */
   NULL,                       /* HB_P_MACROPUSHPARE,        */
   NULL,                       /* HB_P_MACROPUSHALIASED,     */
   NULL,                       /* HB_P_MACROSYMBOL,          */
   NULL,                       /* HB_P_MACROTEXT,            */
   NULL,                       /* HB_P_MESSAGE,              */
   NULL,                       /* HB_P_MINUS,                */
   NULL,                       /* HB_P_MODULUS,              */
   NULL,                       /* HB_P_MODULENAME,           */
                               /* start: pcodes generated by macro compiler */
   NULL,                       /* HB_P_MMESSAGE,             */
   NULL,                       /* HB_P_MPOPALIASEDFIELD,     */
   NULL,                       /* HB_P_MPOPALIASEDVAR,       */
   NULL,                       /* HB_P_MPOPFIELD,            */
   NULL,                       /* HB_P_MPOPMEMVAR,           */
   NULL,                       /* HB_P_MPUSHALIASEDFIELD,    */
   NULL,                       /* HB_P_MPUSHALIASEDVAR,      */
   NULL,                       /* HB_P_MPUSHBLOCK,           */
   NULL,                       /* HB_P_MPUSHFIELD,           */
   NULL,                       /* HB_P_MPUSHMEMVAR,          */
   NULL,                       /* HB_P_MPUSHMEMVARREF,       */
   NULL,                       /* HB_P_MPUSHSYM,             */
   NULL,                       /* HB_P_MPUSHVARIABLE,        */
                               /* end: */
   NULL,                       /* HB_P_MULT,                 */
   NULL,                       /* HB_P_NEGATE,               */
   NULL,                       /* HB_P_NOOP,                 */
   NULL,                       /* HB_P_NOT,                  */
   NULL,                       /* HB_P_NOTEQUAL,             */
   NULL,                       /* HB_P_OR,                   */
   NULL,                       /* HB_P_PARAMETER,            */
   NULL,                       /* HB_P_PLUS,                 */
   NULL,                       /* HB_P_POP,                  */
   NULL,                       /* HB_P_POPALIAS,             */
   NULL,                       /* HB_P_POPALIASEDFIELD,      */
   NULL,                       /* HB_P_POPALIASEDFIELDNEAR,  */
   NULL,                       /* HB_P_POPALIASEDVAR,        */
   NULL,                       /* HB_P_POPFIELD,             */
   NULL,                       /* HB_P_POPLOCAL,             */
   NULL,                       /* HB_P_POPLOCALNEAR,         */
   NULL,                       /* HB_P_POPMEMVAR,            */
   NULL,                       /* HB_P_POPSTATIC,            */
   NULL,                       /* HB_P_POPVARIABLE,          */
   NULL,                       /* HB_P_POWER,                */
   NULL,                       /* HB_P_PUSHALIAS,            */
   NULL,                       /* HB_P_PUSHALIASEDFIELD,     */
   NULL,                       /* HB_P_PUSHALIASEDFIELDNEAR, */
   NULL,                       /* HB_P_PUSHALIASEDVAR,       */
   NULL,                       /* HB_P_PUSHBLOCK,            */
   NULL,                       /* HB_P_PUSHBLOCKSHORT,       */
   NULL,                       /* HB_P_PUSHFIELD,            */
   NULL,                       /* HB_P_PUSHBYTE,             */
   NULL,                       /* HB_P_PUSHINT,              */
   NULL,                       /* HB_P_PUSHLOCAL,            */
   NULL,                       /* HB_P_PUSHLOCALNEAR,        */
   NULL,                       /* HB_P_PUSHLOCALREF,         */
   NULL,                       /* HB_P_PUSHLONG,             */
   NULL,                       /* HB_P_PUSHMEMVAR,           */
   NULL,                       /* HB_P_PUSHMEMVARREF,        */
   NULL,                       /* HB_P_PUSHNIL,              */
   NULL,                       /* HB_P_PUSHDOUBLE,           */
   NULL,                       /* HB_P_PUSHSELF,             */
   NULL,                       /* HB_P_PUSHSTATIC,           */
   NULL,                       /* HB_P_PUSHSTATICREF,        */
   NULL,                       /* HB_P_PUSHSTR,              */
   NULL,                       /* HB_P_PUSHSTRSHORT,         */
   NULL,                       /* HB_P_PUSHSYM,              */
   NULL,                       /* HB_P_PUSHSYMNEAR,          */
   NULL,                       /* HB_P_PUSHVARIABLE,         */
   NULL,                       /* HB_P_RETVALUE,             */
   NULL,                       /* HB_P_SEND,                 */
   NULL,                       /* HB_P_SENDSHORT,            */
   NULL,                       /* HB_P_SEQBEGIN,             */
   NULL,                       /* HB_P_SEQEND,               */
   NULL,                       /* HB_P_SEQRECOVER,           */
   NULL,                       /* HB_P_SFRAME,               */
   NULL,                       /* HB_P_STATICS,              */
   NULL,                       /* HB_P_STATICNAME,           */
   NULL,                       /* HB_P_SWAPALIAS,            */
   NULL,                       /* HB_P_TRUE,                 */
   NULL,                       /* HB_P_ZERO,                 */
   NULL,                       /* HB_P_ONE,                  */
   NULL,                       /* HB_P_MACROFUNC,            */
   NULL,                       /* HB_P_MACRODO,              */
   NULL,                       /* HB_P_MPUSHSTR,             */
   NULL,                       /* HB_P_LOCALNEARADDINT,      */
   NULL,                       /* HB_P_MACROPUSHREF          */
   NULL,                       /* HB_P_PUSHLONGLONG          */
   NULL,                       /* HB_P_ENUMSTART             */
   NULL,                       /* HB_P_ENUMNEXT              */
   NULL,                       /* HB_P_ENUMPREV              */
   NULL,                       /* HB_P_ENUMEND               */
   NULL,                       /* HB_P_SWITCH                */
   NULL,                       /* HB_P_PUSHDATE              */
                               /* optimalization of inlined math operations */
   NULL,                       /* HB_P_PLUSEQPOP             */
   NULL,                       /* HB_P_MINUSEQPOP            */
   NULL,                       /* HB_P_MULTEQPOP             */
   NULL,                       /* HB_P_DIVEQPOP              */
   NULL,                       /* HB_P_PLUSEQ                */
   NULL,                       /* HB_P_MINUSEQ               */
   NULL,                       /* HB_P_MULTEQ                */
   NULL,                       /* HB_P_DIVEQ                 */
   NULL,                       /* HB_P_WITHOBJECTSTART       */
   NULL,                       /* HB_P_WITHOBJECTMESSAGE     */
   NULL,                       /* HB_P_WITHOBJECTEND         */
   NULL,                       /* HB_P_MACROSEND             */
   NULL,                       /* HB_P_PUSHOVARREF           */
   NULL,                       /* HB_P_ARRAYPUSHREF          */
   NULL,                       /* HB_P_VFRAME                */
   NULL,                       /* HB_P_LARGEFRAME            */
   NULL,                       /* HB_P_LARGEVFRAME           */
   NULL,                       /* HB_P_PUSHSTRHIDDEN         */
   NULL,                       /* HB_P_LOCALADDINT           */
   NULL,                       /* HB_P_MODEQPOP              */
   NULL,                       /* HB_P_EXPEQPOP              */
   NULL,                       /* HB_P_MODEQ                 */
   NULL,                       /* HB_P_EXPEQ                 */
   NULL,                       /* HB_P_DUPLUNREF             */
   NULL,                       /* HB_P_MPUSHBLOCKLARGE       */
   NULL,                       /* HB_P_MPUSHSTRLARGE         */
   NULL,                       /* HB_P_PUSHBLOCKLARGE        */
   NULL,                       /* HB_P_PUSHSTRLARGE          */
   NULL,                       /* HB_P_SWAP                  */
   NULL,                       /* HB_P_PUSHVPARAMS           */
   NULL,                       /* HB_P_PUSHUNREF             */
   NULL,                       /* HB_P_SEQALWAYS             */
   NULL,                       /* HB_P_ALWAYSBEGIN           */
   NULL,                       /* HB_P_ALWAYSEND             */
   NULL,                       /* HB_P_DECEQPOP              */
   NULL,                       /* HB_P_INCEQPOP              */
   NULL,                       /* HB_P_DECEQ                 */
   NULL,                       /* HB_P_INCEQ                 */
   NULL,                       /* HB_P_LOCALDEC              */
   NULL,                       /* HB_P_LOCALINC              */
   NULL,                       /* HB_P_LOCALINCPUSH          */
   NULL,                       /* HB_P_PUSHFUNCSYM           */
   NULL,                       /* HB_P_HASHGEN               */
   NULL,                       /* HB_P_SEQBLOCK              */
   NULL                        /* HB_P_THREADSTATICS         */
};
hbstripl.c63
VOIDhb_compStripFuncLines( PFUNCTION pFunc )
void hb_compStripFuncLines( PFUNCTION pFunc )
{
   assert( HB_P_LAST_PCODE == sizeof( s_stripLines_table ) / sizeof( PHB_STRIP_FUNC ) );

   hb_compPCodeEval( pFunc, s_stripLines_table, NULL );
}
hbstripl.c264
hbusage.c
TypeFunctionSourceLine
VOIDhb_compPrintUsage( HB_COMP_DECL, const char * szSelf )
void hb_compPrintUsage( HB_COMP_DECL, const 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 (default) 1=normal 2=verbose",
           "\n                                   3=generate real C code",
           "\n          %cgo              output type: Platform dependant object module",
#ifdef HB_GEN_W32_OBJ
           "\n          %cgw              output type: Windows/DOS OBJ32 (.obj)",
#endif
           "\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 ], HB_OS_OPT_DELIM_LIST[ 0 ] );
      hb_compOutStd( HB_COMP_PARAM, buffer );
   }
}
hbusage.c55
VOIDhb_compPrintModes( HB_COMP_DECL )
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: -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)" );
   }
}
hbusage.c125
VOIDhb_compPrintCredits( HB_COMP_DECL )
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"
         "Alejandro de Garate \n"
         "Alex Shashkov \n"
         "Alexander S. Kresin \n"
         "Andi Jahja \n"
         "Antonio Carlos Pantaglione \n"
         "Antonio Linares \n"
         "April White \n"
         "Bil Simser \n"
         "Bill Robertson \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"
         "Fernando Mancera \n"
         "Francesco Saverio Giudice \n"
         "Giancarlo Niccolai \n"
         "Gonzalo A. Diethelm \n"
         "Gustavo Junior Alves \n"
         "Hannes Ziegler \n"
         "Horacio D. Roldan Kasimatis \n"
         "Ignacio Ortiz de Zuniga \n"
         "Ilias Lazaridis \n"
         "Jacek Kubica \n"
         "Janica Lubos \n"
         "Jean-Francois Lefebvre (mafact) \n"
         "Jorge A. Giraldo \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"
         "Massimo Belgrano \n"
         "Matteo Baccan \n"
         "Matthew Hamilton \n"
         "Mauricio Abre \n"
         "Maurilio Longo \n"
         "Miguel Angel Marchuet Frutos \n"
         "Mindaugas Kavaliauskas \n"
         "Mitja Podgornik \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"
         "Pritpal Bedi \n"
         "Przemyslaw Czerpak \n"
         "Randy Portnoff \n"
         "Ron Pinkas \n"
         "Ryszard Glab \n"
         "Teo Fonrouge \n"
         "Tim Stone \n"
         "Toma¾ Zupan \n"
         "Viktor Szakats \n"
         "Vladimir Kazimirchik \n"
         "Walter Negro \n"
      );
}
hbusage.c169
VOIDhb_compPrintLogo( HB_COMP_DECL )
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 );
}
hbusage.c250
ppcomp.c
TypeFunctionSourceLine
STATIC VOIDhb_pp_ErrorGen( void * cargo, const char * szMsgTable[], char cPrefix, int iErrorCode, const char * szParam1, const char * szParam2 )
static void hb_pp_ErrorGen( void * cargo,
                            const char * szMsgTable[], char cPrefix, int iErrorCode,
                            const char * szParam1, const char * szParam2 )
{
   HB_COMP_DECL = ( HB_COMP_PTR ) cargo;
   int iCurrLine = HB_COMP_PARAM->currLine;
   const char * currModule = HB_COMP_PARAM->currModule;

   HB_COMP_PARAM->currLine = hb_pp_line( HB_COMP_PARAM->pLex->pPP );
   HB_COMP_PARAM->currModule = hb_pp_fileName( HB_COMP_PARAM->pLex->pPP );
   if( cPrefix == 'W' )
      hb_compGenWarning( HB_COMP_PARAM, szMsgTable, cPrefix, iErrorCode, szParam1, szParam2 );
   else
      hb_compGenError( HB_COMP_PARAM, szMsgTable, cPrefix, iErrorCode, szParam1, szParam2 );
   HB_COMP_PARAM->fError = FALSE;
   HB_COMP_PARAM->currLine = iCurrLine;
   HB_COMP_PARAM->currModule = currModule;
}
ppcomp.c56
STATIC VOIDhb_pp_Disp( void * cargo, const char * szMessage )
static void hb_pp_Disp( void * cargo, const char * szMessage )
{
   HB_COMP_DECL = ( HB_COMP_PTR ) cargo;

   hb_compOutStd( HB_COMP_PARAM, szMessage );
}
ppcomp.c75
STATIC VOIDhb_pp_PragmaDump( void * cargo, char * pBuffer, ULONG ulSize, int iLine )
static void hb_pp_PragmaDump( void * cargo, char * pBuffer, ULONG ulSize,
                              int iLine )
{
   PINLINE pInline;

   pInline = hb_compInlineAdd( ( HB_COMP_PTR ) cargo, NULL, iLine );
   pInline->pCode = ( BYTE * ) hb_xgrab( ulSize + 1 );
   memcpy( pInline->pCode, pBuffer, ulSize );
   pInline->pCode[ ulSize ] = '\0';
   pInline->lPCodeSize = ulSize;
}
ppcomp.c82
STATIC VOIDhb_pp_hb_inLine( void * cargo, char * szFunc, char * pBuffer, ULONG ulSize, int iLine )
static void hb_pp_hb_inLine( void * cargo, char * szFunc,
                             char * pBuffer, ULONG ulSize, int iLine )
{
   HB_COMP_DECL = ( HB_COMP_PTR ) cargo;

   if( HB_COMP_PARAM->iLanguage != HB_LANG_C && HB_COMP_PARAM->iLanguage != HB_LANG_OBJ_MODULE )
   {
      int iCurrLine = HB_COMP_PARAM->currLine;
      HB_COMP_PARAM->currLine = iLine;
      hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_REQUIRES_C, NULL, NULL );
      HB_COMP_PARAM->fError = FALSE;
      HB_COMP_PARAM->currLine = iCurrLine;
   }
   else
   {
      PINLINE pInline = hb_compInlineAdd( HB_COMP_PARAM,
         hb_compIdentifierNew( HB_COMP_PARAM, szFunc, HB_IDENT_COPY ), iLine );
      pInline->pCode = ( BYTE * ) hb_xgrab( ulSize + 1 );
      memcpy( pInline->pCode, pBuffer, ulSize );
      pInline->pCode[ ulSize ] = '\0';
      pInline->lPCodeSize = ulSize;
   }
}
ppcomp.c94
STATIC BOOLhb_pp_CompilerSwitch( void * cargo, const char * szSwitch, int iValue )
static BOOL hb_pp_CompilerSwitch( void * cargo, const char * szSwitch,
                                  int iValue )
{
   HB_COMP_DECL = ( HB_COMP_PTR ) cargo;
   BOOL fError = FALSE;
   int i = strlen( szSwitch );

   if( i > 1 && ( ( int ) ( szSwitch[ i - 1 ] - '0' ) ) == iValue )
      --i;

   if( i == 1 )
   {
      switch( szSwitch[ 0 ] )
      {
         case 'a':
         case 'A':
            HB_COMP_PARAM->fAutoMemvarAssume = iValue != 0;
            break;

         case 'b':
         case 'B':
            HB_COMP_PARAM->fDebugInfo = iValue != 0;
            break;

         case 'l':
         case 'L':
            HB_COMP_PARAM->fLineNumbers = iValue != 0;
            break;

         case 'n':
         case 'N':
            HB_COMP_PARAM->fStartProc = iValue != 0;
            break;

         case 'p':
         case 'P':
            HB_COMP_PARAM->fPPO = iValue != 0;
            break;

         case 'q':
         case 'Q':
            HB_COMP_PARAM->fQuiet = iValue != 0;
            break;

         case 'v':
         case 'V':
            HB_COMP_PARAM->fForceMemvars = iValue != 0;
            break;

         case 'w':
         case 'W':
            if( iValue >= 0 && iValue <= 3 )
               HB_COMP_PARAM->iWarnings = iValue;
            else
               fError = TRUE;
            break;

         case 'z':
         case 'Z':
            if( iValue )
               HB_COMP_PARAM->supported &= ~HB_COMPFLAG_SHORTCUTS;
            else
               HB_COMP_PARAM->supported |= HB_COMPFLAG_SHORTCUTS;
            break;

         default:
            fError = TRUE;
      }
   }
   else if( i == 2 )
   {
      if( szSwitch[ 0 ] == 'k' || szSwitch[ 0 ] == 'K' )
      {
         int iFlag = 0;
         /* -k? parameters are case sensitive */
         switch( szSwitch[ 1 ] )
         {
            case 'c':
               /* clear all flags - minimal set of features */
               HB_COMP_PARAM->supported &= HB_COMPFLAG_SHORTCUTS;
               HB_COMP_PARAM->supported |= HB_COMPFLAG_OPTJUMP |
                                           HB_COMPFLAG_MACROTEXT;
               break;
            case 'h':
               iFlag = HB_COMPFLAG_HARBOUR;
               break;
            case 'i':
               iFlag = HB_COMPFLAG_HB_INLINE;
               break;
            case 'r':
               iFlag = HB_COMPFLAG_RT_MACRO;
               break;
            case 'x':
               iFlag = HB_COMPFLAG_XBASE;
               break;
            case 'J':
               iFlag = HB_COMPFLAG_OPTJUMP;
               iValue = !iValue;
               break;
            case 'M':
               iFlag = HB_COMPFLAG_MACROTEXT;
               iValue = !iValue;
               break;
            case 's':
               iFlag = HB_COMPFLAG_ARRSTR;
               break;
            default:
               fError = TRUE;
         }
         if( !fError && iFlag )
         {
            if( iValue )
               HB_COMP_PARAM->supported |= iFlag;
            else
               HB_COMP_PARAM->supported &= ~iFlag;
         }
      }
      else if( hb_strnicmp( szSwitch, "es", 2 ) == 0 &&
               ( iValue == HB_EXITLEVEL_DEFAULT ||
                 iValue == HB_EXITLEVEL_SETEXIT ||
                 iValue == HB_EXITLEVEL_DELTARGET ) )
         HB_COMP_PARAM->iExitLevel = iValue;
      else if( hb_stricmp( szSwitch, "p+" ) == 0 )
         HB_COMP_PARAM->fPPT = iValue != 0;
      else
         fError = TRUE;
   }
   /* xHarbour extension */
   else if( i >= 4 && hb_strnicmp( szSwitch, "TEXTHIDDEN", i ) == 0 &&
            iValue >= 0 && iValue <= 1 )
      HB_COMP_PARAM->iHidden = iValue;
   else
      fError = TRUE;

   return fError;
}
ppcomp.c118
VOIDhb_compInitPP( HB_COMP_DECL, int argc, char * const argv[] )
void hb_compInitPP( HB_COMP_DECL, int argc, char * const argv[] )
{
   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, NULL, 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->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 );

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

      /* mark current rules as standard ones */
      hb_pp_setStdBase( HB_COMP_PARAM->pLex->pPP );
   }
}
ppcomp.c256

Page url: http://www.yourdomain.com/help/index.html?compiler.htm