From d728ec28dcb51a139859e4fed48da894a8363a51 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 7 Apr 2008 09:31:21 +0300 Subject: [PATCH] Remove ARGstr_t typedef, it serves no purpose - argv strings are just regular strings, the structure is what's special --- rpmio/argv.c | 8 ++++---- rpmio/argv.h | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/rpmio/argv.c b/rpmio/argv.c index c39c9d118..2e26c93be 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -76,8 +76,8 @@ ARGV_t argvData(const ARGV_t argv) int argvCmp(const void * a, const void * b) { - ARGstr_t astr = *(ARGV_t)a; - ARGstr_t bstr = *(ARGV_t)b; + const char *astr = *(ARGV_t)a; + const char *bstr = *(ARGV_t)b; return strcmp(astr, bstr); } @@ -89,7 +89,7 @@ int argvSort(ARGV_t argv, int (*compar)(const void *, const void *)) 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 *)) { if (argv == NULL) @@ -120,7 +120,7 @@ int argiAdd(ARGI_t * argip, int ix, int val) return 0; } -int argvAdd(ARGV_t * argvp, ARGstr_t val) +int argvAdd(ARGV_t * argvp, const char *val) { ARGV_t argv; int argc; diff --git a/rpmio/argv.h b/rpmio/argv.h index e3bbcc126..840cb19c4 100644 --- a/rpmio/argv.h +++ b/rpmio/argv.h @@ -11,7 +11,6 @@ extern "C" { #endif -typedef const char * ARGstr_t; typedef char ** ARGV_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() * @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 *)); /** \ingroup rpmargv @@ -112,7 +111,7 @@ int argiAdd(ARGI_t * argip, int ix, int val); * @param val string arg to append * @return 0 always */ -int argvAdd(ARGV_t * argvp, ARGstr_t val); +int argvAdd(ARGV_t * argvp, const char *val); /** \ingroup rpmargv * Append one argv array to another.