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( const char * msg, ARGV_t argv,
00030 FILE * fp)
00031
00032 ;
00033
00039
00040 ARGI_t argiFree( ARGI_t argi)
00041 ;
00042
00048
00049 ARGV_t argvFree( ARGV_t argv)
00050 ;
00051
00057 int argiCount( const ARGI_t argi)
00058 ;
00059
00065
00066 ARGint_t argiData( ARGI_t argi)
00067 ;
00068
00074 int argvCount( const ARGV_t argv)
00075 ;
00076
00082
00083 ARGV_t argvData( ARGV_t argv)
00084 ;
00085
00092
00093 int argiCmp(const void * a, const void * b)
00094 ;
00095
00096
00103
00104 int argvCmp(const void * a, const void * b)
00105 ;
00106
00107
00114 int argvStrcasecmp(const void * a, const void * b)
00115 ;
00116
00117 #if defined(RPM_VENDOR_OPENPKG)
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 ;
00154
00162
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)
00168
00175
00176 ARGV_t argvSearchLinear(ARGV_t argv, ARGstr_t val,
00177 int (*compar)(const void *, const void *))
00178 ;
00179 #endif
00180
00188 int argiAdd( ARGI_t * argip, int ix, int val)
00189 ;
00190
00197 int argvAdd( ARGV_t * argvp, ARGstr_t val)
00198 ;
00199
00206 int argvAppend( ARGV_t * argvp, ARGV_t av)
00207 ;
00208
00216 int argvSplit(ARGV_t * argvp, const char * str, const char * seps)
00217 ;
00218
00224
00225 char * argvJoin(ARGV_t argv)
00226 ;
00227
00234 int argvFgets(ARGV_t * argvp, void * fd)
00235
00236 ;
00237
00238 #ifdef __cplusplus
00239 }
00240 #endif
00241
00242 #endif