Index: squid/lib/radix.c diff -c squid/lib/radix.c:1.16 squid/lib/radix.c:1.16.2.1 *** squid/lib/radix.c:1.16 Tue Nov 13 12:24:34 2001 --- squid/lib/radix.c Wed Jun 18 17:53:34 2003 *************** *** 113,121 **** #include "radix.h" int squid_max_keylen; struct squid_radix_mask *squid_rn_mkfreelist; ! struct squid_radix_node_head *squid_mask_rnhead; static char *addmask_key; static unsigned char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF}; --- 113,127 ---- #include "radix.h" + int squid_max_keylen; struct squid_radix_mask *squid_rn_mkfreelist; ! /* Silly construct to get rid of GCC-3.3 warning about type-punning */ ! union { ! struct squid_radix_node_head *rn; ! void *ptr; ! } squid_mask_rnhead_u; ! #define squid_mask_rnhead squid_mask_rnhead_u.rn static char *addmask_key; static unsigned char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF}; *************** *** 981,987 **** addmask_key = cplim = rn_ones + squid_max_keylen; while (cp < cplim) *cp++ = -1; ! if (squid_rn_inithead((void **) &squid_mask_rnhead, 0) == 0) { fprintf(stderr, "rn_init2 failed.\n"); exit(-1); } --- 987,993 ---- addmask_key = cplim = rn_ones + squid_max_keylen; while (cp < cplim) *cp++ = -1; ! if (squid_rn_inithead(&squid_mask_rnhead_u.ptr, 0) == 0) { fprintf(stderr, "rn_init2 failed.\n"); exit(-1); } Index: squid/lib/rfc1738.c diff -c squid/lib/rfc1738.c:1.23 squid/lib/rfc1738.c:1.23.2.1 *** squid/lib/rfc1738.c:1.23 Wed Feb 7 11:56:51 2001 --- squid/lib/rfc1738.c Wed Jun 18 17:53:34 2003 *************** *** 128,135 **** do_escape = 1; } /* RFC 1738 says any non-US-ASCII are encoded */ ! if (((unsigned char) *p>= (unsigned char) 0x80) && ! ((unsigned char) *p <= (unsigned char) 0xFF)) { do_escape = 1; } /* Do the triplet encoding, or just copy the char */ --- 128,134 ---- do_escape = 1; } /* RFC 1738 says any non-US-ASCII are encoded */ ! if (((unsigned char) *p>= (unsigned char) 0x80)) { do_escape = 1; } /* Do the triplet encoding, or just copy the char */ Index: squid/src/asn.c diff -c squid/src/asn.c:1.78 squid/src/asn.c:1.78.2.1 *** squid/src/asn.c:1.78 Tue Nov 13 12:24:35 2001 --- squid/src/asn.c Wed Jun 18 17:53:34 2003 *************** *** 50,56 **** /* END of definitions for radix tree entries */ /* Head for ip to asn radix tree */ ! struct squid_radix_node_head *AS_tree_head; /* * Structure for as number information. it could be simply --- 50,62 ---- /* END of definitions for radix tree entries */ /* Head for ip to asn radix tree */ ! /* Silly union construct to get rid of GCC-3.3 warning */ ! union { ! struct squid_radix_node_head *rn; ! void *ptr; ! } AS_tree_head_u; ! ! #define AS_tree_head AS_tree_head_u.rn /* * Structure for as number information. it could be simply *************** *** 160,166 **** CBDATA_INIT_TYPE(ASState); if (0 == inited++) squid_rn_init(); ! squid_rn_inithead((void **) &AS_tree_head, 8); asnAclInitialize(Config.aclList); cachemgrRegister("asndb", "AS Number Database", asnStats, 0, 1); } --- 166,172 ---- CBDATA_INIT_TYPE(ASState); if (0 == inited++) squid_rn_init(); ! squid_rn_inithead(&AS_tree_head_u.ptr, 8); asnAclInitialize(Config.aclList); cachemgrRegister("asndb", "AS Number Database", asnStats, 0, 1); } Index: squid/src/delay_pools.c diff -c squid/src/delay_pools.c:1.19.2.7 squid/src/delay_pools.c:1.19.2.8 *** squid/src/delay_pools.c:1.19.2.7 Sun Mar 9 11:41:27 2003 --- squid/src/delay_pools.c Wed Jun 18 17:53:35 2003 *************** *** 397,403 **** position |= 255; if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) { delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8)); - assert(position < C3_IND_SZ); delay_data[pool].class3->individual[position] = (int) (((double) Config.Delay.rates[pool]->individual.max_bytes * Config.Delay.initial) / 100); --- 397,402 ---- *************** *** 415,421 **** assert(j < (IND_MAP_SZ - 1)); delay_data[pool].class3->individual_map[i][j + 1] = 255; position |= j; - assert(position < C3_IND_SZ); delay_data[pool].class3->individual[position] = (int) (((double) Config.Delay.rates[pool]->individual.max_bytes * Config.Delay.initial) / 100); --- 414,419 ---- Index: squid/src/snmp_core.c diff -c squid/src/snmp_core.c:1.51.2.2 squid/src/snmp_core.c:1.51.2.3 *** squid/src/snmp_core.c:1.51.2.2 Thu Feb 14 12:02:17 2002 --- squid/src/snmp_core.c Wed Jun 18 17:53:35 2003 *************** *** 607,616 **** return (Answer); } else if (PDU->command == SNMP_PDU_GETNEXT) { oid *NextOidName = NULL; ! int NextOidNameLen = 0; ParseFn = snmpTreeNext(PDU->variables->name, PDU->variables->name_length, ! &(NextOidName), (snint *) & NextOidNameLen); if (ParseFn == NULL) { Answer->errstat = SNMP_ERR_NOSUCHNAME; --- 607,616 ---- return (Answer); } else if (PDU->command == SNMP_PDU_GETNEXT) { oid *NextOidName = NULL; ! snint NextOidNameLen = 0; ParseFn = snmpTreeNext(PDU->variables->name, PDU->variables->name_length, ! &NextOidName, &NextOidNameLen); if (ParseFn == NULL) { Answer->errstat = SNMP_ERR_NOSUCHNAME; Index: squid/lib/GNUregex.c diff -c squid/lib/GNUregex.c:1.12 squid/lib/GNUregex.c:1.12.2.1 *** squid/lib/GNUregex.c:1.12 Sun Jan 7 02:55:22 2001 --- squid/lib/GNUregex.c Thu Jun 19 18:09:06 2003 *************** *** 87,93 **** static char re_syntax_table[CHAR_SET_SIZE]; static void ! init_syntax_once() { register int c; static int done = 0; --- 87,93 ---- static char re_syntax_table[CHAR_SET_SIZE]; static void ! init_syntax_once(void) { register int c; static int done = 0; *************** *** 819,830 **** /* Subroutine declarations and macros for regex_compile. */ - static void store_op1(), store_op2(); - static void insert_op1(), insert_op2(); - static boolean at_begline_loc_p(), at_endline_loc_p(); - static boolean group_in_compile_stack(); - static reg_errcode_t compile_range(); - /* Fetch the next character in the uncompiled pattern---translating it * if necessary. Also cast from a signed character in the constant * string passed to us by the user to an unsigned char that we can use --- 819,824 ---- *************** *** 975,980 **** --- 969,982 ---- unsigned avail; /* Offset of next open position. */ } compile_stack_type; + static void store_op1(re_opcode_t op, unsigned char *loc, int arg); + static void store_op2( re_opcode_t op, unsigned char *loc, int arg1, int arg2); + static void insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end); + static void insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end); + static boolean at_begline_loc_p(const char * pattern, const char *p, reg_syntax_t syntax); + static boolean at_endline_loc_p(const char *p, const char *pend, int syntax); + static boolean group_in_compile_stack(compile_stack_type compile_stack, regnum_t regnum); + static reg_errcode_t compile_range(const char **p_ptr, const char *pend, char *translate, reg_syntax_t syntax, unsigned char *b); #define INIT_COMPILE_STACK_SIZE 32 *************** *** 1037,1047 **** * examined nor set. */ static reg_errcode_t ! regex_compile(pattern, size, syntax, bufp) ! const char *pattern; ! int size; ! reg_syntax_t syntax; ! struct re_pattern_buffer *bufp; { /* We fetch characters from PATTERN here. Even though PATTERN is * `char *' (i.e., signed), we declare these variables as unsigned, so --- 1039,1045 ---- * examined nor set. */ static reg_errcode_t ! regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_pattern_buffer *bufp) { /* We fetch characters from PATTERN here. Even though PATTERN is * `char *' (i.e., signed), we declare these variables as unsigned, so *************** *** 1992,2002 **** /* Store OP at LOC followed by two-byte integer parameter ARG. */ ! static void ! store_op1(op, loc, arg) ! re_opcode_t op; ! unsigned char *loc; ! int arg; { *loc = (unsigned char) op; STORE_NUMBER(loc + 1, arg); --- 1990,1996 ---- /* Store OP at LOC followed by two-byte integer parameter ARG. */ ! void store_op1(re_opcode_t op, unsigned char *loc, int arg) { *loc = (unsigned char) op; STORE_NUMBER(loc + 1, arg); *************** *** 2005,2015 **** /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ ! static void ! store_op2(op, loc, arg1, arg2) ! re_opcode_t op; ! unsigned char *loc; ! int arg1, arg2; { *loc = (unsigned char) op; STORE_NUMBER(loc + 1, arg1); --- 1999,2006 ---- /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ ! void ! store_op2( re_opcode_t op, unsigned char *loc, int arg1, int arg2) { *loc = (unsigned char) op; STORE_NUMBER(loc + 1, arg1); *************** *** 2020,2031 **** /* Copy the bytes from LOC to END to open up three bytes of space at LOC * for OP followed by two-byte integer parameter ARG. */ ! static void ! insert_op1(op, loc, arg, end) ! re_opcode_t op; ! unsigned char *loc; ! int arg; ! unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 3; --- 2011,2018 ---- /* Copy the bytes from LOC to END to open up three bytes of space at LOC * for OP followed by two-byte integer parameter ARG. */ ! void ! insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) { register unsigned char *pfrom = end; register unsigned char *pto = end + 3; *************** *** 2039,2050 **** /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ ! static void ! insert_op2(op, loc, arg1, arg2, end) ! re_opcode_t op; ! unsigned char *loc; ! int arg1, arg2; ! unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; --- 2026,2033 ---- /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ ! void ! insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; *************** *** 2060,2069 **** * after an alternative or a begin-subexpression. We assume there is at * least one character before the ^. */ ! static boolean ! at_begline_loc_p(pattern, p, syntax) ! const char *pattern, *p; ! reg_syntax_t syntax; { const char *prev = p - 2; boolean prev_prev_backslash = prev> pattern && prev[-1] == '\\'; --- 2043,2050 ---- * after an alternative or a begin-subexpression. We assume there is at * least one character before the ^. */ ! boolean ! at_begline_loc_p(const char * pattern, const char *p, reg_syntax_t syntax) { const char *prev = p - 2; boolean prev_prev_backslash = prev> pattern && prev[-1] == '\\'; *************** *** 2079,2088 **** /* The dual of at_begline_loc_p. This one is for $. We assume there is * at least one character after the ,ドル i.e., `P < PEND'. */ ! static boolean ! at_endline_loc_p(p, pend, syntax) ! const char *p, *pend; ! int syntax; { const char *next = p; boolean next_backslash = *next == '\\'; --- 2060,2067 ---- /* The dual of at_begline_loc_p. This one is for $. We assume there is * at least one character after the ,ドル i.e., `P < PEND'. */ ! boolean ! at_endline_loc_p(const char *p, const char *pend, int syntax) { const char *next = p; boolean next_backslash = *next == '\\'; *************** *** 2101,2110 **** /* Returns true if REGNUM is in one of COMPILE_STACK's elements and * false if it's not. */ ! static boolean ! group_in_compile_stack(compile_stack, regnum) ! compile_stack_type compile_stack; ! regnum_t regnum; { int this_element; --- 2080,2087 ---- /* Returns true if REGNUM is in one of COMPILE_STACK's elements and * false if it's not. */ ! boolean ! group_in_compile_stack(compile_stack_type compile_stack, regnum_t regnum) { int this_element; *************** *** 2129,2140 **** * We use these short variable names so we can use the same macros as * `regex_compile' itself. */ ! static reg_errcode_t ! compile_range(p_ptr, pend, translate, syntax, b) ! const char **p_ptr, *pend; ! char *translate; ! reg_syntax_t syntax; ! unsigned char *b; { unsigned this_char; --- 2106,2113 ---- * We use these short variable names so we can use the same macros as * `regex_compile' itself. */ ! reg_errcode_t ! compile_range(const char **p_ptr, const char *pend, char *translate, reg_syntax_t syntax, unsigned char *b) { unsigned this_char; *************** *** 2900,2909 **** /* Declarations and macros for re_match_2. */ - static int bcmp_translate(); - static boolean alt_match_null_string_p(), common_op_match_null_string_p(), - group_match_null_string_p(); - /* Structure for per-register (a.k.a. per-group) information. * This must not be longer than one word, because we push this value * onto the failure stack. Other register information, such as the --- 2873,2878 ---- *************** *** 2927,2932 **** --- 2896,2905 ---- unsigned ever_matched_something:1; } bits; } register_info_type; + static boolean alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type *reg_info); + static boolean common_op_match_null_string_p( unsigned char **p, unsigned char *end, register_info_type *reg_info); + static int bcmp_translate(unsigned char const *s1, unsigned char const *s2, register int len, char *translate); + static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info); #define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p) #define IS_ACTIVE(R) ((R).bits.is_active) *************** *** 4175,4181 **** /* Subroutine definitions for re_match_2. */ - /* We are passed P pointing to a register number after a start_memory. * * Return true if the pattern up to the corresponding stop_memory can --- 4148,4153 ---- *************** *** 4186,4195 **** * * We don't handle duplicates properly (yet). */ ! static boolean ! group_match_null_string_p(p, end, reg_info) ! unsigned char **p, *end; ! register_info_type *reg_info; { int mcnt; /* Point to after the args to the start_memory. */ --- 4158,4165 ---- * * We don't handle duplicates properly (yet). */ ! boolean ! group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info) { int mcnt; /* Point to after the args to the start_memory. */ *************** *** 4290,4299 **** * It expects P to be the first byte of a single alternative and END one * byte past the last. The alternative can contain groups. */ ! static boolean ! alt_match_null_string_p(p, end, reg_info) ! unsigned char *p, *end; ! register_info_type *reg_info; { int mcnt; unsigned char *p1 = p; --- 4260,4267 ---- * It expects P to be the first byte of a single alternative and END one * byte past the last. The alternative can contain groups. */ ! boolean ! alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type *reg_info) { int mcnt; unsigned char *p1 = p; *************** *** 4325,4334 **** * * Sets P to one after the op and its arguments, if any. */ ! static boolean ! common_op_match_null_string_p(p, end, reg_info) ! unsigned char **p, *end; ! register_info_type *reg_info; { int mcnt; boolean ret; --- 4293,4300 ---- * * Sets P to one after the op and its arguments, if any. */ ! boolean ! common_op_match_null_string_p( unsigned char **p, unsigned char *end, register_info_type *reg_info) { int mcnt; boolean ret; *************** *** 4410,4422 **** /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN * bytes; nonzero otherwise. */ ! static int ! bcmp_translate(s1, s2, len, translate) ! unsigned char *s1, *s2; ! register int len; ! char *translate; { ! register unsigned char *p1 = s1, *p2 = s2; while (len) { if (translate[*p1++] != translate[*p2++]) return 1; --- 4376,4385 ---- /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN * bytes; nonzero otherwise. */ ! int ! bcmp_translate(unsigned char const *s1, unsigned char const*s2, register int len, char *translate) { ! register unsigned char const *p1 = s1, *p2 = s2; while (len) { if (translate[*p1++] != translate[*p2++]) return 1;

AltStyle によって変換されたページ (->オリジナル) /