rpm  5.4.10
argv.h
Go to the documentation of this file.
1 #ifndef _H_ARGV_
2 #define _H_ARGV_
3 
8 typedef const char * ARGstr_t;
9 typedef ARGstr_t * ARGV_t;
10 
11 typedef unsigned int * ARGint_t;
12 
13 struct ARGI_s {
14  unsigned nvals;
16 };
17 typedef struct ARGI_s * ARGI_t;
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
29 void argvPrint(/*@null@*/ const char * msg, /*@null@*/ ARGV_t argv,
30  /*@null@*/ FILE * fp)
31  /*@globals fileSystem @*/
32  /*@modifies *fp, fileSystem @*/;
33 
39 /*@null@*/
40 ARGI_t argiFree(/*@only@*/ /*@null@*/ ARGI_t argi)
41  /*@modifies argi @*/;
42 
48 /*@null@*/
49 ARGV_t argvFree(/*@only@*/ /*@null@*/ ARGV_t argv)
50  /*@modifies argv @*/;
51 
57 int argiCount(/*@null@*/ const ARGI_t argi)
58  /*@*/;
59 
65 /*@null@*/
66 ARGint_t argiData(/*@null@*/ ARGI_t argi)
67  /*@*/;
68 
74 int argvCount(/*@null@*/ ARGV_t argv)
75  /*@*/;
76 
82 /*@null@*/
83 ARGV_t argvData(/*@null@*/ ARGV_t argv)
84  /*@*/;
85 
92 /*@-exportlocal@*/
93 int argiCmp(ARGint_t * a, ARGint_t * b)
94  /*@*/;
95 /*@=exportlocal@*/
96 
103 /*@-exportlocal@*/
104 int argvCmp(ARGstr_t * a, ARGstr_t * b)
105  /*@*/;
106 /*@=exportlocal@*/
107 
114 int argvStrcasecmp(ARGstr_t * a, ARGstr_t * b)
115  /*@*/;
116 
117 #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
118 
124 int argvFnmatch(ARGstr_t * a, ARGstr_t * b)
125  /*@*/;
126 
133 int argvFnmatchCasefold(ARGstr_t * a, ARGstr_t * b)
134  /*@*/;
135 #endif
136 
143 int argiSort(ARGI_t argi, int (*compar)(ARGint_t *, ARGint_t *))
144  /*@*/;
145 
152 int argvSort(ARGV_t argv, int (*compar)(ARGstr_t *, ARGstr_t *))
153  /*@modifies *argv @*/;
154 
162 /*@dependent@*/ /*@null@*/
163 ARGV_t argvSearch(ARGV_t argv, ARGstr_t val,
164  int (*compar)(ARGstr_t *, ARGstr_t *))
165  /*@*/;
166 
167 #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
168 
175 /*@dependent@*/ /*@null@*/
176 ARGV_t argvSearchLinear(ARGV_t argv, ARGstr_t val,
177  int (*compar)(ARGstr_t *, ARGstr_t *))
178  /*@*/;
179 #endif
180 
188 int argiAdd(/*@out@*/ ARGI_t * argip, int ix, int val)
189  /*@modifies *argip @*/;
190 
197 int argvAdd(/*@out@*/ ARGV_t * argvp, ARGstr_t val)
198  /*@modifies *argvp @*/;
199 
206 int argvAppend(/*@out@*/ ARGV_t * argvp, /*@null@*/ ARGV_t av)
207  /*@modifies *argvp @*/;
208 
216 int argvSplit(ARGV_t * argvp, const char * str, /*@null@*/ const char * seps)
217  /*@modifies *argvp @*/;
218 
225 /*@only@*/
226 char * argvJoin(ARGV_t argv, char sep)
227  /*@*/;
228 
235 int argvFgets(ARGV_t * argvp, void * fd)
236  /*@globals fileSystem@*/
237  /*@modifies *argvp, fd, fileSystem @*/;
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #endif /* _H_ARGV_ */