summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-10-28 14:19:43 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:12 +0100
commit5df77bab6d3324c2b9dc696e38ccac9317b1ff70 (patch)
treed33bac15274c2d719ec0f34851f5d4de525d7f18
parentf034ca39df7f6f513d0d4d4f479194592ac48645 (diff)
Portability: apparently some systems declare `char *basename(const
char *)' in system header files. Changing our basename() (in history.c) to match this prototype allows it to be compiled on such systems, and is harmless. (Harmless, that is, if no system declares `char *basename(char *)'.)
-rw-r--r--history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/history.c b/history.c
index 3a42a2e..d1035dd 100644
--- a/history.c
+++ b/history.c
@@ -56,7 +56,7 @@ static char *newstr() {
return ealloc((size_t)1024);
}
-static char *basename(char *s) {
+static char *basename(const char *s) {
char *t = strrchr(s, '/');
return (t == NULL) ? s : t + 1;
}