Remove unused function string_to_argv

This commit is contained in:
Nikos Tsipinakis 2017-02-05 13:05:52 +02:00
parent 0c49b49254
commit 3f5257f285
2 changed files with 0 additions and 22 deletions

View File

@ -93,26 +93,6 @@ char *string_append(char *a, const char *b, const char *sep)
} }
char **string_to_argv(const char *s)
{
char *str = strdup(s);
char **argv = NULL;
char *p = strtok (str, " ");
int n_spaces = 0;
while (p) {
argv = realloc (argv, sizeof (char*) * ++n_spaces);
argv[n_spaces-1] = g_strdup(p);
p = strtok (NULL, " ");
}
argv = realloc (argv, sizeof (char*) * (n_spaces+1));
argv[n_spaces] = NULL;
free(str);
return argv;
}
void string_strip_delimited(char *str, char a, char b) void string_strip_delimited(char *str, char a, char b)
{ {
int iread=-1, iwrite=0, copen=0; int iread=-1, iwrite=0, copen=0;

View File

@ -15,8 +15,6 @@ char *string_replace(const char *needle, const char *replacement,
char *string_append(char *a, const char *b, const char *sep); char *string_append(char *a, const char *b, const char *sep);
char **string_to_argv(const char *s);
/* strip content between two delimiter characters (inplace) */ /* strip content between two delimiter characters (inplace) */
void string_strip_delimited(char *str, char a, char b); void string_strip_delimited(char *str, char a, char b);