projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug fixes and changes from Rick Adams
[unix-history]
/
usr
/
src
/
usr.bin
/
uucp
/
libuu
/
lastpart.c
diff --git
a/usr/src/usr.bin/uucp/libuu/lastpart.c
b/usr/src/usr.bin/uucp/libuu/lastpart.c
index
d0280be
..
ccb84a9
100644
(file)
--- a/
usr/src/usr.bin/uucp/libuu/lastpart.c
+++ b/
usr/src/usr.bin/uucp/libuu/lastpart.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)lastpart.c 5.
1
(Berkeley) %G%";
+static char sccsid[] = "@(#)lastpart.c 5.
2
(Berkeley) %G%";
#endif
/*******
#endif
/*******
@@
-15,10
+15,11
@@
lastpart(file)
register char *file;
{
register char *c;
register char *file;
{
register char *c;
+ char *rindex();
- c =
file + strlen(file
);
-
while (c >= file
)
- if (*(--c) == '/')
- break;
-
return(++c)
;
+ c =
rindex(file, '/'
);
+
if (c
)
+ return c;
+ else
+
return file
;
}
}