pike.git / src / pike_search_engine2.c

version» Context lines:

pike.git/src/pike_search_engine2.c:2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      /*    * NCHAR = Needle character    * HCHAR = Haystack character    */    - static INLINE HCHAR *NameNH(MEMCHR)(HCHAR *p, NCHAR c, ptrdiff_t e) + static inline HCHAR *NameNH(MEMCHR)(HCHAR *p, NCHAR c, ptrdiff_t e)   {   #if NSHIFT > HSHIFT    if(c > (1<<(8*HSHIFT))) return 0;   #endif    return NameH(MEMCHR)(p,c,e);   }       - static INLINE int NameNH(MEMCMP)(NCHAR *a, HCHAR *b, ptrdiff_t e) + static inline int NameNH(MEMCMP)(NCHAR *a, HCHAR *b, ptrdiff_t e)   {   #if NSHIFT == HSHIFT    return memcmp(a, b, sizeof(HCHAR)*e);   #else    for(;e;e--,b++,a++)    {    if(*b!=*a)    {    if(*b<*a) return -1;    if(*b>*a) return 1;
pike.git/src/pike_search_engine2.c:42:   {    return NameNH(MEMCHR)(haystack,    (NCHAR)(ptrdiff_t) PTR_TO_INT(data),    haystacklen);   }         #ifndef DEBUG_CLANG   static /* works around clang 3.0 compilation/linking error. */   #endif - INLINE HCHAR *NameNH(memchr_memcmp)(NCHAR *needle, + inline HCHAR *NameNH(memchr_memcmp)(NCHAR *needle,    ptrdiff_t needlelen,    HCHAR *haystack,    ptrdiff_t haystacklen)   {    NCHAR c;    HCHAR *end;       if(needlelen > haystacklen) return 0;       end=haystack + haystacklen - needlelen+1;