Mercurial > gnulib
annotate lib/argp-pvh.c @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Default definition for ARGP_PROGRAM_VERSION_HOOK. |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 Copyright (C) 1996-2019 Free Software Foundation, Inc. |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 This file is part of the GNU C Library. |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 Written by Miles Bader <miles@gnu.ai.mit.edu>. |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
6259
diff
changeset
|
6 This program is free software: you can redistribute it and/or modify |
4419
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
7 it under the terms of the GNU General Public License as published by |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
6259
diff
changeset
|
8 the Free Software Foundation; either version 3 of the License, or |
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
6259
diff
changeset
|
9 (at your option) any later version. |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 |
4419
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
11 This program is distributed in the hope that it will be useful, |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
4419
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
14 GNU General Public License for more details. |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
6259
diff
changeset
|
16 You should have received a copy of the GNU General Public License |
19190 | 17 along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #ifdef HAVE_CONFIG_H |
6259
96c32553b4c6
Use a consistent style for including <config.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5848
diff
changeset
|
20 # include <config.h> |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 #endif |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 #include "argp.h" |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 /* If set by the user program to a non-zero value, then a default option |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 --version is added (unless the ARGP_NO_HELP flag is used), which calls |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 this function with a stream to print the version to and a pointer to the |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 current parsing state, and then exits (unless the ARGP_NO_EXIT flag is |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ |
5229
eea0ec01bfa9
(argp_program_version_hook): Provide initial value.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4419
diff
changeset
|
30 void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = NULL; |