diff options
Diffstat (limited to '')
-rw-r--r-- | src/screen_play.c | 2 | ||||
-rw-r--r-- | src/support.c | 20 | ||||
-rw-r--r-- | src/support.h | 1 |
3 files changed, 1 insertions, 22 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 3478987b5..615472dcc 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -154,7 +154,7 @@ handle_save_playlist(screen_t *screen, mpdclient_t *c, char *name) NULL, NULL, gcmp); - filename=trim(filename); + filename=g_strstrip(filename); /* destroy completion support */ wrln_pre_completion_callback = NULL; diff --git a/src/support.c b/src/support.c index 90ecb8b0d..3717e6c0f 100644 --- a/src/support.c +++ b/src/support.c @@ -36,26 +36,6 @@ extern void screen_status_printf(char *format, ...); static gboolean noconvert = TRUE; char * -trim(char *str) -{ - char *end; - - if( str==NULL ) - return NULL; - - while( IS_WHITESPACE(*str) ) - str++; - - end=str+strlen(str)-1; - while( end>str && IS_WHITESPACE(*end) ) - { - *end = '\0'; - end--; - } - return str; -} - -char * remove_trailing_slash(char *path) { int len; diff --git a/src/support.h b/src/support.h index fce9aac28..4182d2e74 100644 --- a/src/support.h +++ b/src/support.h @@ -11,7 +11,6 @@ char *basename(char *path); #define IS_WHITESPACE(c) (c==' ' || c=='\t' || c=='\r' || c=='\n') -char *trim(char *str); char *remove_trailing_slash(char *path); char *lowerstr(char *str); char *strcasestr(const char *haystack, const char *needle); |