]> err.no Git - pkg-config/blob - poptint.h
Print out \r\n on windows, not just \n
[pkg-config] / poptint.h
1 /*
2 Copyright (c) 1998  Red Hat Software
3  
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10  
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13  
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20  
21 Except as contained in this notice, the name of the X Consortium shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from the X Consortium.
24 */
25
26 #ifndef H_POPTINT
27 #define H_POPTINT
28
29 struct optionStackEntry {
30     int argc;
31     char ** argv;
32     int next;
33     char * nextArg;
34     char * nextCharArg;
35     struct poptAlias * currAlias;
36     int stuffed;
37 };
38
39 struct execEntry {
40     char * longName;
41     char shortName;
42     char * script;
43 };
44
45 struct poptContext_s {
46     struct optionStackEntry optionStack[POPT_OPTION_DEPTH], * os;
47     char ** leftovers;
48     int numLeftovers;
49     int nextLeftover;
50     const struct poptOption * options;
51     int restLeftover;
52     char * appName;
53     struct poptAlias * aliases;
54     int numAliases;
55     int flags;
56     struct execEntry * execs;
57     int numExecs;
58     char ** finalArgv;
59     int finalArgvCount;
60     int finalArgvAlloced;
61     struct execEntry * doExec;
62     char * execPath;
63     int execAbsolute;
64     char * otherHelp;
65 };
66
67 #ifdef HAVE_LIBINTL_H
68 #include <libintl.h>
69 #endif
70
71 #ifdef HAVE_GETTEXT
72 #define _(foo) gettext(foo)
73 #else
74 #define _(foo) (foo)
75 #endif
76
77 #ifdef HAVE_DGETTEXT
78 #define POPT_(foo) dgettext("popt", foo)
79 #else
80 #define POPT_(foo) (foo)
81 #endif
82
83 #define N_(foo) (foo)
84
85 #endif