aboutsummaryrefslogtreecommitdiffstats
path: root/mktable.c
diff options
context:
space:
mode:
Diffstat (limited to 'mktable.c')
-rw-r--r--mktable.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mktable.c b/mktable.c
index 6e97643..d9cdf38 100644
--- a/mktable.c
+++ b/mktable.c
@@ -1,4 +1,4 @@
-/* $Id: mktable.c,v 1.11 2002/12/24 17:20:47 ukai Exp $ */
+/* $Id: mktable.c,v 1.12 2003/03/12 18:27:07 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include "myctype.h"
@@ -48,7 +48,10 @@ main(int argc, char *argv[], char **envp)
fprintf(stderr, "Can't open %s\n", argv[2]);
exit(1);
}
- fbase = Strnew_charp(argv[2]);
+ p = argv[2];
+ if (strrchr(p, '/') != NULL)
+ p = strrchr(p, '/')+1;
+ fbase = Strnew_charp(p);
if (strchr(fbase->ptr, '.'))
while (Strlastchar(fbase) != '.')
Strshrink(fbase, 1);