rpm 4.11.1-rc1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

argv.h
Go to the documentation of this file.
1 #ifndef _H_ARGV_
2 #define _H_ARGV_
3
8 #include <stdio.h>
9 #include <rpm/rpmtypes.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 typedef char ** ARGV_t;
16 typedef char * const *ARGV_const_t;
17
18 typedef int * ARGint_t;
19 struct ARGI_s {
20 unsigned nvals;
21 ARGint_t vals;
22 };
23 typedef struct ARGI_s * ARGI_t;
24 typedef struct ARGI_s const * const ARGI_const_t;
25
32 void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
33
39 ARGI_t argiFree(ARGI_t argi);
40
41
46 ARGV_t argvNew(void);
47
53 ARGV_t argvFree(ARGV_t argv);
54
60 int argiCount(ARGI_const_t argi);
61
67 ARGint_t argiData(ARGI_const_t argi);
68
74 int argvCount(ARGV_const_t argv);
75
81 ARGV_t argvData(ARGV_t argv);
82
89 int argvCmp(const void * a, const void * b);
90
97 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
98
106 ARGV_t argvSearch(ARGV_const_t argv, const char *val,
107 int (*compar)(const void *, const void *));
108
116 int argiAdd(ARGI_t * argip, int ix, int val);
117
124 int argvAdd(ARGV_t * argvp, const char *val);
125
132 int argvAddNum(ARGV_t * argvp, int val);
133
140 int argvAppend(ARGV_t * argvp, ARGV_const_t av);
141
142 enum argvFlags_e {
143 ARGV_NONE = 0,
144 ARGV_SKIPEMPTY = (1 << 0), /* omit empty strings from result */
145 };
146
147 typedef rpmFlags argvFlags;
148
156 ARGV_t argvSplitString(const char * str, const char * seps, argvFlags flags);
157
165 int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
166
173 char *argvJoin(ARGV_const_t argv, const char *sep);
174
175 #ifdef __cplusplus
176 }
177 #endif
178
179 #endif /* _H_ARGV_ */