1 #define SUBSYSTEM APPLICATION_EXEC "_ribbon: "
2 
3 #if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8
4 #define STRCHR_TSTNULL(X) (((X) - 0x0101010101010101) & ~(X) & 0x8080808080808080)
5 #else
6 #define STRCHR_TSTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
7 #endif
8 
9 #define STRCHR_UNALIGN(X) ((long) X & (sizeof(long) - 1))
10 #define STRCHR_TSTCHAR(X, M) (STRCHR_TSTNULL(X ^ M))
11 
12 #define str_boyermoore_max(a, b) ((a < b) ? b : a)
13 #define utf8_len_mask ((size_t) (-1) / 0xff)
14 
15 static char *itoa_str = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz";
16 
17 static void str_boyermoore_it1(long *, char *, long);
18 static void str_boyermoore_it2(long *, char *, long);
19 static long str_boyermoore_suflen(char *, long, long);
20 static long str_boyermoore_ispref(char *, long, long);
21 
22 static size_t ascii_len(const char *);
23 static size_t utf8_len(const char *);
24 static size_t utf32_len(const char *);
25 static int ascii_len_cb(unsigned int) __UNUSED__;
26