From 1da21bd3b469cd212e2bfa2dbb4254087c206a0a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 May 2012 22:21:11 -0500 Subject: [PATCH] argvsplit: proper namespacing --- argvsplit.c | 6 ++++-- parse.c | 4 ++-- pkg.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/argvsplit.c b/argvsplit.c index 3d6d2b6..d7044c2 100644 --- a/argvsplit.c +++ b/argvsplit.c @@ -24,13 +24,15 @@ #include "config.h" #include "pkg.h" -void argv_free(char **argv) +void +pkg_argv_free(char **argv) { free(argv[0]); free(argv); } -int argv_split(const char *src, int *argc, char ***argv) +int +pkg_argv_split(const char *src, int *argc, char ***argv) { char *buf = malloc(strlen(src) + 1); const char *src_iter; diff --git a/parse.c b/parse.c index 1ca38e4..fc7c3a9 100644 --- a/parse.c +++ b/parse.c @@ -32,12 +32,12 @@ parse_fragment_list(pkg_t *pkg, const char *string) char *repstr = pkg_tuple_parse(pkg->vars, string); pkg_fragment_t *head = NULL; - argv_split(repstr, &argc, &argv); + pkg_argv_split(repstr, &argc, &argv); for (i = 0; i < argc; i++) head = pkg_fragment_add(head, argv[i]); - argv_free(argv); + pkg_argv_free(argv); free(repstr); return head; diff --git a/pkg.h b/pkg.h index d7b7e84..8fb15b8 100644 --- a/pkg.h +++ b/pkg.h @@ -150,8 +150,8 @@ pkg_dependency_t *pkg_dependency_append(pkg_dependency_t *head, pkg_dependency_t void pkg_dependency_free(pkg_dependency_t *head); /* argvsplit.c */ -int argv_split(const char *src, int *argc, char ***argv); -void argv_free(char **argv); +int pkg_argv_split(const char *src, int *argc, char ***argv); +void pkg_argv_free(char **argv); /* fragment.c */ pkg_fragment_t *pkg_fragment_append(pkg_fragment_t *head, pkg_fragment_t *tail);