rpm 5.2.1

rpmio/argv.h

Go to the documentation of this file.
00001 #ifndef _H_ARGV_
00002 #define _H_ARGV_
00003 
00008 typedef const char * ARGstr_t;
00009 typedef ARGstr_t * ARGV_t;
00010 
00011 typedef unsigned int * ARGint_t;
00012 
00013 struct ARGI_s {
00014     unsigned nvals;
00015     ARGint_t vals;
00016 };
00017 typedef struct ARGI_s * ARGI_t;
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00029 void argvPrint(/*@null@*/ const char * msg, /*@null@*/ ARGV_t argv,
00030                 /*@null@*/ FILE * fp)
00031         /*@globals fileSystem @*/
00032         /*@modifies *fp, fileSystem @*/;
00033 
00039 /*@null@*/
00040 ARGI_t argiFree(/*@only@*/ /*@null@*/ ARGI_t argi)
00041         /*@modifies argi @*/;
00042 
00048 /*@null@*/
00049 ARGV_t argvFree(/*@only@*/ /*@null@*/ ARGV_t argv)
00050         /*@modifies argv @*/;
00051 
00057 int argiCount(/*@null@*/ const ARGI_t argi)
00058         /*@*/;
00059 
00065 /*@null@*/
00066 ARGint_t argiData(/*@null@*/ ARGI_t argi)
00067         /*@*/;
00068 
00074 int argvCount(/*@null@*/ const ARGV_t argv)
00075         /*@*/;
00076 
00082 /*@null@*/
00083 ARGV_t argvData(/*@null@*/ ARGV_t argv)
00084         /*@*/;
00085 
00092 /*@-exportlocal@*/
00093 int argiCmp(const void * a, const void * b)
00094         /*@*/;
00095 /*@=exportlocal@*/
00096 
00103 /*@-exportlocal@*/
00104 int argvCmp(const void * a, const void * b)
00105         /*@*/;
00106 /*@=exportlocal@*/
00107 
00114 int argvStrcasecmp(const void * a, const void * b)
00115         /*@*/;
00116 
00117 #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
00118 
00124 int argvFnmatch(const void * a, const void * b)
00125         /*@*/;
00126 
00133 int argvFnmatchCasefold(const void * a, const void * b)
00134         /*@*/;
00135 #endif
00136 
00143 int argiSort(ARGI_t argi, int (*compar)(const void *, const void *))
00144         /*@*/;
00145 
00152 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *))
00153         /*@modifies *argv @*/;
00154 
00162 /*@dependent@*/ /*@null@*/
00163 ARGV_t argvSearch(ARGV_t argv, ARGstr_t val,
00164                 int (*compar)(const void *, const void *))
00165         /*@*/;
00166 
00167 #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
00168 
00175 /*@dependent@*/ /*@null@*/
00176 ARGV_t argvSearchLinear(ARGV_t argv, ARGstr_t val,
00177                 int (*compar)(const void *, const void *))
00178         /*@*/;
00179 #endif
00180 
00188 int argiAdd(/*@out@*/ ARGI_t * argip, int ix, int val)
00189         /*@modifies *argip @*/;
00190 
00197 int argvAdd(/*@out@*/ ARGV_t * argvp, ARGstr_t val)
00198         /*@modifies *argvp @*/;
00199 
00206 int argvAppend(/*@out@*/ ARGV_t * argvp, /*@null@*/ ARGV_t av)
00207         /*@modifies *argvp @*/;
00208 
00216 int argvSplit(ARGV_t * argvp, const char * str, /*@null@*/ const char * seps)
00217         /*@modifies *argvp @*/;
00218 
00224 /*@only@*/
00225 char * argvJoin(ARGV_t argv)
00226         /*@*/;
00227 
00234 int argvFgets(ARGV_t * argvp, void * fd)
00235         /*@globals fileSystem@*/
00236         /*@modifies *argvp, fd, fileSystem @*/;
00237 
00238 #ifdef __cplusplus
00239 }
00240 #endif
00241 
00242 #endif /* _H_ARGV_ */