diff options
author | Roland McGrath <roland@gnu.org> | 1996-04-20 00:05:25 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-04-20 00:05:25 +0000 |
commit | a641835acd28fabf507c5a99d7805c694c2ec7e3 (patch) | |
tree | 5829796a450826b540dc763b8891b110bafd35b1 /stdlib/rpmatch.c | |
parent | f24f4dc82d76bc2bed2d7e28877c5e9e469d4931 (diff) | |
download | glibc-a641835acd28fabf507c5a99d7805c694c2ec7e3.tar.gz |
Fri Apr 19 00:49:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>cvs/libc-960420
* stdlib/rpmatch.c (rpmatch: try): Take new arg NOMATCH, return value
for nonmatching nonerror (instead of !MATCH).
(rpmatch): Use it, so we return -1 when NOEXPR doesn't match either.
* resolv/getnetnamadr.c (getnetbyaddr): Use u_int32_t instead of
unsigned long for variable NET2.
* time/etcetera, time/europe, time/solar89: Updated from ADO's 96e.
Tue Apr 9 14:37:31 1996 Ulrich Drepper <drepper@cygnus.com>
* catgets/Makefile, catgets/catgets.c, catgets/catgetsinfo.h,
catgets/config.h, catgets/gencat.c, catgets/nl_types.h,
catgets/open_catalog.c: New files. Implementation of XPG4
compliant catgets() function and needed tools.
* Makefile (subdirs): Add catgets.
Thu Apr 18 23:36:11 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* math/Makefile (CPPFLAGS): Append -D__NO_MATH_INLINES.
Wed Apr 10 20:48:43 1996 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/vfprintf.c: Correct some typos.
* sysdeps/libm-ieee754/w_gammaf.c, sysdeps/libm-ieee754/w_lgamma.c,
sysdeps/libm-ieee754/w_lgammaf.c: Reference signgam instead of
__signgam.
Thu Apr 18 21:07:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Makerules (no-whole-archive): New variable.
(build-shlib): Use it.
* elf/Makefile (libdl.so): Use it.
* configure.in (libc_cv_ld_no_whole_archive): New check for
--no-whole-archive.
* config.make.in (have-no-whole-archive): New variable.
* stdio-common/printf_fp.c: Increase fudge factor for BIGNUM_SIZE calc
from 3 to 4.
* Make-dist: Include version.mk.
(version, release): Variables removed.
* Makeconfig (version.mk): New target.
Fri Apr 19 01:42:18 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/Makefile (headers): Add langinfo.h.
(CPPFLAGS): Remove -Iliblib.
Diffstat (limited to 'stdlib/rpmatch.c')
-rw-r--r-- | stdlib/rpmatch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/rpmatch.c b/stdlib/rpmatch.c index 0dcaa6dc87..4774e2cf45 100644 --- a/stdlib/rpmatch.c +++ b/stdlib/rpmatch.c @@ -30,7 +30,7 @@ rpmatch (response) { /* Match against one of the response patterns, compiling the pattern first if necessary. */ - inline int try (const int tag, const int match, + inline int try (const int tag, const int match, const int nomatch, const char **lastp, regex_t *re) { const char *pattern = nl_langinfo (tag); @@ -50,13 +50,13 @@ rpmatch (response) } /* Try the pattern. */ - return regexec (re, response, 0, NULL, 0) == 0 ? match : !match; + return regexec (re, response, 0, NULL, 0) == 0 ? match : nomatch; } /* We cache the response patterns and compiled regexps here. */ static const char *yesexpr, *noexpr; static regex_t yesre, nore; - return (try (YESEXPR, 1, &yesexpr, &yesre) ?: - try (NOEXPR, 0, &noexpr, &nore)); + return (try (YESEXPR, 1, 0, &yesexpr, &yesre) ?: + try (NOEXPR, 0, -1, &noexpr, &nore)); } |