aboutsummaryrefslogtreecommitdiff
path: root/argp/argp-fmtstream.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
commit3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch)
treedb47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /argp/argp-fmtstream.c
parent1248c1c41508387ff282b208636737e8cdc9b5b0 (diff)
downloadglibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.bz2
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'argp/argp-fmtstream.c')
-rw-r--r--argp/argp-fmtstream.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c
index 55ac7f9183..f57b99d1d8 100644
--- a/argp/argp-fmtstream.c
+++ b/argp/argp-fmtstream.c
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
- Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999,2001-2003,2005,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -40,7 +40,7 @@
#define isblank(ch) ((ch)==' ' || (ch)=='\t')
#endif
-#if defined _LIBC && defined USE_IN_LIBIO
+#ifdef _LIBC
# include <wchar.h>
# include <libio/libioP.h>
# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
@@ -101,11 +101,7 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
__argp_fmtstream_update (fs);
if (fs->p > fs->buf)
{
-#ifdef USE_IN_LIBIO
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
-#else
- fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
-#endif
}
free (fs->buf);
free (fs);
@@ -150,11 +146,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
size_t i;
for (i = 0; i < pad; i++)
{
-#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
putwc_unlocked (L' ', fs->stream);
else
-#endif
putc_unlocked (' ', fs->stream);
}
}
@@ -315,11 +309,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
*nl++ = ' ';
else
for (i = 0; i < fs->wmargin; ++i)
-#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
putwc_unlocked (L' ', fs->stream);
else
-#endif
putc_unlocked (' ', fs->stream);
/* Copy the tail of the original buffer into the current buffer