summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--parser.l24
2 files changed, 19 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index b9a51e0c..f521fd61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,15 @@
2009-10-22 Kaz Kylheku <kkylheku@gmail.com>
+ * parser.l (YY_INPUT): Kill tabs with spaces (how did they sneak in?).
+ Fix possible use of uninitialized ch.
+
+2009-10-21 Kaz Kylheku <kkylheku@gmail.com>
+
* txr.1: Fixed misleading wording (separation versus termination).
Added Introduction headings to some major sections.
Improved exception handling intro.
-2009-10-22 Kaz Kylheku <kkylheku@gmail.com>
+2009-10-21 Kaz Kylheku <kkylheku@gmail.com>
Version 019
@@ -18,7 +23,7 @@
* lib.c, match.c, regex.c, regex.h, stream.c: Trailing whitespace
removed from lines.
-2009-10-22 Kaz Kylheku <kkylheku@gmail.com>
+2009-10-21 Kaz Kylheku <kkylheku@gmail.com>
* txr.1: Documented freeform.
diff --git a/parser.l b/parser.l
index 7a5f0c17..d35c23ad 100644
--- a/parser.l
+++ b/parser.l
@@ -41,18 +41,18 @@
#define YY_NO_UNPUT
-#define YY_INPUT(buf, result, max_size) \
- do { \
- obj_t *c = nil; \
- int n, ch; \
- for (n = 0; n < max_size && \
- (c = get_char(yyin_stream)) && \
- (ch = c_chr(c)) != '\n'; ++n) \
- buf[n] = (char) ch; \
- if (ch == '\n') \
- buf[n++] = (char) ch; \
- result = n; \
- } while (0)
+#define YY_INPUT(buf, result, max_size) \
+ do { \
+ obj_t *c = nil; \
+ int n, ch = '*'; \
+ for (n = 0; n < max_size && \
+ (c = get_char(yyin_stream)) && \
+ (ch = c_chr(c)) != '\n'; ++n) \
+ buf[n] = (char) ch; \
+ if (ch == '\n') \
+ buf[n++] = (char) ch; \
+ result = n; \
+ } while (0)
obj_t *yyin_stream;