diff options
author | jbj <devnull@localhost> | 1999-03-16 20:04:26 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-03-16 20:04:26 +0000 |
commit | ca9dc63de974d1335dce533d310ffbb11812fce0 (patch) | |
tree | 469a0c5fca0d4af44d115ec546262ef0b5623e7b /misc | |
parent | 776dc9c2581c54e7ebb9980ca01401956e4f81b0 (diff) | |
download | librpm-tizen-ca9dc63de974d1335dce533d310ffbb11812fce0.tar.gz librpm-tizen-ca9dc63de974d1335dce533d310ffbb11812fce0.tar.bz2 librpm-tizen-ca9dc63de974d1335dce533d310ffbb11812fce0.zip |
Fix newSpec in "rpm -q --specfile --specedit"
CVS patchset: 2892
CVS date: 1999/03/16 20:04:26
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile.am | 14 | ||||
-rw-r--r-- | misc/basename.c | 13 |
2 files changed, 20 insertions, 7 deletions
diff --git a/misc/Makefile.am b/misc/Makefile.am index b590e4636..38f91558f 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -5,13 +5,13 @@ AUTOMAKE_OPTIONS = 1.4 foreign INCLUDES = -I$(top_srcdir) @INCPATH@ EXTRA_DIST = \ - alloca.c error.c fakefork.c fnmatch.c \ - getcwd.c getmntent.c getwd.c glob.c \ - inet_aton.c memcmp.c mktime.c myrealloc.c \ - putenv.c realpath.c stpcpy.c stpncpy.c \ - strcasecmp.c strncasecmp.c strcspn.c strdup.c \ - strerror.c strftime.c strcspn.c strstr.c \ - strtol.c strtoul.c + alloca.c basename.c error.c fakefork.c \ + fnmatch.c getcwd.c getmntent.c getwd.c \ + glob.c inet_aton.c memcmp.c mktime.c \ + myrealloc.c putenv.c realpath.c stpcpy.c \ + stpncpy.c strcasecmp.c strncasecmp.c strcspn.c \ + strdup.c strerror.c strftime.c strcspn.c \ + strstr.c strtol.c strtoul.c noinst_HEADERS = \ error.h fnmatch.h glob.h \ diff --git a/misc/basename.c b/misc/basename.c new file mode 100644 index 000000000..7fea76ed7 --- /dev/null +++ b/misc/basename.c @@ -0,0 +1,13 @@ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif + +char * +basename(const char *file) +{ + char *fn = strrchr(file, '/'); + return fn ? fn+1 : (char *)file; +} |