=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/compile_et/Attic/compile_et.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/compile_et/Attic/compile_et.c 1996/12/11 13:44:56 1.2 --- src/usr.bin/compile_et/Attic/compile_et.c 1997/06/17 20:28:56 1.3 *************** *** 1,4 **** ! /* $OpenBSD: compile_et.c,v 1.2 1996/12/11 13:44:56 deraadt Exp $ */ /* * Copyright 1986, 1987, 1988 --- 1,4 ---- ! /* $OpenBSD: compile_et.c,v 1.3 1997/06/17 20:28:56 kstailey Exp $ */ /* * Copyright 1986, 1987, 1988 *************** *** 23,36 **** "Copyright 1987,1988 by MIT Student Information Processing Board"; static const char rcsid_compile_et_c[] = ! "$Id: compile_et.c,v 1.2 1996/12/11 13:44:56 deraadt Exp $"; #endif extern char *gensym(); extern char *current_token; extern int table_number, current; char buffer[BUFSIZ]; ! char *table_name = (char *)NULL; FILE *hfile, *cfile; /* C library */ --- 23,36 ---- "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 $"; #endif extern char *gensym(); extern char *current_token; extern int table_number, current; char buffer[BUFSIZ]; ! char *table_name = NULL; FILE *hfile, *cfile; /* C library */ *************** *** 197,203 **** strcpy (p, filename); filename = p; p = strrchr(filename, '/'); ! if (p == (char *)NULL) p = filename; else p++; --- 197,203 ---- strcpy (p, filename); filename = p; p = strrchr(filename, '/'); ! if (p == NULL) p = filename; else p++; *************** *** 222,235 **** } hfile = fopen(h_file, "w"); ! if (hfile == (FILE *)NULL) { perror(h_file); exit(1); } fprintf (hfile, warning, h_file); cfile = fopen(c_file, "w"); ! if (cfile == (FILE *)NULL) { perror(c_file); exit(1); } --- 222,235 ---- } hfile = fopen(h_file, "w"); ! if (hfile == NULL) { perror(h_file); exit(1); } fprintf (hfile, warning, h_file); cfile = fopen(c_file, "w"); ! if (cfile == NULL) { perror(c_file); exit(1); } *************** *** 253,259 **** for (cpp = struct_def; *cpp; cpp++) fputs (*cpp, cfile); fprintf(cfile, ! "static const struct error_table et = { text, %ldL, %d };\n\n", table_number, current); fputs("static struct et_list link = { 0, 0 };\n\n", cfile); --- 253,259 ---- for (cpp = struct_def; *cpp; cpp++) fputs (*cpp, cfile); fprintf(cfile, ! "static const struct error_table et = { text, %dL, %d };\n\n", table_number, current); fputs("static struct et_list link = { 0, 0 };\n\n", cfile); *************** *** 269,275 **** fprintf (hfile, "extern void initialize_%s_error_table ();\n", table_name); ! fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%ldL)\n", table_name, table_number); /* compatibility... */ fprintf (hfile, "\n/* for compatibility with older versions... */\n"); --- 269,275 ---- fprintf (hfile, "extern void initialize_%s_error_table ();\n", table_name); ! fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%dL)\n", table_name, table_number); /* compatibility... */ fprintf (hfile, "\n/* for compatibility with older versions... */\n"); *************** *** 286,289 **** --- 286,291 ---- fputs(s, stderr); fprintf(stderr, "\nLine number %d; last token was '%s'\n", lineno, current_token); + + return 0; }