about summary refs log tree commit diff
path: root/stdio-common/fxprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-20 17:51:14 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-20 17:51:14 +0000
commit8a259a2310d269a86c603262e8f2c5f69f2a9c9d (patch)
treee2718944bb69323ba381e1d80160e490e7b8167c /stdio-common/fxprintf.c
parentdf6f89692fd7e802f38f944ed73942354a9911f8 (diff)
downloadglibc-8a259a2310d269a86c603262e8f2c5f69f2a9c9d.tar.gz
glibc-8a259a2310d269a86c603262e8f2c5f69f2a9c9d.tar.xz
glibc-8a259a2310d269a86c603262e8f2c5f69f2a9c9d.zip
* include/stdio.h (__fxprintf): Remove wfmt argument.
	* stdio-common/fxprintf.c: Include assert.h, ctype.h and wchar.h.
	(__fxprintf): Remove wfmt argument, create wfmt format string on
	the fly from fmt.
	* argp/argp-fmtstream.c: Adjust all __fxprintf callers.
	* argp/argp-help.c: Likewise.
	* assert/assert-perr.c: Likewise.
	* assert/assert.c: Likewise.
	* gmon/gmon.c: Likewise.
	* inet/rcmd.c: Likewise.
	* malloc/obstack.c: Likewise.
	* misc/error.c: Likewise.
	* misc/getpass.c: Likewise.
	* posix/getopt.c: Likewise.
	* resolv/res_hconf.c: Likewise.
	* stdio-common/perror.c: Likewise.
	* stdio-common/psignal.c: Likewise.
	* stdlib/fmtmsg.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/clnt_perr.c: Likewise.
	* sunrpc/clnt_tcp.c: Likewise.
	* sunrpc/clnt_udp.c: Likewise.
	* sunrpc/clnt_unix.c: Likewise.
	* sunrpc/svc_simple.c: Likewise.
	* sunrpc/svc_tcp.c: Likewise.
	* sunrpc/svc_udp.c: Likewise.
	* sunrpc/svc_unix.c: Likewise.
	* sunrpc/xdr.c: Likewise.
	* sunrpc/xdr_array.c: Likewise.
	* sunrpc/xdr_rec.c: Likewise.
	* sunrpc/xdr_ref.c: Likewise.
	* sysdeps/generic/wordexp.c: Likewise.
Diffstat (limited to 'stdio-common/fxprintf.c')
-rw-r--r--stdio-common/fxprintf.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c
index 82a2ac8bd7..298e5f22b0 100644
--- a/stdio-common/fxprintf.c
+++ b/stdio-common/fxprintf.c
@@ -17,22 +17,34 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <assert.h>
+#include <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <wchar.h>
 
 
 int
-__fxprintf (FILE *fp, const char *fmt, const wchar_t *wfmt, ...)
+__fxprintf (FILE *fp, const char *fmt, ...)
 {
   if (fp == NULL)
     fp = stderr;
 
   va_list ap;
-  va_start (ap, wfmt);
+  va_start (ap, fmt);
 
   int res;
   if (_IO_fwide (fp, 0) > 0)
-    res = __vfwprintf (fp, wfmt, ap);
+    {
+      size_t len = strlen (fmt) + 1, i;
+      wchar_t wfmt[len];
+      for (i = 0; i < len; ++i)
+	{
+	  assert (isascii (fmt[i]));
+	  wfmt[i] = fmt[i];
+	}
+      res = __vfwprintf (fp, wfmt, ap);
+    }
   else
     res = _IO_vfprintf (fp, fmt, ap);