diff options
author | Roland McGrath <roland@gnu.org> | 1996-01-13 00:46:48 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-01-13 00:46:48 +0000 |
commit | 02ac66c50d2faf11677911fd99579869f24795ef (patch) | |
tree | bafee0af52b84a7fe2f40725fa158ab6e7d1d6e1 /stdio-common/vfscanf.c | |
parent | d94d8f2a5960683c324e184f1240b0c26fd3bc09 (diff) | |
download | glibc-02ac66c50d2faf11677911fd99579869f24795ef.tar.gz glibc-02ac66c50d2faf11677911fd99579869f24795ef.tar.xz glibc-02ac66c50d2faf11677911fd99579869f24795ef.zip |
Fri Jan 12 13:40:01 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-960113
* posix/gnu/types.h: Moved to sysdeps/generic/gnu/types.h. * posix/glob.c (glob): Add parens in glob call flags arg for GLOB_BRACE case. * string/string.h (strdupa): New macro. * stdio-common/vfscanf.c (%[): Grok ] as first char in set, not terminator on empty set. From drepper.
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r-- | stdio-common/vfscanf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 14aa7d9748..c13627aac2 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -703,6 +703,11 @@ __vfscanf (FILE *s, const char *format, va_list argptr) else not_in = 0; + if (*f == ']') + /* If ] appears before any char in the set, it is not + the terminator, but the first char in the set. */ + ADDW (*f++); + while ((fc = *f++) != '\0' && fc != ']') { if (fc == '-' && *f != '\0' && *f != ']' && |