1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Cleanup of configuration options

Make several tool features mandatory and simplify the code.
This commit is contained in:
Ulrich Drepper
2011-09-10 14:34:15 -04:00
parent 1248c1c415
commit 3ce1f29594
84 changed files with 468 additions and 797 deletions

View File

@ -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