summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eedf600)
raw | patch | inline | side by side (parent: eedf600)
author | Kalle Wallin <kaw@linux.se> | |
Thu, 1 Jul 2004 10:52:57 +0000 (10:52 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Thu, 1 Jul 2004 10:52:57 +0000 (10:52 +0000) |
src/screen_play.c | patch | blob | history | |
src/support.c | patch | blob | history | |
src/support.h | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index 3478987b55e848da6eea6c92140ff00fcf8405ed..615472dccf644b3511a1164b1fb5984783da7ed2 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
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 90ecb8b0d444a5b11df1395887b36521952f81ec..3717e6c0f4a0c8137978cf82fe584a9d453e8f4c 100644 (file)
--- a/src/support.c
+++ b/src/support.c
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)
{
diff --git a/src/support.h b/src/support.h
index fce9aac28b68782c3a058ce86322bbcc44fe73cc..4182d2e746dddd3326b458dd6f6b95ec697a5d94 100644 (file)
--- a/src/support.h
+++ b/src/support.h
#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);