- 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
    00010 #ifdef __cplusplus
    00011 extern "C" {
    00012 #endif
    00013
    00014 typedef char ** ARGV_t;
    00015 typedef char * const *ARGV_const_t;
    00016
    00017 typedef int * ARGint_t;
    00018 struct ARGI_s {
    00019     unsigned nvals;
    00020     ARGint_t vals;
    00021 };
    00022 typedef struct ARGI_s * ARGI_t;
    00023 typedef struct ARGI_s const * const ARGI_const_t;
    00024
    00031 void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
    00032
    00038 ARGI_t argiFree(ARGI_t argi);
    00039
    00040
    00045 ARGV_t argvNew(void);
    00046
    00052 ARGV_t argvFree(ARGV_t argv);
    00053
    00059 int argiCount(ARGI_const_t argi);
    00060
    00066 ARGint_t argiData(ARGI_const_t argi);
    00067
    00073 int argvCount(ARGV_const_t argv);
    00074
    00080 ARGV_t argvData(ARGV_t argv);
    00081
    00088 int argvCmp(const void * a, const void * b);
    00089
    00096 int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
    00097
    00105 ARGV_t argvSearch(ARGV_const_t argv, const char *val,
    00106                 int (*compar)(const void *, const void *));
    00107
    00115 int argiAdd(ARGI_t * argip, int ix, int val);
    00116
    00123 int argvAdd(ARGV_t * argvp, const char *val);
    00124
    00131 int argvAddNum(ARGV_t * argvp, int val);
    00132
    00139 int argvAppend(ARGV_t * argvp, ARGV_const_t av);
    00140
    00148 int argvSplit(ARGV_t * argvp, const char * str, const char * seps);
    00149
    00156 char *argvJoin(ARGV_const_t argv, const char *sep);
    00157
    00158 #ifdef __cplusplus
    00159 }
    00160 #endif
    00161
    00162 #endif /* _H_ARGV_ */