summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-13 21:13:48 +0000
committerMiles Bader <miles@gnu.org>1997-02-13 21:13:48 +0000
commitdcfaecb6c28e2d91f6e48d59f0c8c6e8d91987d3 (patch)
treecc8accb575404ae69ace24fc9cdffa39bcadc124 /libshouldbeinlibc
parent919099f76b4dd19eb120b18971cd853e9c3da527 (diff)
Update to libc-970212 versions.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/argp-ba.c32
-rw-r--r--libshouldbeinlibc/argp-fmtstream.c23
-rw-r--r--libshouldbeinlibc/argp-fmtstream.h17
-rw-r--r--libshouldbeinlibc/argp-fs-xinl.c13
-rw-r--r--libshouldbeinlibc/argp-help.c43
-rw-r--r--libshouldbeinlibc/argp-namefrob.h22
-rw-r--r--libshouldbeinlibc/argp-parse.c34
-rw-r--r--libshouldbeinlibc/argp-pv.c32
-rw-r--r--libshouldbeinlibc/argp-pvh.c36
-rw-r--r--libshouldbeinlibc/argp-test.c19
-rw-r--r--libshouldbeinlibc/argp-xinl.c13
-rw-r--r--libshouldbeinlibc/argp.h73
12 files changed, 183 insertions, 174 deletions
diff --git a/libshouldbeinlibc/argp-ba.c b/libshouldbeinlibc/argp-ba.c
index f31c756d..61efc346 100644
--- a/libshouldbeinlibc/argp-ba.c
+++ b/libshouldbeinlibc/argp-ba.c
@@ -1,24 +1,22 @@
-/* Default definition for ARGP_PROGRAM_BUG_ADDRESS
+/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* If set by the user program, it should point to string that is the
bug-reporting address for the program. It will be printed by argp_help if
diff --git a/libshouldbeinlibc/argp-fmtstream.c b/libshouldbeinlibc/argp-fmtstream.c
index 3f6474a0..bdceceea 100644
--- a/libshouldbeinlibc/argp-fmtstream.c
+++ b/libshouldbeinlibc/argp-fmtstream.c
@@ -1,8 +1,7 @@
-/* Word-wrapping and line-truncating streams
-
+/* Word-wrapping and line-truncating streams.
Copyright (C) 1997 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,17 +14,13 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This package emulates glibc `line_wrap_stream' semantics for systems that
don't have that. */
-/* Get some gnu features: isblank, vsnprintf */
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
-
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -50,7 +45,7 @@
replacing the whitespace before them with a newline and WMARGIN spaces.
Otherwise, chars beyond RMARGIN are simply dropped until a newline.
Returns NULL if there was an error. */
-argp_fmtstream_t
+argp_fmtstream_t
__argp_make_fmtstream (FILE *stream,
size_t lmargin, size_t rmargin, ssize_t wmargin)
{
@@ -85,7 +80,7 @@ weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
#endif
/* Flush FS to its stream, and free it (but don't close the stream). */
-void
+void
__argp_fmtstream_free (argp_fmtstream_t fs)
{
__argp_fmtstream_update (fs);
@@ -308,7 +303,7 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
/* Flush FS's buffer. */
__argp_fmtstream_update (fs);
-
+
wrote = fwrite (fs->buf, 1, fs->p - fs->buf, fs->stream);
if (wrote == fs->p - fs->buf)
{
diff --git a/libshouldbeinlibc/argp-fmtstream.h b/libshouldbeinlibc/argp-fmtstream.h
index 4c716ba6..280a893c 100644
--- a/libshouldbeinlibc/argp-fmtstream.h
+++ b/libshouldbeinlibc/argp-fmtstream.h
@@ -1,8 +1,7 @@
-/* Word-wrapping and line-truncating streams
-
+/* Word-wrapping and line-truncating streams.
Copyright (C) 1997 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This package emulates glibc `line_wrap_stream' semantics for systems that
don't have that. If the system does have it, it is just a wrapper for
@@ -35,7 +34,7 @@
#include <string.h>
#include <unistd.h>
-#if (_LIBC - 0 && !defined (_USE_IN_LIBIO)) \
+#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
|| (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
/* line_wrap_stream is available, so use that. */
#define ARGP_FMTSTREAM_USE_LINEWRAP
@@ -183,7 +182,7 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
/* Inline versions of above routines. */
#if !_LIBC
-#define __argp_fmtstream_putc argp_fmtstream_putc
+#define __argp_fmtstream_putc argp_fmtstream_putc
#define __argp_fmtstream_puts argp_fmtstream_puts
#define __argp_fmtstream_write argp_fmtstream_write
#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
diff --git a/libshouldbeinlibc/argp-fs-xinl.c b/libshouldbeinlibc/argp-fs-xinl.c
index 1535f1c7..59426c7d 100644
--- a/libshouldbeinlibc/argp-fs-xinl.c
+++ b/libshouldbeinlibc/argp-fs-xinl.c
@@ -1,8 +1,7 @@
-/* Real definitions for extern inline functions in argp-fmtstream.h
-
+/* Real definitions for extern inline functions in argp-fmtstream.h.
Copyright (C) 1997 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define ARGP_FS_EI
#undef __OPTIMIZE__
diff --git a/libshouldbeinlibc/argp-help.c b/libshouldbeinlibc/argp-help.c
index a58e4c4b..5556d209 100644
--- a/libshouldbeinlibc/argp-help.c
+++ b/libshouldbeinlibc/argp-help.c
@@ -1,24 +1,22 @@
-/* Hierarchial argument parsing help output
-
+/* Hierarchial argument parsing help output.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <string.h>
@@ -68,7 +66,7 @@
indented slighly in a way that's supposed to make most long options appear
to be in a separate column.
- For example, the following output (from ps):
+ For example, the following output (from ps):
-p PID, --pid=PID List the process PID
--pgrp=PGRP List processes in the process group PGRP
@@ -390,7 +388,8 @@ hol_entry_first_long (const struct hol_entry *entry)
/* Returns the entry in HOL with the long option name NAME, or 0 if there is
none. */
-static struct hol_entry *hol_find_entry (struct hol *hol, char *name)
+static struct hol_entry *
+hol_find_entry (struct hol *hol, const char *name)
{
struct hol_entry *entry = hol->entries;
unsigned num_entries = hol->num_entries;
@@ -415,7 +414,7 @@ static struct hol_entry *hol_find_entry (struct hol *hol, char *name)
/* If an entry with the long option NAME occurs in HOL, set it's special
sort position to GROUP. */
static void
-hol_set_group (struct hol *hol, char *name, int group)
+hol_set_group (struct hol *hol, const char *name, int group)
{
struct hol_entry *entry = hol_find_entry (hol, name);
if (entry)
@@ -678,7 +677,7 @@ indent_to (argp_fmtstream_t stream, unsigned col)
format REQ_FMT or OPT_FMT depending on whether it's a required or
optional argument. */
static void
-arg (const struct argp_option *real, char *req_fmt, char *opt_fmt,
+arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
argp_fmtstream_t stream)
{
if (real->arg)
@@ -806,7 +805,7 @@ hol_entry_help (struct hol_entry *entry, argp_fmtstream_t stream,
}
else
/* A realy long option. */
- {
+ {
__argp_fmtstream_set_wmargin (stream, LONG_OPT_COL);
for (opt = real, num = entry->num; num > 0; opt++, num--)
if (opt->name && ovisible (opt))
@@ -929,7 +928,7 @@ usage_long_opt (const struct argp_option *opt,
if (! arg)
arg = real->arg;
-
+
if (arg)
if ((opt->flags | real->flags) & OPTION_ARG_OPTIONAL)
__argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
diff --git a/libshouldbeinlibc/argp-namefrob.h b/libshouldbeinlibc/argp-namefrob.h
index 0ffffb97..bd0023de 100644
--- a/libshouldbeinlibc/argp-namefrob.h
+++ b/libshouldbeinlibc/argp-namefrob.h
@@ -1,3 +1,23 @@
+/* Hierarchial argument parsing help output.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#if !_LIBC
/* This code is written for inclusion in gnu-libc, and uses names in the
namespace reserved for libc. If we're not compiling in libc, define those
@@ -29,7 +49,7 @@
#undef __argp_fmtstream_free
#define __argp_fmtstream_free argp_fmtstream_free
#undef __argp_fmtstream_putc
-#define __argp_fmtstream_putc argp_fmtstream_putc
+#define __argp_fmtstream_putc argp_fmtstream_putc
#undef __argp_fmtstream_puts
#define __argp_fmtstream_puts argp_fmtstream_puts
#undef __argp_fmtstream_write
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index f6051d37..74b2ac93 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -1,24 +1,22 @@
-/* Hierarchial argument parsing, layered over getopt
-
+/* Hierarchial argument parsing, layered over getopt.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <string.h>
@@ -204,7 +202,7 @@ static struct mutex getopt_lock = MUTEX_INITIALIZER;
recursively. If someday argp is changed not to use the non-reentrant
getopt interface, we can get rid of this shit. XXX */
void
-_argp_unlock_xxx ()
+_argp_unlock_xxx (void)
{
UNLOCK_GETOPT;
}
@@ -635,7 +633,7 @@ parser_finalize (struct parser *parser,
return err;
}
-
+
/* Call the user parsers to parse the non-option argument VAL, at the current
position, returning any error. */
static error_t
diff --git a/libshouldbeinlibc/argp-pv.c b/libshouldbeinlibc/argp-pv.c
index e6e87adb..59e6f8d0 100644
--- a/libshouldbeinlibc/argp-pv.c
+++ b/libshouldbeinlibc/argp-pv.c
@@ -1,24 +1,22 @@
-/* Default definition for ARGP_PROGRAM_VERSION
+/* Default definition for ARGP_PROGRAM_VERSION.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* If set by the user program to a non-zero value, then a default option
--version is added (unless the ARGP_NO_HELP flag is used), which will
diff --git a/libshouldbeinlibc/argp-pvh.c b/libshouldbeinlibc/argp-pvh.c
index a58c1923..f942038e 100644
--- a/libshouldbeinlibc/argp-pvh.c
+++ b/libshouldbeinlibc/argp-pvh.c
@@ -1,24 +1,22 @@
-/* Default definition for ARGP_PROGRAM_VERSION_HOOK
-
- Copyright (C) 1996 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include "argp.h"
diff --git a/libshouldbeinlibc/argp-test.c b/libshouldbeinlibc/argp-test.c
index 9b4e8af6..9eabec3d 100644
--- a/libshouldbeinlibc/argp-test.c
+++ b/libshouldbeinlibc/argp-test.c
@@ -1,8 +1,7 @@
-/* Test program for argp argument parser
-
+/* Test program for argp argument parser.
Copyright (C) 1997 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <argp.h>
@@ -39,7 +38,7 @@ struct argp_option sub_options[] =
static const char sub_args_doc[] = "STRING...\n-";
static const char sub_doc[] = "\vThis is the doc string from the sub-arg-parser.";
-static error_t
+static error_t
sub_parse_opt (int key, char *arg, struct argp_state *state)
{
switch (key)
@@ -60,7 +59,7 @@ sub_parse_opt (int key, char *arg, struct argp_state *state)
}
return 0;
}
-
+
static struct argp sub_argp = {
sub_options, sub_parse_opt, sub_args_doc, sub_doc
};
@@ -97,7 +96,7 @@ static const char doc[] = "Test program for argp."
"\vThis doc string comes after the options."
"\nHey! Some manual formatting!";
-static error_t
+static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
switch (key)
diff --git a/libshouldbeinlibc/argp-xinl.c b/libshouldbeinlibc/argp-xinl.c
index 3058d9ac..336f2995 100644
--- a/libshouldbeinlibc/argp-xinl.c
+++ b/libshouldbeinlibc/argp-xinl.c
@@ -1,8 +1,7 @@
-/* Real definitions for extern inline functions in argp.h
-
+/* Real definitions for extern inline functions in argp.h.
Copyright (C) 1997 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define ARGP_EI
#undef __OPTIMIZE__
diff --git a/libshouldbeinlibc/argp.h b/libshouldbeinlibc/argp.h
index abe52b56..be727561 100644
--- a/libshouldbeinlibc/argp.h
+++ b/libshouldbeinlibc/argp.h
@@ -1,35 +1,26 @@
-/* Hierarchial argument parsing, layered over getopt
-
+/* Hierarchial argument parsing, layered over getopt.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- This file is part of the GNU Hurd.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef __ARGP_H__
#define __ARGP_H__
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#ifdef __GNU_LIBRARY__
-#include <sys/cdefs.h>
-#endif
-
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
@@ -38,7 +29,19 @@
#ifndef __const
#define __const const
#endif
+
+#ifndef __P
+# if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
+# define __P(args) args
+# else
+# define __P(args) ()
+# endif
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A description of a particular option. A pointer to an array of
these is passed in the OPTIONS field of an argp structure. Each option
entry can correspond to one long option and/or one short option; more
@@ -115,7 +118,7 @@ typedef error_t (*argp_parser_t)(int key, char *arg, struct argp_state *state);
#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
/* Special values for the KEY argument to an argument parsing function.
- ARGP_ERR_UNKNOWN should be returned if they aren't understood.
+ ARGP_ERR_UNKNOWN should be returned if they aren't understood.
The sequence of keys to parser calls is either (where opt is a user key):
ARGP_KEY_INIT (opt | ARGP_KEY_ARG)... ARGP_KEY_END
@@ -435,14 +438,14 @@ extern int __option_is_end __P ((__const struct argp_option *__opt));
#ifdef __OPTIMIZE__
#if !_LIBC
-#define __argp_usage argp_usage
-#define __argp_state_help argp_state_help
-#define __option_is_short _option_is_short
-#define __option_is_end _option_is_end
+# define __argp_usage argp_usage
+# define __argp_state_help argp_state_help
+# define __option_is_short _option_is_short
+# define __option_is_end _option_is_end
#endif
#ifndef ARGP_EI
-#define ARGP_EI extern inline
+# define ARGP_EI extern inline
#endif
ARGP_EI void
@@ -470,12 +473,16 @@ __option_is_end (__const struct argp_option *__opt)
}
#if !_LIBC
-#undef __argp_usage
-#undef __argp_state_help
-#undef __option_is_short
-#undef __option_is_end
+# undef __argp_usage
+# undef __argp_state_help
+# undef __option_is_short
+# undef __option_is_end
#endif
#endif /* __OPTIMIZE__ */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __ARGP_H__ */