Module Name:    src
Committed By:   lukem
Date:           Sun Apr 12 03:35:43 UTC 2009

Modified Files:
        src/usr.bin/fgen: fgen.h fgen.l

Log Message:
Fix WARNS=4 issues (-Wshadow, -Wcast-qual, -Wsign-compare, etc)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/fgen/fgen.h
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/fgen/fgen.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/fgen/fgen.h
diff -u src/usr.bin/fgen/fgen.h:1.6 src/usr.bin/fgen/fgen.h:1.7
--- src/usr.bin/fgen/fgen.h:1.6	Sun Apr 12 03:13:09 2009
+++ src/usr.bin/fgen/fgen.h	Sun Apr 12 03:35:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fgen.h,v 1.6 2009/04/12 03:13:09 lukem Exp $	*/
+/*	$NetBSD: fgen.h,v 1.7 2009/04/12 03:35:43 lukem Exp $	*/
 /*
  * fgen.h -- stuff for the fcode tokenizer.
  *
@@ -48,7 +48,7 @@
 
 /* Defined fcode and string. */
 struct fcode {
-	char *name;
+	const char *name;
 	long num;
 	int type;
 	struct fcode *l;
@@ -57,8 +57,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;

Index: src/usr.bin/fgen/fgen.l
diff -u src/usr.bin/fgen/fgen.l:1.29 src/usr.bin/fgen/fgen.l:1.30
--- src/usr.bin/fgen/fgen.l:1.29	Sun Apr 12 03:15:35 2009
+++ src/usr.bin/fgen/fgen.l	Sun Apr 12 03:35:43 2009
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: fgen.l,v 1.29 2009/04/12 03:15:35 lukem Exp $	*/
+/*	$NetBSD: fgen.l,v 1.30 2009/04/12 03:35:43 lukem Exp $	*/
 /* FLEX input for FORTH input file scanner */
 /*  
  * Copyright (c) 1998 Eduardo Horvath.
@@ -47,7 +47,7 @@
 #endif
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: fgen.l,v 1.29 2009/04/12 03:15:35 lukem Exp $");
+__RCSID("$NetBSD: fgen.l,v 1.30 2009/04/12 03:35:43 lukem Exp $");
 #endif
 
 %}
@@ -74,7 +74,7 @@
 #include <unistd.h>
 
 #include "fgen.h"
-TOKEN token;
+TOKEN ltoken;
 
 /*
  * Global variables that control the parse state.
@@ -85,7 +85,7 @@
 int outf = 1; /* stdout */
 int state = 0;
 int nextfcode = 0x800; 
-int base = TOK_HEX;
+int numbase = TOK_HEX;
 long outpos;
 char *outbuf = NULL;
 char *outfile, *infile;
@@ -100,7 +100,7 @@
 Cell parse_stack[PSTKSIZ];
 int parse_stack_ptr = 0;
 
-void	token_err(int, char *, char *, char *, ...)
+void	token_err(int, const char *, const char *, const char *, ...)
 	__attribute__((__format__(__printf__, 4, 5)));
 YY_DECL;
 
@@ -113,177 +113,177 @@
 
 %%
 
-0		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+0		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
-1		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+1		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
-2		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+2		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
-3		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+3		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
--1		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+-1		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
-\.		{ token.type = TOK_OTHER; token.text = yytext; return &token; }
+\.		{ ltoken.type = TOK_OTHER; ltoken.text = yytext; return &ltoken; }
 
 {white}*		/* whitespace -- keep looping */ ;
 
 \\[^\n]*\n		/* end of line comment -- keep looping */ { STATE(yytext, "EOL comment"); }
 
--?{hex}+		{ token.type = TOK_NUMBER; token.text = yytext;
-					return &token; }
+-?{hex}+		{ ltoken.type = TOK_NUMBER; ltoken.text = yytext;
+					return &ltoken; }
 
-\'.\'		{ token.type = TOK_C_LIT; token.text = yytext; return &token; }
+\'.\'		{ ltoken.type = TOK_C_LIT; ltoken.text = yytext; return &ltoken; }
 
-\"{white}*(\\\"|[^"])*\"	{ token.type = TOK_STRING_LIT; token.text = yytext; 
-				return &token; } /* String started by `"' or `."' */
+\"{white}*(\\\"|[^"])*\"	{ ltoken.type = TOK_STRING_LIT; ltoken.text = yytext; 
+				return &ltoken; } /* String started by `"' or `."' */
 
-\.\({white}*(\\\"|[^)])*\)	{ token.type = TOK_PSTRING; token.text = yytext; 
-				return &token; } /* String of type `.(.....)' */
+\.\({white}*(\\\"|[^)])*\)	{ ltoken.type = TOK_PSTRING; ltoken.text = yytext; 
+				return &ltoken; } /* String of type `.(.....)' */
 
-\.\"{white}*(\\\"|[^"])*\"	{ token.type = TOK_PSTRING; token.text = yytext; 
-				return &token; }
+\.\"{white}*(\\\"|[^"])*\"	{ ltoken.type = TOK_PSTRING; ltoken.text = yytext; 
+				return &ltoken; }
 
-"("		{ token.type = TOK_COMMENT; token.text = yytext;
-				return &token; }
+"("		{ ltoken.type = TOK_COMMENT; ltoken.text = yytext;
+				return &ltoken; }
 
-")"		{ token.type = TOK_ENDCOMMENT; token.text = yytext;
-				return &token; }
+")"		{ ltoken.type = TOK_ENDCOMMENT; ltoken.text = yytext;
+				return &ltoken; }
 
-":"		{ token.type = TOK_COLON; token.text = yytext;
-				return &token; }
+":"		{ ltoken.type = TOK_COLON; ltoken.text = yytext;
+				return &ltoken; }
 
-";"		{ token.type = TOK_SEMICOLON; token.text = yytext;
-				return &token; }
+";"		{ ltoken.type = TOK_SEMICOLON; ltoken.text = yytext;
+				return &ltoken; }
 
-\'		{ token.type = TOK_TOKENIZE; token.text = yytext;
-				return &token; }
+\'		{ ltoken.type = TOK_TOKENIZE; ltoken.text = yytext;
+				return &ltoken; }
 
-[aA][gG][aA][iI][nN]	{ token.type = TOK_AGAIN; token.text = yytext;
-				return &token; }
+[aA][gG][aA][iI][nN]	{ ltoken.type = TOK_AGAIN; ltoken.text = yytext;
+				return &ltoken; }
 
-[aA][lL][iI][aA][sS]	{ token.type = TOK_ALIAS; token.text = yytext;
-				return &token; }
+[aA][lL][iI][aA][sS]	{ ltoken.type = TOK_ALIAS; ltoken.text = yytext;
+				return &ltoken; }
 
-\[\'\]			{ token.type = TOK_GETTOKEN; token.text = yytext;
-				return &token; }
+\[\'\]			{ ltoken.type = TOK_GETTOKEN; ltoken.text = yytext;
+				return &ltoken; }
 
-[aA][sS][cC][iI][iI]	{ token.type = TOK_ASCII; token.text = yytext;
-				return &token; }
+[aA][sS][cC][iI][iI]	{ ltoken.type = TOK_ASCII; ltoken.text = yytext;
+				return &ltoken; }
 
-[bB][eE][gG][iI][nN]	{ token.type = TOK_BEGIN; token.text = yytext;
-				return &token; }
+[bB][eE][gG][iI][nN]	{ ltoken.type = TOK_BEGIN; ltoken.text = yytext;
+				return &ltoken; }
 
-[bB][uU][fF][fF][eE][rR]:	{ token.type = TOK_BUFFER; token.text = yytext;
-				return &token; }
+[bB][uU][fF][fF][eE][rR]:	{ ltoken.type = TOK_BUFFER; ltoken.text = yytext;
+				return &ltoken; }
 
-[cC][aA][sS][eE]	{ token.type = TOK_CASE; token.text = yytext;
-				return &token; }
+[cC][aA][sS][eE]	{ ltoken.type = TOK_CASE; ltoken.text = yytext;
+				return &ltoken; }
 
-[cC][oO][nN][sS][tT][aA][nN][tT]	{ token.type = TOK_CONSTANT; token.text = yytext;
-				return &token; }
+[cC][oO][nN][sS][tT][aA][nN][tT]	{ ltoken.type = TOK_CONSTANT; ltoken.text = yytext;
+				return &ltoken; }
 
-[cC][oO][nN][tT][rR][oO][lL]	{ token.type = TOK_CONTROL; token.text = yytext;
-				return &token; }
+[cC][oO][nN][tT][rR][oO][lL]	{ ltoken.type = TOK_CONTROL; ltoken.text = yytext;
+				return &ltoken; }
 
