(root)/
findutils-4.9.0/
lib/
findutils-version.c
       1  /* findutils-version.c -- show version information for findutils
       2     Copyright (C) 2007-2022 Free Software Foundation, Inc.
       3  
       4     This program is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU General Public License as published by
       6     the Free Software Foundation, either version 3 of the License, or
       7     (at your option) any later version.
       8  
       9     This program is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU General Public License for more details.
      13  
      14     You should have received a copy of the GNU General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.
      16  */
      17  
      18  /* config.h must be included first. */
      19  #include <config.h>
      20  
      21  /* system headers would go here if we needed any. */
      22  
      23  /* gnulib headers. */
      24  #include "version-etc.h"
      25  
      26  /* find headers. */
      27  #include "system.h"
      28  #include "findutils-version.h"
      29  
      30  
      31  #ifdef _LIBC
      32  /* In the GNU C library, there is a predefined variable for this.  */
      33  # define program_name program_invocation_name
      34  #endif
      35  
      36  extern char *program_name;
      37  const char *version_string = VERSION;
      38  
      39  void
      40  display_findutils_version (const char *official_name)
      41  {
      42    /* We use official_name rather than program name in the version
      43     * information.  This is deliberate, it is specified by the
      44     * GNU coding standard.
      45     */
      46    fflush (stderr);
      47    version_etc (stdout,
      48  	       official_name, PACKAGE_NAME, version_string,
      49  	       _("Eric B. Decker"),
      50  	       _("James Youngman"),
      51  	       _("Kevin Dalley"),
      52  	       (const char*) NULL);
      53  }