1/*
2 * Copyright 2001, Manuel J. Petit. All rights reserved.
3 * Distributed under the terms of the NewOS License.
4 */
5
6
7#include <string.h>
8#include <strings.h>
9#include <sys/types.h>
10
11
12char *
13strrchr(char const *s, int c)
14{
15	char const *last = NULL;
16
17	for (;; s++) {
18		if (*s == (char)c)
19			last = s;
20		if (*s == '\0')
21			break;
22	}
23
24	return (char *)last;
25}
26
27
28char *
29rindex(char const *s, int c)
30{
31	return strrchr(s, c);
32}
33
34