summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44ecb3b)
raw | patch | inline | side by side (parent: 44ecb3b)
author | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 09:51:53 +0000 (11:51 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 09:51:53 +0000 (11:51 +0200) |
src/support.c | patch | blob | history | |
src/support.h | patch | blob | history |
diff --git a/src/support.c b/src/support.c
index 3ceac5a3a0d294450663497148fb6537ac584bfa..bfcd070258cafd5aadf45fff8caa889b4f331a1a 100644 (file)
--- a/src/support.c
+++ b/src/support.c
#include <ctype.h>
#include <string.h>
-#define BUFSIZE 1024
-
-char *
-remove_trailing_slash(char *path)
-{
- int len;
-
- if (path == NULL)
- return NULL;
-
- len = strlen(path);
- if (len > 1 && path[len - 1] == '/')
- path[len - 1] = '\0';
-
- return path;
-}
-
#ifndef HAVE_STRCASESTR
const char *
strcasestr(const char *haystack, const char *needle)
diff --git a/src/support.h b/src/support.h
index 305ecbcf19d3fde468f3ea1cfe2d48a0aecbe97a..9edc20f351b4b85061b322103b0e02bc8a75be7f 100644 (file)
--- a/src/support.h
+++ b/src/support.h
#include <libgen.h>
#endif
-char *remove_trailing_slash(char *path);
const char *strcasestr(const char *haystack, const char *needle);
typedef struct {