~ubuntu-branches/ubuntu/vivid/libdap/vivid

« back to all changes in this revision

Viewing changes to gl/streq.h

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2013-10-17 22:12:11 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20131017221211-re1r37k4d6wrtmeq
Tags: 3.12.0-1
* New upstream release.
  - No longer need curl-types-remove.patch 
* Add debian/watch file.
* Fix typo in hardening flags; Change  to =all,-pie ; 
  Use DEB_LDFLAGS_MAINT_APPEND. Closes: #697387.
* Enable parallel build. Closes: #723938.
* Depend on libcurl4-gnutls-dev | libcurl-dev. Closes: #722701.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Optimized string comparison.
2
 
   Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify it
5
5
   under the terms of the GNU Lesser General Public License as published
21
21
 
22
22
#include <string.h>
23
23
 
24
 
/* STREQ allows to optimize string comparison with a small literal string.
25
 
     STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
 
24
/* STREQ_OPT allows to optimize string comparison with a small literal string.
 
25
     STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
26
26
   is semantically equivalent to
27
27
     strcmp (s, "EUC-KR") == 0
28
28
   just faster.  */
163
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
167
  streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
168
168
 
169
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
172
  (strcmp (s1, s2) == 0)
173
173
 
174
174
#endif