-[cC][rR][eE][aA][tT][eE]	{ token.type = TOK_CREATE; token.text = yytext;
-				return &token; }
+[cC][rR][eE][aA][tT][eE]	{ ltoken.type = TOK_CREATE; ltoken.text = yytext;
+				return &ltoken; }
 
-[dD]#		{ token.type = TOK_DECIMAL; token.text = yytext;
-				return &token; }
+[dD]#		{ ltoken.type = TOK_DECIMAL; ltoken.text = yytext;
+				return &ltoken; }
 
-[dD][eE][cC][iI][mM][aA][lL]	{ token.type = TOK_DECIMAL; token.text = yytext;
-				return &token; }
+[dD][eE][cC][iI][mM][aA][lL]	{ ltoken.type = TOK_DECIMAL; ltoken.text = yytext;
+				return &ltoken; }
 
-[dD][eE][fF][eE][rR]	{ token.type = TOK_DEFER; token.text = yytext;
-				return &token; }
+[dD][eE][fF][eE][rR]	{ ltoken.type = TOK_DEFER; ltoken.text = yytext;
+				return &ltoken; }
 
-\??[dD][oO]	{ token.type = TOK_DO; token.text = yytext;
-				return &token; }
+\??[dD][oO]	{ ltoken.type = TOK_DO; ltoken.text = yytext;
+				return &ltoken; }
 
-[eE][lL][sS][eE]	{ token.type = TOK_ELSE; token.text = yytext;
-				return &token; }
+[eE][lL][sS][eE]	{ ltoken.type = TOK_ELSE; ltoken.text = yytext;
+				return &ltoken; }
 
-[eE][nN][dD][cC][aA][sS][eE]	{ token.type = TOK_ENDCASE; token.text = yytext;
-				return &token; }
+[eE][nN][dD][cC][aA][sS][eE]	{ ltoken.type = TOK_ENDCASE; ltoken.text = yytext;
+				return &ltoken; }
 
-[eE][nN][dD][oO][fF]	{ token.type = TOK_ENDOF; token.text = yytext;
-				return &token; }
+[eE][nN][dD][oO][fF]	{ ltoken.type = TOK_ENDOF; ltoken.text = yytext;
+				return &ltoken; }
 
-[eE][xX][tT][eE][rR][nN][aA][lL]	{ token.type = TOK_EXTERNAL; token.text = yytext;
-				return &token; }
+[eE][xX][tT][eE][rR][nN][aA][lL]	{ ltoken.type = TOK_EXTERNAL; ltoken.text = yytext;
+				return &ltoken; }
 
-[fF][iI][eE][lL][dD]	{ token.type = TOK_FIELD; token.text = yytext;
-				return &token; }
+[fF][iI][eE][lL][dD]	{ ltoken.type = TOK_FIELD; ltoken.text = yytext;
+				return &ltoken; }
 
-[hH]#		{ token.type = TOK_HEX; token.text = yytext;
-				return &token; }
+[hH]#		{ ltoken.type = TOK_HEX; ltoken.text = yytext;
+				return &ltoken; }
 
-[hH][eE][aA][dD][eE][rR][lL][eE][sS][sS]	{ token.type = TOK_HEADERLESS; token.text = yytext;
-				return &token; }
+[hH][eE][aA][dD][eE][rR][lL][eE][sS][sS]	{ ltoken.type = TOK_HEADERLESS; ltoken.text = yytext;
+				return &ltoken; }
 
-[hH][eE][aA][dD][eE][rR][sS]	{ token.type = TOK_HEADERS; token.text = yytext;
-				return &token; }
+[hH][eE][aA][dD][eE][rR][sS]	{ ltoken.type = TOK_HEADERS; ltoken.text = yytext;
+				return &ltoken; }
 
-[hH][eE][xX]	{ token.type = TOK_HEX; token.text = yytext;
-				return &token; }
+[hH][eE][xX]	{ ltoken.type = TOK_HEX; ltoken.text = yytext;
+				return &ltoken; }
 
-[iI][fF]		{ token.type = TOK_IF; token.text = yytext;
-				return &token; }
+[iI][fF]		{ ltoken.type = TOK_IF; ltoken.text = yytext;
+				return &ltoken; }
 
-\??[lL][eE][aA][vV][eE]	{ token.type = TOK_LEAVE; token.text = yytext;
-				return &token; }
+\??[lL][eE][aA][vV][eE]	{ ltoken.type = TOK_LEAVE; ltoken.text = yytext;
+				return &ltoken; }
 
-\+?[lL][oO][oO][pP]	{ token.type = TOK_LOOP; token.text = yytext;
-				return &token; }
+\+?[lL][oO][oO][pP]	{ ltoken.type = TOK_LOOP; ltoken.text = yytext;
+				return &ltoken; }
 
-[oO]#		{ token.type = TOK_OCTAL; token.text = yytext;
-				return &token; }
+[oO]#		{ ltoken.type = TOK_OCTAL; ltoken.text = yytext;
+				return &ltoken; }
 
-[oO][cC][tT][aA][lL]	{ token.type = TOK_OCTAL; token.text = yytext;
-				return &token; }
+[oO][cC][tT][aA][lL]	{ ltoken.type = TOK_OCTAL; ltoken.text = yytext;
+				return &ltoken; }
 
-[oO][fF]		{ token.type = TOK_OF; token.text = yytext;
-				return &token; }
+[oO][fF]		{ ltoken.type = TOK_OF; ltoken.text = yytext;
+				return &ltoken; }
 
-[rR][eE][pP][eE][aA][tT]	{ token.type = TOK_REPEAT; token.text = yytext;
-				return &token; }
+[rR][eE][pP][eE][aA][tT]	{ ltoken.type = TOK_REPEAT; ltoken.text = yytext;
+				return &ltoken; }
 
-[tT][hH][eE][nN]	{ token.type = TOK_THEN; token.text = yytext;
-				return &token; }
+[tT][hH][eE][nN]	{ ltoken.type = TOK_THEN; ltoken.text = yytext;
+				return &ltoken; }
 
-[tT][oO]		{ token.type = TOK_TO; token.text = yytext;
-				return &token; }
+[tT][oO]		{ ltoken.type = TOK_TO; ltoken.text = yytext;
+				return &ltoken; }
 
-[uU][nN][tT][iI][lL]	{ token.type = TOK_UNTIL; token.text = yytext;
-				return &token; }
+[uU][nN][tT][iI][lL]	{ ltoken.type = TOK_UNTIL; ltoken.text = yytext;
+				return &ltoken; }
 
-[vV][aA][lL][uU][eE]	{ token.type = TOK_VALUE; token.text = yytext;
-				return &token; }
+[vV][aA][lL][uU][eE]	{ ltoken.type = TOK_VALUE; ltoken.text = yytext;
+				return &ltoken; }
 
-[vV][aA][rR][iI][aA][bB][lL][eE]	{ token.type = TOK_VARIABLE; token.text = yytext;
-				return &token; }
+[vV][aA][rR][iI][aA][bB][lL][eE]	{ ltoken.type = TOK_VARIABLE; ltoken.text = yytext;
+				return &ltoken; }
 
-[wW][hH][iI][lL][eE]	{ token.type = TOK_WHILE; token.text = yytext;
-				return &token; }
+[wW][hH][iI][lL][eE]	{ ltoken.type = TOK_WHILE; ltoken.text = yytext;
+				return &ltoken; }
 
-offset16		{ token.type = TOK_OFFSET16; token.text = yytext;
-				return &token; }
+offset16		{ ltoken.type = TOK_OFFSET16; ltoken.text = yytext;
+				return &ltoken; }
 
-tokenizer\[	{ token.type = TOK_BEGTOK; token.text = yytext;
-				return &token; }
+tokenizer\[	{ ltoken.type = TOK_BEGTOK; ltoken.text = yytext;
+				return &ltoken; }
 
-emit-byte		{ token.type = TOK_EMIT_BYTE; token.text = yytext;
-				return &token; }
+emit-byte		{ ltoken.type = TOK_EMIT_BYTE; ltoken.text = yytext;
+				return &ltoken; }
 
-\]tokenizer	{ token.type = TOK_ENDTOK; token.text = yytext;
-				return &token; }
+\]tokenizer	{ ltoken.type = TOK_ENDTOK; ltoken.text = yytext;
+				return &ltoken; }
 
-fload		{ token.type = TOK_FLOAD; token.text = yytext;
-				return &token; }
+fload		{ ltoken.type = TOK_FLOAD; ltoken.text = yytext;
+				return &ltoken; }
 
 
-[^ \n\t\r\f]+	{ token.type = TOK_OTHER; token.text = yytext;
-				return &token; }
+[^ \n\t\r\f]+	{ ltoken.type = TOK_OTHER; ltoken.text = yytext;
+				return &ltoken; }
 
 <<EOF>>			{ return NULL; }
 %%
