rpm 4.15.1

argv.h
Go to the documentation of this file.
1 #ifndef _H_ARGV_
2 #define _H_ARGV_
3
10 #include <stdio.h>
11 #include <rpm/rpmtypes.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 typedef char ** ARGV_t;
18 typedef char * const *ARGV_const_t;
19
20 typedef int * ARGint_t;
21 struct ARGI_s {
22 unsigned nvals;
23 ARGint_t vals;
24 };
25 typedef struct ARGI_s * ARGI_t;
26 typedef struct ARGI_s const * const ARGI_const_t;
27
34 void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
35
41 ARGI_t argiFree(ARGI_t argi);
42
43
48 ARGV_t argvNew(void);
49
55 ARGV_t argvFree(ARGV_t argv);
56
62 int argiCount(ARGI_const_t argi);
63
69 ARGint_t argiData(ARGI_const_t argi);
70
76 int argvCount(ARGV_const_t argv);
77
83 ARGV_t argvData(ARGV_t argv);
84
91 int argvCmp(const void * a, const void * b);
92
99 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
100
108 ARGV_t argvSearch(ARGV_const_t argv, const char *val,
109 int (*compar)(const void *, const void *));
110
118 int argiAdd(ARGI_t * argip, int ix, int val);
119
126 int argvAdd(ARGV_t * argvp, const char *val);
127
134 int argvAddNum(ARGV_t * argvp, int val);
135
142 int argvAppend(ARGV_t * argvp, ARGV_const_t av);
143
144 enum argvFlags_e {
145 ARGV_NONE = 0,
146 ARGV_SKIPEMPTY = (1 << 0), /* omit empty strings from result */
147 };
148
149 typedef rpmFlags argvFlags;
150
158 ARGV_t argvSplitString(const char * str, const char * seps, argvFlags flags);
159
167 int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
168
175 char *argvJoin(ARGV_const_t argv, const char *sep);
176
177 #ifdef __cplusplus
178 }
179 #endif
180
181 #endif /* _H_ARGV_ */
rpmFlags
uint32_t rpmFlags
Definition: rpmtypes.h:42
argiFree
ARGI_t argiFree(ARGI_t argi)
ARGint_t
int * ARGint_t
Definition: argv.h:20
argvCount
int argvCount(ARGV_const_t argv)
argvSort
int argvSort(ARGV_t argv, int(*compar)(const void *, const void *))
ARGV_const_t
char *const * ARGV_const_t
Definition: argv.h:18
ARGI_s
Definition: argv.h:21
ARGI_t
struct ARGI_s * ARGI_t
Definition: argv.h:25
argvAdd
int argvAdd(ARGV_t *argvp, const char *val)
ARGI_s::vals
ARGint_t vals
Definition: argv.h:23
argvCmp
int argvCmp(const void *a, const void *b)
argvAddNum
int argvAddNum(ARGV_t *argvp, int val)
ARGV_t
char ** ARGV_t
Definition: argv.h:17
argvFlags
rpmFlags argvFlags
Definition: argv.h:149
argvNew
ARGV_t argvNew(void)
argvFree
ARGV_t argvFree(ARGV_t argv)
argvSplitString
ARGV_t argvSplitString(const char *str, const char *seps, argvFlags flags)
argiAdd
int argiAdd(ARGI_t *argip, int ix, int val)
argvData
ARGV_t argvData(ARGV_t argv)
ARGV_SKIPEMPTY
@ ARGV_SKIPEMPTY
Definition: argv.h:146
argvJoin
char * argvJoin(ARGV_const_t argv, const char *sep)
argvFlags_e
argvFlags_e
Definition: argv.h:144
argiData
ARGint_t argiData(ARGI_const_t argi)
ARGI_s::nvals
unsigned nvals
Definition: argv.h:22
argiCount
int argiCount(ARGI_const_t argi)
ARGI_const_t
struct ARGI_s const *const ARGI_const_t
Definition: argv.h:26
argvPrint
void argvPrint(const char *msg, ARGV_const_t argv, FILE *fp)
argvSearch
ARGV_t argvSearch(ARGV_const_t argv, const char *val, int(*compar)(const void *, const void *))
argvSplit
int argvSplit(ARGV_t *argvp, const char *str, const char *seps)
argvAppend
int argvAppend(ARGV_t *argvp, ARGV_const_t av)
ARGV_NONE
@ ARGV_NONE
Definition: argv.h:145