]> git.gag.com Git - debian/tar/commitdiff
simplify
authorBdale Garbee <bdale@gag.com>
Thu, 11 Mar 2010 00:05:16 +0000 (17:05 -0700)
committerBdale Garbee <bdale@gag.com>
Thu, 11 Mar 2010 00:05:16 +0000 (17:05 -0700)
lib/Makefile.in
lib/argp-version-etc.c [deleted file]
lib/argp-version-etc.h [deleted file]
lib/progname.c [deleted file]
lib/progname.h [deleted file]

index f29a1b8093c43996e271d7179f01e64e23d6c146..8c3309bccf406eceeb3472e787436e06c92dd084 100644 (file)
@@ -614,9 +614,7 @@ EXTRA_DIST = alloca.c alloca.in.h argmatch.c argmatch.h backupfile.c \
        printf-args.h printf-parse.c printf-parse.h vasnprintf.c \
        vasnprintf.h vsnprintf.c wchar.in.h wctype.in.h wcwidth.c \
        xalloc.h xmalloc.c xgetcwd.c xgetcwd.h xstrtol-error.c \
-       xstrtol.c xstrtol.h xstrtoul.c \
-       c-ctype.h c-ctype.c \
-       argp-version-etc.h argp-version-etc.c progrname.h progname.c 
+       xstrtol.c xstrtol.h xstrtoul.c c-ctype.h c-ctype.c 
 BUILT_SOURCES = $(ALLOCA_H) configmake.h $(DIRENT_H) $(FCNTL_H) \
        $(FLOAT_H) $(FNMATCH_H) getdate.c $(GETOPT_H) $(INTTYPES_H) \
        $(STDARG_H) $(STDBOOL_H) $(STDINT_H) stdio.h stdlib.h string.h \
@@ -670,9 +668,7 @@ EXTRA_libtar_a_SOURCES = alloca.c argmatch.c backupfile.c \
        dup-safer.c fd-safer.c pipe-safer.c unlinkdir.c unsetenv.c \
        utime.c utimens.c asnprintf.c printf-args.c printf-parse.c \
        vasnprintf.c vsnprintf.c wcwidth.c xmalloc.c xgetcwd.c \
-       xstrtol-error.c xstrtol.c xstrtoul.c \
-       c-ctype.h c-ctype.c \
-       argp-version-etc.h argp-version-etc.c progrname.h progname.c 
+       xstrtol-error.c xstrtol.c xstrtoul.c c-ctype.h c-ctype.c 
 LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
