summary refs log tree commit diff
path: root/posix/getopt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
commitdf6f89692fd7e802f38f944ed73942354a9911f8 (patch)
tree12debd445b11886fcf433fc6f85e9abe615670cc /posix/getopt.c
parent10ffcd52f0578b13b48bdf84e73759353b29b673 (diff)
downloadglibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.gz
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.xz
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.zip
* wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs,
	wcsrtombs, mbsnrtowcs, and wcsnrtombs.
	* debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk,
	wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk.
	* debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk,
	__wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk.
	* debug/tst-chk1.c: Add tests for new functions.
	* debug/mbsnrtowcs_chk.c: New file.
	* debug/mbsrtowcs_chk.c: New file.
	* debug/wcrtomb_chk.c: New file.
	* debug/wcsnrtombs_chk.c: New file.
	* debug/wcsrtombs_chk.c: New file.

	* include/stdio.h: Add declaration for __fxprintf.
Diffstat (limited to 'posix/getopt.c')
-rw-r--r--posix/getopt.c50
1 files changed, 10 insertions, 40 deletions
diff --git a/posix/getopt.c b/posix/getopt.c
index 9ad13a4a92..c294ce3711 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -576,10 +576,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 		  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		  if (_IO_fwide (stderr, 0) > 0)
-		    __fwprintf (stderr, L"%s", buf);
-		  else
-		    fputs (buf, stderr);
+		  __fxprintf (NULL, "%s", L"%s", buf);
 
 		  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		  _IO_funlockfile (stderr);
@@ -654,10 +651,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 			  ((_IO_FILE *) stderr)->_flags2
 			    |= _IO_FLAGS2_NOTCANCEL;
 
-			  if (_IO_fwide (stderr, 0) > 0)
-			    __fwprintf (stderr, L"%s", buf);
-			  else
-			    fputs (buf, stderr);
+			  __fxprintf (NULL, "%s", L"%s", buf);
 
 			  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			  _IO_funlockfile (stderr);
@@ -694,10 +688,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 			  ((_IO_FILE *) stderr)->_flags2
 			    |= _IO_FLAGS2_NOTCANCEL;
 
-			  if (_IO_fwide (stderr, 0) > 0)
-			    __fwprintf (stderr, L"%s", buf);
-			  else
-			    fputs (buf, stderr);
+			  __fxprintf (NULL, "%s", L"%s", buf);
 
 			  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			  _IO_funlockfile (stderr);
@@ -771,10 +762,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 		  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		  if (_IO_fwide (stderr, 0) > 0)
-		    __fwprintf (stderr, L"%s", buf);
-		  else
-		    fputs (buf, stderr);
+		  __fxprintf (NULL, "%s", L"%s", buf);
 
 		  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		  _IO_funlockfile (stderr);
@@ -837,10 +825,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 		int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		if (_IO_fwide (stderr, 0) > 0)
-		  __fwprintf (stderr, L"%s", buf);
-		else
-		  fputs (buf, stderr);
+		__fxprintf (NULL, "%s", L"%s", buf);
 
 		((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		_IO_funlockfile (stderr);
@@ -888,10 +873,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 		    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		    if (_IO_fwide (stderr, 0) > 0)
-		      __fwprintf (stderr, L"%s", buf);
-		    else
-		      fputs (buf, stderr);
+		    __fxprintf (NULL, "%s", L"%s", buf);
 
 		    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		    _IO_funlockfile (stderr);
@@ -960,10 +942,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 		    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		    if (_IO_fwide (stderr, 0) > 0)
-		      __fwprintf (stderr, L"%s", buf);
-		    else
-		      fputs (buf, stderr);
+		    __fxprintf (NULL, "%s", L"%s", buf);
 
 		    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		    _IO_funlockfile (stderr);
@@ -1005,10 +984,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 			    ((_IO_FILE *) stderr)->_flags2
 			      |= _IO_FLAGS2_NOTCANCEL;
 
-			    if (_IO_fwide (stderr, 0) > 0)
-			      __fwprintf (stderr, L"%s", buf);
-			    else
-			      fputs (buf, stderr);
+			    __fxprintf (NULL, "%s", L"%s", buf);
 
 			    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			    _IO_funlockfile (stderr);
@@ -1047,10 +1023,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 			    ((_IO_FILE *) stderr)->_flags2
 			      |= _IO_FLAGS2_NOTCANCEL;
 
-			    if (_IO_fwide (stderr, 0) > 0)
-			      __fwprintf (stderr, L"%s", buf);
-			    else
-			      fputs (buf, stderr);
+			    __fxprintf (NULL, "%s", L"%s", buf);
 
 			    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			    _IO_funlockfile (stderr);
@@ -1121,10 +1094,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 			int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 			((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-			if (_IO_fwide (stderr, 0) > 0)
-			  __fwprintf (stderr, L"%s", buf);
-			else
-			  fputs (buf, stderr);
+			__fxprintf (NULL, "%s", L"%s", buf);
 
 			((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			_IO_funlockfile (stderr);