@@ -293,435 +293,435 @@
 Cell pop(void);
 int depth(void);
 int fadd(struct fcode *, struct fcode *);
-struct fcode *flookup(struct fcode *, char *);
+struct fcode *flookup(struct fcode *, const char *);
 int aadd(struct macro *, struct macro *);
-struct macro *alookup(struct macro *, char *);
+struct macro *alookup(struct macro *, const char *);
 void initdic(void);
-void usage(char *);
+void usage(const char *);
 void tokenize(YY_BUFFER_STATE);
-int emit(char *);
+int emit(const char *);
 int spit(long);
-void sspit(char *);
-int apply_macros(YY_BUFFER_STATE, char *);
+void sspit(const char *);
+int apply_macros(YY_BUFFER_STATE, const char *);
 int main(int argc, char *argv[]);
-Cell cvt(char *, char **, int base);
+Cell cvt(const char *, char **, int base);
 
 /*
  * Standard FCode names and numbers.  Includes standard
  * tokenizer aliases.
  */
 struct fcode fcodes[] = {
-		{ "end0",			0x0000 },
-		{ "b(lit)",			0x0010 },
-		{ "b(')",			0x0011 },
-		{ "b(\")",			0x0012 },
-		{ "bbranch",			0x0013 },
-		{ "b?branch",			0x0014 },
-		{ "b(loop)",			0x0015 },
-		{ "b(+loop)",			0x0016 },
-		{ "b(do)",			0x0017 },
-		{ "b(?do)",			0x0018 },
-		{ "i",				0x0019 },
-		{ "j",				0x001a },
-		{ "b(leave)",			0x001b },
-		{ "b(of)",			0x001c },
-		{ "execute",			0x001d },
-		{ "+",				0x001e },
-		{ "-",				0x001f },
-		{ "*",				0x0020 },
-		{ "/",				0x0021 },
-		{ "mod",			0x0022 },
-		{ "and",			0x0023 },
-		{ "or",				0x0024 },
-		{ "xor",			0x0025 },
-		{ "invert",			0x0026 },
-		{ "lshift",			0x0027 },
-		{ "rshift",			0x0028 },
-		{ ">>a",			0x0029 },
-		{ "/mod",			0x002a },
-		{ "u/mod",			0x002b },
-		{ "negate",			0x002c },
-		{ "abs",			0x002d },
-		{ "min",			0x002e },
-		{ "max",			0x002f },
-		{ ">r",				0x0030 },
-		{ "r>",				0x0031 },
-		{ "r@",				0x0032 },
-		{ "exit",			0x0033 },
-		{ "0=",				0x0034 },
-		{ "0<>",			0x0035 },
-		{ "0<",				0x0036 },
-		{ "0<=",			0x0037 },
-		{ "0>",				0x0038 },
-		{ "0>=",			0x0039 },
-		{ "<",				0x003a },
-		{ ">",				0x003b },
-		{ "=",				0x003c },
-		{ "<>",				0x003d },
-		{ "u>",				0x003e },
-		{ "u<=",			0x003f },
-		{ "u<",				0x0040 },
-		{ "u>=",			0x0041 },
-		{ ">=",				0x0042 },
-		{ "<=",				0x0043 },
-		{ "between",			0x0044 },
-		{ "within",			0x0045 },
-		{ "drop",			0x0046 },
-		{ "dup",			0x0047 },
-		{ "over",			0x0048 },
-		{ "swap",			0x0049 },
-		{ "rot",			0x004a },
-		{ "-rot",			0x004b },
-		{ "tuck",			0x004c },
-		{ "nip",			0x004d },
-		{ "pick",			0x004e },
-		{ "roll",			0x004f },
-		{ "?dup",			0x0050 },
-		{ "depth",			0x0051 },
-		{ "2drop",			0x0052 },
-		{ "2dup",			0x0053 },
-		{ "2over",			0x0054 },
-		{ "2swap",			0x0055 },
-		{ "2rot",			0x0056 },
-		{ "2/",				0x0057 },
-		{ "u2/",			0x0058 },
-		{ "2*",				0x0059 },
-		{ "/c",				0x005a },
-		{ "/w",				0x005b },
-		{ "/l",				0x005c },
-		{ "/n",				0x005d },
-		{ "ca+",			0x005e },
-		{ "wa+",			0x005f },
-		{ "la+",			0x0060 },
-		{ "na+",			0x0061 },
-		{ "char+",			0x0062 },
-		{ "wa1+",			0x0063 },
-		{ "la1+",			0x0064 },
-		{ "cell+",			0x0065 },
-		{ "chars",			0x0066 },
-		{ "/w*",			0x0067 },
-		{ "/l*",			0x0068 },
-		{ "cells",			0x0069 },
-		{ "on",				0x006a },
-		{ "off",			0x006b },
-		{ "+!",				0x006c },
-		{ "@",				0x006d },
-		{ "l@",				0x006e },
-		{ "w@",				0x006f },
-		{ "<w@",			0x0070 },
-		{ "c@",				0x0071 },
-		{ "!",				0x0072 },
-		{ "l!",				0x0073 },
-		{ "w!",				0x0074 },
-		{ "c!",				0x0075 },
-		{ "2@",				0x0076 },
-		{ "2!",				0x0077 },
-		{ "move",			0x0078 },
-		{ "fill",			0x0079 },
-		{ "comp",			0x007a },
-		{ "noop",			0x007b },
-		{ "lwsplit",			0x007c },
-		{ "wjoin",			0x007d },
-		{ "lbsplit",			0x007e },
-		{ "bljoin",			0x007f },
-		{ "wbflip",			0x0080 },
-		{ "upc",			0x0081 },
-		{ "lcc",			0x0082 },
-		{ "pack",			0x0083 },
-		{ "count",			0x0084 },
-		{ "body>",			0x0085 },
-		{ ">body",			0x0086 },
-		{ "fcode-revision",		0x0087 },
-		{ "span",			0x0088 },
-		{ "unloop",			0x0089 },
-		{ "expect",			0x008a },
-		{ "alloc-mem",			0x008b },
-		{ "free-mem",			0x008c },
-		{ "key?",			0x008d },
-		{ "key",			0x008e },
-		{ "emit",			0x008f },
-		{ "type",			0x0090 },
-		{ "(cr",			0x0091 },
-		{ "cr",				0x0092 },
-		{ "#out",			0x0093 },
-		{ "#line",			0x0094 },
-		{ "hold",			0x0095 },
-		{ "<#",				0x0096 },
-		{ "u#>",			0x0097 },
-		{ "sign",			0x0098 },
-		{ "u#",				0x0099 },
-		{ "u#s",			0x009a },
-		{ "u.",				0x009b },
-		{ "u.r",			0x009c },
-		{ ".",				0x009d },
-		{ ".r",				0x009e },
-		{ ".s",				0x009f },
-		{ "base",			0x00a0 },
-		{ "convert",			0x00a1 },
-		{ "$number",			0x00a2 },
-		{ "digit",			0x00a3 },
-		{ "-1",				0x00a4 },
-		{ "true",			0x00a4 },
-		{ "0",				0x00a5 },
-		{ "1",				0x00a6 },
-		{ "2",				0x00a7 },
-		{ "3",				0x00a8 },
-		{ "bl",				0x00a9 },
-		{ "bs",				0x00aa },
-		{ "bell",			0x00ab },
-		{ "bounds",			0x00ac },
-		{ "here",			0x00ad },
-		{ "aligned",			0x00ae },
-		{ "wbsplit",			0x00af },
-		{ "bwjoin",			0x00b0 },
-		{ "b(<mark)",			0x00b1 },
-		{ "b(>resolve)",		0x00b2 },
-		{ "set-token-table",		0x00b3 },
-		{ "set-table",			0x00b4 },
-		{ "new-token",			0x00b5 },
-		{ "named-token",		0x00b6 },
-		{ "b(:)",			0x00b7 },
-		{ "b(value)",			0x00b8 },
-		{ "b(variable)",		0x00b9 },
-		{ "b(constant)",		0x00ba },
-		{ "b(create)",			0x00bb },
-		{ "b(defer)",			0x00bc },
-		{ "b(buffer:)",			0x00bd },
-		{ "b(field)",			0x00be },
-		{ "b(code)",			0x00bf },
-		{ "instance",			0x00c0 },
-		{ "b(;)",			0x00c2 },
-		{ "b(to)",			0x00c3 },
-		{ "b(case)",			0x00c4 },
-		{ "b(endcase)",			0x00c5 },
-		{ "b(endof)",			0x00c6 },
-		{ "#",				0x00c7 },
-		{ "#s",				0x00c8 },
-		{ "#>",				0x00c9 },
-		{ "external-token",		0x00ca },
-		{ "$find",			0x00cb },
-		{ "offset16",			0x00cc },
-		{ "evaluate",			0x00cd },
-		{ "c,",				0x00d0 },
-		{ "w,",				0x00d1 },
-		{ "l,",				0x00d2 },
-		{ "'",				0x00d3 },
-		{ "um*",			0x00d4 },
-		{ "um/mod",			0x00d5 },
-		{ "d+",				0x00d8 },
-		{ "d-",				0x00d9 },
-		{ "get-token",			0x00da },
-		{ "set-token",			0x00db },
-		{ "state",			0x00dc },
-		{ "compile,",			0x00dd },
-		{ "behavior",			0x00de },
-		{ "start0",			0x00f0 },
-		{ "start1",			0x00f1 },
-		{ "start2",			0x00f2 },
-		{ "start4",			0x00f3 },
-		{ "ferror",			0x00fc },
-		{ "version1",			0x00fd },
-		{ "4-byte-id",			0x00fe },
-		{ "end1",			0x00ff },
-		{ "dma-alloc",			0x0101 },
-		{ "my-address",			0x0102 },
-		{ "my-space",			0x0103 },
-		{ "memmap",			0x0104 },
-		{ "free-virtual",		0x0105 },
-		{ ">physical",			0x0106 },
-		{ "my-params",			0x010f },
-		{ "property",			0x0110 },
-		{ "encode-int",			0x0111 },
-		{ "encode+",			0x0112 },
-		{ "encode-phys",		0x0113 },
-		{ "encode-string",		0x0114 },
-		{ "encode-bytes",		0x0115 },
-		{ "reg",			0x0116 },
-		{ "intr",			0x0117 },
-		{ "driver",			0x0118 },
-		{ "model",			0x0119 },
-		{ "device-type",		0x011a },
-		{ "parse-2int",			0x011b },
-		{ "is-install",			0x011c },
-		{ "is-remove",			0x011d },
-		{ "is-selftest",		0x011e },
-		{ "new-device",			0x011f },
-		{ "diagnostic-mode?",		0x0120 },
-		{ "display-status",		0x0121 },
-		{ "memory-test-suite",		0x0122 },
-		{ "group-code",			0x0123 },
-		{ "mask",			0x0124 },
-		{ "get-msecs",			0x0125 },
-		{ "ms",				0x0126 },
-		{ "find-device",		0x0127 },
-		{ "decode-phys",		0x0128 },
-		{ "map-low",			0x0130 },
-		{ "sbus-intr>cpu",		0x0131 },
-		{ "#lines",			0x0150 },
-		{ "#columns",			0x0151 },
-		{ "line#",			0x0152 },
-		{ "column#",			0x0153 },
-		{ "inverse?",			0x0154 },
-		{ "inverse-screen?",		0x0155 },
-		{ "frame-buffer-busy?",		0x0156 },
-		{ "draw-character",		0x0157 },
-		{ "reset-screen",		0x0158 },
-		{ "toggle-cursor",		0x0159 },
-		{ "erase-screen",		0x015a },
-		{ "blink-screen",		0x015b },
-		{ "invert-screen",		0x015c },
-		{ "insert-characters",		0x015d },
-		{ "delete-characters",		0x015e },
-		{ "insert-lines",		0x015f },
-		{ "delete-lines",		0x0160 },
-		{ "draw-logo",			0x0161 },
-		{ "frame-buffer-addr",		0x0162 },
-		{ "screen-height",		0x0163 },
-		{ "screen-width",		0x0164 },
-		{ "window-top",			0x0165 },
-		{ "window-left",		0x0166 },
-		{ "default-font",		0x016a },
-		{ "set-font",			0x016b },
-		{ "char-height",		0x016c },
-		{ "char-width",			0x016d },
-		{ ">font",			0x016e },
-		{ "fontbytes",			0x016f },
-		{ "fb8-draw-character",		0x0180 },
-		{ "fb8-reset-screen",		0x0181 },
-		{ "fb8-toggle-cursor",		0x0182 },
-		{ "fb8-erase-screen",		0x0183 },
-		{ "fb8-blink-screen",		0x0184 },
-		{ "fb8-invert-screen",		0x0185 },
-		{ "fb8-insert-characters",	0x0186 },
-		{ "fb8-delete-characters",	0x0187 },
-		{ "fb8-inisert-lines",		0x0188 },
-		{ "fb8-delete-lines",		0x0189 },
-		{ "fb8-draw-logo",		0x018a },
-		{ "fb8-install",		0x018b },
-		{ "return-buffer",		0x01a0 },
-		{ "xmit-packet",		0x01a1 },
-		{ "poll-packet",		0x01a2 },
-		{ "mac-address",		0x01a4 },
-		{ "device-name",		0x0201 },
-		{ "my-args",			0x0202 },
-		{ "my-self",			0x0203 },
-		{ "find-package",		0x0204 },
-		{ "open-package",		0x0205 },
-		{ "close-package",		0x0206 },
-		{ "find-method",		0x0207 },
-		{ "call-package",		0x0208 },
-		{ "$call-parent",		0x0209 },
-		{ "my-parent",			0x020a },
-		{ "ihandle>phandle",		0x020b },
-		{ "my-unit",			0x020d },
-		{ "$call-method",		0x020e },
-		{ "$open-package",		0x020f },
-		{ "processor-type",		0x0210 },
-		{ "firmware-version",		0x0211 },
-		{ "fcode-version",		0x0212 },
-		{ "alarm",			0x0213 },
-		{ "(is-user-word)",		0x0214 },
-		{ "suspend-fcode",		0x0215 },
-		{ "abort",			0x0216 },
-		{ "catch",			0x0217 },
-		{ "throw",			0x0218 },
-		{ "user-abort",			0x0219 },
-		{ "get-my-property",		0x021a },
-		{ "decode-int",			0x021b },
-		{ "decode-string",		0x021c },
-		{ "get-inherited-property",	0x021d },
-		{ "delete-property",		0x021e },
-		{ "get-package-property",	0x021f },
-		{ "cpeek",			0x0220 },
-		{ "wpeek",			0x0221 },
-		{ "lpeek",			0x0222 },
-		{ "cpoke",			0x0223 },
-		{ "wpoke",			0x0224 },
-		{ "lpoke",			0x0225 },
-		{ "lwflip",			0x0226 },
-		{ "lbflip",			0x0227 },
-		{ "lbflips",			0x0228 },
-		{ "adr-mask",			0x0229 },
-		{ "rb@",			0x0230 },
-		{ "rb!",			0x0231 },
-		{ "rw@",			0x0232 },
-		{ "rw!",			0x0233 },
-		{ "rl@",			0x0234 },
-		{ "rl!",			0x0235 },
-		{ "wbflips",			0x0236 },
-		{ "lwflips",			0x0237 },
-		{ "probe",			0x0238 },
-		{ "probe-virtual",		0x0239 },
-		{ "child",			0x023b },
-		{ "peer",			0x023c },
-		{ "next-property",		0x023d },
-		{ "byte-load",			0x023e },
-		{ "set-args",			0x023f },
-		{ "left-parse-string",		0x0240 },
+		{ "end0",			0x0000, 0, NULL, NULL },
+		{ "b(lit)",			0x0010, 0, NULL, NULL },
+		{ "b(')",			0x0011, 0, NULL, NULL },
+		{ "b(\")",			0x0012, 0, NULL, NULL },
+		{ "bbranch",			0x0013, 0, NULL, NULL },
+		{ "b?branch",			0x0014, 0, NULL, NULL },
+		{ "b(loop)",			0x0015, 0, NULL, NULL },
+		{ "b(+loop)",			0x0016, 0, NULL, NULL },
+		{ "b(do)",			0x0017, 0, NULL, NULL },
+		{ "b(?do)",			0x0018, 0, NULL, NULL },
+		{ "i",				0x0019, 0, NULL, NULL },
+		{ "j",				0x001a, 0, NULL, NULL },
+		{ "b(leave)",			0x001b, 0, NULL, NULL },
+		{ "b(of)",			0x001c, 0, NULL, NULL },
+		{ "execute",			0x001d, 0, NULL, NULL },
+		{ "+",				0x001e, 0, NULL, NULL },
+		{ "-",				0x001f, 0, NULL, NULL },
+		{ "*",				0x0020, 0, NULL, NULL },
+		{ "/",				0x0021, 0, NULL, NULL },
+		{ "mod",			0x0022, 0, NULL, NULL },
+		{ "and",			0x0023, 0, NULL, NULL },
+		{ "or",				0x0024, 0, NULL, NULL },
+		{ "xor",			0x0025, 0, NULL, NULL },
+		{ "invert",			0x0026, 0, NULL, NULL },
+		{ "lshift",			0x0027, 0, NULL, NULL },
+		{ "rshift",			0x0028, 0, NULL, NULL },
+		{ ">>a",			0x0029, 0, NULL, NULL },
+		{ "/mod",			0x002a, 0, NULL, NULL },
+		{ "u/mod",			0x002b, 0, NULL, NULL },
+		{ "negate",			0x002c, 0, NULL, NULL },
+		{ "abs",			0x002d, 0, NULL, NULL },
+		{ "min",			0x002e, 0, NULL, NULL },
+		{ "max",			0x002f, 0, NULL, NULL },
+		{ ">r",				0x0030, 0, NULL, NULL },
+		{ "r>",				0x0031, 0, NULL, NULL },
+		{ "r@",				0x0032, 0, NULL, NULL },
+		{ "exit",			0x0033, 0, NULL, NULL },
+		{ "0=",				0x0034, 0, NULL, NULL },
+		{ "0<>",			0x0035, 0, NULL, NULL },
+		{ "0<",				0x0036, 0, NULL, NULL },
+		{ "0<=",			0x0037, 0, NULL, NULL },
+		{ "0>",				0x0038, 0, NULL, NULL },
+		{ "0>=",			0x0039, 0, NULL, NULL },
+		{ "<",				0x003a, 0, NULL, NULL },
+		{ ">",				0x003b, 0, NULL, NULL },
+		{ "=",				0x003c, 0, NULL, NULL },
+		{ "<>",				0x003d, 0, NULL, NULL },
+		{ "u>",				0x003e, 0, NULL, NULL },
+		{ "u<=",			0x003f, 0, NULL, NULL },
+		{ "u<",				0x0040, 0, NULL, NULL },
+		{ "u>=",			0x0041, 0, NULL, NULL },
+		{ ">=",				0x0042, 0, NULL, NULL },
+		{ "<=",				0x0043, 0, NULL, NULL },
+		{ "between",			0x0044, 0, NULL, NULL },
+		{ "within",			0x0045, 0, NULL, NULL },
+		{ "drop",			0x0046, 0, NULL, NULL },
+		{ "dup",			0x0047, 0, NULL, NULL },
+		{ "over",			0x0048, 0, NULL, NULL },
+		{ "swap",			0x0049, 0, NULL, NULL },
+		{ "rot",			0x004a, 0, NULL, NULL },
+		{ "-rot",			0x004b, 0, NULL, NULL },
+		{ "tuck",			0x004c, 0, NULL, NULL },
+		{ "nip",			0x004d, 0, NULL, NULL },
+		{ "pick",			0x004e, 0, NULL, NULL },
+		{ "roll",			0x004f, 0, NULL, NULL },
+		{ "?dup",			0x0050, 0, NULL, NULL },
+		{ "depth",			0x0051, 0, NULL, NULL },
+		{ "2drop",			0x0052, 0, NULL, NULL },
+		{ "2dup",			0x0053, 0, NULL, NULL },
+		{ "2over",			0x0054, 0, NULL, NULL },
+		{ "2swap",			0x0055, 0, NULL, NULL },
+		{ "2rot",			0x0056, 0, NULL, NULL },
+		{ "2/",				0x0057, 0, NULL, NULL },
+		{ "u2/",			0x0058, 0, NULL, NULL },
+		{ "2*",				0x0059, 0, NULL, NULL },
+		{ "/c",				0x005a, 0, NULL, NULL },
+		{ "/w",				0x005b, 0, NULL, NULL },
+		{ "/l",				0x005c, 0, NULL, NULL },
+		{ "/n",				0x005d, 0, NULL, NULL },
+		{ "ca+",			0x005e, 0, NULL, NULL },
+		{ "wa+",			0x005f, 0, NULL, NULL },
+		{ "la+",			0x0060, 0, NULL, NULL },
+		{ "na+",			0x0061, 0, NULL, NULL },
+		{ "char+",			0x0062, 0, NULL, NULL },
+		{ "wa1+",			0x0063, 0, NULL, NULL },
+		{ "la1+",			0x0064, 0, NULL, NULL },
+		{ "cell+",			0x0065, 0, NULL, NULL },
+		{ "chars",			0x0066, 0, NULL, NULL },
+		{ "/w*",			0x0067, 0, NULL, NULL },
+		{ "/l*",			0x0068, 0, NULL, NULL },
+		{ "cells",			0x0069, 0, NULL, NULL },
+		{ "on",				0x006a, 0, NULL, NULL },
+		{ "off",			0x006b, 0, NULL, NULL },
+		{ "+!",				0x006c, 0, NULL, NULL },
+		{ "@",				0x006d, 0, NULL, NULL },
+		{ "l@",				0x006e, 0, NULL, NULL },
+		{ "w@",				0x006f, 0, NULL, NULL },
+		{ "<w@",			0x0070, 0, NULL, NULL },
+		{ "c@",				0x0071, 0, NULL, NULL },
+		{ "!",				0x0072, 0, NULL, NULL },
+		{ "l!",				0x0073, 0, NULL, NULL },
+		{ "w!",				0x0074, 0, NULL, NULL },
+		{ "c!",				0x0075, 0, NULL, NULL },
+		{ "2@",				0x0076, 0, NULL, NULL },
+		{ "2!",				0x0077, 0, NULL, NULL },
+		{ "move",			0x0078, 0, NULL, NULL },
+		{ "fill",			0x0079, 0, NULL, NULL },
+		{ "comp",			0x007a, 0, NULL, NULL },
+		{ "noop",			0x007b, 0, NULL, NULL },
+		{ "lwsplit",			0x007c, 0, NULL, NULL },
+		{ "wjoin",			0x007d, 0, NULL, NULL },
+		{ "lbsplit",			0x007e, 0, NULL, NULL },
+		{ "bljoin",			0x007f, 0, NULL, NULL },
+		{ "wbflip",			0x0080, 0, NULL, NULL },
+		{ "upc",			0x0081, 0, NULL, NULL },
+		{ "lcc",			0x0082, 0, NULL, NULL },
+		{ "pack",			0x0083, 0, NULL, NULL },
+		{ "count",			0x0084, 0, NULL, NULL },
+		{ "body>",			0x0085, 0, NULL, NULL },
+		{ ">body",			0x0086, 0, NULL, NULL },
+		{ "fcode-revision",		0x0087, 0, NULL, NULL },
+		{ "span",			0x0088, 0, NULL, NULL },
+		{ "unloop",			0x0089, 0, NULL, NULL },
+		{ "expect",			0x008a, 0, NULL, NULL },
+		{ "alloc-mem",			0x008b, 0, NULL, NULL },
+		{ "free-mem",			0x008c, 0, NULL, NULL },
+		{ "key?",			0x008d, 0, NULL, NULL },
+		{ "key",			0x008e, 0, NULL, NULL },
+		{ "emit",			0x008f, 0, NULL, NULL },
+		{ "type",			0x0090, 0, NULL, NULL },
+		{ "(cr",			0x0091, 0, NULL, NULL },
+		{ "cr",				0x0092, 0, NULL, NULL },
+		{ "#out",			0x0093, 0, NULL, NULL },
+		{ "#line",			0x0094, 0, NULL, NULL },
+		{ "hold",			0x0095, 0, NULL, NULL },
+		{ "<#",				0x0096, 0, NULL, NULL },
+		{ "u#>",			0x0097, 0, NULL, NULL },
+		{ "sign",			0x0098, 0, NULL, NULL },
+		{ "u#",				0x0099, 0, NULL, NULL },
+		{ "u#s",			0x009a, 0, NULL, NULL },
+		{ "u.",				0x009b, 0, NULL, NULL },
+		{ "u.r",			0x009c, 0, NULL, NULL },
+		{ ".",				0x009d, 0, NULL, NULL },
+		{ ".r",				0x009e, 0, NULL, NULL },
+		{ ".s",				0x009f, 0, NULL, NULL },
+		{ "base",			0x00a0, 0, NULL, NULL },
+		{ "convert",			0x00a1, 0, NULL, NULL },
+		{ "$number",			0x00a2, 0, NULL, NULL },
+		{ "digit",			0x00a3, 0, NULL, NULL },
+		{ "-1",				0x00a4, 0, NULL, NULL },
+		{ "true",			0x00a4, 0, NULL, NULL },
+		{ "0",				0x00a5, 0, NULL, NULL },
+		{ "1",				0x00a6, 0, NULL, NULL },
+		{ "2",				0x00a7, 0, NULL, NULL },
+		{ "3",				0x00a8, 0, NULL, NULL },
+		{ "bl",				0x00a9, 0, NULL, NULL },
+		{ "bs",				0x00aa, 0, NULL, NULL },
+		{ "bell",			0x00ab, 0, NULL, NULL },
+		{ "bounds",			0x00ac, 0, NULL, NULL },
+		{ "here",			0x00ad, 0, NULL, NULL },
+		{ "aligned",			0x00ae, 0, NULL, NULL },
+		{ "wbsplit",			0x00af, 0, NULL, NULL },
+		{ "bwjoin",			0x00b0, 0, NULL, NULL },
+		{ "b(<mark)",			0x00b1, 0, NULL, NULL },
+		{ "b(>resolve)",		0x00b2, 0, NULL, NULL },
+		{ "set-token-table",		0x00b3, 0, NULL, NULL },
+		{ "set-table",			0x00b4, 0, NULL, NULL },
+		{ "new-token",			0x00b5, 0, NULL, NULL },
+		{ "named-token",		0x00b6, 0, NULL, NULL },
+		{ "b(:)",			0x00b7, 0, NULL, NULL },
+		{ "b(value)",			0x00b8, 0, NULL, NULL },
+		{ "b(variable)",		0x00b9, 0, NULL, NULL },
+		{ "b(constant)",		0x00ba, 0, NULL, NULL },
+		{ "b(create)",			0x00bb, 0, NULL, NULL },
+		{ "b(defer)",			0x00bc, 0, NULL, NULL },
+		{ "b(buffer:)",			0x00bd, 0, NULL, NULL },
+		{ "b(field)",			0x00be, 0, NULL, NULL },
+		{ "b(code)",			0x00bf, 0, NULL, NULL },
+		{ "instance",			0x00c0, 0, NULL, NULL },
+		{ "b(;)",			0x00c2, 0, NULL, NULL },
+		{ "b(to)",			0x00c3, 0, NULL, NULL },
+		{ "b(case)",			0x00c4, 0, NULL, NULL },
+		{ "b(endcase)",			0x00c5, 0, NULL, NULL },
+		{ "b(endof)",			0x00c6, 0, NULL, NULL },
+		{ "#",				0x00c7, 0, NULL, NULL },
+		{ "#s",				0x00c8, 0, NULL, NULL },
+		{ "#>",				0x00c9, 0, NULL, NULL },
+		{ "external-token",		0x00ca, 0, NULL, NULL },
+		{ "$find",			0x00cb, 0, NULL, NULL },
+		{ "offset16",			0x00cc, 0, NULL, NULL },
+		{ "evaluate",			0x00cd, 0, NULL, NULL },
+		{ "c,",				0x00d0, 0, NULL, NULL },
+		{ "w,",				0x00d1, 0, NULL, NULL },
+		{ "l,",				0x00d2, 0, NULL, NULL },
+		{ "'",				0x00d3, 0, NULL, NULL },
+		{ "um*",			0x00d4, 0, NULL, NULL },
+		{ "um/mod",			0x00d5, 0, NULL, NULL },
+		{ "d+",				0x00d8, 0, NULL, NULL },
+		{ "d-",				0x00d9, 0, NULL, NULL },
+		{ "get-token",			0x00da, 0, NULL, NULL },
+		{ "set-token",			0x00db, 0, NULL, NULL },
+		{ "state",			0x00dc, 0, NULL, NULL },
+		{ "compile,",			0x00dd, 0, NULL, NULL },
+		{ "behavior",			0x00de, 0, NULL, NULL },
+		{ "start0",			0x00f0, 0, NULL, NULL },
+		{ "start1",			0x00f1, 0, NULL, NULL },
+		{ "start2",			0x00f2, 0, NULL, NULL },
+		{ "start4",			0x00f3, 0, NULL, NULL },
+		{ "ferror",			0x00fc, 0, NULL, NULL },
+		{ "version1",			0x00fd, 0, NULL, NULL },
+		{ "4-byte-id",			0x00fe, 0, NULL, NULL },
+		{ "end1",			0x00ff, 0, NULL, NULL },
+		{ "dma-alloc",			0x0101, 0, NULL, NULL },
+		{ "my-address",			0x0102, 0, NULL, NULL },
+		{ "my-space",			0x0103, 0, NULL, NULL },
+		{ "memmap",			0x0104, 0, NULL, NULL },
+		{ "free-virtual",		0x0105, 0, NULL, NULL },
+		{ ">physical",			0x0106, 0, NULL, NULL },
+		{ "my-params",			0x010f, 0, NULL, NULL },
+		{ "property",			0x0110, 0, NULL, NULL },
+		{ "encode-int",			0x0111, 0, NULL, NULL },
+		{ "encode+",			0x0112, 0, NULL, NULL },
+		{ "encode-phys",		0x0113, 0, NULL, NULL },
+		{ "encode-string",		0x0114, 0, NULL, NULL },
+		{ "encode-bytes",		0x0115, 0, NULL, NULL },
+		{ "reg",			0x0116, 0, NULL, NULL },
+		{ "intr",			0x0117, 0, NULL, NULL },
+		{ "driver",			0x0118, 0, NULL, NULL },
+		{ "model",			0x0119, 0, NULL, NULL },
+		{ "device-type",		0x011a, 0, NULL, NULL },
+		{ "parse-2int",			0x011b, 0, NULL, NULL },
+		{ "is-install",			0x011c, 0, NULL, NULL },
+		{ "is-remove",			0x011d, 0, NULL, NULL },
+		{ "is-selftest",		0x011e, 0, NULL, NULL },
+		{ "new-device",			0x011f, 0, NULL, NULL },
+		{ "diagnostic-mode?",		0x0120, 0, NULL, NULL },
+		{ "display-status",		0x0121, 0, NULL, NULL },
+		{ "memory-test-suite",		0x0122, 0, NULL, NULL },
+		{ "group-code",			0x0123, 0, NULL, NULL },
+		{ "mask",			0x0124, 0, NULL, NULL },
+		{ "get-msecs",			0x0125, 0, NULL, NULL },
+		{ "ms",				0x0126, 0, NULL, NULL },
+		{ "find-device",		0x0127, 0, NULL, NULL },
+		{ "decode-phys",		0x0128, 0, NULL, NULL },
+		{ "map-low",			0x0130, 0, NULL, NULL },
+		{ "sbus-intr>cpu",		0x0131, 0, NULL, NULL },
+		{ "#lines",			0x0150, 0, NULL, NULL },
+		{ "#columns",			0x0151, 0, NULL, NULL },
+		{ "line#",			0x0152, 0, NULL, NULL },
+		{ "column#",			0x0153, 0, NULL, NULL },
+		{ "inverse?",			0x0154, 0, NULL, NULL },
+		{ "inverse-screen?",		0x0155, 0, NULL, NULL },
+		{ "frame-buffer-busy?",		0x0156, 0, NULL, NULL },
+		{ "draw-character",		0x0157, 0, NULL, NULL },
+		{ "reset-screen",		0x0158, 0, NULL, NULL },
+		{ "toggle-cursor",		0x0159, 0, NULL, NULL },
+		{ "erase-screen",		0x015a, 0, NULL, NULL },
+		{ "blink-screen",		0x015b, 0, NULL, NULL },
+		{ "invert-screen",		0x015c, 0, NULL, NULL },
+		{ "insert-characters",		0x015d, 0, NULL, NULL },
+		{ "delete-characters",		0x015e, 0, NULL, NULL },
+		{ "insert-lines",		0x015f, 0, NULL, NULL },
+		{ "delete-lines",		0x0160, 0, NULL, NULL },
+		{ "draw-logo",			0x0161, 0, NULL, NULL },
+		{ "frame-buffer-addr",		0x0162, 0, NULL, NULL },
+		{ "screen-height",		0x0163, 0, NULL, NULL },
+		{ "screen-width",		0x0164, 0, NULL, NULL },
+		{ "window-top",			0x0165, 0, NULL, NULL },
+		{ "window-left",		0x0166, 0, NULL, NULL },
+		{ "default-font",		0x016a, 0, NULL, NULL },
+		{ "set-font",			0x016b, 0, NULL, NULL },
+		{ "char-height",		0x016c, 0, NULL, NULL },
+		{ "char-width",			0x016d, 0, NULL, NULL },
+		{ ">font",			0x016e, 0, NULL, NULL },
+		{ "fontbytes",			0x016f, 0, NULL, NULL },
+		{ "fb8-draw-character",		0x0180, 0, NULL, NULL },
+		{ "fb8-reset-screen",		0x0181, 0, NULL, NULL },
+		{ "fb8-toggle-cursor",		0x0182, 0, NULL, NULL },
+		{ "fb8-erase-screen",		0x0183, 0, NULL, NULL },
+		{ "fb8-blink-screen",		0x0184, 0, NULL, NULL },
+		{ "fb8-invert-screen",		0x0185, 0, NULL, NULL },
+		{ "fb8-insert-characters",	0x0186, 0, NULL, NULL },
+		{ "fb8-delete-characters",	0x0187, 0, NULL, NULL },
+		{ "fb8-inisert-lines",		0x0188, 0, NULL, NULL },
+		{ "fb8-delete-lines",		0x0189, 0, NULL, NULL },
+		{ "fb8-draw-logo",		0x018a, 0, NULL, NULL },
+		{ "fb8-install",		0x018b, 0, NULL, NULL },
+		{ "return-buffer",		0x01a0, 0, NULL, NULL },
+		{ "xmit-packet",		0x01a1, 0, NULL, NULL },
+		{ "poll-packet",		0x01a2, 0, NULL, NULL },
+		{ "mac-address",		0x01a4, 0, NULL, NULL },
+		{ "device-name",		0x0201, 0, NULL, NULL },
+		{ "my-args",			0x0202, 0, NULL, NULL },
+		{ "my-self",			0x0203, 0, NULL, NULL },
+		{ "find-package",		0x0204, 0, NULL, NULL },
+		{ "open-package",		0x0205, 0, NULL, NULL },
+		{ "close-package",		0x0206, 0, NULL, NULL },
+		{ "find-method",		0x0207, 0, NULL, NULL },
+		{ "call-package",		0x0208, 0, NULL, NULL },
+		{ "$call-parent",		0x0209, 0, NULL, NULL },
+		{ "my-parent",			0x020a, 0, NULL, NULL },
+		{ "ihandle>phandle",		0x020b, 0, NULL, NULL },
+		{ "my-unit",			0x020d, 0, NULL, NULL },
+		{ "$call-method",		0x020e, 0, NULL, NULL },
+		{ "$open-package",		0x020f, 0, NULL, NULL },
+		{ "processor-type",		0x0210, 0, NULL, NULL },
+		{ "firmware-version",		0x0211, 0, NULL, NULL },
+		{ "fcode-version",		0x0212, 0, NULL, NULL },
+		{ "alarm",			0x0213, 0, NULL, NULL },
+		{ "(is-user-word)",		0x0214, 0, NULL, NULL },
+		{ "suspend-fcode",		0x0215, 0, NULL, NULL },
+		{ "abort",			0x0216, 0, NULL, NULL },
+		{ "catch",			0x0217, 0, NULL, NULL },
+		{ "throw",			0x0218, 0, NULL, NULL },
+		{ "user-abort",			0x0219, 0, NULL, NULL },
+		{ "get-my-property",		0x021a, 0, NULL, NULL },
+		{ "decode-int",			0x021b, 0, NULL, NULL },
+		{ "decode-string",		0x021c, 0, NULL, NULL },
+		{ "get-inherited-property",	0x021d, 0, NULL, NULL },
+		{ "delete-property",		0x021e, 0, NULL, NULL },
+		{ "get-package-property",	0x021f, 0, NULL, NULL },
+		{ "cpeek",			0x0220, 0, NULL, NULL },
+		{ "wpeek",			0x0221, 0, NULL, NULL },
+		{ "lpeek",			0x0222, 0, NULL, NULL },
+		{ "cpoke",			0x0223, 0, NULL, NULL },
+		{ "wpoke",			0x0224, 0, NULL, NULL },
+		{ "lpoke",			0x0225, 0, NULL, NULL },
+		{ "lwflip",			0x0226, 0, NULL, NULL },
+		{ "lbflip",			0x0227, 0, NULL, NULL },
+		{ "lbflips",			0x0228, 0, NULL, NULL },
+		{ "adr-mask",			0x0229, 0, NULL, NULL },
+		{ "rb@",			0x0230, 0, NULL, NULL },
+		{ "rb!",			0x0231, 0, NULL, NULL },
+		{ "rw@",			0x0232, 0, NULL, NULL },
+		{ "rw!",			0x0233, 0, NULL, NULL },
+		{ "rl@",			0x0234, 0, NULL, NULL },
+		{ "rl!",			0x0235, 0, NULL, NULL },
+		{ "wbflips",			0x0236, 0, NULL, NULL },
+		{ "lwflips",			0x0237, 0, NULL, NULL },
+		{ "probe",			0x0238, 0, NULL, NULL },
+		{ "probe-virtual",		0x0239, 0, NULL, NULL },
+		{ "child",			0x023b, 0, NULL, NULL },
+		{ "peer",			0x023c, 0, NULL, NULL },
+		{ "next-property",		0x023d, 0, NULL, NULL },
+		{ "byte-load",			0x023e, 0, NULL, NULL },
+		{ "set-args",			0x023f, 0, NULL, NULL },
+		{ "left-parse-string",		0x0240, 0, NULL, NULL },
 			/* 64-bit FCode extensions */
-		{ "bxjoin",			0x0241 },
-		{ "<l@",			0x0242 },
-		{ "lxjoin",			0x0243 },
-		{ "rx@",			0x022e },
-		{ "rx!",			0x022f },
-		{ "wxjoin",			0x0244 },
-		{ "x,",				0x0245 },
-		{ "x@",				0x0246 },
-		{ "x!",				0x0247 },
-		{ "/x",				0x0248 },
-		{ "/x*",			0x0249 },
-		{ "xa+",			0x024a },
-		{ "xa1+",			0x024b },
-		{ "xbflip",			0x024c },
-		{ "xbflips",			0x024d },
-		{ "xbsplit",			0x024e },
-		{ "xlflip",			0x024f },
-		{ "xlflips",			0x0250 },
-		{ "xlsplit",			0x0251 },
-		{ "xwflip",			0x0252 },
-		{ "xwflips",			0x0253 },
-		{ "xwsplit",			0x0254 },
-		{ NULL, 0 }
+		{ "bxjoin",			0x0241, 0, NULL, NULL },
+		{ "<l@",			0x0242, 0, NULL, NULL },
+		{ "lxjoin",			0x0243, 0, NULL, NULL },
+		{ "rx@",			0x022e, 0, NULL, NULL },
+		{ "rx!",			0x022f, 0, NULL, NULL },
+		{ "wxjoin",			0x0244, 0, NULL, NULL },
+		{ "x,",				0x0245, 0, NULL, NULL },
+		{ "x@",				0x0246, 0, NULL, NULL },
+		{ "x!",				0x0247, 0, NULL, NULL },
+		{ "/x",				0x0248, 0, NULL, NULL },
+		{ "/x*",			0x0249, 0, NULL, NULL },
+		{ "xa+",			0x024a, 0, NULL, NULL },
+		{ "xa1+",			0x024b, 0, NULL, NULL },
+		{ "xbflip",			0x024c, 0, NULL, NULL },
+		{ "xbflips",			0x024d, 0, NULL, NULL },
+		{ "xbsplit",			0x024e, 0, NULL, NULL },
+		{ "xlflip",			0x024f, 0, NULL, NULL },
+		{ "xlflips",			0x0250, 0, NULL, NULL },
+		{ "xlsplit",			0x0251, 0, NULL, NULL },
+		{ "xwflip",			0x0252, 0, NULL, NULL },
+		{ "xwflips",			0x0253, 0, NULL, NULL },
+		{ "xwsplit",			0x0254, 0, NULL, NULL },
+		{ NULL,				0, 0, NULL, NULL }
 };
 
 /*
  * Default macros -- can be overridden by colon definitions.
  */
 struct macro macros[] = {
-	{ "eval",	"evaluate" }, /* Build a more balanced tree */
-	{ "(.)",	"dup abs <# u#s swap sign u#>" },
-	{ "<<",		"lshift" },
-	{ ">>",		"rshift" },
-	{ "?",		"@ ." },
-	{ "1+",		"1 +" },
-	{ "1-",		"1 -" },
-	{ "2+",		"2 +" },
-	{ "2-",		"2 -" },
-	{ "abort\"",	"-2 throw" },
-	{ "accept",	"span @ -rot expect span @ swap span !" },
-	{ "allot",	"0 max 0 ?do 0 c, loop" },
-	{ "blank",	"bl fill" },
-	{ "/c*",	"chars" },
-	{ "ca1+",	"char+" },
-	{ "carret",	"b(lit) 00 00 00 0x0d" },
-	{ ".d",		"base @ swap 0x0a base ! . base !" },
-	{ "decode-bytes", ">r over r@ + swap r@ - rot r>" },
-	{ "3drop",	"drop 2drop" },
-	{ "3dup",	"2 pick 2 pick 2 pick" },
-	{ "erase",	"0 fill" },
-	{ "false",	"0" },
-	{ ".h",		"base @ swap 0x10 base ! . base !" },
-	{ "linefeed",	"b(lit) 00 00 00 0x0a" },
-	{ "/n*",	"cells" },
-	{ "na1+",	"cell+", },
-	{ "not",	"invert", },
-	{ "s.",		"(.) type space" },
-	{ "space",	"bl emit" },
-	{ "spaces",	"0 max 0 ?do space loop" },
-	{ "struct",	"0" },
-	{ "true",	"-1" },
-	{ "(u,)",	"<# u#s u#>" },
-	{ NULL, NULL }
+	{ "eval",	"evaluate", 0, NULL, NULL }, /* Build a more balanced tree */
+	{ "(.)",	"dup abs <# u#s swap sign u#>", 0, NULL, NULL },
+	{ "<<",		"lshift", 0, NULL, NULL },
+	{ ">>",		"rshift", 0, NULL, NULL },
+	{ "?",		"@ .", 0, NULL, NULL },
+	{ "1+",		"1 +", 0, NULL, NULL },
+	{ "1-",		"1 -", 0, NULL, NULL },
+	{ "2+",		"2 +", 0, NULL, NULL },
+	{ "2-",		"2 -", 0, NULL, NULL },
+	{ "abort\"",	"-2 throw", 0, NULL, NULL },
+	{ "accept",	"span @ -rot expect span @ swap span !", 0, NULL, NULL },
+	{ "allot",	"0 max 0 ?do 0 c, loop", 0, NULL, NULL },
+	{ "blank",	"bl fill", 0, NULL, NULL },
+	{ "/c*",	"chars", 0, NULL, NULL },
+	{ "ca1+",	"char+", 0, NULL, NULL },
+	{ "carret",	"b(lit) 00 00 00 0x0d", 0, NULL, NULL },
+	{ ".d",		"base @ swap 0x0a base ! . base !", 0, NULL, NULL },
+	{ "decode-bytes", ">r over r@ + swap r@ - rot r>", 0, NULL, NULL },
+	{ "3drop",	"drop 2drop", 0, NULL, NULL },
+	{ "3dup",	"2 pick 2 pick 2 pick", 0, NULL, NULL },
+	{ "erase",	"0 fill", 0, NULL, NULL },
+	{ "false",	"0", 0, NULL, NULL },
+	{ ".h",		"base @ swap 0x10 base ! . base !", 0, NULL, NULL },
+	{ "linefeed",	"b(lit) 00 00 00 0x0a", 0, NULL, NULL },
+	{ "/n*",	"cells", 0, NULL, NULL },
+	{ "na1+",	"cell+", 0, NULL, NULL },
+	{ "not",	"invert", 0, NULL, NULL },
+	{ "s.",		"(.) type space", 0, NULL, NULL },
+	{ "space",	"bl emit", 0, NULL, NULL },
+	{ "spaces",	"0 max 0 ?do space loop", 0, NULL, NULL },
+	{ "struct",	"0", 0, NULL, NULL },
+	{ "true",	"-1", 0, NULL, NULL },
+	{ "(u,)",	"<# u#s u#>", 0, NULL, NULL },
+	{ NULL, NULL, 0, NULL, NULL }
 };
 
 /*
@@ -733,7 +733,7 @@
  */
 #define strtol(x, y, z)		cvt(x, y, z)
 Cell
