Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/strrchr.c
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 276 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 276 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* |
2 | * strrchr.c |
3 | */ |
4 | |
5 | #include <string.h> |
6 | #include <klibc/compiler.h> |
7 | |
8 | char *strrchr(const char *s, int c) |
9 | { |
10 | const char *found = NULL; |
11 | |
12 | while (*s) { |
13 | if (*s == (char)c) |
14 | found = s; |
15 | s++; |
16 | } |
17 | |
18 | return (char *)found; |
19 | } |
20 | |
21 | __ALIAS(char *, rindex, (const char *, int), strrchr) |