[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19-eof-string.patch
From: |
Akim Demaille |
Subject: |
19-eof-string.patch |
Date: |
Thu, 18 Oct 2001 23:30:51 +0200 |
The peer of the previous patch:
# 1.4
errprint()
errprint(`
# 1.4q pre patch
NONE:0: /usr/bin/m4: ERROR: EOF in string
# 1.4q post-patch
/usr/local/bin/m4: ERROR: EOF in string
lt-m4: /tmp/foo.m4:2: EOF in string
Index: ChangeLog
from Akim Demaille <address@hidden>
* m4/input.c (m4_next_token): Display where was opened what is
not closed.
Index: m4/input.c
--- m4/input.c Thu, 18 Oct 2001 23:15:03 +0200 akim
+++ m4/input.c Thu, 18 Oct 2001 23:17:42 +0200 akim
@@ -1107,13 +1107,16 @@
}
else if (M4_IS_LQUOTE(ch)) /* QUOTED STRING, SINGLE QUOTES */
{
+ const char *current_file = m4_current_file;
+ int current_line = m4_current_line;
quote_level = 1;
while (1)
{
ch = next_char ();
if (ch == CHAR_EOF)
- M4ERROR ((EXIT_FAILURE, 0,
- _("ERROR: EOF in string")));
+ error_at_line (EXIT_FAILURE, 0,
+ current_file, current_line,
+ _("EOF in string"));
if (M4_IS_RQUOTE(ch))
{
@@ -1134,14 +1137,16 @@
/* QUOTED STRING, LONGER QUOTES */
else if (!single_quotes && MATCH (ch, lquote.string))
{
+ const char *current_file = m4_current_file;
+ int current_line = m4_current_line;
quote_level = 1;
while (1)
{
ch = next_char ();
if (ch == CHAR_EOF)
- M4ERROR ((EXIT_FAILURE, 0,
- _("ERROR: EOF in string")));
-
+ error_at_line (EXIT_FAILURE, 0,
+ current_file, current_line,
+ _("EOF in string"));
if (MATCH (ch, rquote.string))
{
if (--quote_level == 0)
- 19-eof-string.patch,
Akim Demaille <=