-cvt(char *s, char **e, int base)
+cvt(const char *s, char **e, int base)
 {
 	Cell v = 0;
 	int c, n = 0;
@@ -758,7 +758,7 @@
 		v += c;
 	}
 	if (e)
-		*e = s;
+		*e = __UNCONST(s);
 	if (n)
 		return (-v);
 	return (v);
@@ -837,7 +837,7 @@
  * Look for a code in the dictionary.
  */
 struct fcode *
-flookup(struct fcode *dict, char *str)
+flookup(struct fcode *dict, const char *str)
 {
 	int res;
 	if (!dict) return (dict);
@@ -903,7 +903,7 @@
  * Look for a macro in the aliases.
  */
 struct macro *
-alookup(struct macro *dict, char *str)
+alookup(struct macro *dict, const char *str)
 {
 	int res;
 	if (!dict) return (dict);
@@ -962,7 +962,7 @@
 }
 
 int
-apply_macros(YY_BUFFER_STATE input, char *str)
+apply_macros(YY_BUFFER_STATE yinput, const char *str)
 {
 	struct macro *xform = alookup(aliases, str);
 	
@@ -972,14 +972,14 @@
 		newbuf = yy_scan_string(xform->equiv);
 		yy_switch_to_buffer(newbuf);
 		tokenize(newbuf);
-		yy_switch_to_buffer(input);
+		yy_switch_to_buffer(yinput);
 		yy_delete_buffer(newbuf);
 	}
 	return (xform != NULL);
 }
 
 void
