Import upstream version 1.27
[debian/tar] / gnu / c-strcase.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Case-insensitive string comparison functions in C locale.
4    Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2013 Free Software
5    Foundation, Inc.
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3, or (at your option)
10    any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
19
20 #ifndef C_STRCASE_H
21 #define C_STRCASE_H
22
23 #include <stddef.h>
24
25
26 /* The functions defined in this file assume the "C" locale and a character
27    set without diacritics (ASCII-US or EBCDIC-US or something like that).
28    Even if the "C" locale on a particular system is an extension of the ASCII
29    character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
30    is ISO-8859-1), the functions in this file recognize only the ASCII
31    characters.  More precisely, one of the string arguments must be an ASCII
32    string; the other one can also contain non-ASCII characters (but then
33    the comparison result will be nonzero).  */
34
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40
41 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
42    greater than zero if S1 is lexicographically less than, equal to or greater
43    than S2.  */
44 extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE;
45
46 /* Compare no more than N characters of strings S1 and S2, ignoring case,
47    returning less than, equal to or greater than zero if S1 is
48    lexicographically less than, equal to or greater than S2.  */
49 extern int c_strncasecmp (const char *s1, const char *s2, size_t n)
50   _GL_ATTRIBUTE_PURE;
51
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57
58 #endif /* C_STRCASE_H */