diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
tree | c7881b015b220558167310345b162324c96be15a /firmware/common/strstr.c | |
parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
download | rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip |
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/strstr.c')
-rw-r--r-- | firmware/common/strstr.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/firmware/common/strstr.c b/firmware/common/strstr.c deleted file mode 100644 index 73fab1cc63..0000000000 --- a/firmware/common/strstr.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: $ | ||
9 | * | ||
10 | * Copyright (C) 1991, 1992 Linus Torvalds | ||
11 | * (from linux/lib/string.c) | ||
12 | * | ||
13 | ****************************************************************************/ | ||
14 | |||
15 | #include <string.h> | ||
16 | |||
17 | /** | ||
18 | * strstr - Find the first substring in a %NUL terminated string | ||
19 | * @s1: The string to be searched | ||
20 | * @s2: The string to search for | ||
21 | */ | ||
22 | char *strstr(const char *s1, const char *s2) | ||
23 | { | ||
24 | int l1, l2; | ||
25 | |||
26 | l2 = strlen(s2); | ||
27 | if (!l2) | ||
28 | return (char *)s1; | ||
29 | l1 = strlen(s1); | ||
30 | while (l1 >= l2) { | ||
31 | l1--; | ||
32 | if (!memcmp(s1, s2, l2)) | ||
33 | return (char *)s1; | ||
34 | s1++; | ||
35 | } | ||
36 | return NULL; | ||
37 | } | ||
38 | |||