diff --git a/lib/argp-version-etc.c b/lib/argp-version-etc.c
deleted file mode 100644 (file)
index 4913bf5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Version hook for Argp.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-
-   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 3 of the License, or
-   (at your option) any later version.
-
-   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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-#include <version-etc.h>
-#include <argp.h>
-#include <argp-version-etc.h>
-
-static const char *program_canonical_name;
-static const char * const *program_authors;
-
-static void
-version_etc_hook (FILE *stream, struct argp_state *state)
-{
-  version_etc_ar (stream, program_canonical_name, PACKAGE_NAME, VERSION,
-                  program_authors);
-}
-
-void
-argp_version_setup (const char *name, const char * const *authors)
-{
-  argp_program_version_hook = version_etc_hook;
-  program_canonical_name = name;
-  program_authors = authors;
-}
diff --git a/lib/argp-version-etc.h b/lib/argp-version-etc.h
deleted file mode 100644 (file)
index 23b6e7a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Version hook for Argp.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-
-   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 3 of the License, or
-   (at your option) any later version.
-
-   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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _ARGP_VERSION_ETC_H
-#define _ARGP_VERSION_ETC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Setup standard display of the version information for the `--version'
-   option.  NAME is the canonical program name, and AUTHORS is a NULL-
-   terminated array of author names. At least one author name must be
-   given.
-
-   If NAME is NULL, the package name (as given by the PACKAGE macro)
-   is asumed to be the name of the program.
-
-   This function is intended to be called before argp_parse().
-*/
-extern void argp_version_setup (const char *name, const char * const *authors);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ARGP_VERSION_ETC_H */
diff --git a/lib/progname.c b/lib/progname.c
deleted file mode 100644 (file)
index 0bd63fa..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Program name management.
-   Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2001.
-
-   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 3 of the License, or
-   (at your option) any later version.
-
-   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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-#include <config.h>
-
-/* Specification.  */
-#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
-#include "progname.h"
-
-#include <errno.h> /* get program_invocation_name declaration */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-/* String containing name the program is called with.
-   To be initialized by main().  */
-const char *program_name = NULL;
-
-/* Set program_name, based on argv[0].
-   argv0 must be a string allocated with indefinite extent, and must not be
-   modified after this call.  */
-void
-set_program_name (const char *argv0)
-{
-  /* libtool creates a temporary executable whose name is sometimes prefixed
-     with "lt-" (depends on the platform).  It also makes argv[0] absolute.
-     But the name of the temporary executable is a detail that should not be
-     visible to the end user and to the test suite.
-     Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here.  */
-  const char *slash;
-  const char *base;
-
-  /* Sanity check.  POSIX requires the invoking process to pass a non-NULL
-     argv[0].  */
-  if (argv0 == NULL)
-    {
-      /* It's a bug in the invoking program.  Help diagnosing it.  */
-      fputs ("A NULL argv[0] was passed through an exec system call.\n",
-             stderr);
-      abort ();
-    }
-
-  slash = strrchr (argv0, '/');
-  base = (slash != NULL ? slash + 1 : argv0);
-  if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
-    {
-      argv0 = base;
-      if (strncmp (base, "lt-", 3) == 0)
-        {
-          argv0 = base + 3;
-          /* On glibc systems, remove the "lt-" prefix from the variable
-             program_invocation_short_name.  */
-#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
-          program_invocation_short_name = (char *) argv0;
-#endif
-        }
-    }
-
-  /* But don't strip off a leading <dirname>/ in general, because when the user
-     runs
-         /some/hidden/place/bin/cp foo foo
-     he should get the error message
-         /some/hidden/place/bin/cp: `foo' and `foo' are the same file
-     not
-         cp: `foo' and `foo' are the same file
-   */
-
-  program_name = argv0;
-
-  /* On glibc systems, the error() function comes from libc and uses the
-     variable program_invocation_name, not program_name.  So set this variable
-     as well.  */
-#if HAVE_DECL_PROGRAM_INVOCATION_NAME
-  program_invocation_name = (char *) argv0;
-#endif
-}
diff --git a/lib/progname.h b/lib/progname.h
deleted file mode 100644 (file)
index 77e782a..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Program name management.
-   Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2001.
-
-   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 3 of the License, or
-   (at your option) any later version.
-
-   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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _PROGNAME_H
-#define _PROGNAME_H
-
-/* Programs using this file should do the following in main():
-     set_program_name (argv[0]);
- */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* String containing name the program is called with.  */
-extern const char *program_name;
-
-/* Set program_name, based on argv[0].
-   argv0 must be a string allocated with indefinite extent, and must not be
-   modified after this call.  */
-extern void set_program_name (const char *argv0);
-
-#if ENABLE_RELOCATABLE
-
-/* Set program_name, based on argv[0], and original installation prefix and
-   directory, for relocatability.  */
-extern void set_program_name_and_installdir (const char *argv0,
-                                             const char *orig_installprefix,
-                                             const char *orig_installdir);
-#undef set_program_name
-#define set_program_name(ARG0) \
-  set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
-
-/* Return the full pathname of the current executable, based on the earlier
-   call to set_program_name_and_installdir.  Return NULL if unknown.  */
-extern char *get_full_program_name (void);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _PROGNAME_H */