aboutsummaryrefslogtreecommitdiff
path: root/argp/argp-fmtstream.c
diff options
context:
space:
mode:
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 55ac7f9..f57b99d 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