annotate lib/c-strcase.h @ 9268:a553c18c572d

Rename sys_time_.h to sys_time.in.h.
author Bruno Haible <bruno@clisp.org>
date Tue, 02 Oct 2007 00:37:40 +0200
parents dbf2af5391cd
children b5e42ef33b49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6359
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Case-insensitive string comparison functions in C locale.
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc.
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 #ifndef C_STRCASE_H
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #define C_STRCASE_H
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include <stddef.h>
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 /* The functions defined in this file assume the "C" locale and a character
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 set without diacritics (ASCII-US or EBCDIC-US or something like that).
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 Even if the "C" locale on a particular system is an extension of the ASCII
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 is ISO-8859-1), the functions in this file recognize only the ASCII
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 characters. More precisely, one of the string arguments must be an ASCII
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 string; the other one can also contain non-ASCII characters (but then
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 the comparison result will be nonzero). */
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 #ifdef __cplusplus
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 extern "C" {
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #endif
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 greater than zero if S1 is lexicographically less than, equal to or greater
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 than S2. */
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 extern int c_strcasecmp (const char *s1, const char *s2);
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 /* Compare no more than N characters of strings S1 and S2, ignoring case,
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 returning less than, equal to or greater than zero if S1 is
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 lexicographically less than, equal to or greater than S2. */
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 extern int c_strncasecmp (const char *s1, const char *s2, size_t n);
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 #ifdef __cplusplus
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 }
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 #endif
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54
dbf2af5391cd New module 'c-strcase'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 #endif /* C_STRCASE_H */