diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-10-10 20:14:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-10-10 20:14:12 +0000 |
commit | c06b7169e41740e4be335ca3f6221bc7d60464c7 (patch) | |
tree | fa5b4f6e4629b6b8b36be74118acbdd0f9e73e6d /stdio-common/printf-prs.c | |
parent | 59d430c6809871b357f2e9e677ef7fdfc03fbf62 (diff) | |
download | glibc-c06b7169e41740e4be335ca3f6221bc7d60464c7.tar.gz glibc-c06b7169e41740e4be335ca3f6221bc7d60464c7.tar.xz glibc-c06b7169e41740e4be335ca3f6221bc7d60464c7.zip |
* stdio-common/printf-parse.h: Include string.h and wchar.h.
(__find_specwc): Change into __extern_always_inline function. (__find_specmb): Likewise. Remove ps argument. Use __strchrnul. (__parse_one_specmb): Remove ps argument. * stdio-common/vfprintf.c (vfprintf): Remove mbstate variable. Adjust __find_specmb and __parse_one_specmb callers. * stdio-common/printf-prs.c (parse_printf_format): Likewise. * stdio-common/printf-parsemb.c (__find_specwc, __find_specmb): Removed. (__parse_one_specmb): Remove ps argument, adjust __find_specmb caller.
Diffstat (limited to 'stdio-common/printf-prs.c')
-rw-r--r-- | stdio-common/printf-prs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/stdio-common/printf-prs.c b/stdio-common/printf-prs.c index 015b01f1ed..aabc9ed85a 100644 --- a/stdio-common/printf-prs.c +++ b/stdio-common/printf-prs.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, + 2007 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 @@ -66,17 +66,16 @@ parse_printf_format (fmt, n, argtypes) size_t nargs; /* Number of arguments. */ size_t max_ref_arg; /* Highest index used in a positional arg. */ struct printf_spec spec; - mbstate_t mbstate; const unsigned char *f = (const unsigned char *) fmt; nargs = 0; max_ref_arg = 0; /* Search for format specifications. */ - for (f = __find_specmb (f, &mbstate); *f != '\0'; f = spec.next_fmt) + for (f = __find_specmb (f); *f != '\0'; f = spec.next_fmt) { /* Parse this spec. */ - nargs += __parse_one_specmb (f, nargs, &spec, &max_ref_arg, &mbstate); + nargs += __parse_one_specmb (f, nargs, &spec, &max_ref_arg); /* If the width is determined by an argument this is an int. */ if (spec.width_arg != -1 && (size_t) spec.width_arg < n) |