1 /*
2  *  Routines to access hardware
3  *
4  *  Copyright (c) 2013 Realtek Semiconductor Corp.
5  *
6  *  This module is a confidential and proprietary property of RealTek and
7  *  possession or use of this module requires written permission of RealTek.
8  */
9 
10 #include "basic_types.h"
11 #include <stdarg.h>
12 #include <stddef.h>             /* Compiler defns such as size_t, NULL etc. */
13 #include "strproc.h"
14 #include "section_config.h"
15 #include "diag.h"
16 #include "ameba_soc.h"
17 
18 /**
19  * strpbrk - Find the first occurrence of a set of characters
20  * @cs: The string to be searched
21  * @ct: The characters to search for
22  */
23 LIBC_ROM_TEXT_SECTION
_strpbrk(const char * cs,const char * ct)24 _LONG_CALL_ char *_strpbrk(const char *cs, const char *ct)
25 {
26         const char *sc1, *sc2;
27 
28         for (sc1 = cs; *sc1 != '\0'; ++sc1) {
29                 for (sc2 = ct; *sc2 != '\0'; ++sc2) {
30                         if (*sc1 == *sc2)
31                                 return (char *)sc1;
32                 }
33         }
34         return NULL;
35 }
36 
37