-usage(char *me)
+usage(const char *me)
 {
 	(void)fprintf(stderr, "%s: [-d level] [-o outfile] infile\n", me);
 	exit(1);
@@ -992,7 +992,7 @@
 	FILE *inf;
 	struct fcode_header *fheader;
 	YY_BUFFER_STATE inbuf;
-	char *hdrtype = "version1";
+	const char *hdrtype = "version1";
 	int i;
 
 	outf = 1; /* stdout */
@@ -1068,12 +1068,12 @@
  */
 
 void
-tokenize(YY_BUFFER_STATE input)
+tokenize(YY_BUFFER_STATE yinput)
 {
 	FILE *inf;
 	YY_BUFFER_STATE inbuf;
 	TOKEN *token;
-	char *last_token = "";
+	const char *last_token = "";
 	struct fcode *fcode;
 	int pos, off;
 
@@ -1089,7 +1089,7 @@
 				push(strtol(token->text, &end, 16));
 				break;
 			}
-			value = strtol(token->text, &end, base);
+			value = strtol(token->text, &end, numbase);
 			if (*end != 0)
 				token_err(yylineno, infile, yytext,
 				    "illegal number conversion");
@@ -1258,7 +1258,7 @@
 			alias->name = strdup(token->text);
 			token = yylex();
 			if (token == NULL) {
-				free(alias->name);
+				free(__UNCONST(alias->name));
 				free(alias);
 				(void)printf( "EOF in alias definition\n");
 				return;
@@ -1414,7 +1414,7 @@
 					emit("base");
 					emit("!");
 				} else
-					base = TOK_DECIMAL;
+					numbase = TOK_DECIMAL;
 			} else {
 				char *end;
 				Cell value;
@@ -1628,7 +1628,7 @@
 					emit("base");
 					emit("!");
 				} else
