=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/fgen/fgen.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/fgen/fgen.h 2002/02/16 21:27:45 1.2 +++ src/usr.bin/fgen/fgen.h 2020/03/24 07:00:40 1.3 @@ -1,5 +1,5 @@ -/* $OpenBSD: fgen.h,v 1.2 2002/02/16 21:27:45 millert Exp $ */ -/* $NetBSD: fgen.h,v 1.4 2001/06/13 10:46:05 wiz Exp $ */ +/* $OpenBSD: fgen.h,v 1.3 2020/03/24 07:00:40 otto Exp $ */ +/* $NetBSD: fgen.h,v 1.9 2010/02/08 20:14:55 eeh Exp $ */ /* * fgen.h -- stuff for the fcode tokenizer. * @@ -14,11 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Eduardo Horvath. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -33,7 +28,7 @@ */ /* Type of a Cell */ -typedef long Cell; +typedef int64_t Cell; /* Token from the scanner. */ struct tok { @@ -44,12 +39,12 @@ #define TOKEN struct tok #define YY_DECL TOKEN* yylex(void) -#define FCODE 0xF00DBABE -#define MACRO 0xFEEDBABE +#define FCODE 0x000FC0DE +#define MACRO 0x0000F00D /* Defined fcode and string. */ struct fcode { - char *name; + const char *name; long num; int type; struct fcode *l; @@ -58,8 +53,8 @@ /* macro instruction as separate words */ struct macro { - char *name; - char *equiv; + const char *name; + const char *equiv; int type; struct macro *l; struct macro *r; @@ -88,12 +83,12 @@ TOK_PSTRING, TOK_TOKENIZE, TOK_COMMENT, - TOK_ENDCOMMENT, TOK_COLON, TOK_SEMICOLON, TOK_TOSTRING, /* These are special */ + TOK_ABORT_S, TOK_AGAIN, TOK_ALIAS, TOK_GETTOKEN, @@ -107,9 +102,12 @@ TOK_DEFER, TOK_DO, TOK_ELSE, + TOK_END0, TOK_ENDCASE, TOK_ENDOF, TOK_EXTERNAL, + TOK_FCODE_VERSION2, + TOK_FCODE_END, TOK_FIELD, TOK_HEADERLESS, TOK_HEADERS, @@ -117,14 +115,16 @@ TOK_LEAVE, TOK_LOOP, TOK_OF, + TOK_OFFSET16, TOK_REPEAT, + TOK_STARTX, TOK_THEN, TOK_TO, TOK_UNTIL, TOK_VALUE, TOK_VARIABLE, + TOK_VERSION1, TOK_WHILE, - TOK_OFFSET16, /* Tokenizer directives */ TOK_BEGTOK,