about summary refs log tree commit diff
path: root/stdio-common/vfprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-10 20:14:12 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-10 20:14:12 +0000
commitc06b7169e41740e4be335ca3f6221bc7d60464c7 (patch)
treefa5b4f6e4629b6b8b36be74118acbdd0f9e73e6d /stdio-common/vfprintf.c
parent59d430c6809871b357f2e9e677ef7fdfc03fbf62 (diff)
downloadglibc-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/vfprintf.c')
-rw-r--r--stdio-common/vfprintf.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index fae0f7464e..d1dc1aaf59 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -209,11 +209,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
   CHAR_T *workstart = NULL;
   CHAR_T *workend;
 
-  /* State for restartable multibyte character handling functions.  */
-#ifndef COMPILE_WPRINTF
-  mbstate_t mbstate;
-#endif
-
   /* We have to save the original argument pointer.  */
   va_list ap_save;
 
@@ -1294,11 +1289,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
   /* Find the first format specifier.  */
   f = lead_str_end = __find_specwc ((const UCHAR_T *) format);
 #else
-  /* Put state for processing format string in initial state.  */
-  memset (&mbstate, '\0', sizeof (mbstate_t));
-
   /* Find the first format specifier.  */
-  f = lead_str_end = __find_specmb ((const UCHAR_T *) format, &mbstate);
+  f = lead_str_end = __find_specmb ((const UCHAR_T *) format);
 #endif
 
   /* Lock stream.  */
@@ -1591,7 +1583,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
 #ifdef COMPILE_WPRINTF
       f = __find_specwc ((end_of_spec = ++f));
 #else
-      f = __find_specmb ((end_of_spec = ++f), &mbstate);
+      f = __find_specmb ((end_of_spec = ++f));
 #endif
 
       /* Write the following constant string.  */
@@ -1674,8 +1666,7 @@ do_positional:
 #ifdef COMPILE_WPRINTF
 	nargs += __parse_one_specwc (f, nargs, &specs[nspecs], &max_ref_arg);
 #else
-	nargs += __parse_one_specmb (f, nargs, &specs[nspecs], &max_ref_arg,
-				     &mbstate);
+	nargs += __parse_one_specmb (f, nargs, &specs[nspecs], &max_ref_arg);
 #endif
       }