From dc167b4c52255c2e8c4859afa4ff180d8249f3d1 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Sun, 15 Oct 2017 14:29:12 -0700 Subject: [PATCH] Remove unused funcs remove_slash, replace_tilde Remove unused funcs remove_slash() (an identical one exists in win32_print.c) and replace_tilde(). --- src/tuxpaint.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 5c2f2be78..20f0c9cd7 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -16756,46 +16756,6 @@ static void handle_active(SDL_Event * event) } -/* removes a single '\' or '/' from end of path */ - -static char *remove_slash(char *path) -{ - int len = strlen(path); - - if (!len) - return path; - - if (path[len - 1] == '/' || path[len - 1] == '\\') - path[len - 1] = 0; - - return path; -} - -/* replace '~' at the beginning of a path with home directory */ -/* -static char *replace_tilde(const char* const path) -{ - char *newpath; - int newlen; - - int len = strlen(path); - - if (!len) - return strdup(""); - - if (path[0] == '~') - { - newlen = strlen(getenv("HOME")) + len; - newpath = malloc(sizeof(char)*newlen); - sprintf(newpath, "%s%s", getenv("HOME"), path+1); - } - else - newpath = strdup(path); - - return newpath; -} -*/ - /* For right-to-left languages, when word-wrapping, we need to make sure the text doesn't end up going from bottom-to-top, too! */