projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83da373
)
Bell 32V development
author
Tom London
<tbl@research.uucp>
Sat, 20 Jan 1979 04:51:52 +0000
(23:51 -0500)
committer
Tom London
<tbl@research.uucp>
Sat, 20 Jan 1979 04:51:52 +0000
(23:51 -0500)
Work on file usr/src/libc/gen/rindex.c
Co-Authored-By: John Reiser <jfr@research.uucp>
Synthesized-from: 32v
usr/src/libc/gen/rindex.c
[new file with mode: 0644]
patch
|
blob
diff --git a/usr/src/libc/gen/rindex.c
b/usr/src/libc/gen/rindex.c
new file mode 100644
(file)
index 0000000..
af1ff76
--- /dev/null
+++ b/
usr/src/libc/gen/rindex.c
@@ -0,0
+1,20
@@
+/*
+ * Return the ptr in sp at which the character c last
+ * appears; NULL if not found
+*/
+
+#define NULL 0
+
+char *
+rindex(sp, c)
+register char *sp, c;
+{
+ register char *r;
+
+ r = NULL;
+ do {
+ if (*sp == c)
+ r = sp;
+ } while (*sp++);
+ return(r);
+}