From: joey Date: Sun, 19 May 2002 23:55:14 +0000 (+0000) Subject: * Patch from Seneca to correct newspeak's X-Git-Tag: 2.39~24 X-Git-Url: http://git.ieval.ro/?p=filters.git;a=commitdiff_plain;h=3872d98cd3176214e90886a2b7805f806854529b * Patch from Seneca to correct newspeak's handling of double quotes preeceeded by punctuation and followed by a blank line. Closes: #146769 --- diff --git a/debian/changelog b/debian/changelog index 25b8a7f..ffa5d4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +filters (2.23) unstable; urgency=low + + * Patch from Seneca to correct newspeak's + handling of double quotes preeceeded by punctuation and followed by a + blank line. Closes: #146769 + + -- Joey Hess Sun, 19 May 2002 19:52:06 -0400 + filters (2.22) unstable; urgency=low * Something I already fixed in CVS, Closes: #124617 diff --git a/debian/control b/debian/control index 131f0af..859e90a 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: games Priority: optional Build-Depends: debhelper (>= 3), flex, bison | byacc | btyacc Maintainer: Joey Hess -Standards-Version: 3.5.6.0 +Standards-Version: 3.5.6.1 Package: filters Architecture: any diff --git a/kraut.dir/lex.yy.c b/kraut.dir/lex.yy.c index 038b6bb..38190b2 100644 --- a/kraut.dir/lex.yy.c +++ b/kraut.dir/lex.yy.c @@ -9,7 +9,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include - +#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus @@ -22,7 +22,9 @@ #ifdef __cplusplus #include +#ifndef _WIN32 #include +#endif /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -450,7 +452,7 @@ char *yytext; #line 11 "kraut.l" char buf[128]; -#line 454 "lex.yy.c" +#line 456 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -550,9 +552,20 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + } #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -603,7 +616,7 @@ YY_DECL #line 15 "kraut.l" -#line 607 "lex.yy.c" +#line 620 "lex.yy.c" if ( yy_init ) { @@ -986,7 +999,7 @@ YY_RULE_SETUP #line 78 "kraut.l" ECHO; YY_BREAK -#line 990 "lex.yy.c" +#line 1003 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1550,11 +1563,15 @@ YY_BUFFER_STATE b; } +#ifndef _WIN32 +#include +#else #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) diff --git a/newspeak.l b/newspeak.l index 67b2c5e..51333ab 100644 --- a/newspeak.l +++ b/newspeak.l @@ -584,7 +584,7 @@ robably|ventually|[Oo]bvious|[Bb]asic|{W}[Oo]nly|otally | if (14 == fcounter++) printf("(fnord) "); } -[.,!?]\"([^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y0,yytext+1); +[.,!?]\"([^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y0,yytext+2); \"([.,!?][^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y1,yytext+2); . printf(yytext);