-					base = TOK_HEX;
+					numbase = TOK_HEX;
 			} else {
 				char *end;
 				Cell value;
@@ -1726,7 +1726,7 @@
 					emit("base");
 					emit("!");
 				} else
-					base = TOK_OCTAL;
+					numbase = TOK_OCTAL;
 			} else {
 				char *end;
 				Cell value;
@@ -1826,9 +1826,6 @@
 			break;
 		case TOK_UNTIL:
 			STATE(token->text, "TOK_UNTIL");
-		{
-			int pos;
-
 			emit("b?branch");
 			pos = pop();
 			pos -= outpos;
@@ -1836,8 +1833,7 @@
 				spit((pos>>8)&0xff);
 			}
 			spit(pos&0xff);
-		}
-		break;			
+			break;
 		case TOK_VALUE:
 			STATE(token->text, "TOK_VALUE");
 
@@ -1935,13 +1931,13 @@
 				tokenize(inbuf);
 				infile = oldinfile;
 			}
-			yy_switch_to_buffer(input);
+			yy_switch_to_buffer(yinput);
 			yy_delete_buffer(inbuf);
 			fclose(inf);
 			break;
 		case TOK_OTHER:
 			STATE(token->text, "TOK_OTHER");
-			if (apply_macros(input, token->text))
+			if (apply_macros(yinput, token->text))
 				break;
 			if (emit(token->text)) {
 #if 0
@@ -1973,13 +1969,13 @@
  * print a tokenizer error message
  */
 void
-token_err(int lineno, char *infile, char *text, char *fmt, ...)
+token_err(int lineno, const char *file, const char *text, const char *fmt, ...)
 {
 	va_list ap;
 
 	va_start(ap, fmt);
-	if (infile)
-		(void)fprintf(stderr, "%s:%d: ", infile, lineno);
+	if (file)
+		(void)fprintf(stderr, "%s:%d: ", file, lineno);
 	if (fmt)
 		(void)vfprintf(stderr, fmt, ap);
 	fputc('\n', stderr);
@@ -1995,7 +1991,7 @@
  * Fcode must be in dictionary.  No alias conversion done.
  */
 int
-emit(char *str)
+emit(const char *str)
 {
 	struct fcode *code;
 	if ((code = flookup( dictionary, str)))
@@ -2024,8 +2020,8 @@
 
 	if (n >> 8)
 		count += spit(n >> 8);
-	if (outpos >= outbufsiz) {
-		while (outpos >= outbufsiz) outbufsiz += BUFCLICK;
+	if ((size_t)outpos >= outbufsiz) {
+		while ((size_t)outpos >= outbufsiz) outbufsiz += BUFCLICK;
 		if (!(outbuf = realloc(outbuf, outbufsiz))) {
 			(void)printf( "realloc of %ld bytes failed -- out of memory\n",
 				      (long)outbufsiz);
@@ -2041,7 +2037,7 @@
  * Spit out an FCode string.
  */
 void
-sspit(char *s)
+sspit(const char *s)
 {
 	int len = strlen(s);
 

Reply via email to