Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/regex Add REG_GNU



details:   https://anonhg.NetBSD.org/src/rev/e16e4c3f054f
branches:  trunk
changeset: 980985:e16e4c3f054f
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 23 17:13:44 2021 +0000

description:
Add REG_GNU

diffstat:

 tests/lib/libc/regex/main.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 987b276ca381 -r e16e4c3f054f tests/lib/libc/regex/main.c
--- a/tests/lib/libc/regex/main.c       Tue Feb 23 16:54:17 2021 +0000
+++ b/tests/lib/libc/regex/main.c       Tue Feb 23 17:13:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.3 2021/02/23 15:00:01 christos Exp $        */
+/*     $NetBSD: main.c,v 1.4 2021/02/23 17:13:44 christos Exp $        */
 
 /*-
  * Copyright (c) 1993 The NetBSD Foundation, Inc.
@@ -352,7 +352,7 @@
 {
        char *p;
        int o = (type == 'c') ? copts : eopts;
-       const char *legal = (type == 'c') ? "bisnmpP" : "^$#tl";
+       const char *legal = (type == 'c') ? "bisnmpg" : "^$#tl";
 
        for (p = s; *p != '\0'; p++)
                if (strchr(legal, *p) != NULL)
@@ -376,8 +376,8 @@
                        case 'p':
                                o |= REG_PEND;
                                break;
-                       case 'P':
-                               o |= REG_POSIX;
+                       case 'g':
+                               o |= REG_GNU;
                                break;
                        case '^':
                                o |= REG_NOTBOL;



Home | Main Index | Thread Index | Old Index