From f65f7608ab21e9082e2fbf4ba26fe1621538a05f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 12 Jun 2004 03:00:05 +0000 Subject: [PATCH] Ignore a missing newline at EOF for single line comments. (#83674, Sven Fri Jun 11 22:56:46 2004 Matthias Clasen * glib/gscanner.c (g_scanner_get_token_ll): Ignore a missing newline at EOF for single line comments. (#83674, Sven Neumann) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gscanner.c | 4 ++++ 6 files changed, 34 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5a19bf5..973bbf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Jun 11 22:56:46 2004 Matthias Clasen + + * glib/gscanner.c (g_scanner_get_token_ll): Ignore a + missing newline at EOF for single line comments. + (#83674, Sven Neumann) + Thu Jun 10 23:38:02 2004 Matthias Clasen * tests/printf-test.c (TEST): Actually set any_failed on diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5a19bf5..973bbf5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Fri Jun 11 22:56:46 2004 Matthias Clasen + + * glib/gscanner.c (g_scanner_get_token_ll): Ignore a + missing newline at EOF for single line comments. + (#83674, Sven Neumann) + Thu Jun 10 23:38:02 2004 Matthias Clasen * tests/printf-test.c (TEST): Actually set any_failed on diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 5a19bf5..973bbf5 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Fri Jun 11 22:56:46 2004 Matthias Clasen + + * glib/gscanner.c (g_scanner_get_token_ll): Ignore a + missing newline at EOF for single line comments. + (#83674, Sven Neumann) + Thu Jun 10 23:38:02 2004 Matthias Clasen * tests/printf-test.c (TEST): Actually set any_failed on diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5a19bf5..973bbf5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Fri Jun 11 22:56:46 2004 Matthias Clasen + + * glib/gscanner.c (g_scanner_get_token_ll): Ignore a + missing newline at EOF for single line comments. + (#83674, Sven Neumann) + Thu Jun 10 23:38:02 2004 Matthias Clasen * tests/printf-test.c (TEST): Actually set any_failed on diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5a19bf5..973bbf5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Fri Jun 11 22:56:46 2004 Matthias Clasen + + * glib/gscanner.c (g_scanner_get_token_ll): Ignore a + missing newline at EOF for single line comments. + (#83674, Sven Neumann) + Thu Jun 10 23:38:02 2004 Matthias Clasen * tests/printf-test.c (TEST): Actually set any_failed on diff --git a/glib/gscanner.c b/glib/gscanner.c index b9b0e7f..d9c7309 100644 --- a/glib/gscanner.c +++ b/glib/gscanner.c @@ -1634,6 +1634,10 @@ g_scanner_get_token_ll (GScanner *scanner, gstring = g_string_append_c (gstring, ch); ch = g_scanner_get_char (scanner, line_p, position_p); } + /* ignore a missing newline at EOF for single line comments */ + if (in_comment_single && + config->cpair_comment_single[1] == '\n') + in_comment_single = FALSE; } else if (config->scan_identifier && ch && strchr (config->cset_identifier_first, ch)) -- 2.7.4