Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: use common sty...



details:   https://anonhg.NetBSD.org/src/rev/a10497126346
branches:  trunk
changeset: 959786:a10497126346
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Feb 25 00:50:10 2021 +0000

description:
tests/libcurses: use common style for parse error messages

diffstat:

 tests/lib/libcurses/director/testlang_conf.l |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (34 lines):

diff -r 74b386a3967f -r a10497126346 tests/lib/libcurses/director/testlang_conf.l
--- a/tests/lib/libcurses/director/testlang_conf.l      Thu Feb 25 00:42:00 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_conf.l      Thu Feb 25 00:50:10 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_conf.l,v 1.24 2021/02/25 00:42:00 rillig Exp $        */
+/*     $NetBSD: testlang_conf.l,v 1.25 2021/02/25 00:50:10 rillig Exp $        */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -125,7 +125,8 @@
                        default:
                                if (isalpha(*p))
                                        errx(2,
-                                           "%s:%zu: invalid escape sequence '\\%c' in string literal",
+                                           "%s:%zu: Invalid escape sequence "
+                                           "'\\%c' in string literal",
                                            cur_file, line, *p);
                                *q++ = *p++;
                        }
@@ -182,10 +183,9 @@
                char *inc_file;
 
                if (include_ptr > MAX_INCLUDES) {
-                       fprintf(stderr,
-                               "Maximum number of nested includes exceeded "
-                               "at line %zu of file %s\n", line, cur_file);
-                               exit(2);
+                       errx(2,
+                           "%s:%zu: Maximum number of nested includes "
+                           "exceeded", cur_file, line);
                }
 
                const char *dir_begin;



Home | Main Index | Thread Index | Old Index