From: George Koehler Date: Sun, 29 Oct 2017 18:18:47 +0000 (-0400) Subject: For DIAGOPT, change outshort(patno) to outshort(lino - 1). X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=cb8b28c0880bd5c57a2796eadc08a3a8c7595f36;p=ack.git For DIAGOPT, change outshort(patno) to outshort(lino - 1). This is more useful when looking for patterns; lino - 1 is probably the line number in the patterns file. DIAGOPT is off by default but one can edit optim.h to enable it. The other changes just clean up whitespace. --- diff --git a/util/opt/mktab.y b/util/opt/mktab.y index e2a6c0b1a..7208919c5 100644 --- a/util/opt/mktab.y +++ b/util/opt/mktab.y @@ -87,7 +87,7 @@ pattern : if (patCBO) { register int i; - if (! rplCBO) { + if (! rplCBO) { yyerror("No CBO in replacement"); } for (i=0; imaxpatlen) maxpatlen=patlen; + patno++; + printf("\n"); + if (patlen>maxpatlen) maxpatlen=patlen; } outbyte(b) { @@ -424,4 +424,3 @@ out(w) { outshort(w); } } -