cscope/cscope-egrep.out.patch

32 lines
755 B
Diff

# on sources that have '\r\n' in them, egrep produces no output
# strip the carriage return out of the output
# rcoe@wi.rr.com
#
--- cscope-15.7a/src/egrep.y 2008-03-12 15:43:56.000000000 -0500
+++ cscope-15.7a.orig/src/egrep.y 2011-06-09 15:32:08.809669622 -0500
@@ -612,12 +612,22 @@
succeed:
fprintf(output, format, file, lnum);
if (p <= nlp) {
- while (nlp < buf_end)
+ while (nlp < buf_end) {
+ if ('\r' == *nlp) {
+ nlp++;
+ continue;
+ }
putc(*nlp++, output);
+ }
nlp = buf;
}
- while (nlp < p)
+ while (nlp < p) {
+ if ('\r' == *nlp) {
+ nlp++;
+ continue;
+ }
putc(*nlp++, output);
+ }
lnum++;
nlp = p;
if (out[cstat = istat] == 0)