rpm 4.10.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

argv.h
Go to the documentation of this file.

    00001 #ifndef _H_ARGV_
    00002 #define _H_ARGV_
    00003
    00008 #include <stdio.h>
    00009 #include <rpm/rpmtypes.h>
    00010
    00011 #ifdef __cplusplus
    00012 extern "C" {
    00013 #endif
    00014
    00015 typedef char ** ARGV_t;
    00016 typedef char * const *ARGV_const_t;
    00017
    00018 typedef int * ARGint_t;
    00019 struct ARGI_s {
    00020     unsigned nvals;
    00021     ARGint_t vals;
    00022 };
    00023 typedef struct ARGI_s * ARGI_t;
    00024 typedef struct ARGI_s const * const ARGI_const_t;
    00025
    00032 void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
    00033
    00039 ARGI_t argiFree(ARGI_t argi);
    00040
    00041
    00046 ARGV_t argvNew(void);
    00047
    00053 ARGV_t argvFree(ARGV_t argv);
    00054
    00060 int argiCount(ARGI_const_t argi);
    00061
    00067 ARGint_t argiData(ARGI_const_t argi);
    00068
    00074 int argvCount(ARGV_const_t argv);
    00075
    00081 ARGV_t argvData(ARGV_t argv);
    00082
    00089 int argvCmp(const void * a, const void * b);
    00090
    00097 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
    00098
    00106 ARGV_t argvSearch(ARGV_const_t argv, const char *val,
    00107                 int (*compar)(const void *, const void *));
    00108
    00116 int argiAdd(ARGI_t * argip, int ix, int val);
    00117
    00124 int argvAdd(ARGV_t * argvp, const char *val);
    00125
    00132 int argvAddNum(ARGV_t * argvp, int val);
    00133
    00140 int argvAppend(ARGV_t * argvp, ARGV_const_t av);
    00141
    00142 enum argvFlags_e {
    00143     ARGV_NONE           = 0,
    00144     ARGV_SKIPEMPTY      = (1 << 0),     /* omit empty strings from result */
    00145 };
    00146
    00147 typedef rpmFlags argvFlags;
    00148
    00156 ARGV_t argvSplitString(const char * str, const char * seps, argvFlags flags);
    00157
    00165 int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
    00166
    00173 char *argvJoin(ARGV_const_t argv, const char *sep);
    00174
    00175 #ifdef __cplusplus
    00176 }
    00177 #endif
    00178
    00179 #endif /* _H_ARGV_ */