about summary refs log tree commit diff
path: root/argp
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
parent1248c1c41508387ff282b208636737e8cdc9b5b0 (diff)
downloadglibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.xz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'argp')
-rw-r--r--argp/argp-fmtstream.c12
-rw-r--r--argp/argp-fmtstream.h5
-rw-r--r--argp/argp-help.c11
3 files changed, 8 insertions, 20 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
diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
index f94207a20b..aa8842132f 100644
--- a/argp/argp-fmtstream.h
+++ b/argp/argp-fmtstream.h
@@ -1,5 +1,5 @@
 /* Word-wrapping and line-truncating streams.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -43,8 +43,7 @@
 # endif
 #endif
 
-#if    (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
-    || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
+#if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
 /* line_wrap_stream is available, so use that.  */
 #define ARGP_FMTSTREAM_USE_LINEWRAP
 #endif
diff --git a/argp/argp-help.c b/argp/argp-help.c
index c12b10e235..bab5b4081e 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -1,6 +1,5 @@
 /* Hierarchial argument parsing help output
-   Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1995-2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -312,13 +311,13 @@ fill_in_uparams (const struct argp_state *state)
      {"no-parent", 'P',	      0,     0, "Include processes without parents"},
      {0,           'x',       0,     OPTION_ALIAS},
      {"all-fields",'Q',       0,     0, "Don't elide unusable fields (normally"
-                                        " if there's some reason ps can't"
+					" if there's some reason ps can't"
 					" print a field for any process, it's"
-                                        " removed from the output entirely)" },
+					" removed from the output entirely)" },
      {"reverse",   'r',       0,     0, "Reverse the order of any sort"},
      {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
      {"session",   OPT_SESS,  "SID", OPTION_ARG_OPTIONAL,
-                                        "Add the processes from the session"
+					"Add the processes from the session"
 					" SID (which defaults to the sid of"
 					" the current process)" },
 
@@ -1874,11 +1873,9 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
 #endif
 	    }
 
-#ifdef USE_IN_LIBIO
 	  if (_IO_fwide (stream, 0) > 0)
 	    putwc_unlocked (L'\n', stream);
 	  else
-#endif
 	    putc_unlocked ('\n', stream);
 
 #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)