diff options
Diffstat (limited to 'rf.c')
-rw-r--r-- | rf.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/rf.c b/rf.c index ec315b9..cd5e75e 100644 --- a/rf.c +++ b/rf.c @@ -96,44 +96,6 @@ static int excluded(const char *name) { return 0; } -char *escape_string(char *input) { - char ch; - int i = 0; - int j = 0; - char *output = calloc(sizeof(char), strlen(input) * 2); - - while ((ch = input[i]) != '\0') { - switch (ch) { - case ' ': - case '\t': - case '\'': - case '(': - case ')': - output[j++] = '\\'; - output[j++] = ch; - i++; - break; - default: - output[j++] = input[i++]; - } - } - - return output; -} - -int has_spaces(char *input) { - char ch; - int i = 0; - - while ((ch = input[i++]) != '\0') { - if (isspace(ch)) { - return 1; - } - } - - return 0; -} - /* return 1 if breaking early (e.g. reaching limit) otherwise return 0 */ static int recurse_find(char **patterns, int *pattern_count, const char *dirname, struct switches *switches) { @@ -209,9 +171,7 @@ static int recurse_find(char **patterns, int *pattern_count, if (matched) { if (is_child(entry->d_name) != 0) { - char *escaped = escape_string(full_path); - printf("%s\n", escaped); - free(escaped); + printf("%s\n", full_path); } if (switches->limit > 0 && |