diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1998-05-13 17:54:23 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1998-05-13 17:54:23 +0000 |
commit | ac2c89bf61167c1418043fdb45c252c1e3e62077 (patch) | |
tree | 05d24521fc45ca716e9a3884eba5cf8309578c88 | |
parent | 102fbb0b052434db291e85e21acf954cd934764b (diff) |
generate int errorcodes instead of long to match the new libcom_err
This should solve the problems with having kerberos servers on alphas.
-rw-r--r-- | usr.bin/compile_et/compile_et.c | 6 | ||||
-rw-r--r-- | usr.bin/compile_et/error_table.y | 12 | ||||
-rw-r--r-- | usr.bin/compile_et/et_lex.lex.l | 4 |
3 files changed, 13 insertions, 9 deletions
diff --git a/usr.bin/compile_et/compile_et.c b/usr.bin/compile_et/compile_et.c index 8117d36818e..c8a08eb103b 100644 --- a/usr.bin/compile_et/compile_et.c +++ b/usr.bin/compile_et/compile_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compile_et.c,v 1.3 1997/06/17 20:28:56 kstailey Exp $ */ +/* $OpenBSD: compile_et.c,v 1.4 1998/05/13 17:54:20 art Exp $ */ /* * Copyright 1986, 1987, 1988 @@ -23,7 +23,7 @@ static const char copyright[] = "Copyright 1987,1988 by MIT Student Information Processing Board"; static const char rcsid_compile_et_c[] = - "$Id: compile_et.c,v 1.3 1997/06/17 20:28:56 kstailey Exp $"; + "$Id: compile_et.c,v 1.4 1998/05/13 17:54:20 art Exp $"; #endif extern char *gensym(); @@ -253,7 +253,7 @@ int main (argc, argv) int argc; char **argv; { for (cpp = struct_def; *cpp; cpp++) fputs (*cpp, cfile); fprintf(cfile, - "static const struct error_table et = { text, %dL, %d };\n\n", + "static const struct error_table et = { text, %d, %d };\n\n", table_number, current); fputs("static struct et_list link = { 0, 0 };\n\n", cfile); diff --git a/usr.bin/compile_et/error_table.y b/usr.bin/compile_et/error_table.y index 42e9df16fbe..2d32ca87e08 100644 --- a/usr.bin/compile_et/error_table.y +++ b/usr.bin/compile_et/error_table.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: error_table.y,v 1.1 1996/11/11 05:06:35 downsj Exp $ */ +/* $OpenBSD: error_table.y,v 1.2 1998/05/13 17:54:21 art Exp $ */ /*- * Copyright 1987, 1988 by the Student Information Processing Board @@ -101,7 +101,7 @@ description : QUOTED_STRING #ifndef lint static char const rcsid_error_table_y[] = - "$Id: error_table.y,v 1.1 1996/11/11 05:06:35 downsj Exp $"; + "$Id: error_table.y,v 1.2 1998/05/13 17:54:21 art Exp $"; #endif #include "et_lex.lex.c" @@ -148,10 +148,11 @@ quote(string) return(rv); } -long table_number; +int table_number; int current = 0; char **error_codes = (char **)NULL; +void add_ec(name, description) char const *name, *description; { @@ -166,6 +167,7 @@ add_ec(name, description) error_codes[current] = (char *)NULL; } +void add_ec_val(name, val, description) char const *name, *val, *description; { @@ -190,12 +192,13 @@ add_ec_val(name, val, description) error_codes[current] = (char *)NULL; } +void put_ecs() { int i; for (i = 0; i < current; i++) { if (error_codes[i] != (char *)NULL) - fprintf(hfile, "#define %-40s (%ldL)\n", + fprintf(hfile, "#define %-40s (%d)\n", error_codes[i], table_number + i); } } @@ -234,6 +237,7 @@ int char_to_num(c) exit (1); } +void set_table_num(string) char *string; { diff --git a/usr.bin/compile_et/et_lex.lex.l b/usr.bin/compile_et/et_lex.lex.l index e7d92d497c4..e25e18328a1 100644 --- a/usr.bin/compile_et/et_lex.lex.l +++ b/usr.bin/compile_et/et_lex.lex.l @@ -16,7 +16,7 @@ end return END; \n ++lineno; \"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1); - if (p=strrchr(yylval.dynstr, '"')) *p='\0'; + if ((p = strrchr(yylval.dynstr, '"')) != NULL) *p = '\0'; return QUOTED_STRING; } @@ -27,5 +27,5 @@ end return END; . { return (*yytext); } %% #ifndef lint -static char rcsid_et_lex_lex_l[] = "$Id: et_lex.lex.l,v 1.1 1996/11/11 05:06:35 downsj Exp $"; +static char rcsid_et_lex_lex_l[] = "$Id: et_lex.lex.l,v 1.2 1998/05/13 17:54:22 art Exp $"; #endif |