Mercurial > hg > octave-kai > gnulib-hg
annotate lib/argp-pvh.c @ 8341:7929a12676ab
New module 'vasprintf-posix'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 05 Mar 2007 00:37:52 +0000 |
parents | 96c32553b4c6 |
children | bbbbbf4cd1c5 |
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. |
5229
eea0ec01bfa9
(argp_program_version_hook): Provide initial value.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4419
diff
changeset
|
2 Copyright (C) 1996, 1997, 1999, 2004 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 |
4419
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
6 This program is free software; you can redistribute it and/or modify |
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 |
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option) |
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
9 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 |
4419
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
16 You should have received a copy of the GNU General Public License along |
9b828c973b9d
Get lib/argp* from glibc.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4385
diff
changeset
|
17 with this program; if not, write to the Free Software Foundation, |
5848
a48fb0e98c8c
*** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents:
5229
diff
changeset
|
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #ifdef HAVE_CONFIG_H |
6259
96c32553b4c6
Use a consistent style for including <config.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5848
diff
changeset
|
21 # include <config.h> |
4385
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 #endif |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 #include "argp.h" |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 |
1c170fb33fa6
argp facility from glibc-20030610.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 /* 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
|
27 --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
|
28 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
|
29 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
|
30 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
|
31 void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = NULL; |