Remove ARGstr_t typedef, it serves no purpose
- argv strings are just regular strings, the structure is what's special
This commit is contained in:
parent
a5533d9604
commit
d728ec28dc
|
@ -76,8 +76,8 @@ ARGV_t argvData(const ARGV_t argv)
|
||||||
|
|
||||||
int argvCmp(const void * a, const void * b)
|
int argvCmp(const void * a, const void * b)
|
||||||
{
|
{
|
||||||
ARGstr_t astr = *(ARGV_t)a;
|
const char *astr = *(ARGV_t)a;
|
||||||
ARGstr_t bstr = *(ARGV_t)b;
|
const char *bstr = *(ARGV_t)b;
|
||||||
return strcmp(astr, bstr);
|
return strcmp(astr, bstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ int argvSort(ARGV_t argv, int (*compar)(const void *, const void *))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ARGV_t argvSearch(ARGV_t argv, ARGstr_t val,
|
ARGV_t argvSearch(ARGV_t argv, const char *val,
|
||||||
int (*compar)(const void *, const void *))
|
int (*compar)(const void *, const void *))
|
||||||
{
|
{
|
||||||
if (argv == NULL)
|
if (argv == NULL)
|
||||||
|
@ -120,7 +120,7 @@ int argiAdd(ARGI_t * argip, int ix, int val)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int argvAdd(ARGV_t * argvp, ARGstr_t val)
|
int argvAdd(ARGV_t * argvp, const char *val)
|
||||||
{
|
{
|
||||||
ARGV_t argv;
|
ARGV_t argv;
|
||||||
int argc;
|
int argc;
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef const char * ARGstr_t;
|
|
||||||
typedef char ** ARGV_t;
|
typedef char ** ARGV_t;
|
||||||
|
|
||||||
typedef int * ARGint_t;
|
typedef int * ARGint_t;
|
||||||
|
@ -94,7 +93,7 @@ int argvSort(ARGV_t argv, int (*compar)(const void *, const void *));
|
||||||
* @param compar strcmp-like comparison function, or NULL for argvCmp()
|
* @param compar strcmp-like comparison function, or NULL for argvCmp()
|
||||||
* @return found string (NULL on failure)
|
* @return found string (NULL on failure)
|
||||||
*/
|
*/
|
||||||
ARGV_t argvSearch(ARGV_t argv, ARGstr_t val,
|
ARGV_t argvSearch(ARGV_t argv, const char *val,
|
||||||
int (*compar)(const void *, const void *));
|
int (*compar)(const void *, const void *));
|
||||||
|
|
||||||
/** \ingroup rpmargv
|
/** \ingroup rpmargv
|
||||||
|
@ -112,7 +111,7 @@ int argiAdd(ARGI_t * argip, int ix, int val);
|
||||||
* @param val string arg to append
|
* @param val string arg to append
|
||||||
* @return 0 always
|
* @return 0 always
|
||||||
*/
|
*/
|
||||||
int argvAdd(ARGV_t * argvp, ARGstr_t val);
|
int argvAdd(ARGV_t * argvp, const char *val);
|
||||||
|
|
||||||
/** \ingroup rpmargv
|
/** \ingroup rpmargv
|
||||||
* Append one argv array to another.
|
* Append one argv array to another.
|
||||||
|
|
Loading…
Reference in New Issue