diff options
author | jbj <devnull@localhost> | 1999-11-26 16:19:30 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-11-26 16:19:30 +0000 |
commit | c8406c80d2a9670df64f1ab7e38d90626cad906f (patch) | |
tree | 73cd94dccefe9e495fa59f775b6e931e4867e984 /build | |
parent | 2a423cf9398d597b1320e95e864909e292f9c82f (diff) | |
download | rpm-c8406c80d2a9670df64f1ab7e38d90626cad906f.tar.gz rpm-c8406c80d2a9670df64f1ab7e38d90626cad906f.tar.bz2 rpm-c8406c80d2a9670df64f1ab7e38d90626cad906f.zip |
lib/macro.c: Create rpmCleanPath().
build/misc.c: Delete cleanFileName().
CVS patchset: 3435
CVS date: 1999/11/26 16:19:30
Diffstat (limited to 'build')
-rw-r--r-- | build/misc.c | 25 | ||||
-rw-r--r-- | build/rpmbuild.h | 1 |
2 files changed, 0 insertions, 26 deletions
diff --git a/build/misc.c b/build/misc.c index 7e99e349e..f7de2e309 100644 --- a/build/misc.c +++ b/build/misc.c @@ -14,28 +14,3 @@ int parseNum(const char *line, int *res) return 0; } - -const char *cleanFileName(const char *name) -{ - static char res[BUFSIZ]; /* XXX yuk */ - char *copyTo, copied; - const char *copyFrom; - - /* Copy to fileName, eliminate duplicate "/" and trailing "/" */ - copyTo = res; - copied = '\0'; - copyFrom = name; - while (*copyFrom) { - if (*copyFrom != '/' || copied != '/') { - *copyTo++ = copied = *copyFrom; - } - copyFrom++; - } - *copyTo = '\0'; - copyTo--; - if ((copyTo != res) && (*copyTo == '/')) { - *copyTo = '\0'; - } - - return res; -} diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 5b5908cc3..8d574d28f 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -95,7 +95,6 @@ int isPart(char *line); /* from build/misc.h */ int parseNum(const char *line, /*@out@*/int *res); -/*@observer@*/ const char *cleanFileName(const char *name); /* from build/parse.h */ |