diff options
author | Kalle Wallin <kaw@linux.se> | 2004-07-01 10:52:57 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-07-01 10:52:57 +0000 |
commit | 95633d4b608f6ae3d74c6ee5c269ed2559a9966c (patch) | |
tree | 90da767ea9a3bcc7ae57f9d8deff94c9acf82eb3 | |
parent | eedf600cfe4b74db6053e96f0b09979594ca31ba (diff) | |
download | mpd-95633d4b608f6ae3d74c6ee5c269ed2559a9966c.tar.gz mpd-95633d4b608f6ae3d74c6ee5c269ed2559a9966c.tar.xz mpd-95633d4b608f6ae3d74c6ee5c269ed2559a9966c.zip |
Removed the trim() function, using glib's g_strstrip() instead
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1751 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-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); |