rpm  4.5
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 int * ARGint_t;
12 struct ARGI_s {
13  unsigned nvals;
15 };
16 typedef struct ARGI_s * ARGI_t;
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
28 void argvPrint(/*@null@*/ const char * msg, /*@null@*/ ARGV_t argv,
29  /*@null@*/ FILE * fp)
30  /*@globals fileSystem @*/
31  /*@modifies *fp, fileSystem @*/;
32 
38 /*@null@*/
39 ARGI_t argiFree(/*@only@*/ /*@null@*/ ARGI_t argi)
40  /*@modifies argi @*/;
41 
47 /*@null@*/
48 ARGV_t argvFree(/*@only@*/ /*@null@*/ ARGV_t argv)
49  /*@modifies argv @*/;
50 
56 int argiCount(/*@null@*/ const ARGI_t argi)
57  /*@*/;
58 
64 /*@null@*/
65 ARGint_t argiData(/*@null@*/ ARGI_t argi)
66  /*@*/;
67 
73 int argvCount(/*@null@*/ const ARGV_t argv)
74  /*@*/;
75 
81 /*@null@*/
82 ARGV_t argvData(/*@null@*/ ARGV_t argv)
83  /*@*/;
84 
91 /*@-exportlocal@*/
92 int argvCmp(const void * a, const void * b)
93  /*@*/;
94 /*@=exportlocal@*/
95 
102 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *))
103  /*@modifies *argv @*/;
104 
112 /*@dependent@*/ /*@null@*/
113 ARGV_t argvSearch(ARGV_t argv, ARGstr_t val,
114  int (*compar)(const void *, const void *))
115  /*@*/;
116 
124 int argiAdd(/*@out@*/ ARGI_t * argip, int ix, int val)
125  /*@modifies *argip @*/;
126 
133 int argvAdd(/*@out@*/ ARGV_t * argvp, ARGstr_t val)
134  /*@modifies *argvp @*/;
135 
142 int argvAppend(/*@out@*/ ARGV_t * argvp, /*@null@*/ const ARGV_t av)
143  /*@modifies *argvp @*/;
144 
152 int argvSplit(ARGV_t * argvp, const char * str, /*@null@*/ const char * seps)
153  /*@modifies *argvp @*/;
154 
160 /*@only@*/
161 char * argvJoin(ARGV_t argv)
162  /*@*/;
163 
170 int argvFgets(ARGV_t * argvp, void * fd)
171  /*@modifies *argvp, fd @*/;
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* _H_ARGV_ */