projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
basename.c
diff --git
a/lib/basename.c
b/lib/basename.c
index
5237b11
..
36e0f62
100644
(file)
--- a/
lib/basename.c
+++ b/
lib/basename.c
@@
-1,5
+1,5
@@
/* basename.c -- return the last element in a path
/* basename.c -- return the last element in a path
- Copyright (C) 1990, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 1999, 2000
, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-19,6
+19,7
@@
# include <config.h>
#endif
# include <config.h>
#endif
+#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
@@
-64,7
+65,7
@@
base_name (char const *name)
--base;
/* Make sure the last byte is not a slash. */
--base;
/* Make sure the last byte is not a slash. */
- assert (all_slashes ||
*(p - 1) != '/'
);
+ assert (all_slashes ||
!ISSLASH (*(p - 1))
);
return (char *) base;
}
return (char *) base;
}