git.annexia.org
/
miniexpect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b44176
)
Add a note about clearing the input buffer in mexp_expect.
author
Richard W.M. Jones
<rjones@redhat.com>
Sat, 26 Apr 2014 10:51:25 +0000
(11:51 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Sat, 26 Apr 2014 10:51:25 +0000
(11:51 +0100)
miniexpect.c
patch
|
blob
|
history
diff --git
a/miniexpect.c
b/miniexpect.c
index
fef03fd
..
eca8e9a
100644
(file)
--- a/
miniexpect.c
+++ b/
miniexpect.c
@@
-208,6
+208,10
@@
mexp_expect (mexp_h *h, const mexp_regexp *regexps, int *ovector, int ovecsize)
time (&start_t);
/* Clear the read buffer. */
+ /* XXX This is possibly incorrect because it throws away inputs that
+ * may not have been matched yet. A better idea is to record the
+ * end of the previous match and only throw that away.
+ */
clear_buffer (h);
for (;;) {