rpm 4.20.1 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
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
48ARGV_t argvNew(void);
49
55ARGV_t argvFree(ARGV_t argv);
56
62 int argiCount(ARGI_const_t argi);
63
69ARGint_t argiData(ARGI_const_t argi);
70
76 int argvCount(ARGV_const_t argv);
77
83ARGV_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
108ARGV_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
135 int argvAddN(ARGV_t * argvp, const char *val, size_t len);
136
143 int argvAddNum(ARGV_t * argvp, int val);
144
151 int argvAppend(ARGV_t * argvp, ARGV_const_t av);
152
153 enum argvFlags_e {
154 ARGV_NONE = 0,
155 ARGV_SKIPEMPTY = (1 << 0), /* omit empty strings from result */
156};
157
158 typedef rpmFlags argvFlags;
159
167ARGV_t argvSplitString(const char * str, const char * seps, argvFlags flags);
168
176 int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
177
184 char *argvJoin(ARGV_const_t argv, const char *sep);
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif /* _H_ARGV_ */
argvCount
int argvCount(ARGV_const_t argv)
argvAddN
int argvAddN(ARGV_t *argvp, const char *val, size_t len)
argvSort
int argvSort(ARGV_t argv, int(*compar)(const void *, const void *))
argvSplit
int argvSplit(ARGV_t *argvp, const char *str, const char *seps)
argvAddNum
int argvAddNum(ARGV_t *argvp, int val)
argvSearch
ARGV_t argvSearch(ARGV_const_t argv, const char *val, int(*compar)(const void *, const void *))
argvCmp
int argvCmp(const void *a, const void *b)
argvSplitString
ARGV_t argvSplitString(const char *str, const char *seps, argvFlags flags)
argvAppend
int argvAppend(ARGV_t *argvp, ARGV_const_t av)
argvJoin
char * argvJoin(ARGV_const_t argv, const char *sep)
argiData
ARGint_t argiData(ARGI_const_t argi)
argiCount
int argiCount(ARGI_const_t argi)
argvNew
ARGV_t argvNew(void)
argvData
ARGV_t argvData(ARGV_t argv)
argiAdd
int argiAdd(ARGI_t *argip, int ix, int val)
argiFree
ARGI_t argiFree(ARGI_t argi)
argvAdd
int argvAdd(ARGV_t *argvp, const char *val)
argvFree
ARGV_t argvFree(ARGV_t argv)
argvPrint
void argvPrint(const char *msg, ARGV_const_t argv, FILE *fp)
rpmtypes.h
ARGI_s
Definition argv.h:21