Diff for /embedaddon/libiconv/srclib/streq.h between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/05/29 09:29:43 version 1.1.1.3, 2021/03/17 13:38:46
Line 1 Line 1
 /* Optimized string comparison.  /* Optimized string comparison.
   Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc.   Copyright (C) 2001-2002, 2007, 2009-2019 Free Software Foundation, Inc.
   
    This program is free software: you can redistribute it and/or modify it     This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published     under the terms of the GNU General Public License as published
Line 12 Line 12
    General Public License for more details.     General Public License for more details.
   
    You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
   
 /* Written by Bruno Haible <bruno@clisp.org>.  */  /* Written by Bruno Haible <bruno@clisp.org>.  */
   
Line 21 Line 21
   
 #include <string.h>  #include <string.h>
   
/* STREQ allows to optimize string comparison with a small literal string./* STREQ_OPT allows to optimize string comparison with a small literal string.
     STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)     STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
    is semantically equivalent to     is semantically equivalent to
      strcmp (s, "EUC-KR") == 0       strcmp (s, "EUC-KR") == 0
    just faster.  */     just faster.  */
Line 163  streq0 (const char *s1, const char *s2, char s20, char Line 163  streq0 (const char *s1, const char *s2, char s20, char
     return 0;      return 0;
 }  }
   
#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)    streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
   
 #else  #else
   
#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   (strcmp (s1, s2) == 0)    (strcmp (s1, s2) == 0)
   
 #endif  #endif

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>