Mercurial > hg > nginx-quic
comparison src/core/ngx_string.h @ 2655:87e1fcd9b604 stable-0.6
r2202, r2408, r2425, r2454, r2459, r2482, r2504, r2542, r2565, r2579,
r2580, r2585, r2586, r2587, r2591, r2626 merge:
try_files
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 02 Apr 2009 06:44:45 +0000 |
parents | d7d3a72c07d8 |
children |
comparison
equal
deleted
inserted
replaced
2654:96b878c984f4 | 2655:87e1fcd9b604 |
---|---|
50 /* msvc and icc7 compile strcmp() to inline loop */ | 50 /* msvc and icc7 compile strcmp() to inline loop */ |
51 #define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2) | 51 #define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2) |
52 | 52 |
53 | 53 |
54 #define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) | 54 #define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) |
55 #define ngx_strlen(s) strlen((const char *) s) | |
56 | |
55 #define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) | 57 #define ngx_strchr(s1, c) strchr((const char *) s1, (int) c) |
56 #define ngx_strlen(s) strlen((const char *) s) | 58 |
59 static ngx_inline u_char * | |
60 ngx_strlchr(u_char *p, u_char *last, u_char c) | |
61 { | |
62 while (p < last) { | |
63 | |
64 if (*p == c) { | |
65 return p; | |
66 } | |
67 | |
68 p++; | |
69 } | |
70 | |
71 return NULL; | |
72 } | |
57 | 73 |
58 | 74 |
59 /* | 75 /* |
60 * msvc and icc7 compile memset() to the inline "rep stos" | 76 * msvc and icc7 compile memset() to the inline "rep stos" |
61 * while ZeroMemory() and bzero() are the calls. | 77 * while ZeroMemory() and bzero() are the calls. |