From a82fdff58064e24994117ed668ae13362253be46 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Jul 2003 23:25:13 +0000 Subject: [PATCH] Get lib/argp* from glibc. --- config/srclist.txt | 14 +++++++++++++- lib/argp-ba.c | 21 ++++++++++----------- lib/argp-eexst.c | 21 ++++++++++----------- lib/argp-fmtstream.c | 21 ++++++++++----------- lib/argp-fmtstream.h | 21 ++++++++++----------- lib/argp-fs-xinl.c | 21 ++++++++++----------- lib/argp-help.c | 26 +++++++++++++------------- lib/argp-namefrob.h | 21 ++++++++++----------- lib/argp-parse.c | 21 ++++++++++----------- lib/argp-pv.c | 21 ++++++++++----------- lib/argp-pvh.c | 21 ++++++++++----------- lib/argp-xinl.c | 21 ++++++++++----------- lib/argp.h | 25 ++++++++++++++----------- 13 files changed, 140 insertions(+), 135 deletions(-) diff --git a/config/srclist.txt b/config/srclist.txt index d4cdc7748..58b2c5a9c 100644 --- a/config/srclist.txt +++ b/config/srclist.txt @@ -1,4 +1,4 @@ -# $Id: srclist.txt,v 1.15 2003-06-22 22:47:40 karl Exp $ +# $Id: srclist.txt,v 1.16 2003-07-08 23:25:13 eggert Exp $ # Files for which we are not the source. See ./srclistvars.sh for the # variable definitions. @@ -20,6 +20,18 @@ $GNUORG/fdl.texi doc $GETTEXT/gettext.h lib # +$LIBCSRC/argp/argp-ba.c lib gpl +$LIBCSRC/argp/argp-eexst.c lib gpl +$LIBCSRC/argp/argp-fmtstream.c lib gpl +$LIBCSRC/argp/argp-fmtstream.h lib gpl +$LIBCSRC/argp/argp-fs-xinl.c lib gpl +$LIBCSRC/argp/argp.h lib gpl +$LIBCSRC/argp/argp-help.c lib gpl +$LIBCSRC/argp/argp-namefrob.h lib gpl +$LIBCSRC/argp/argp-parse.c lib gpl +$LIBCSRC/argp/argp-pv.c lib gpl +$LIBCSRC/argp/argp-pvh.c lib gpl +$LIBCSRC/argp/argp-xinl.c lib gpl $LIBCSRC/sysdeps/generic/strtoll.c lib gpl $LIBCSRC/posix/getopt.h lib gpl $LIBCSRC/posix/getopt1.c lib gpl diff --git a/lib/argp-ba.c b/lib/argp-ba.c index f5270c88d..c4712284a 100644 --- a/lib/argp-ba.c +++ b/lib/argp-ba.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 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/lib/argp-eexst.c b/lib/argp-eexst.c index 151f89a1c..d5cd28cea 100644 --- a/lib/argp-eexst.c +++ b/lib/argp-eexst.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/lib/argp-fmtstream.c b/lib/argp-fmtstream.c index d06ea8453..c6d79a56f 100644 --- a/lib/argp-fmtstream.c +++ b/lib/argp-fmtstream.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 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. */ diff --git a/lib/argp-fmtstream.h b/lib/argp-fmtstream.h index 7a291e28c..bc348f282 100644 --- a/lib/argp-fmtstream.h +++ b/lib/argp-fmtstream.h @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 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 diff --git a/lib/argp-fs-xinl.c b/lib/argp-fs-xinl.c index 21f9bd9f7..32015e95b 100644 --- a/lib/argp-fs-xinl.c +++ b/lib/argp-fs-xinl.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/lib/argp-help.c b/lib/argp-help.c index af23d93fe..497bae148 100644 --- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -1,22 +1,21 @@ /* Hierarchial argument parsing help output - Copyright (C) 1995-2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 @@ -521,7 +520,7 @@ hol_free (struct hol *hol) free (hol); } -static inline int +static int hol_entry_short_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, @@ -547,6 +546,7 @@ hol_entry_short_iterate (const struct hol_entry *entry, } static inline int +__attribute ((always_inline)) hol_entry_long_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, diff --git a/lib/argp-namefrob.h b/lib/argp-namefrob.h index 668f35d0d..e44c21194 100644 --- a/lib/argp-namefrob.h +++ b/lib/argp-namefrob.h @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 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 diff --git a/lib/argp-parse.c b/lib/argp-parse.c index 6d5f08cf8..cb8f9e1ad 100644 --- a/lib/argp-parse.c +++ b/lib/argp-parse.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/lib/argp-pv.c b/lib/argp-pv.c index 5987956a9..f93a22eda 100644 --- a/lib/argp-pv.c +++ b/lib/argp-pv.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 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/lib/argp-pvh.c b/lib/argp-pvh.c index 912a3f889..0ca258b7e 100644 --- a/lib/argp-pvh.c +++ b/lib/argp-pvh.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/lib/argp-xinl.c b/lib/argp-xinl.c index 3710f6f49..11bab59d1 100644 --- a/lib/argp-xinl.c +++ b/lib/argp-xinl.c @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/lib/argp.h b/lib/argp.h index 04b4e9280..5694da4f5 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -3,20 +3,19 @@ This file is part of the GNU C Library. Written by Miles Bader . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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 distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _ARGP_H #define _ARGP_H @@ -32,6 +31,10 @@ # define __const const #endif +#ifndef __THROW +# define __THROW +#endif + #ifndef __error_t_defined typedef int error_t; # define __error_t_defined -- 2.11.0