xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/strings.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi /* Copyright (C) 1991,92,96,97,99,2000,2001 Free Software Foundation, Inc.
2*53ee8cc1Swenshuai.xi    This file is part of the GNU C Library.
3*53ee8cc1Swenshuai.xi 
4*53ee8cc1Swenshuai.xi    The GNU C Library is free software; you can redistribute it and/or
5*53ee8cc1Swenshuai.xi    modify it under the terms of the GNU Lesser General Public
6*53ee8cc1Swenshuai.xi    License as published by the Free Software Foundation; either
7*53ee8cc1Swenshuai.xi    version 2.1 of the License, or (at your option) any later version.
8*53ee8cc1Swenshuai.xi 
9*53ee8cc1Swenshuai.xi    The GNU C Library is distributed in the hope that it will be useful,
10*53ee8cc1Swenshuai.xi    but WITHOUT ANY WARRANTY; without even the implied warranty of
11*53ee8cc1Swenshuai.xi    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*53ee8cc1Swenshuai.xi    Lesser General Public License for more details.
13*53ee8cc1Swenshuai.xi 
14*53ee8cc1Swenshuai.xi    You should have received a copy of the GNU Lesser General Public
15*53ee8cc1Swenshuai.xi    License along with the GNU C Library; if not, write to the Free
16*53ee8cc1Swenshuai.xi    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17*53ee8cc1Swenshuai.xi    02111-1307 USA.  */
18*53ee8cc1Swenshuai.xi 
19*53ee8cc1Swenshuai.xi #ifndef	_STRINGS_H
20*53ee8cc1Swenshuai.xi #define	_STRINGS_H	1
21*53ee8cc1Swenshuai.xi 
22*53ee8cc1Swenshuai.xi /* We don't need and should not read this file if <string.h> was already
23*53ee8cc1Swenshuai.xi    read. The one exception being that if __USE_BSD isn't defined, then
24*53ee8cc1Swenshuai.xi    these aren't defined in string.h, so we need to define them here.  */
25*53ee8cc1Swenshuai.xi #if !defined _STRING_H || !defined __USE_BSD
26*53ee8cc1Swenshuai.xi 
27*53ee8cc1Swenshuai.xi # include <features.h>
28*53ee8cc1Swenshuai.xi # define __need_size_t
29*53ee8cc1Swenshuai.xi # include <stddef.h>
30*53ee8cc1Swenshuai.xi 
31*53ee8cc1Swenshuai.xi __BEGIN_DECLS
32*53ee8cc1Swenshuai.xi 
33*53ee8cc1Swenshuai.xi /* Compare N bytes of S1 and S2 (same as memcmp).  */
34*53ee8cc1Swenshuai.xi extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
35*53ee8cc1Swenshuai.xi      __THROW __attribute_pure__;
36*53ee8cc1Swenshuai.xi 
37*53ee8cc1Swenshuai.xi /* Copy N bytes of SRC to DEST (like memmove, but args reversed).  */
38*53ee8cc1Swenshuai.xi extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW;
39*53ee8cc1Swenshuai.xi 
40*53ee8cc1Swenshuai.xi /* Set N bytes of S to 0.  */
41*53ee8cc1Swenshuai.xi extern void bzero (void *__s, size_t __n) __THROW;
42*53ee8cc1Swenshuai.xi 
43*53ee8cc1Swenshuai.xi /* Return the position of the first bit set in I, or 0 if none are set.
44*53ee8cc1Swenshuai.xi    The least-significant bit is position 1, the most-significant 32.  */
45*53ee8cc1Swenshuai.xi extern int ffs (int __i) __THROW __attribute__ ((const));
46*53ee8cc1Swenshuai.xi 
47*53ee8cc1Swenshuai.xi /* Find the first occurrence of C in S (same as strchr).  */
48*53ee8cc1Swenshuai.xi extern char *index (__const char *__s, int __c) __THROW __attribute_pure__;
49*53ee8cc1Swenshuai.xi 
50*53ee8cc1Swenshuai.xi /* Find the last occurrence of C in S (same as strrchr).  */
51*53ee8cc1Swenshuai.xi extern char *rindex (__const char *__s, int __c) __THROW __attribute_pure__;
52*53ee8cc1Swenshuai.xi 
53*53ee8cc1Swenshuai.xi /* Compare S1 and S2, ignoring case.  */
54*53ee8cc1Swenshuai.xi extern int strcasecmp (__const char *__s1, __const char *__s2)
55*53ee8cc1Swenshuai.xi      __THROW __attribute_pure__;
56*53ee8cc1Swenshuai.xi 
57*53ee8cc1Swenshuai.xi /* Compare no more than N chars of S1 and S2, ignoring case.  */
58*53ee8cc1Swenshuai.xi extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
59*53ee8cc1Swenshuai.xi      __THROW __attribute_pure__;
60*53ee8cc1Swenshuai.xi 
61*53ee8cc1Swenshuai.xi __END_DECLS
62*53ee8cc1Swenshuai.xi 
63*53ee8cc1Swenshuai.xi #endif	/* string.h  */
64*53ee8cc1Swenshuai.xi 
65*53ee8cc1Swenshuai.xi #endif	/* strings.h  */
66