summaryrefslogtreecommitdiff
path: root/rpmio/rpmstring.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-17 21:56:54 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-17 21:56:54 +0300
commit94ff22b129aeb31c38848231e40f87aa4a5613a1 (patch)
treea4732817a093d33d64667becc21af37cda6fa086 /rpmio/rpmstring.c
parent7800911bb0281ab568af767c74a664b9c1215464 (diff)
downloadlibrpm-tizen-94ff22b129aeb31c38848231e40f87aa4a5613a1.tar.gz
librpm-tizen-94ff22b129aeb31c38848231e40f87aa4a5613a1.tar.bz2
librpm-tizen-94ff22b129aeb31c38848231e40f87aa4a5613a1.zip
Eliminate splitString() and freeSplitString()
- use ARGV_t instead, it does the same and more...
Diffstat (limited to 'rpmio/rpmstring.c')
-rw-r--r--rpmio/rpmstring.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/rpmio/rpmstring.c b/rpmio/rpmstring.c
index ac9b5cf34..08d44b46a 100644
--- a/rpmio/rpmstring.c
+++ b/rpmio/rpmstring.c
@@ -26,49 +26,6 @@ char * stripTrailingChar(char * s, char c)
return s;
}
-char ** splitString(const char * str, size_t length, char sep)
-{
- const char * source;
- char * s, * dest;
- char ** list;
- int i;
- int fields;
-
- s = xmalloc(length + 1);
-
- fields = 1;
- for (source = str, dest = s, i = 0; i < length; i++, source++, dest++) {
- *dest = *source;
- if (*dest == sep) fields++;
- }
-
- *dest = '\0';
-
- list = xmalloc(sizeof(*list) * (fields + 1));
-
- dest = s;
- list[0] = dest;
- i = 1;
- while (i < fields) {
- if (*dest == sep) {
- list[i++] = dest + 1;
- *dest = 0;
- }
- dest++;
- }
-
- list[i] = NULL;
-
-/* FIX: list[i] is NULL */
- return list;
-}
-
-void freeSplitString(char ** list)
-{
- list[0] = _free(list[0]);
- list = _free(list);
-}
-
StringBuf newStringBuf(void)
{
StringBuf sb = xmalloc(sizeof(*sb));