summaryrefslogtreecommitdiffstats
path: root/gl/streq.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/streq.h')
-rw-r--r--gl/streq.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gl/streq.h b/gl/streq.h
index aa65bb8..12c1867 100644
--- a/gl/streq.h
+++ b/gl/streq.h
@@ -1,5 +1,5 @@
1/* Optimized string comparison. 1/* Optimized string comparison.
2 Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc. 2 Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify it 4 This program is free software: you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published 5 under the terms of the GNU General Public License as published
@@ -9,7 +9,7 @@
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details. 12 General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -21,8 +21,8 @@
21 21
22#include <string.h> 22#include <string.h>
23 23
24/* STREQ allows to optimize string comparison with a small literal string. 24/* STREQ_OPT allows to optimize string comparison with a small literal string.
25 STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) 25 STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
26 is semantically equivalent to 26 is semantically equivalent to
27 strcmp (s, "EUC-KR") == 0 27 strcmp (s, "EUC-KR") == 0
28 just faster. */ 28 just faster. */
@@ -163,12 +163,12 @@ streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23,
163 return 0; 163 return 0;
164} 164}
165 165
166#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ 166#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
167 streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) 167 streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
168 168
169#else 169#else
170 170
171#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ 171#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
172 (strcmp (s1, s2) == 0) 172 (strcmp (s1, s2) == 0)
173 173
174#endif 174#endif