rpm 4.19.92
The RPM Package Manager
Loading...
Searching...
No Matches
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
14extern "C" {
15#endif
16
17typedef char ** ARGV_t;
18typedef char * const *ARGV_const_t;
19
20typedef int * ARGint_t;
21struct ARGI_s {
22 unsigned nvals;
23 ARGint_t vals;
24};
25typedef struct ARGI_s * ARGI_t;
26typedef struct ARGI_s const * const ARGI_const_t;
27
34void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
35
42
43
48ARGV_t argvNew(void);
49
55ARGV_t argvFree(ARGV_t argv);
56
62int argiCount(ARGI_const_t argi);
63
69ARGint_t argiData(ARGI_const_t argi);
70
76int argvCount(ARGV_const_t argv);
77
83ARGV_t argvData(ARGV_t argv);
84
91int argvCmp(const void * a, const void * b);
92
99int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
100
108ARGV_t argvSearch(ARGV_const_t argv, const char *val,
109 int (*compar)(const void *, const void *));
110
118int argiAdd(ARGI_t * argip, int ix, int val);
119
126int argvAdd(ARGV_t * argvp, const char *val);
127
135int argvAddN(ARGV_t * argvp, const char *val, size_t len);
136
143int argvAddNum(ARGV_t * argvp, int val);
144
151int argvAppend(ARGV_t * argvp, ARGV_const_t av);
152
153enum argvFlags_e {
154 ARGV_NONE = 0,
155 ARGV_SKIPEMPTY = (1 << 0), /* omit empty strings from result */
156};
157
158typedef rpmFlags argvFlags;
159
167ARGV_t argvSplitString(const char * str, const char * seps, argvFlags flags);
168
176int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
177
184char *argvJoin(ARGV_const_t argv, const char *sep);
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif /* _H_ARGV_ */
int argvCount(ARGV_const_t argv)
int argvAddN(ARGV_t *argvp, const char *val, size_t len)
int argvSort(ARGV_t argv, int(*compar)(const void *, const void *))
int argvSplit(ARGV_t *argvp, const char *str, const char *seps)
int argvAddNum(ARGV_t *argvp, int val)
ARGV_t argvSearch(ARGV_const_t argv, const char *val, int(*compar)(const void *, const void *))
int argvCmp(const void *a, const void *b)
ARGV_t argvSplitString(const char *str, const char *seps, argvFlags flags)
int argvAppend(ARGV_t *argvp, ARGV_const_t av)
char * argvJoin(ARGV_const_t argv, const char *sep)
ARGint_t argiData(ARGI_const_t argi)
int argiCount(ARGI_const_t argi)
ARGV_t argvNew(void)
ARGV_t argvData(ARGV_t argv)
int argiAdd(ARGI_t *argip, int ix, int val)
ARGI_t argiFree(ARGI_t argi)
int argvAdd(ARGV_t *argvp, const char *val)
ARGV_t argvFree(ARGV_t argv)
void argvPrint(const char *msg, ARGV_const_t argv, FILE *fp)
Definition argv.h:21