diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8af6fedfa4..b05bc4e056 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +19990602-09:30 Alexander Kresin + Updated: + * source/hbpp/hbpp.c - main preprocessor file + * source/hbpp/c.prg - sample file + * source/hbpp/makefile.b16 + * source/hbpp/makefile.b32 + Added: + * source/hbpp/buildgcc.bat + * source/hbpp/table.c 19990601-23:50 EDT David G. Holm * makefile.b31 - Made progress on GT API, so put USE_GTAPI back in as default. diff --git a/harbour/source/hbpp/buildgcc.bat b/harbour/source/hbpp/buildgcc.bat new file mode 100644 index 0000000000..e4033c9b6b --- /dev/null +++ b/harbour/source/hbpp/buildgcc.bat @@ -0,0 +1 @@ +gcc hbpp.c harb.c table.c -o hbpp.exe \ No newline at end of file diff --git a/harbour/source/hbpp/c.prg b/harbour/source/hbpp/c.prg index e6e8deedf3..f68911325d 100644 --- a/harbour/source/hbpp/c.prg +++ b/harbour/source/hbpp/c.prg @@ -1,4 +1,3 @@ -#include "std.ch" SET PATH TO c:\database\ @ 1,1,10,10 BOX ORAMKA @ 10,10 say "Hello World" diff --git a/harbour/source/hbpp/hbpp.c b/harbour/source/hbpp/hbpp.c index 1c60f51e15..1ecb2fde9c 100644 --- a/harbour/source/hbpp/hbpp.c +++ b/harbour/source/hbpp/hbpp.c @@ -7,23 +7,39 @@ #include #include "harb.h" +typedef struct +{ + char *name; + char *pars; + int npars; + char *value; +} DEFINES; + +typedef struct +{ + char *name; + char *mpatt; + char *value; +} COMMANDS; + int Hp_Parse( int, int ); int ParseDirective( char* ); int ParseDefine( char* ); -int AddDefine ( char* ); +DEFINES* AddDefine ( char* ); int ParseUndef( char* ); int ParseIfdef( char*, int); int ParseCommand( char* ); int ConvertPatterns ( char*, int, char*, int ); void AddCommand ( char * ); +COMMANDS* getCommand ( int ); int ParseExpression( char*, char* ); -void WorkDefine ( char**, char**, int); +void WorkDefine ( char**, char**, DEFINES*); int WorkCommand ( char*, char*, char**, int); void CmdParse ( char *ptri, int aCmdStru[100][2] ); int WorkMarkers( char**, char*, char*, int*, int aCmdStru[100][2], int*, int ); void SkipOptional( char**, char*, int*); -int DefSearch(char *); +DEFINES* DefSearch(char *); int ComSearch(char *,int); void SearnRep( char*,char*,int,char*,int*); int ReplacePattern ( char, char*, int, char*, int ); @@ -61,6 +77,7 @@ int NextName ( char**, char*, char**); #define IT_EXPR 1 #define IT_ID 2 #define IT_COMMA 3 +#define IT_ID_OR_EXPR 4 int ParseState = 0; int lInclude = 0; @@ -69,26 +86,15 @@ int nline=0; int Repeate; char groupchar; -typedef struct -{ - char *name; - char *pars; - int npars; - char *value; -} DEFINES; - -DEFINES *aDefines ; +extern DEFINES aDefines[] ; +extern int koldef; +DEFINES *aDefnew ; int koldefines = 0, maxdefines = 50; -typedef struct -{ - char *name; - char *mpatt; - char *value; -} COMMANDS; - -#define INITIAL_ACOM_SIZE 250 -COMMANDS *aCommands ; +#define INITIAL_ACOM_SIZE 200 +extern COMMANDS aCommands[] ; +extern int kolcomm; +COMMANDS *aCommnew ; int kolcommands = 0, maxcommands = INITIAL_ACOM_SIZE; int main (int argc,char* argv[]) @@ -112,12 +118,12 @@ FILENAME *pFileName =NULL; { printf("Can't open %s",szFileName); return 1; } aCondCompile = (int*) _xgrab( sizeof(int) * 5 ); - aDefines = ( DEFINES * ) _xgrab( sizeof(DEFINES) * 50 ); - aCommands = ( COMMANDS * ) _xgrab( sizeof(COMMANDS) * INITIAL_ACOM_SIZE ); + aDefnew = ( DEFINES * ) _xgrab( sizeof(DEFINES) * 50 ); + aCommnew = ( COMMANDS * ) _xgrab( sizeof(COMMANDS) * INITIAL_ACOM_SIZE ); Hp_Parse(handl_i,handl_o); close(handl_i); close(handl_o); - +/* for (i=0;ivalue = ( *sLine == '\0' )? NULL : strodup ( sLine ); + lastdef->npars = npars; + lastdef->pars = ( npars == 0 )? NULL : strodup ( pars ); return 0; } -int AddDefine ( char* defname ) +DEFINES* AddDefine ( char* defname ) { - int ndef = DefSearch( defname ); + DEFINES* stdef = DefSearch( defname ); - if ( ndef >= 0 ) + if ( stdef != NULL ) { - if ( aDefines[ndef].pars != NULL ) _xfree ( aDefines[ndef].pars ); - _xfree ( aDefines[ndef].value ); + if ( stdef->pars != NULL ) _xfree ( stdef->pars ); + _xfree ( stdef->value ); } else { if ( koldefines == maxdefines ) /* Add new entry to defines table */ { maxdefines += 50; - aDefines = (DEFINES *)_xrealloc( aDefines, sizeof( DEFINES ) * maxdefines ); + aDefnew = (DEFINES *)_xrealloc( aDefnew, sizeof( DEFINES ) * maxdefines ); } - ndef = koldefines++; - aDefines[ndef].name = strodup ( defname ); + stdef = &aDefnew[koldefines++]; + stdef->name = strodup ( defname ); } - return ndef; + return stdef; } int ParseUndef( char* sLine) { char defname[MAX_NAME]; - int i = 0; + DEFINES* stdef; NextWord( &sLine, defname, FALSE ); - if ( ( i = DefSearch(defname) ) >= 0 ) + if ( ( stdef = DefSearch(defname) ) >= 0 ) { - _xfree ( aDefines[i].name ); - _xfree ( aDefines[i].pars ); - _xfree ( aDefines[i].value ); + _xfree ( stdef->name ); + _xfree ( stdef->pars ); + _xfree ( stdef->value ); + stdef->name = NULL; +/* for ( ; i < koldefines-1; i++ ) { aDefines[i].name = aDefines[i+1].name; @@ -341,6 +350,7 @@ int ParseUndef( char* sLine) aDefines[i].npars = aDefines[i+1].npars; } koldefines--; +*/ } return 0; } @@ -348,7 +358,7 @@ int ParseUndef( char* sLine) int ParseIfdef( char* sLine, int usl) { char defname[MAX_NAME]; - int i; + DEFINES *stdef; NextWord( &sLine, defname, FALSE ); if ( *defname == '\0' ) return 3000; @@ -357,30 +367,44 @@ int ParseIfdef( char* sLine, int usl) maxCondCompile += 5; aCondCompile = (int*)_xrealloc( aCondCompile, sizeof( int ) * maxCondCompile ); } - if ( ( (i = DefSearch(defname)) >= 0 && usl ) - || ( i < 0 && !usl ) ) aCondCompile[nCondCompile] = 1; + if ( ( (stdef = DefSearch(defname)) != NULL && usl ) + || ( stdef == NULL && !usl ) ) aCondCompile[nCondCompile] = 1; else aCondCompile[nCondCompile] = 0; nCondCompile++; return 0; } -int DefSearch(char *defname) +DEFINES* DefSearch(char *defname) { int i,j; - for ( i=0; i=0; i-- ) + { + for ( j=0; *(aDefnew[i].name+j)==*(defname+j) && + *(aDefnew[i].name+j)!='\0'; j++ ); + if ( *(aDefnew[i].name+j)==*(defname+j) ) return &aDefnew[i]; + } + + for ( i=koldef-1; i>=0; i-- ) { for ( j=0; *(aDefines[i].name+j)==*(defname+j) && *(aDefines[i].name+j)!='\0'; j++ ); - if ( *(aDefines[i].name+j)==*(defname+j) ) break; + if ( *(aDefines[i].name+j)==*(defname+j) ) return &aDefines[i]; } - if ( i >= koldefines ) return -1; - return i; + return NULL; } int ComSearch(char *cmdname, int ncmd) { int i,j; - for ( i=(ncmd)? ncmd:kolcommands-1; i >= 0; i-- ) + if ( !ncmd || ncmd > kolcomm ) + for ( i=(ncmd)? ncmd-kolcomm:kolcommands-1; i >= 0; i-- ) + { + for ( j=0; *(aCommnew[i].name+j)==toupper(*(cmdname+j)) && + *(aCommnew[i].name+j)!='\0'; j++ ); + if ( *(aCommnew[i].name+j)==toupper(*(cmdname+j)) ) return kolcomm+i; + } + + for ( i=(ncmd && ncmd<=kolcomm)? ncmd:kolcomm-1; i >= 0; i-- ) { for ( j=0; *(aCommands[i].name+j)==toupper(*(cmdname+j)) && *(aCommands[i].name+j)!='\0'; j++ ); @@ -410,8 +434,8 @@ int ParseCommand( char* sLine) if ( (rez = ConvertPatterns ( mpatt, mlen, rpatt, rlen )) > 0 ) return rez; AddCommand ( cmdname ); - aCommands[kolcommands-1].mpatt = strodup ( mpatt ); - aCommands[kolcommands-1].value = ( rlen > 0 )? strodup ( rpatt ) : NULL; + aCommnew[kolcommands-1].mpatt = strodup ( mpatt ); + aCommnew[kolcommands-1].value = ( rlen > 0 )? strodup ( rpatt ) : NULL; return 0; } @@ -433,7 +457,12 @@ int ConvertPatterns ( char *mpatt, int mlen, char *rpatt, int rlen ) else if ( *(mpatt+i) == '(' ) { exptype = '4'; i++; } while ( *(mpatt+i) != '>' ) { - if ( *(mpatt+i) == ',' ) { exptype = '1'; while ( *(mpatt+i++) != '>' ); break; } + if ( *(mpatt+i) == ',' ) + { + exptype = '1'; + while ( *(mpatt+i) != '>' ) i++; + break; + } else if ( *(mpatt+i) == ':' ) { exptype = '2'; break; } *(exppatt+explen++) = *(mpatt+i++); } @@ -484,19 +513,25 @@ void AddCommand ( char *cmdname ) if ( kolcommands == maxcommands ) { maxcommands += 50; - aCommands = (COMMANDS *)_xrealloc( aCommands, sizeof( COMMANDS ) * maxcommands ); + aCommnew = (COMMANDS *)_xrealloc( aCommnew, sizeof( COMMANDS ) * maxcommands ); } - aCommands[kolcommands].name = strodup ( cmdname ); + aCommnew[kolcommands].name = strodup ( cmdname ); kolcommands++; } +COMMANDS* getCommand ( int ndef ) +{ + return (ndef>=kolcomm)? &(aCommnew[ndef-kolcomm]):&(aCommands[ndef]); +} + int ParseExpression( char* sLine, char* sOutLine ) { char sToken[MAX_NAME]; char *ptri, *ptro; - int lenToken,npars,ndef,i; + int lenToken,npars,i,ndef; int rezDef, rezCom, kolpass = 0; - int aUsed[100], kolused = 0, lastused; + int kolused = 0, lastused; + DEFINES *aUsed[100], *stdef; do { @@ -505,19 +540,19 @@ int ParseExpression( char* sLine, char* sOutLine ) lastused = kolused; /* Look for macros from #define */ while ( ( lenToken = NextName(&ptri, sToken, &ptro) ) > 0 ) - if ( (ndef=DefSearch(sToken)) >= 0 ) + if ( (stdef=DefSearch(sToken)) != NULL ) { - for(i=0;ipars == NULL ) { rezDef = 1; ptro -= lenToken; lenToken = 0; - while ( *(aDefines[ndef].value+lenToken) != '\0' ) - *ptro++ = *(aDefines[ndef].value+lenToken++); + while ( *(stdef->value+lenToken) != '\0' ) + *ptro++ = *(stdef->value+lenToken++); } else { @@ -530,11 +565,11 @@ int ParseExpression( char* sLine, char* sOutLine ) if ( *(ptri+i) == ',' ) npars++; i++; } - if ( aDefines[ndef].npars == npars + 1 ) + if ( stdef->npars == npars + 1 ) { rezDef = 1; ptro -= lenToken; - WorkDefine( &ptri, &ptro, ndef ); + WorkDefine( &ptri, &ptro, stdef ); } } else *ptro++ = ' '; @@ -547,7 +582,10 @@ int ParseExpression( char* sLine, char* sOutLine ) if ( !kolpass ) { ptri = sLine; ptro = sOutLine; - lenToken = NextWord( &ptri, sToken, FALSE); +// lenToken = NextWord( &ptri, sToken, FALSE); + SKIPTABSPACES( ptri ); + if ( isname(*ptri) ) lenToken = NextName( &ptri, sToken, NULL); + else { *sToken = *ptri++; *(sToken+1) = '\0'; lenToken = 1; } if ( (ndef=ComSearch(sToken,0)) >= 0 ) { if ( (i = WorkCommand( sToken, ptri, &ptro, ndef )) > 0 ) @@ -562,16 +600,16 @@ int ParseExpression( char* sLine, char* sOutLine ) return 0; } -void WorkDefine ( char** ptri, char** ptro, int ndef ) +void WorkDefine ( char** ptri, char** ptro, DEFINES *stdef ) { char parfict[MAX_NAME], parreal[MAX_NAME]; char *ptrb; int ipos = 0, ifou, ibeg; int lenfict, lenreal, lenres; - while ( *(aDefines[ndef].value+ipos) != '\0' ) /* Copying value of macro */ + while ( *(stdef->value+ipos) != '\0' ) /* Copying value of macro */ { /* to destination string */ - *(*ptro+ipos) = *(aDefines[ndef].value+ipos); + *(*ptro+ipos) = *(stdef->value+ipos); ipos++; } *(*ptro+ipos) = '\0'; @@ -580,7 +618,7 @@ void WorkDefine ( char** ptri, char** ptro, int ndef ) ipos = 0; ibeg = 0; do /* Parsing through parameters */ { /* in macro definition */ - if ( *(aDefines[ndef].pars+ipos)==',' || *(aDefines[ndef].pars+ipos)=='\0' ) + if ( *(stdef->pars+ipos)==',' || *(stdef->pars+ipos)=='\0' ) { *(parfict+ipos-ibeg) = '\0'; lenfict = ipos - ibeg; @@ -609,8 +647,8 @@ void WorkDefine ( char** ptri, char** ptro, int ndef ) ibeg = ipos+1; } } - else *(parfict+ipos-ibeg) = *(aDefines[ndef].pars+ipos); - if ( *(aDefines[ndef].pars+ipos) == '\0' ) break; + else *(parfict+ipos-ibeg) = *(stdef->pars+ipos); + if ( *(stdef->pars+ipos) == '\0' ) break; ipos++; } while ( 1 ); @@ -627,10 +665,10 @@ int WorkCommand ( char* sToken, char* ptri, char** ptro, int ndef ) char *ptrmp; /* Copying result pattern to destination string */ - lenres = strocpy ( *ptro, aCommands[ndef].value ); + lenres = strocpy ( *ptro, getCommand(ndef)->value ); CmdParse ( ptri, aCmdStru ); /* Parse input string */ - ptrmp = aCommands[ndef].mpatt; /* Pointer to a match pattern */ + ptrmp = getCommand(ndef)->mpatt; /* Pointer to a match pattern */ do { Repeate = 0; @@ -666,7 +704,7 @@ int WorkCommand ( char* sToken, char* ptri, char** ptro, int ndef ) rez = 0; break; default: /* Key word */ - if ( aCmdStru[iItem][1] != IT_ID || + if ( aCmdStru[iItem][1] == IT_COMMA || strocmp(ptri + aCmdStru[iItem][0], &ptrmp ) ) { if ( nbr ) { SkipOptional( &ptrmp, *ptro, &lenres); iItem--; } @@ -700,9 +738,9 @@ int WorkCommand ( char* sToken, char* ptri, char** ptro, int ndef ) if ( !rez && (ndef = ComSearch(sToken,ndef-1))>=0 ) { - ptrmp = aCommands[ndef].mpatt; /* Pointer to a match pattern */ + ptrmp = getCommand(ndef)->mpatt; /* Pointer to a match pattern */ /* Copying result pattern to destination string */ - lenres = strocpy ( *ptro, aCommands[ndef].value ); + lenres = strocpy ( *ptro, getCommand(ndef)->value ); } } while ( !rez && ndef >= 0 ); @@ -779,6 +817,9 @@ void CmdParse ( char *ptri, int aCmdStru[100][2] ) { State = STATE_BRACKET; StBr1 = 1; + aCmdStru[ aCmdStru[0][0] ][1] = IT_ID_OR_EXPR; + aCmdStru[0][0]++; + aCmdStru[ aCmdStru[0][0] ][0] = i; aCmdStru[ aCmdStru[0][0] ][1] = IT_EXPR; } else if ( *ptri == '[' ) @@ -792,6 +833,9 @@ void CmdParse ( char *ptri, int aCmdStru[100][2] ) State = STATE_BRACKET; StBr3 = 1; aCmdStru[ aCmdStru[0][0] ][1] = IT_ID; + aCmdStru[0][0]++; + aCmdStru[ aCmdStru[0][0] ][0] = i; + aCmdStru[ aCmdStru[0][0] ][1] = IT_EXPR; } else if ( *ptri == ' ' ) State = STATE_ID_END; break; @@ -825,16 +869,18 @@ int WorkMarkers( char **ptrmp, char *ptri, char *ptro, int *lenres, int aCmdStru lenpatt = stroncpy ( exppatt, *ptrmp, 4 ); *ptrmp += 4; + ifiItem = *iItem; + if ( aCmdStru[ifiItem][1] == IT_ID_OR_EXPR ) (*iItem)++; if ( *(exppatt+2) == '4' ) /* ---- extended match marker */ { /* Copying a real expression to 'expreal' */ - lenreal = stroncpy ( expreal, ptri + aCmdStru[*iItem][0], - aCmdStru[*iItem+1][0]-aCmdStru[*iItem][0] ); + lenreal = stroncpy ( expreal, ptri + aCmdStru[ifiItem][0], + aCmdStru[*iItem+1][0]-aCmdStru[ifiItem][0] ); SearnRep( exppatt,expreal,lenreal,ptro,lenres); } else if ( *(exppatt+2) == '3' ) /* ---- wild match marker */ { - ifiItem = *iItem; *iItem = aCmdStru[0][0]; + *iItem = aCmdStru[0][0]; /* Copying a real expression to 'expreal' */ lenreal = stroncpy ( expreal, ptri + aCmdStru[ifiItem][0], aCmdStru[*iItem+1][0]-aCmdStru[ifiItem][0] ); @@ -847,8 +893,8 @@ int WorkMarkers( char **ptrmp, char *ptri, char *ptro, int *lenres, int aCmdStru *(exppatt+lenpatt) = '\0'; (*ptrmp)++; /* Copying a real expression to 'expreal' */ - lenreal = stroncpy ( expreal, ptri + aCmdStru[*iItem][0], - aCmdStru[*iItem+1][0]-aCmdStru[*iItem][0] ); + lenreal = stroncpy ( expreal, ptri + aCmdStru[ifiItem][0], + aCmdStru[*iItem+1][0]-aCmdStru[ifiItem][0] ); ptr = exppatt + 4; rezrestr = 0; @@ -894,7 +940,6 @@ int WorkMarkers( char **ptrmp, char *ptri, char *ptro, int *lenres, int aCmdStru } else if ( *(exppatt+2) == '1' ) /* ---- list match marker */ { - ifiItem = *iItem; while ( *iItem < aCmdStru[0][0] && aCmdStru[*iItem+1][1] == IT_COMMA ) *iItem+=2; /* Copying a real expression to 'expreal' */ lenreal = stroncpy ( expreal, ptri + aCmdStru[ifiItem][0], @@ -904,8 +949,8 @@ int WorkMarkers( char **ptrmp, char *ptri, char *ptro, int *lenres, int aCmdStru else /* ---- regular match marker */ { /* Copying a real expression to 'expreal' */ - lenreal = stroncpy ( expreal, ptri + aCmdStru[*iItem][0], - aCmdStru[*iItem+1][0]-aCmdStru[*iItem][0] ); + lenreal = stroncpy ( expreal, ptri + aCmdStru[ifiItem][0], + aCmdStru[*iItem+1][0]-aCmdStru[ifiItem][0] ); SearnRep( exppatt,expreal,lenreal,ptro,lenres); } return 1; @@ -940,7 +985,9 @@ void SearnRep( char *exppatt,char *expreal,int lenreal,char *ptro, int *lenres) { int ifou, isdvig = 0, rezs; int kolmarkers; + int lennew, i; char lastchar = '0'; + char expnew[MAX_NAME]; char *ptr, *ptr2; while ( (ifou = hb_strAt( exppatt, 2, ptro+isdvig, *lenres-isdvig )) > 0 ) { @@ -967,14 +1014,12 @@ void SearnRep( char *exppatt,char *expreal,int lenreal,char *ptro, int *lenres) } else { - char expnew[MAX_NAME]; - int lennew = ptr2-ptr-1, i; + lennew = ptr2-ptr-1; memcpy ( expnew, ptr+1, lennew ); *(expnew + lennew) = '\0'; - i = hb_strAt( exppatt, 2, expnew, lennew ); - lennew += ReplacePattern ( exppatt[2], expreal, lenreal, - expnew+i-1, lennew ); + while ( (i = hb_strAt( exppatt, 2, expnew, lennew )) > 0 ) + lennew += ReplacePattern ( exppatt[2], expreal, lenreal, expnew+i-1, lennew ); if ( kolmarkers ) { groupchar = (char) ( (unsigned int)groupchar + 1 ); @@ -1259,11 +1304,11 @@ int NextName ( char** sSource, char* sDest, char **sOut ) { int i = 0; while ( **sSource != '\0' && !isname(**sSource) ) - { if ( *sOut !=NULL ) *(*sOut)++ = **sSource; (*sSource)++; } + { if ( sOut !=NULL ) *(*sOut)++ = **sSource; (*sSource)++; } while ( **sSource != '\0' && isname(**sSource) ) { - if ( *sOut !=NULL ) *(*sOut)++ = **sSource; + if ( sOut !=NULL ) *(*sOut)++ = **sSource; *sDest++ = *(*sSource)++; i++; } *sDest = '\0'; diff --git a/harbour/source/hbpp/makefile.b16 b/harbour/source/hbpp/makefile.b16 index a5e68265e6..f920e3a5fe 100644 --- a/harbour/source/hbpp/makefile.b16 +++ b/harbour/source/hbpp/makefile.b16 @@ -2,7 +2,8 @@ PROJECT: hbpp.exe -hbpp.exe : hbpp.c harb.c - \borlandc\bin\bcc -ml hbpp.c harb.c +hbpp.exe : hbpp.c harb.c table.c + \borlandc\bin\bcc -ml hbpp.c harb.c table.c del hbpp.obj del harb.obj + del table.obj \ No newline at end of file diff --git a/harbour/source/hbpp/makefile.b32 b/harbour/source/hbpp/makefile.b32 index 0351ec0f20..f407c77e73 100644 --- a/harbour/source/hbpp/makefile.b32 +++ b/harbour/source/hbpp/makefile.b32 @@ -2,7 +2,8 @@ PROJECT: hbpp.exe -hbpp.exe : hbpp.c harb.c - bcc32 -O2 -I\borland\cbuilder\include hbpp.c harb.c +hbpp.exe : hbpp.c harb.c table.c + bcc32 -O2 -I\borland\cbuilder\include hbpp.c harb.c table.c del hbpp.obj del harb.obj + del table.obj \ No newline at end of file diff --git a/harbour/source/hbpp/table.c b/harbour/source/hbpp/table.c new file mode 100644 index 0000000000..ecf1417b59 --- /dev/null +++ b/harbour/source/hbpp/table.c @@ -0,0 +1,330 @@ +#include +typedef struct +{ + char *name; + char *pars; + int npars; + char *value; +} DEFINES; +typedef struct +{ + char *name; + char *mpatt; + char *value; +} COMMANDS; + +int koldef = 41; +DEFINES aDefines[] = +{ + { "_SET_EXACT",NULL,0,"1" }, + { "_SET_FIXED",NULL,0,"2" }, + {"_SET_DECIMALS",NULL,0,"3"}, + {"_SET_DATEFORMAT",NULL,0,"4"}, + {"_SET_EPOCH",NULL,0,"5"}, + {"_SET_PATH",NULL,0,"6"}, + {"_SET_DEFAULT",NULL,0,"7"}, + {"_SET_EXCLUSIVE",NULL,0,"8"}, + {"_SET_SOFTSEEK",NULL,0,"9"}, + {"_SET_UNIQUE",NULL,0,"10"}, + {"_SET_DELETED",NULL,0,"11"}, + {"_SET_CANCEL",NULL,0,"12"}, + {"_SET_DEBUG",NULL,0,"13"}, + {"_SET_TYPEAHEAD",NULL,0,"14"}, + {"_SET_COLOR",NULL,0,"15"}, + {"_SET_CURSOR",NULL,0,"16"}, + {"_SET_CONSOLE",NULL,0,"17"}, + {"_SET_ALTERNATE",NULL,0,"18"}, + {"_SET_ALTFILE",NULL,0,"19"}, + {"_SET_DEVICE",NULL,0,"20"}, + {"_SET_EXTRA",NULL,0,"21"}, + {"_SET_EXTRAFILE",NULL,0,"22"}, + {"_SET_PRINTER",NULL,0,"23"}, + {"_SET_PRINTFILE",NULL,0,"24"}, + {"_SET_MARGIN",NULL,0,"25"}, + {"_SET_BELL",NULL,0,"26"}, + {"_SET_CONFIRM",NULL,0,"27"}, + {"_SET_ESCAPE",NULL,0,"28"}, + {"_SET_INSERT",NULL,0,"29"}, + {"_SET_EXIT",NULL,0,"30"}, + {"_SET_INTENSITY",NULL,0,"31"}, + {"_SET_SCOREBOARD",NULL,0,"32"}, + {"_SET_DELIMITERS",NULL,0,"33"}, + {"_SET_DELIMCHARS",NULL,0,"34"}, + {"_SET_WRAP",NULL,0,"35"}, + {"_SET_MESSAGE",NULL,0,"36"}, + {"_SET_MCENTER",NULL,0,"37"}, + {"_SET_SCROLLBREAK",NULL,0,"38"}, + {"_SET_COUNT",NULL,0,"38"}, + {"_SET_CH",NULL,0,NULL}, + {"_DFSET","x,y",2,"Set( _SET_DATEFORMAT, if(__SetCentury(), x, y) )"} +}; + +int kolcomm = 239; +COMMANDS aCommands[] = +{ + {"DO","WHILE \1A00","while \1A00"}, + {"END","\1A00","end"}, + {"END","SEQUENCE","end"}, + {"ENDSEQUENCE","","end"}, + {"ENDDO","\1A30","enddo"}, + {"ENDIF","\1A30","endif"}, + {"ENDCASE","\1A30","endcase"}, + {"ENDFOR","[ \1A30 ]","next"}, + {"NEXT","\1A00 [TO \1B00] [STEP \1C00]","next"}, + {"DO","\1A00.PRG [WITH \1B10]","do \1A00 [ WITH \1B00]"}, + {"CALL","\1A00() [WITH \1B10]","call \1A00 [ WITH \1B00]"}, + {"STORE","\1A00 TO \1B00 [, \1C00 ]","\1B00 := [ \1C00 := ] \1A00"}, + {"SET","ECHO \1A30",NULL}, + {"SET","HEADING \1A30",NULL}, + {"SET","MENU \1A30",NULL}, + {"SET","STATUS \1A30",NULL}, + {"SET","STEP \1A30",NULL}, + {"SET","SAFETY \1A30",NULL}, + {"SET","TALK \1A30",NULL}, + {"SET","PROCEDURE TO",NULL}, + {"SET","PROCEDURE TO \1A00","_ProcReq_( \1A30 )"}, + {"SET","EXACT \1A20ON,OFF,&>","Set( _SET_EXACT, \1A30 )"}, + {"SET","EXACT (\1A00)","Set( _SET_EXACT, \1A00 )"}, + {"SET","FIXED \1A20ON,OFF,&>","Set( _SET_FIXED, \1A30 )"}, + {"SET","FIXED (\1A00)","Set( _SET_FIXED, \1A00 )"}, + {"SET","DECIMALS TO \1A00","Set( _SET_DECIMALS, \1A00 )"}, + {"SET","DECIMALS TO","Set( _SET_DECIMALS, 0 )"}, + {"SET","PATH TO \1A30","Set( _SET_PATH, \1A30 )"}, + {"SET","PATH TO","Set( _SET_PATH, "" )"}, + {"SET","DEFAULT TO \1A40","Set( _SET_DEFAULT, \1A30 )"}, + {"SET","DEFAULT TO","Set( _SET_DEFAULT, "" )"}, + {"SET","CENTURY \1A20ON,OFF,&>","__SetCentury( \1A30 )"}, + {"SET","CENTURY (\1A00)","__SetCentury( \1A00 )"}, + {"SET","EPOCH TO \1A00","Set( _SET_EPOCH, \1A00 )"}, + {"SET","DATE FORMAT [TO] \1A00","Set( _SET_DATEFORMAT, \1A00 )"}, + {"SET","DATE [TO] AMERICAN","_DFSET( 'mm/dd/yyyy', 'mm/dd/yy' )"}, + {"SET","DATE [TO] ANSI","_DFSET( 'yyyy.mm.dd', 'yy.mm.dd' )"}, + {"SET","DATE [TO] BRITISH","_DFSET( 'dd/mm/yyyy', 'dd/mm/yy' )"}, + {"SET","DATE [TO] FRENCH","_DFSET( 'dd/mm/yyyy', 'dd/mm/yy' )"}, + {"SET","DATE [TO] GERMAN","_DFSET( 'dd.mm.yyyy', 'dd.mm.yy' )"}, + {"SET","DATE [TO] ITALIAN","_DFSET( 'dd-mm-yyyy', 'dd-mm-yy' )"}, + {"SET","DATE [TO] JAPANESE","_DFSET( 'yyyy/mm/dd', 'yy/mm/dd' )"}, + {"SET","DATE [TO] USA","_DFSET( 'mm-dd-yyyy', 'mm-dd-yy' )"}, + {"SET","ALTERNATE \1A20ON,OFF,&>","Set( _SET_ALTERNATE, \1A30 )"}, + {"SET","ALTERNATE (\1A00)","Set( _SET_ALTERNATE, \1A00 )"}, + {"SET","ALTERNATE TO","Set( _SET_ALTFILE, "" )"}, + {"SET","ALTERNATE TO \1A40 [\1B20 ADDITIVE>]","Set( _SET_ALTFILE, \1A30, \1B50 )"}, + {"SET","CONSOLE \1A20ON,OFF,&>","Set( _SET_CONSOLE, \1A30 )"}, + {"SET","CONSOLE (\1A00)","Set( _SET_CONSOLE, \1A00 )"}, + {"SET","MARGIN TO \1A00","Set( _SET_MARGIN, \1A00 )"}, + {"SET","MARGIN TO","Set( _SET_MARGIN, 0 )"}, + {"SET","PRINTER \1A20ON,OFF,&>","Set( _SET_PRINTER, \1A30 )"}, + {"SET","PRINTER (\1A00)","Set( _SET_PRINTER, \1A00 )"}, + {"SET","PRINTER TO","Set( _SET_PRINTFILE, "" )"}, + {"SET","PRINTER TO \1A40 [\1B20 ADDITIVE>]","Set( _SET_PRINTFILE, \1A30, \1B50 )"}, + {"SET","DEVICE TO SCREEN","Set( _SET_DEVICE, 'SCREEN' )"}, + {"SET","DEVICE TO PRINTER","Set( _SET_DEVICE, 'PRINTER' )"}, + {"SET","COLOR TO [\1A30]","SetColor( \1A10 )"}, + {"SET","COLOR TO ( \1A00 )","SetColor( \1A00 )"}, + {"SET","COLOUR TO [\1A30]","SET COLOR TO [\1A00]"}, + {"SET","CURSOR \1A20ON,OFF,&>","SetCursor( if(Upper(\1A30) == 'ON', 1, 0) )"}, + {"SET","CURSOR (\1A00)","SetCursor( if(\1A00, 1, 0) )"}, + {"?","[ \1A10]","QOut( \1A00 )"}, + {"??","[ \1A10]","QQOut( \1A00 )"}, + {"EJECT","","__Eject()"}, + {"TEXT","","text QOut, QQOut"}, + {"TEXT","TO FILE \1A40","__TextSave( \1A30 ) ; text QOut, __TextRestore"}, + {"TEXT","TO PRINTER","__TextSave('PRINTER') ; text QOut, __TextRestore"}, + {"CLS","","Scroll() ; SetPos(0,0)"}, + {"CLEAR","SCREEN","CLS"}, + {"@","\1A00, \1B00","Scroll( \1A00, \1B00, \1A00 ) ; SetPos( \1A00, \1B00 )"}, + {"@","\1A00, \1B00 CLEAR","Scroll( \1A00, \1B00 ) ; SetPos( \1A00, \1B00 )"}, + {"@","\1A00, \1B00 CLEAR TO \1C00, \1D00","Scroll( \1A00, \1B00, \1C00, \1D00 ) ; SetPos( \1A00, \1B00 )"}, + {"@","\1A00, \1B00, \1C00, \1D00 BOX \1E00 [COLOR \1F00]","DispBox( \1A00, \1B00, \1C00, \1D00, \1E00 [, \1F00 ] )"}, + {"@","\1A00, \1B00 TO \1C00, \1D00 [DOUBLE] [COLOR \1E00]","DispBox( \1A00, \1B00, \1C00, \1D00, 2 [, \1E00 ] )"}, + {"@","\1A00, \1B00 TO \1C00, \1D00 [COLOR \1E00]","DispBox( \1A00, \1B00, \1C00, \1D00, 1 [, \1E00 ] )"}, + {"@","\1A00, \1B00 SAY \1C00 [PICTURE \1D00] [COLOR \1E00]","DevPos( \1A00, \1B00 ) ; DevOutPict( \1C00, \1D00 [, \1E00] )"}, + {"@","\1A00, \1B00 SAY \1C00 [COLOR \1D00]","DevPos( \1A00, \1B00 ) ; DevOut( \1C00 [, \1D00] )"}, + {"SET","BELL \1A20ON,OFF,&>","Set( _SET_BELL, \1A30 )"}, + {"SET","BELL (\1A00)","Set( _SET_BELL, \1A00 )"}, + {"SET","CONFIRM \1A20ON,OFF,&>","Set( _SET_CONFIRM, \1A30 )"}, + {"SET","CONFIRM (\1A00)","Set( _SET_CONFIRM, \1A00 )"}, + {"SET","ESCAPE \1A20ON,OFF,&>","Set( _SET_ESCAPE, \1A30 )"}, + {"SET","ESCAPE (\1A00)","Set( _SET_ESCAPE, \1A00 )"}, + {"SET","INTENSITY \1A20ON,OFF,&>","Set( _SET_INTENSITY, \1A30 )"}, + {"SET","INTENSITY (\1A00)","Set( _SET_INTENSITY, \1A00 )"}, + {"SET","SCOREBOARD \1A20ON,OFF,&>","Set( _SET_SCOREBOARD, \1A30 )"}, + {"SET","SCOREBOARD (\1A00)","Set( _SET_SCOREBOARD, \1A00 )"}, + {"SET","DELIMITERS \1A20ON,OFF,&>","Set( _SET_DELIMITERS, \1A30 )"}, + {"SET","DELIMITERS (\1A00)","Set( _SET_DELIMITERS, \1A00 )"}, + {"SET","DELIMITERS TO \1A00","Set( _SET_DELIMCHARS, \1A00 )"}, + {"SET","DELIMITERS TO DEFAULT","Set( _SET_DELIMCHARS, '::' )"}, + {"SET","DELIMITERS TO","Set( _SET_DELIMCHARS, '::' )"}, + {"SET","FORMAT TO \1A00","_ProcReq_( \1A30 + '.FMT' ) ; __SetFormat( {|| \1A00()} )"}, + {"SET","FORMAT TO \1A00.\1B00","_ProcReq_( \1A30 + '.' + \1B30 ) ; __SetFormat( {|| \1A00()} )"}, + {"SET","FORMAT TO \1A20&>","if ( Empty(\1A30) ) ; SET FORMAT TO ; else ; __SetFormat( &('{||' + \1A30 + '()}') ) ; end"}, + {"SET","FORMAT TO","__SetFormat()"}, + {"@","\1A00, \1B00 GET \1C00 [PICTURE \1D00] [VALID \1E00] [WHEN \1F00] [SEND \1G00]", + "SetPos( \1A00, \1B00 ) ; AAdd( GetList, _GET_( \1C00, \1C20, \1D00, \1E40, \1F40 ):display() ) [; ATail(GetList):\1G00]"}, + {"@","\1A00, \1B00 SAY \1C00 [\1D10] GET \1E00 [\1F10]","@ \1A00, \1B00 SAY \1C00 [\1D00] ; @ Row(), Col()+1 GET \1E00 [\1F00]"}, + {"@","\1A00, \1B00 GET \1C00 [\1D10] RANGE \1E00, \1F00 [\1G10]", + "@ \1A00, \1B00 GET \1C00 [\1D00] VALID {|_1| RangeCheck(_1,, \1E00, \1F00)} [\1G00]"}, + {"@","\1A00, \1B00 GET \1C00 [\1D10] COLOR \1E00 [\1F10]","@ \1A00, \1B00 GET \1C00 [\1D00] SEND colorDisp(\1E00) [\1F00]"}, + {"READ","SAVE","ReadModal(GetList)"}, + {"READ","","ReadModal(GetList) ; GetList := {}"}, + {"CLEAR","GETS","ReadKill(.T.) ; GetList := {}"}, + {"@","[\1A10] COLOUR [\1B10]","@ [\1A00] COLOR [\1B00]"}, + {"SET","WRAP \1A20ON,OFF,&>","Set( _SET_WRAP, \1A30 )"}, + {"SET","WRAP (\1A00)","Set( _SET_WRAP, \1A00 )"}, + {"SET","MESSAGE TO \1A00 [\1B20 CENTER, CENTRE>]","Set( _SET_MESSAGE, \1A00 ) ; Set( _SET_MCENTER, \1B50 )"}, + {"SET","MESSAGE TO","Set( _SET_MESSAGE, 0 ) ; Set( _SET_MCENTER, .f. )"}, + {"@","\1A00, \1B00 PROMPT \1C00 [MESSAGE \1D00]","__AtPrompt( \1A00, \1B00, \1C00 , \1D00 )"}, + {"MENU","TO \1A00","\1A00 := __MenuTo( {|_1| if(PCount() == 0, \1A00, \1A00 := _1)}, \1A10 )"}, + {"SAVE","SCREEN","__XSaveScreen()"}, + {"RESTORE","SCREEN","__XRestScreen()"}, + {"SAVE","SCREEN TO \1A00","\1A00 := SaveScreen( 0, 0, Maxrow(), Maxcol() )"}, + {"RESTORE","SCREEN FROM \1A00","RestScreen( 0, 0, Maxrow(), Maxcol(), \1A00 )"}, + {"WAIT","[\1A00]","__Wait( \1A00 )"}, + {"WAIT","[\1A00] TO \1B00","\1B00 := __Wait( \1A00 )"}, + {"ACCEPT","[\1A00] TO \1B00","\1B00 := __Accept( \1A00 )"}, + {"INPUT","[\1A00] TO \1B00", "if ( !Empty(__Accept(\1A00)) ) ; \1B00 := &( __AcceptStr() ) ; end"}, + {"KEYBOARD","\1A00","__Keyboard( \1A00 )"}, + {"CLEAR","TYPEAHEAD","__Keyboard()"}, + {"SET","TYPEAHEAD TO \1A00","Set( _SET_TYPEAHEAD, \1A00 )"}, + {"SET","KEY \1A00 TO \1B00","SetKey( \1A00, {|p, l, v| \1B00(p, l, v)} )"}, + {"SET","KEY \1A00 TO \1B00 ( [\1C10] )","SET KEY \1A00 TO \1B00"}, + {"SET","KEY \1A00 TO \1B20&>","if ( Empty(\1B30) ) ; SetKey( \1A00, NIL ) ; else ; SetKey( \1A00, {|p, l, v| \1B00(p, l, v)} ) ; end"}, + {"SET","KEY \1A00 [TO]","SetKey( \1A00, NIL )"}, + {"SET","FUNCTION \1A00 [TO] [\1B00]","__SetFunction( \1A00, \1B00 )"}, + {"CLEAR","MEMORY","__MClear()"}, + {"RELEASE","\1A10s","__MXRelease( \1A20 )"}, + {"RELEASE","ALL","__MRelease('*', .t.)"}, + {"RELEASE","ALL LIKE \1A00","__MRelease( \1A10, .t. )"}, + {"RELEASE","ALL EXCEPT \1A00","__MRelease( \1A10, .f. )"}, + {"RESTORE","[FROM \1A40] [\1B20 ADDITIVE>]","__MRestore( \1A30, \1B50 )"}, + {"SAVE","ALL LIKE \1A00 TO \1B40","__MSave( \1B30, \1A30, .t. )"}, + {"SAVE","TO \1A40 ALL LIKE \1B00","__MSave( \1A30, \1B30, .t. )"}, + {"SAVE","ALL EXCEPT \1A00 TO \1B40","__MSave( \1B30, \1A30, .f. )"}, + {"SAVE","TO \1A40 ALL EXCEPT \1B00","__MSave( \1A30, \1B30, .f. )"}, + {"SAVE","[TO \1A40] [ALL]","__MSave( \1A30, '*', .t. )"}, + {"ERASE","\1A40","FErase( \1A30 )"}, + {"DELETE","FILE \1A40","FErase( \1A30 )"}, + {"RENAME","\1A40 TO \1B40","FRename( \1A30, \1B30 )"}, + {"COPY","FILE \1A40 TO \1B40","__CopyFile( \1A30, \1B30 )"}, + {"DIR","[\1A40]","__Dir( \1A30 )"}, + {"TYPE","\1A40 [\1B20 TO PRINTER>] [TO FILE \1C40]","__TypeFile( \1A30, \1B50 ) [; COPY FILE \1A30 TO \1C30 ]"}, + {"TYPE","\1A40 [\1B20 TO PRINTER>]","__TypeFile( \1A30, \1B50 )"}, + {"REQUEST","\1A10s","EXTERNAL \1A00"}, + {"CANCEL","","__Quit()"}, + {"QUIT","","__Quit()"}, + {"RUN","\1A30","__Run( \1A10 )"}, + {"RUN","( \1A00 )","__Run( \1A00 )"}, + {"!","\1A30","RUN \1A00"}, + {"RUN","= \1A00","( run := \1A00 )"}, + {"RUN",":= \1A00","( run := \1A00 )"}, + {"SET","EXCLUSIVE \1A20ON,OFF,&>","Set( _SET_EXCLUSIVE, \1A30 )"}, + {"SET","EXCLUSIVE (\1A00)","Set( _SET_EXCLUSIVE, \1A00 )"}, + {"SET","SOFTSEEK \1A20ON,OFF,&>","Set( _SET_SOFTSEEK, \1A30 )"}, + {"SET","SOFTSEEK (\1A00)","Set( _SET_SOFTSEEK, \1A00 )"}, + {"SET","UNIQUE \1A20ON,OFF,&>","Set( _SET_UNIQUE, \1A30 )"}, + {"SET","UNIQUE (\1A00)","Set( _SET_UNIQUE, \1A00 )"}, + {"SET","DELETED \1A20ON,OFF,&>","Set( _SET_DELETED, \1A30 )"}, + {"SET","DELETED (\1A00)","Set( _SET_DELETED, \1A00 )"}, + {"SELECT","\1A00","dbSelectArea( \1A30 )"}, + {"SELECT","\1A00([\1B10])","dbSelectArea( \1A00(\1B00) )"}, + {"USE","","dbCloseArea()"}, + {"USE","\1A40 [VIA \1B00] [ALIAS \1C00] [\1D20 NEW>] [\1E20 EXCLUSIVE>] [\1F20 SHARED>] [\1G20 READONLY>] [INDEX \1H40 [, \1I40]]", + "dbUseArea( \1D50, \1B00, \1A30, \1C30, if(\1F50 .or. \1E50, !\1E50, NIL), \1G50 ) [; dbSetIndex( \1H30 )] [; dbSetIndex( \1I30 )]"}, + {"APPEND","BLANK","dbAppend()"}, + {"PACK","","__dbPack()"}, + {"ZAP","","__dbZap()"}, + {"UNLOCK","","dbUnlock()"}, + {"UNLOCK","ALL","dbUnlockAll()"}, + {"COMMIT","","dbCommitAll()"}, + {"GOTO","\1A00","dbGoto(\1A00)"}, + {"GO","\1A00","dbGoto(\1A00)"}, + {"GOTO","TOP","dbGoTop()"}, + {"GO","TOP","dbGoTop()"}, + {"GOTO","BOTTOM","dbGoBottom()"}, + {"GO","BOTTOM","dbGoBottom()"}, + {"SKIP","","dbSkip(1)"}, + {"SKIP","\1A00","dbSkip( \1A00 )"}, + {"SKIP","ALIAS \1A00","\1A00 -> ( dbSkip(1) )"}, + {"SKIP","\1A00 ALIAS \1B00","\1B00 -> ( dbSkip(\1A00) )"}, + {"SEEK","\1A00 [\1B20 SOFTSEEK>]","dbSeek( \1A00, if( \1B50, .T., NIL ) )"}, + {"FIND","\1A30","dbSeek( \1A30 )"}, + {"FIND",":= \1A00","( find := \1A00 )"}, + {"FIND","= \1A00","( find := \1A00 )"}, + {"CONTINUE","","__dbContinue()"}, + {"LOCATE","[FOR \1A00] [WHILE \1B00] [NEXT \1C00] [RECORD \1D00] [\1E20REST>] [ALL]", + "__dbLocate(\1A40,\1B40,\1C00,\1D00,\1E50)"}, + {"SET","RELATION TO","dbClearRel()"}, + {"SET","RELATION [\1A20ADDITIVE>] [TO \1B00 INTO \1C40 [, [TO] \1D00 INTO \1E40]]", + "if ( !\1A50 ) ; dbClearRel() ; end ; dbSetRelation(\1C30,\1B40,\1B20) [; dbSetRelation(\1E30,\1D40,\1D20)]"}, + {"SET","FILTER TO","dbClearFilter(NIL)"}, + {"SET","FILTER TO \1A00","dbSetFilter( \1A40, \1A20 )"}, + {"SET","FILTER TO \1A20&>","if ( Empty(\1A30) ) ; dbClearFilter() ; else ; dbSetFilter(\1A40,\1A30) ; end"}, + {"REPLACE","[ \1A00 WITH \1B00 [, \1C00 WITH \1D00] ] [FOR \1E00] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [ALL]"}, + {"DBEval( {|| _FIELD->\1A00 := \1B00 [,_FIELD->\1C00 := \1D00]},\1E40,\1F40,\1G00,\1H00,\1I50)"}, + {"REPLACE","\1A00 WITH \1B00 [, \1C00 WITH \1D00 ]","_FIELD->\1A00 := \1B00 [; _FIELD->\1C00 := \1D00]"}, + {"DELETE","[FOR \1A00] [WHILE \1B00] [NEXT \1C00] [RECORD \1D00] [\1E20REST>] [ALL]"}, + {"DBEval( {|| dbDelete()}, \1A40, \1B40, \1C00, \1D00, \1E50 )"}, + {"RECALL","[FOR \1A00] [WHILE \1B00] [NEXT \1C00] [RECORD \1D00] [\1E20REST>] [ALL]"}, + {"DBEval( {|| dbRecall()}, \1A40, \1B40, \1C00, \1D00, \1E50 )"}, + {"DELETE","","dbDelete()"}, + {"RECALL","","dbRecall()"}, + {"CREATE","\1A40 [FROM \1B40] [VIA \1C00] [ALIAS \1D00] [\1E20 NEW>]","__dbCreate( \1A30, \1B30, \1C00, \1E50, \1D30 )"}, + {"COPY","[STRUCTURE] [EXTENDED] [TO \1A40]","__dbCopyXStruct( \1A30 )"}, + {"COPY","[STRUCTURE] [TO \1A40] [FIELDS \1B10]","__dbCopyStruct( \1A30, { \1B30 } )"}, + {"COPY","[TO \1A40] [DELIMITED [WITH \1B30]] [FIELDS \1C10] [FOR \1D00] [WHILE \1E00] [NEXT \1F00] [RECORD \1G00] [\1H20REST>] [ALL]", + "__dbDelim( .T., \1A30, \1B30, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )"}, + {"COPY","[TO \1A40] [SDF] [FIELDS \1B10] [FOR \1C00] [WHILE \1D00] [NEXT \1E00] [RECORD \1F00] [\1G20REST>] [ALL]", + "__dbSDF( .T., \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )"}, + {"COPY","[TO \1A40] [FIELDS \1B10] [FOR \1C00] [WHILE \1D00] [NEXT \1E00] [RECORD \1F00] [\1G20REST>] [VIA \1H00] [ALL]", + "__dbCopy( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50, \1H00 )"}, + {"APPEND","[FROM \1A40] [DELIMITED [WITH \1B30]] [FIELDS \1C10] [FOR \1D00] [WHILE \1E00] [NEXT \1F00] [RECORD \1G00] [\1H20REST>] [ALL]", + "__dbDelim( .F., \1A30, \1B30, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )"}, + {"APPEND","[FROM \1A40] [SDF] [FIELDS \1B10] [FOR \1C00] [WHILE \1D00] [NEXT \1E00] [RECORD \1F00] [\1G20REST>] [ALL]", + "__dbSDF( .F., \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )"}, + {"APPEND","[FROM \1A40] [FIELDS \1B10] [FOR \1C00] [WHILE \1D00] [NEXT \1E00] [RECORD \1F00] [\1G20REST>] [VIA \1H00] [ALL]", + "__dbApp( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50, \1H00 )"}, + {"SORT","[TO \1A40] [ON \1B10] [FOR \1C00] [WHILE \1D00] [NEXT \1E00] [RECORD \1F00] [\1G20REST>] [ALL]", + "__dbSort( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )"}, + {"TOTAL","[TO \1A40] [ON \1B00] [FIELDS \1C10] [FOR \1D00] [WHILE \1E00] [NEXT \1F00] [RECORD \1G00] [\1H20REST>] [ALL]", + "__dbTotal( \1A30, \1B40, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )"}, + {"UPDATE","[FROM \1A40] [ON \1B00] [REPLACE \1C00 WITH \1D00 [, \1E00 WITH \1F00]] [\1G20RANDOM>]", + "__dbUpdate( \1A30, \1B40, \1G50, {|| _FIELD->\1C00 := \1D00 [, _FIELD->\1E00 := \1F00]} )"}, + {"JOIN","[WITH \1A40] [TO \1B00] [FIELDS \1C10] [FOR \1D00]","__dbJoin( \1A30, \1B30, { \1C30 }, \1D40 )"}, + {"COUNT","[TO \1A00] [FOR \1B00] [WHILE \1C00] [NEXT \1D00] [RECORD \1E00] [\1F20REST>] [ALL]", + "\1A00 := 0 ; DBEval( {|| \1A00 := \1A00 + 1}, \1B40, \1C40, \1D00, \1E00, \1F50 )"}, + {"SUM","[ \1A00 [, \1B00] TO \1C00 [, \1D00] ] [FOR \1E00] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [ALL]", + "\1C00 := [ \1D00 := ] 0 ; DBEval( {|| \1C00 := \1C00 + \1A00 [, \1D00 := \1D00 + \1B00 ]}, \1E40, \1F40, \1G00, \1H00, \1I50 )"}, + {"AVERAGE","[ \1A00 [, \1B00] TO \1C00 [, \1D00] ] [FOR \1E00] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [ALL]", + "M->__Avg := \1C00 := [ \1D00 := ] 0 ; DBEval( {|| M->__Avg := M->__Avg + 1, \1C00 := \1C00 + \1A00 [, \1D00 := \1D00 + \1B00] }, \1E40, \1F40, \1G00, \1H00, \1I50 ) ; \1C00 := \1C00 / M->__Avg [; \1D00 := \1D00 / M->__Avg ]"}, + {"LIST","[\1A10] [\1B20OFF>] [\1C20 TO PRINTER>] [TO FILE \1D40] [FOR \1E00] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [ALL]", + "__dbList( \1B50, { \1A40 }, .t., \1E40, \1F40, \1G00, \1H00, \1I50, \1C50, \1D30 )"}, + {"DISPLAY","[\1A10] [\1B20OFF>] [\1C20 TO PRINTER>] [TO FILE \1D40] [FOR \1E00] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [\1J20ALL>]", + "__DBList( \1B50, { \1A40 }, \1J50, \1E40, \1F40, \1G00, \1H00, \1I50, \1C50, \1D30 )"}, + {"REPORT","FORM \1A00 [HEADING \1B00] [\1C20 PLAIN>] [\1D20 NOEJECT>] [\1E20 SUMMARY>] [\1F20 NOCONSOLE>] [\1G20 TO PRINTER>] [TO FILE \1H40] [FOR \1I00] [WHILE \1J00] [NEXT \1K00] [RECORD \1L00] [\1M20REST>] [ALL]", + "__ReportForm( \1A30, \1G50, \1H30, \1F50, \1I40, \1J40, \1K00, \1L00, \1M50, \1C50, \1B00, \1D50, \1E50 )"}, + {"LABEL","FORM \1A00 [\1B20 SAMPLE>] [\1C20 NOCONSOLE>] [\1D20 TO PRINTER>] [TO FILE \1E40] [FOR \1F00] [WHILE \1G00] [NEXT \1H00] [RECORD \1I00] [\1J20REST>] [ALL]", + "__LabelForm( \1A30, \1D50, \1E30, \1C50, \1F40, \1G40, \1H00, \1I00, \1J50, \1B50 )"}, + {"CLOSE","\1A00","\1A00->( dbCloseArea() )"}, + {"CLOSE","","dbCloseArea()"}, + {"CLOSE","DATABASES","dbCloseAll()"}, + {"CLOSE","ALTERNATE","Set(_SET_ALTFILE, "")"}, + {"CLOSE","FORMAT","__SetFormat(NIL)"}, + {"CLOSE","INDEXES","dbClearIndex()"}, + {"CLOSE","PROCEDURE",NULL}, + {"CLOSE","ALL","CLOSE DATABASES ; SELECT 1 ; CLOSE FORMAT"}, + {"CLEAR","","CLEAR SCREEN ; CLEAR GETS"}, + {"CLEAR","ALL","CLOSE DATABASES ; CLOSE FORMAT ; CLEAR MEMORY ; CLEAR GETS ; SET ALTERNATE OFF ; SET ALTERNATE TO"}, + {"INDEX","ON \1A00 [TAG \1B40 ] TO \1C40 [FOR \1D00] [\1E20ALL>] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [EVAL \1J00] [EVERY \1K00] [\1L20 UNIQUE>] [\1M20 ASCENDING>] [\1N20 DESCENDING>]", + "ordCondSet( \1D20, \1D40, [\1E50], \1F40, \1J40, \1K00, RECNO(), \1G00, \1H00, [\1I50], [\1N50] ) ; ordCreate(\1C30, \1B30, \1A20, \1A40, [\1L50] )"}, + {"INDEX","ON \1A00 TAG \1B40 [TO \1C40] [FOR \1D00] [\1E20ALL>] [WHILE \1F00] [NEXT \1G00] [RECORD \1H00] [\1I20REST>] [EVAL \1J00] [EVERY \1K00] [\1L20 UNIQUE>] [\1M20 ASCENDING>] [\1N20 DESCENDING>]", + "ordCondSet( \1D20, \1D40, [\1E50], \1F40, \1J40, \1K00, RECNO(), \1G00, \1H00, [\1I50], [\1N50] ) ; ordCreate(\1C30, \1B30, \1A20, \1A40, [\1L50] )"}, + {"INDEX","ON \1A00 TO \1B40 [\1C20 UNIQUE>]","dbCreateIndex( \1B30, \1A20, \1A40, if( \1C50, .t., NIL ) )"}, + {"DELETE","TAG \1A40 [ IN \1B40 ] [, \1C40 [ IN \1D40 ] ]","ordDestroy( \1A30, \1B30 ) [; ordDestroy( \1C30, \1D30 ) ]"}, + {"REINDEX","[EVAL \1A00] [EVERY \1B00]","ordCondSet(,,,, \1A40, \1B00,,,,,,,) ; ordListRebuild()"}, + {"REINDEX","","ordListRebuild()"}, + {"SET","INDEX TO [ \1A40 [, \1B40]] [\1C20 ADDITIVE>]", + "if !\1C50 ; ordListClear() ; end [; ordListAdd( \1A30 )] [; ordListAdd( \1B30 )]"}, + {"SET","ORDER TO \1A00 [IN \1B40]","ordSetFocus( \1A00 [, \1B30] )"}, + {"SET","ORDER TO TAG \1A40 [IN \1B40]","ordSetFocus( \1A30 [, \1B30] )"}, + {"SET","ORDER TO","ordSetFocus(0)"} +};