diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/streq.h | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/streq.h')
-rw-r--r-- | gl/streq.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |