mturk 2002/10/22 03:06:55 Modified: jk/native2/common jk_map.c Log: Fix the stupid MSVC CR+LF line endings. Revision Changes Path 1.23 +39 -39 jakarta-tomcat-connectors/jk/native2/common/jk_map.c Index: jk_map.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- jk_map.c 18 Oct 2002 11:45:25 -0000 1.22 +++ jk_map.c 22 Oct 2002 10:06:55 -0000 1.23 @@ -78,40 +78,40 @@ int size; } jk_map_private_t; -#if APR_CHARSET_EBCDIC -#define CASE_MASK 0xbfbfbfbf -#else -#define CASE_MASK 0xdfdfdfdf -#endif - -/* Compute the "checksum" for a key, consisting of the first - * 4 bytes, normalized for case-insensitivity and packed into - * an int...this checksum allows us to do a single integer - * comparison as a fast check to determine whether we can - * skip a strcasecmp - */ -#define COMPUTE_KEY_CHECKSUM(key, checksum) \ -{ \ - const char *k = (key); \ - apr_uint32_t c = (apr_uint32_t)*k; \ - (checksum) = c; \ - (checksum) <<= 8; \ - if (c) { \ - c = (apr_uint32_t)*++k; \ - checksum |= c; \ - } \ - (checksum) <<= 8; \ - if (c) { \ - c = (apr_uint32_t)*++k; \ - checksum |= c; \ - } \ - (checksum) <<= 8; \ - if (c) { \ - c = (apr_uint32_t)*++k; \ - checksum |= c; \ - } \ - checksum &= CASE_MASK; \ -} +#if APR_CHARSET_EBCDIC +#define CASE_MASK 0xbfbfbfbf +#else +#define CASE_MASK 0xdfdfdfdf +#endif + +/* Compute the "checksum" for a key, consisting of the first + * 4 bytes, normalized for case-insensitivity and packed into + * an int...this checksum allows us to do a single integer + * comparison as a fast check to determine whether we can + * skip a strcasecmp + */ +#define COMPUTE_KEY_CHECKSUM(key, checksum) \ +{ \ + const char *k = (key); \ + apr_uint32_t c = (apr_uint32_t)*k; \ + (checksum) = c; \ + (checksum) <<= 8; \ + if (c) { \ + c = (apr_uint32_t)*++k; \ + checksum |= c; \ + } \ + (checksum) <<= 8; \ + if (c) { \ + c = (apr_uint32_t)*++k; \ + checksum |= c; \ + } \ + (checksum) <<= 8; \ + if (c) { \ + c = (apr_uint32_t)*++k; \ + checksum |= c; \ + } \ + checksum &= CASE_MASK; \ +} static void *jk2_map_default_get(jk_env_t *env, jk_map_t *m, const char *name) @@ -124,7 +124,7 @@ return NULL; mPriv=(jk_map_private_t *)m->_private; - COMPUTE_KEY_CHECKSUM(name, checksum); + COMPUTE_KEY_CHECKSUM(name, checksum); for(i = 0 ; i < mPriv->size ; i++) { if (mPriv->keys[i] == checksum && @@ -198,7 +198,7 @@ mPriv=(jk_map_private_t *)m->_private; - COMPUTE_KEY_CHECKSUM(name, checksum); + COMPUTE_KEY_CHECKSUM(name, checksum); for(i = 0 ; i < mPriv->size ; i++) { if (mPriv->keys[i] == checksum && @@ -248,8 +248,8 @@ if(mPriv->size < mPriv->capacity) { apr_uint32_t checksum; - - COMPUTE_KEY_CHECKSUM(name, checksum); + + COMPUTE_KEY_CHECKSUM(name, checksum); mPriv->values[mPriv->size] = value; /* XXX this is wrong - either we take ownership and copy both name and value,
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>