less/less-394-search.patch
Vojtech Vitek (V-Teq) 46c01743d8 Use POSIX regcomp instead of PCRE - revert 406-11
Resolves: #643233

Revert "- configure a regular expression library"
This reverts commit 4b961c758d.

Conflicts:
	less.spec
2012-05-14 17:20:55 +02:00

33 lines
576 B
Diff

--- less-394/line.c.search 2005-12-03 21:20:32.000000000 +0100
+++ less-394/line.c 2006-02-15 11:23:25.308694376 +0100
@@ -1125,6 +1125,14 @@
break;
}
}
+ if (c == '\0')
+ {
+ /*
+ * Pretend the line ended here
+ */
+ new_pos = ch_tell();
+ break;
+ }
linebuf[n++] = c;
c = ch_forw_get();
}
@@ -1198,6 +1206,14 @@
*to = *fm;
n = size_linebuf - old_size_linebuf;
}
+ if (c == '\0')
+ {
+ /*
+ * Pretend the line ended here
+ */
+ new_pos = ch_tell() + 1;
+ break;
+ }
linebuf[--n] = c;
}
if (linep != NULL)