Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!ll-xn!husc6!mit-eddie!uw-beaver!tikal!ole!powell From: powell@ole.UUCP (Gary Powell) Newsgroups: comp.sources.bugs Subject: patch to check for page breaks and use with error (BSD) Message-ID: <399@ole.UUCP> Date: 25 Feb 88 17:15:35 GMT Reply-To: powell@ole.UUCP (Gary Powell) Organization: Seattle Silicon Corporation, Bellevue, WA. Lines: 38 The lex patch lets <^L> through without complaining. At SSC we tend to group functions in files by similar utility, seperating them by ^L. Note : octal 14 is assumed to be page break. edit if your host is different. The change to main.c does two things. 1) print the character in question if it is a printable char (who remebers what token 59 is???) 2) change the format of the line number to be like that of lint so that if you pipe the output thru error (BSD4.3) it will know how to read it. Just run this message thru patch. | patch -d [your source directory] Thanks to Nick Crossly for the program. I find miss matched comments a royal pain to debug. *** lex.l 40c [ \t\n\14]+ ; . *** main.c 156,157c Fprintf (stderr, "%s(%d): %s\n", filename, yylineno, s); . 145,146c if (yychar >= ' ' && yychar <= '~') /* printable char */ Fprintf (stderr, "%s(%d): %s: token (%c)\n", filename, yylineno, s, yychar); else Fprintf (stderr, "%s(%d): %s: token %d\n", filename, yylineno, s, yychar); . -- _Q _Q _Q _Q _Q_Q _Q _Q _Q /_\) /_\) /_\) /_\)/_/\\) /_\) /_\) Gary Powell /_\) _O|/O_O|/O__O|/O___O|/O_OO|/O__O|/O__O|/O__________________________________O|/O_ UUCP!uw-beaver!tikal!ole!powell Seattle Silicon Corp. (206) 828-4422