From: Source Maintenance Date: Sat, 20 Dec 2014 12:12:02 +0000 (+0000) Subject: SourceFormat Enforcement X-Git-Tag: merge-candidate-3-v1~418 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f53969cc1ff3aecd36eeb25487e8f668862ed49e;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/compat/GnuRegex.c b/compat/GnuRegex.c index bc0b2d4a97..a6da5a98ff 100644 --- a/compat/GnuRegex.c +++ b/compat/GnuRegex.c @@ -194,7 +194,7 @@ static int re_match_2(struct re_pattern_buffer * buffer, const char *string1, #if HAVE_ALLOCA_H #include #else /* not __GNUC__ or HAVE_ALLOCA_H */ -#ifndef _AIX /* Already did AIX, up at the top. */ +#ifndef _AIX /* Already did AIX, up at the top. */ char *alloca(); #endif /* not _AIX */ #endif /* not HAVE_ALLOCA_H */ @@ -205,9 +205,9 @@ char *alloca(); #define REGEX_ALLOCATE alloca /* Assumes a `char *destination' variable. */ -#define REGEX_REALLOCATE(source, osize, nsize) \ - (destination = (char *) alloca (nsize), \ - memcpy (destination, source, osize), \ +#define REGEX_REALLOCATE(source, osize, nsize) \ + (destination = (char *) alloca (nsize), \ + memcpy (destination, source, osize), \ destination) #endif /* not REGEX_MALLOC */ @@ -215,7 +215,7 @@ char *alloca(); /* True if `size1' is non-NULL and PTR is pointing anywhere inside * `string1' or just past its end. This works if PTR is NULL, which is * a good thing. */ -#define FIRST_STRING_P(ptr) \ +#define FIRST_STRING_P(ptr) \ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) /* (Re)Allocate N items of type T using malloc, or fail. */ @@ -223,11 +223,11 @@ char *alloca(); #define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) #define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) -#define BYTEWIDTH 8 /* In bits. */ +#define BYTEWIDTH 8 /* In bits. */ #define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) -#if !defined(__MINGW32__) /* MinGW defines boolean */ +#if !defined(__MINGW32__) /* MinGW defines boolean */ typedef char boolean; #endif #define false 0 @@ -348,14 +348,14 @@ typedef enum { * bytes of number. */ set_number_at, - wordchar, /* Matches any word-constituent character. */ - notwordchar, /* Matches any char that is not a word-constituent. */ + wordchar, /* Matches any word-constituent character. */ + notwordchar, /* Matches any char that is not a word-constituent. */ - wordbeg, /* Succeeds if at word beginning. */ - wordend, /* Succeeds if at word end. */ + wordbeg, /* Succeeds if at word beginning. */ + wordend, /* Succeeds if at word end. */ - wordbound, /* Succeeds if at a word boundary. */ - notwordbound /* Succeeds if not at a word boundary. */ + wordbound, /* Succeeds if at a word boundary. */ + notwordbound /* Succeeds if not at a word boundary. */ } re_opcode_t; @@ -363,29 +363,29 @@ typedef enum { /* Store NUMBER in two contiguous bytes starting at DESTINATION. */ -#define STORE_NUMBER(destination, number) \ - do { \ - (destination)[0] = (number) & 0377; \ - (destination)[1] = (number) >> 8; \ +#define STORE_NUMBER(destination, number) \ + do { \ + (destination)[0] = (number) & 0377; \ + (destination)[1] = (number) >> 8; \ } while (0) /* Same as STORE_NUMBER, except increment DESTINATION to * the byte after where the number is stored. Therefore, DESTINATION * must be an lvalue. */ -#define STORE_NUMBER_AND_INCR(destination, number) \ - do { \ - STORE_NUMBER (destination, number); \ - (destination) += 2; \ +#define STORE_NUMBER_AND_INCR(destination, number) \ + do { \ + STORE_NUMBER (destination, number); \ + (destination) += 2; \ } while (0) /* Put into DESTINATION a number stored in two contiguous bytes starting * at SOURCE. */ -#define EXTRACT_NUMBER(destination, source) \ - do { \ - (destination) = *(source) & 0377; \ - (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \ +#define EXTRACT_NUMBER(destination, source) \ + do { \ + (destination) = *(source) & 0377; \ + (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \ } while (0) #ifdef DEBUG @@ -399,7 +399,7 @@ unsigned char *source; *dest += temp << 8; } -#ifndef EXTRACT_MACROS /* To debug the macros. */ +#ifndef EXTRACT_MACROS /* To debug the macros. */ #undef EXTRACT_NUMBER #define EXTRACT_NUMBER(dest, src) extract_number (&dest, src) #endif /* not EXTRACT_MACROS */ @@ -409,10 +409,10 @@ unsigned char *source; /* Same as EXTRACT_NUMBER, except increment SOURCE to after the number. * SOURCE must be an lvalue. */ -#define EXTRACT_NUMBER_AND_INCR(destination, source) \ - do { \ - EXTRACT_NUMBER (destination, source); \ - (source) += 2; \ +#define EXTRACT_NUMBER_AND_INCR(destination, source) \ + do { \ + EXTRACT_NUMBER (destination, source); \ + (source) += 2; \ } while (0) #ifdef DEBUG @@ -448,9 +448,9 @@ static int debug = 0; #define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2) #define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3) #define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4) -#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \ +#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \ if (debug) print_partial_compiled_pattern (s, e) -#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ +#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ if (debug) print_double_string (w, s1, sz1, s2, sz2) extern void printchar(); @@ -723,23 +723,23 @@ int size2; /* This table gives an error message for each of the error codes listed * in regex.h. Obviously the order here has to be same as there. */ -static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ - "No match", /* REG_NOMATCH */ - "Invalid regular expression", /* REG_BADPAT */ - "Invalid collation character", /* REG_ECOLLATE */ - "Invalid character class name", /* REG_ECTYPE */ - "Trailing backslash", /* REG_EESCAPE */ - "Invalid back reference", /* REG_ESUBREG */ - "Unmatched [ or [^", /* REG_EBRACK */ - "Unmatched ( or \\(", /* REG_EPAREN */ - "Unmatched \\{", /* REG_EBRACE */ - "Invalid content of \\{\\}", /* REG_BADBR */ - "Invalid range end", /* REG_ERANGE */ - "Memory exhausted", /* REG_ESPACE */ - "Invalid preceding regular expression", /* REG_BADRPT */ - "Premature end of regular expression", /* REG_EEND */ - "Regular expression too big", /* REG_ESIZE */ - "Unmatched ) or \\)", /* REG_ERPAREN */ +static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ + "No match", /* REG_NOMATCH */ + "Invalid regular expression", /* REG_BADPAT */ + "Invalid collation character", /* REG_ECOLLATE */ + "Invalid character class name", /* REG_ECTYPE */ + "Trailing backslash", /* REG_EESCAPE */ + "Invalid back reference", /* REG_ESUBREG */ + "Unmatched [ or [^", /* REG_EBRACK */ + "Unmatched ( or \\(", /* REG_EPAREN */ + "Unmatched \\{", /* REG_EBRACE */ + "Invalid content of \\{\\}", /* REG_BADBR */ + "Invalid range end", /* REG_ERANGE */ + "Memory exhausted", /* REG_ESPACE */ + "Invalid preceding regular expression", /* REG_BADRPT */ + "Premature end of regular expression", /* REG_EEND */ + "Regular expression too big", /* REG_ESIZE */ + "Unmatched ) or \\)", /* REG_ERPAREN */ }; /* Subroutine declarations and macros for regex_compile. */ @@ -748,17 +748,17 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ * 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 * as an array index (in, e.g., `translate'). */ -#define PATFETCH(c) \ - do {if (p == pend) return REG_EEND; \ - c = (unsigned char) *p++; \ - if (translate) c = translate[c]; \ +#define PATFETCH(c) \ + do {if (p == pend) return REG_EEND; \ + c = (unsigned char) *p++; \ + if (translate) c = translate[c]; \ } while (0) /* Fetch the next character in the uncompiled pattern, with no * translation. */ -#define PATFETCH_RAW(c) \ - do {if (p == pend) return REG_EEND; \ - c = (unsigned char) *p++; \ +#define PATFETCH_RAW(c) \ + do {if (p == pend) return REG_EEND; \ + c = (unsigned char) *p++; \ } while (0) /* Go backwards one character in the pattern. */ @@ -776,32 +776,32 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ #define INIT_BUF_SIZE 32 /* Make sure we have at least N more bytes of space in buffer. */ -#define GET_BUFFER_SPACE(n) \ - while (b - bufp->buffer + (n) > bufp->allocated) \ +#define GET_BUFFER_SPACE(n) \ + while (b - bufp->buffer + (n) > bufp->allocated) \ EXTEND_BUFFER () /* Make sure we have one more byte of buffer space and then add C to it. */ -#define BUF_PUSH(c) \ - do { \ - GET_BUFFER_SPACE (1); \ - *b++ = (unsigned char) (c); \ +#define BUF_PUSH(c) \ + do { \ + GET_BUFFER_SPACE (1); \ + *b++ = (unsigned char) (c); \ } while (0) /* Ensure we have two more bytes of buffer space and then append C1 and C2. */ -#define BUF_PUSH_2(c1, c2) \ - do { \ - GET_BUFFER_SPACE (2); \ - *b++ = (unsigned char) (c1); \ - *b++ = (unsigned char) (c2); \ +#define BUF_PUSH_2(c1, c2) \ + do { \ + GET_BUFFER_SPACE (2); \ + *b++ = (unsigned char) (c1); \ + *b++ = (unsigned char) (c2); \ } while (0) /* As with BUF_PUSH_2, except for three bytes. */ -#define BUF_PUSH_3(c1, c2, c3) \ - do { \ - GET_BUFFER_SPACE (3); \ - *b++ = (unsigned char) (c1); \ - *b++ = (unsigned char) (c2); \ - *b++ = (unsigned char) (c3); \ +#define BUF_PUSH_3(c1, c2, c3) \ + do { \ + GET_BUFFER_SPACE (3); \ + *b++ = (unsigned char) (c1); \ + *b++ = (unsigned char) (c2); \ + *b++ = (unsigned char) (c3); \ } while (0) /* Store a jump with opcode OP at LOC to location TO. We store a @@ -830,29 +830,29 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ * reset the pointers that pointed into the old block to point to the * correct places in the new one. If extending the buffer results in it * being larger than MAX_BUF_SIZE, then flag memory exhausted. */ -#define EXTEND_BUFFER() \ - do { \ - unsigned char *old_buffer = bufp->buffer; \ - if (bufp->allocated == MAX_BUF_SIZE) \ - return REG_ESIZE; \ - bufp->allocated <<= 1; \ - if (bufp->allocated > MAX_BUF_SIZE) \ - bufp->allocated = MAX_BUF_SIZE; \ +#define EXTEND_BUFFER() \ + do { \ + unsigned char *old_buffer = bufp->buffer; \ + if (bufp->allocated == MAX_BUF_SIZE) \ + return REG_ESIZE; \ + bufp->allocated <<= 1; \ + if (bufp->allocated > MAX_BUF_SIZE) \ + bufp->allocated = MAX_BUF_SIZE; \ bufp->buffer = (unsigned char *) realloc (bufp->buffer, bufp->allocated);\ - if (bufp->buffer == NULL) \ - return REG_ESPACE; \ - /* If the buffer moved, move all the pointers into it. */ \ - if (old_buffer != bufp->buffer) \ - { \ - b = (b - old_buffer) + bufp->buffer; \ - begalt = (begalt - old_buffer) + bufp->buffer; \ - if (fixup_alt_jump) \ + if (bufp->buffer == NULL) \ + return REG_ESPACE; \ + /* If the buffer moved, move all the pointers into it. */ \ + if (old_buffer != bufp->buffer) \ + { \ + b = (b - old_buffer) + bufp->buffer; \ + begalt = (begalt - old_buffer) + bufp->buffer; \ + if (fixup_alt_jump) \ fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\ - if (laststart) \ - laststart = (laststart - old_buffer) + bufp->buffer; \ - if (pending_exact) \ - pending_exact = (pending_exact - old_buffer) + bufp->buffer; \ - } \ + if (laststart) \ + laststart = (laststart - old_buffer) + bufp->buffer; \ + if (pending_exact) \ + pending_exact = (pending_exact - old_buffer) + bufp->buffer; \ + } \ } while (0) /* Since we have one byte reserved for the register number argument to @@ -881,7 +881,7 @@ typedef struct { typedef struct { compile_stack_elt_t *stack; unsigned size; - unsigned avail; /* Offset of next open position. */ + unsigned avail; /* Offset of next open position. */ } compile_stack_type; static void store_op1(re_opcode_t op, unsigned char *loc, int arg); @@ -904,30 +904,30 @@ static reg_errcode_t compile_range(const char **p_ptr, const char *pend, char *t |= 1 << (((unsigned char) c) % BYTEWIDTH)) /* Get the next unsigned number in the uncompiled pattern. */ -#define GET_UNSIGNED_NUMBER(num) \ - { if (p != pend) \ - { \ - PATFETCH (c); \ - while (ISDIGIT (c)) \ - { \ - if (num < 0) \ - num = 0; \ - num = num * 10 + c - '0'; \ - if (p == pend) \ - break; \ - PATFETCH (c); \ - } \ - } \ +#define GET_UNSIGNED_NUMBER(num) \ + { if (p != pend) \ + { \ + PATFETCH (c); \ + while (ISDIGIT (c)) \ + { \ + if (num < 0) \ + num = 0; \ + num = num * 10 + c - '0'; \ + if (p == pend) \ + break; \ + PATFETCH (c); \ + } \ + } \ } -#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ +#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ -#define IS_CHAR_CLASS(string) \ - (STREQ (string, "alpha") || STREQ (string, "upper") \ - || STREQ (string, "lower") || STREQ (string, "digit") \ - || STREQ (string, "alnum") || STREQ (string, "xdigit") \ - || STREQ (string, "space") || STREQ (string, "print") \ - || STREQ (string, "punct") || STREQ (string, "graph") \ +#define IS_CHAR_CLASS(string) \ + (STREQ (string, "alpha") || STREQ (string, "upper") \ + || STREQ (string, "lower") || STREQ (string, "digit") \ + || STREQ (string, "alnum") || STREQ (string, "xdigit") \ + || STREQ (string, "space") || STREQ (string, "print") \ + || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) /* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX. @@ -1038,11 +1038,12 @@ regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_patt #endif if (bufp->allocated == 0) { - if (bufp->buffer) { /* If zero allocated, but buffer is non-null, try to realloc - * enough space. This loses if buffer's address is bogus, but - * that is the user's responsibility. */ + if (bufp->buffer) { + /* If zero allocated, but buffer is non-null, try to realloc + * enough space. This loses if buffer's address is bogus, but + * that is the user's responsibility. */ RETALLOC(bufp->buffer, INIT_BUF_SIZE, unsigned char); - } else { /* Caller did not allocate a buffer. Do it for them. */ + } else { /* Caller did not allocate a buffer. Do it for them. */ bufp->buffer = TALLOC(INIT_BUF_SIZE, unsigned char); } if (!bufp->buffer) @@ -1058,7 +1059,7 @@ regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_patt switch (c) { case '^': { - if ( /* If at start of pattern, it's an operator. */ + if ( /* If at start of pattern, it's an operator. */ p == pattern + 1 /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS @@ -1071,7 +1072,7 @@ regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_patt break; case '$': { - if ( /* If at end of pattern, it's an operator. */ + if ( /* If at end of pattern, it's an operator. */ p == pend /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS @@ -1146,16 +1147,17 @@ handle_plus: /* Now we know whether or not zero matches is allowed * and also whether or not two or more matches is allowed. */ - if (many_times_ok) { /* More than one repetition is allowed, so put in at the - * end a backward relative jump from `b' to before the next - * jump we're going to put in below (which jumps from - * laststart to after this jump). - * - * But if we are at the `*' in the exact sequence `.*\n', - * insert an unconditional jump backwards to the ., - * instead of the beginning of the loop. This way we only - * push a failure point once, instead of every time - * through the loop. */ + if (many_times_ok) { + /* More than one repetition is allowed, so put in at the + * end a backward relative jump from `b' to before the next + * jump we're going to put in below (which jumps from + * laststart to after this jump). + * + * But if we are at the `*' in the exact sequence `.*\n', + * insert an unconditional jump backwards to the ., + * instead of the beginning of the loop. This way we only + * push a failure point once, instead of every time + * through the loop. */ assert(p - 1 > pattern); /* Allocate the space for the jump. */ @@ -1169,7 +1171,7 @@ handle_plus: if (TRANSLATE(*(p - 2)) == TRANSLATE('.') && zero_times_ok && p < pend && TRANSLATE(*p) == TRANSLATE('\n') - && !(syntax & RE_DOT_NEWLINE)) { /* We have .*\n. */ + && !(syntax & RE_DOT_NEWLINE)) { /* We have .*\n. */ STORE_JUMP(jump, b, laststart); keep_string_p = true; } else @@ -1274,10 +1276,10 @@ handle_plus: && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') && *p != ']') { reg_errcode_t ret - = compile_range(&p, pend, translate, syntax, b); + = compile_range(&p, pend, translate, syntax, b); if (ret != REG_NOERROR) return ret; - } else if (p[0] == '-' && p[1] != ']') { /* This handles ranges made up of characters only. */ + } else if (p[0] == '-' && p[1] != ']') { /* This handles ranges made up of characters only. */ reg_errcode_t ret; /* Move past the `-'. */ @@ -1290,7 +1292,7 @@ handle_plus: /* See if we're at the beginning of a possible character * class. */ - else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') { /* Leave room for the null. */ + else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') { /* Leave room for the null. */ char str[CHAR_CLASS_MAX_LENGTH + 1]; PATFETCH(c); @@ -1437,7 +1439,7 @@ handle_open: * be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; COMPILE_STACK_TOP.fixup_alt_jump - = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; + = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; COMPILE_STACK_TOP.regnum = regnum; @@ -1471,10 +1473,11 @@ handle_open: return REG_ERPAREN; } handle_close: - if (fixup_alt_jump) { /* Push a dummy failure point at the end of the - * alternative for a possible future - * `pop_failure_jump' to pop. See comments at - * `push_dummy_failure' in `re_match_2'. */ + if (fixup_alt_jump) { + /* Push a dummy failure point at the end of the + * alternative for a possible future + * `pop_failure_jump' to pop. See comments at + * `push_dummy_failure' in `re_match_2'. */ BUF_PUSH(push_dummy_failure); /* We allocated space for this jump when we assigned @@ -1500,9 +1503,9 @@ handle_close: compile_stack.avail--; begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; fixup_alt_jump - = COMPILE_STACK_TOP.fixup_alt_jump - ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 - : 0; + = COMPILE_STACK_TOP.fixup_alt_jump + ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 + : 0; laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; this_group_regnum = COMPILE_STACK_TOP.regnum; /* If we've reached MAX_REGNUM groups, then this open @@ -1514,7 +1517,7 @@ handle_close: * groups were inside this one. */ if (this_group_regnum <= MAX_REGNUM) { unsigned char *inner_group_loc - = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; + = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; *inner_group_loc = regnum - this_group_regnum; BUF_PUSH_3(stop_memory, this_group_regnum, @@ -1523,7 +1526,7 @@ handle_close: } break; - case '|': /* `\|'. */ + case '|': /* `\|'. */ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR) goto normal_backslash; handle_alt: @@ -1647,8 +1650,9 @@ handle_interval: { * jump_n * (The upper bound and `jump_n' are omitted if * `upper_bound' is 1, though.) */ - else { /* If the upper bound is > 1, we need to insert - * more at the end of the loop. */ + else { + /* If the upper bound is > 1, we need to insert + * more at the end of the loop. */ unsigned nbytes = 10 + (upper_bound > 1) * 10; GET_BUFFER_SPACE(nbytes); @@ -1670,13 +1674,14 @@ handle_interval: { insert_op2(set_number_at, laststart, 5, lower_bound, b); b += 5; - if (upper_bound > 1) { /* More than one repetition is allowed, so - * append a backward jump to the `succeed_n' - * that starts this interval. - * - * When we've reached this during matching, - * we'll have matched the interval once, so - * jump back only `upper_bound - 1' times. */ + if (upper_bound > 1) { + /* More than one repetition is allowed, so + * append a backward jump to the `succeed_n' + * that starts this interval. + * + * When we've reached this during matching, + * we'll have matched the interval once, so + * jump back only `upper_bound - 1' times. */ STORE_JUMP2(jump_n, b, laststart + 5, upper_bound - 1); b += 5; @@ -1827,8 +1832,8 @@ normal_char: BUF_PUSH(c); (*pending_exact)++; break; - } /* switch (c) */ - } /* while p != pend */ + } /* switch (c) */ + } /* while p != pend */ /* Through the pattern now. */ @@ -1851,7 +1856,7 @@ normal_char: #endif /* DEBUG */ return REG_NOERROR; -} /* regex_compile */ +} /* regex_compile */ /* Subroutines for `regex_compile'. */ @@ -2028,7 +2033,7 @@ typedef const unsigned char *fail_stack_elt_t; typedef struct { fail_stack_elt_t *stack; unsigned size; - unsigned avail; /* Offset of next open position. */ + unsigned avail; /* Offset of next open position. */ } fail_stack_type; #define FAIL_STACK_EMPTY() (fail_stack.avail == 0) @@ -2038,16 +2043,16 @@ typedef struct { /* Initialize `fail_stack'. Do `return -2' if the alloc fails. */ -#define INIT_FAIL_STACK() \ - do { \ - fail_stack.stack = (fail_stack_elt_t *) \ - REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \ - \ - if (fail_stack.stack == NULL) \ - return -2; \ - \ - fail_stack.size = INIT_FAILURE_ALLOC; \ - fail_stack.avail = 0; \ +#define INIT_FAIL_STACK() \ + do { \ + fail_stack.stack = (fail_stack_elt_t *) \ + REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \ + \ + if (fail_stack.stack == NULL) \ + return -2; \ + \ + fail_stack.size = INIT_FAILURE_ALLOC; \ + fail_stack.avail = 0; \ } while (0) /* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. @@ -2057,34 +2062,34 @@ typedef struct { * * REGEX_REALLOCATE requires `destination' be declared. */ -#define DOUBLE_FAIL_STACK(fail_stack) \ - ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS \ - ? 0 \ - : ((fail_stack).stack = (fail_stack_elt_t *) \ - REGEX_REALLOCATE ((fail_stack).stack, \ - (fail_stack).size * sizeof (fail_stack_elt_t), \ - ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \ - \ - (fail_stack).stack == NULL \ - ? 0 \ - : ((fail_stack).size <<= 1, \ +#define DOUBLE_FAIL_STACK(fail_stack) \ + ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS \ + ? 0 \ + : ((fail_stack).stack = (fail_stack_elt_t *) \ + REGEX_REALLOCATE ((fail_stack).stack, \ + (fail_stack).size * sizeof (fail_stack_elt_t), \ + ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \ + \ + (fail_stack).stack == NULL \ + ? 0 \ + : ((fail_stack).size <<= 1, \ 1))) /* Push PATTERN_OP on FAIL_STACK. * * Return 1 if was able to do so and 0 if ran out of memory allocating * space to do so. */ -#define PUSH_PATTERN_OP(pattern_op, fail_stack) \ - ((FAIL_STACK_FULL () \ - && !DOUBLE_FAIL_STACK (fail_stack)) \ - ? 0 \ - : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \ +#define PUSH_PATTERN_OP(pattern_op, fail_stack) \ + ((FAIL_STACK_FULL () \ + && !DOUBLE_FAIL_STACK (fail_stack)) \ + ? 0 \ + : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \ 1)) /* This pushes an item onto the failure stack. Must be a four-byte * value. Assumes the variable `fail_stack'. Probably should only * be called from within `PUSH_FAILURE_POINT'. */ -#define PUSH_FAILURE_ITEM(item) \ +#define PUSH_FAILURE_ITEM(item) \ fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item /* The complement operation. Assumes `fail_stack' is nonempty. */ @@ -2108,78 +2113,78 @@ typedef struct { * * Does `return FAILURE_CODE' if runs out of memory. */ -#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ - do { \ - char *destination; \ - /* Must be int, so when we don't save any registers, the arithmetic \ - of 0 + -1 isn't done as unsigned. */ \ - int this_reg; \ - \ - DEBUG_STATEMENT (failure_id++); \ - DEBUG_STATEMENT (nfailure_points_pushed++); \ - DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ +#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ + do { \ + char *destination; \ + /* Must be int, so when we don't save any registers, the arithmetic \ + of 0 + -1 isn't done as unsigned. */ \ + int this_reg; \ + \ + DEBUG_STATEMENT (failure_id++); \ + DEBUG_STATEMENT (nfailure_points_pushed++); \ + DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\ - \ - DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ - DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \ - \ - /* Ensure we have enough space allocated for what we will push. */ \ - while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ - { \ - if (!DOUBLE_FAIL_STACK (fail_stack)) \ - return failure_code; \ - \ - DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ - (fail_stack).size); \ + \ + DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ + DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \ + \ + /* Ensure we have enough space allocated for what we will push. */ \ + while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ + { \ + if (!DOUBLE_FAIL_STACK (fail_stack)) \ + return failure_code; \ + \ + DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ + (fail_stack).size); \ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\ - } \ - \ - /* Push the info, starting with the registers. */ \ - DEBUG_PRINT1 ("\n"); \ - \ - for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ - this_reg++) \ - { \ - DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ - DEBUG_STATEMENT (num_regs_pushed++); \ - \ - DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ - PUSH_FAILURE_ITEM (regstart[this_reg]); \ + } \ + \ + /* Push the info, starting with the registers. */ \ + DEBUG_PRINT1 ("\n"); \ + \ + for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ + this_reg++) \ + { \ + DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ + DEBUG_STATEMENT (num_regs_pushed++); \ + \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + PUSH_FAILURE_ITEM (regstart[this_reg]); \ \ - DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ - PUSH_FAILURE_ITEM (regend[this_reg]); \ - \ - DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ - DEBUG_PRINT2 (" match_null=%d", \ - REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ - DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ - DEBUG_PRINT2 (" matched_something=%d", \ - MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT2 (" ever_matched=%d", \ - EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT1 ("\n"); \ - PUSH_FAILURE_ITEM (reg_info[this_reg].word); \ - } \ - \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + PUSH_FAILURE_ITEM (regend[this_reg]); \ + \ + DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ + DEBUG_PRINT2 (" match_null=%d", \ + REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ + DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ + DEBUG_PRINT2 (" matched_something=%d", \ + MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT2 (" ever_matched=%d", \ + EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT1 ("\n"); \ + PUSH_FAILURE_ITEM (reg_info[this_reg].word); \ + } \ + \ DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ - PUSH_FAILURE_ITEM (lowest_active_reg); \ - \ + PUSH_FAILURE_ITEM (lowest_active_reg); \ + \ DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ - PUSH_FAILURE_ITEM (highest_active_reg); \ - \ - DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ - DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ - PUSH_FAILURE_ITEM (pattern_place); \ - \ - DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \ + PUSH_FAILURE_ITEM (highest_active_reg); \ + \ + DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ + PUSH_FAILURE_ITEM (pattern_place); \ + \ + DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ - size2); \ - DEBUG_PRINT1 ("'\n"); \ - PUSH_FAILURE_ITEM (string_place); \ - \ - DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ - DEBUG_PUSH (failure_id); \ + size2); \ + DEBUG_PRINT1 ("'\n"); \ + PUSH_FAILURE_ITEM (string_place); \ + \ + DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ + DEBUG_PUSH (failure_id); \ } while (0) /* This is the number of items that are pushed and popped on the stack @@ -2188,7 +2193,7 @@ typedef struct { /* Individual items aside from the registers. */ #ifdef DEBUG -#define NUM_NONREG_ITEMS 5 /* Includes failure point id. */ +#define NUM_NONREG_ITEMS 5 /* Includes failure point id. */ #else #define NUM_NONREG_ITEMS 4 #endif @@ -2197,8 +2202,8 @@ typedef struct { #define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) /* We actually push this many items. */ -#define NUM_FAILURE_ITEMS \ - ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ +#define NUM_FAILURE_ITEMS \ + ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ + NUM_NONREG_ITEMS) /* How many items can still be added to the stack without overflowing it. */ @@ -2217,61 +2222,61 @@ typedef struct { * `pend', `string1', `size1', `string2', and `size2'. */ #define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\ -{ \ - DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \ - int this_reg; \ - const unsigned char *string_temp; \ - \ - assert (!FAIL_STACK_EMPTY ()); \ - \ - /* Remove failure points and point to how many regs pushed. */ \ - DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ - DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \ - DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \ - \ - assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ - \ - DEBUG_POP (&failure_id); \ - DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \ - \ - /* If the saved string location is NULL, it came from an \ - on_failure_keep_string_jump opcode, and we want to throw away the \ - saved NULL, thus retaining our current position in the string. */ \ - string_temp = POP_FAILURE_ITEM (); \ - if (string_temp != NULL) \ - str = (const char *) string_temp; \ - \ - DEBUG_PRINT2 (" Popping string 0x%x: `", str); \ - DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ - DEBUG_PRINT1 ("'\n"); \ - \ - pat = (unsigned char *) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \ - DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ - \ - /* Restore register info. */ \ - high_reg = (unsigned long) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ - \ - low_reg = (unsigned long) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ - \ - for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ - { \ - DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ - \ - reg_info[this_reg].word = POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ - \ - regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ - \ - regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ - } \ - \ - DEBUG_STATEMENT (nfailure_points_popped++); \ -} /* POP_FAILURE_POINT */ +{ \ + DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \ + int this_reg; \ + const unsigned char *string_temp; \ + \ + assert (!FAIL_STACK_EMPTY ()); \ + \ + /* Remove failure points and point to how many regs pushed. */ \ + DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ + DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \ + DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \ + \ + assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ + \ + DEBUG_POP (&failure_id); \ + DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \ + \ + /* If the saved string location is NULL, it came from an \ + on_failure_keep_string_jump opcode, and we want to throw away the \ + saved NULL, thus retaining our current position in the string. */ \ + string_temp = POP_FAILURE_ITEM (); \ + if (string_temp != NULL) \ + str = (const char *) string_temp; \ + \ + DEBUG_PRINT2 (" Popping string 0x%x: `", str); \ + DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ + DEBUG_PRINT1 ("'\n"); \ + \ + pat = (unsigned char *) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ + \ + /* Restore register info. */ \ + high_reg = (unsigned long) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ + \ + low_reg = (unsigned long) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ + \ + for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ + { \ + DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ + \ + reg_info[this_reg].word = POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ + \ + regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + \ + regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + } \ + \ + DEBUG_STATEMENT (nfailure_points_popped++); \ +} /* POP_FAILURE_POINT */ /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in * BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible @@ -2320,8 +2325,8 @@ struct re_pattern_buffer *bufp; assert(fastmap != NULL && p != NULL); INIT_FAIL_STACK(); - memset(fastmap, 0, 1 << BYTEWIDTH); /* Assume nothing's valid. */ - bufp->fastmap_accurate = 1; /* It will be when we're done. */ + memset(fastmap, 0, 1 << BYTEWIDTH); /* Assume nothing's valid. */ + bufp->fastmap_accurate = 1; /* It will be when we're done. */ bufp->can_be_null = 0; while (p != pend || !FAIL_STACK_EMPTY()) { @@ -2343,17 +2348,17 @@ struct re_pattern_buffer *bufp; #endif { - /* I guess the idea here is to simply not bother with a fastmap - * if a backreference is used, since it's too hard to figure out - * the fastmap for the corresponding group. Setting - * `can_be_null' stops `re_search_2' from using the fastmap, so - * that is all we do. */ + /* I guess the idea here is to simply not bother with a fastmap + * if a backreference is used, since it's too hard to figure out + * the fastmap for the corresponding group. Setting + * `can_be_null' stops `re_search_2' from using the fastmap, so + * that is all we do. */ case duplicate: bufp->can_be_null = 1; return 0; - /* Following are the cases which match a character. These end - * with `break'. */ + /* Following are the cases which match a character. These end + * with `break'. */ case exactn: fastmap[p[1]] = 1; @@ -2466,7 +2471,7 @@ handle_on_failure_jump: bufp->can_be_null = 1; if (succeed_n_p) { - EXTRACT_NUMBER_AND_INCR(k, p); /* Skip the n. */ + EXTRACT_NUMBER_AND_INCR(k, p); /* Skip the n. */ succeed_n_p = false; } continue; @@ -2479,7 +2484,7 @@ handle_on_failure_jump: EXTRACT_NUMBER_AND_INCR(k, p); if (k == 0) { p -= 4; - succeed_n_p = true; /* Spaghetti code alert. */ + succeed_n_p = true; /* Spaghetti code alert. */ goto handle_on_failure_jump; } continue; @@ -2494,8 +2499,8 @@ handle_on_failure_jump: continue; default: - abort(); /* We have listed all the cases. */ - } /* switch *p++ */ + abort(); /* We have listed all the cases. */ + } /* switch *p++ */ /* Getting here means we have found the possible starting * characters for one path of the pattern -- and that the empty @@ -2505,13 +2510,13 @@ handle_on_failure_jump: * does these things. */ path_can_be_null = false; p = pend; - } /* while p */ + } /* while p */ /* Set `can_be_null' for the last path (also the first path, if the * pattern is empty). */ bufp->can_be_null |= path_can_be_null; return 0; -} /* re_compile_fastmap */ +} /* re_compile_fastmap */ /* Searching routines. */ @@ -2597,7 +2602,7 @@ int stop; * null string, however, we don't need to skip characters; we want * the first null string. */ if (fastmap && startpos < total_size && !bufp->can_be_null) { - if (range > 0) { /* Searching forwards. */ + if (range > 0) { /* Searching forwards. */ register const char *d; register int lim = 0; int irange = range; @@ -2619,7 +2624,7 @@ int stop; range--; startpos += irange - range; - } else { /* Searching backwards. */ + } else { /* Searching backwards. */ register char c = (size1 == 0 || startpos >= size1 ? string2[startpos - size1] : string1[startpos]); @@ -2653,7 +2658,7 @@ advance: } } return -1; -} /* re_search_2 */ +} /* re_search_2 */ /* Declarations and macros for re_match_2. */ @@ -2693,22 +2698,22 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, /* Call this when have matched a real character; it sets `matched' flags * for the subexpressions which we are currently inside. Also records * that those subexprs have matched. */ -#define SET_REGS_MATCHED() \ - do \ - { \ - unsigned r; \ - for (r = lowest_active_reg; r <= highest_active_reg; r++) \ - { \ - MATCHED_SOMETHING (reg_info[r]) \ - = EVER_MATCHED_SOMETHING (reg_info[r]) \ - = 1; \ - } \ - } \ +#define SET_REGS_MATCHED() \ + do \ + { \ + unsigned r; \ + for (r = lowest_active_reg; r <= highest_active_reg; r++) \ + { \ + MATCHED_SOMETHING (reg_info[r]) \ + = EVER_MATCHED_SOMETHING (reg_info[r]) \ + = 1; \ + } \ + } \ while (0) /* This converts PTR, a pointer into one of the search strings `string1' * and `string2' into an offset from the beginning of that string. */ -#define POINTER_TO_OFFSET(ptr) \ +#define POINTER_TO_OFFSET(ptr) \ (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) /* Registers are set to a sentinel when they haven't yet matched. */ @@ -2721,15 +2726,15 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, /* Call before fetching a character with *d. This switches over to * string2 if necessary. */ -#define PREFETCH() \ - while (d == dend) \ - { \ - /* End of string2 => fail. */ \ - if (dend == end_match_2) \ - goto fail; \ - /* End of string1 => advance to string2. */ \ - d = string2; \ - dend = end_match_2; \ +#define PREFETCH() \ + while (d == dend) \ + { \ + /* End of string2 => fail. */ \ + if (dend == end_match_2) \ + goto fail; \ + /* End of string1 => advance to string2. */ \ + d = string2; \ + dend = end_match_2; \ } /* Test if at very beginning or at very end of the virtual concatenation @@ -2744,9 +2749,9 @@ static int at_strings_end(const char *d, const char *end2) * two special cases to check for: if past the end of string1, look at * the first character in string2; and if before the beginning of * string2, look at the last character in string1. */ -#define WORDCHAR_P(d) \ - (re_syntax_table[(d) == end1 ? *string2 \ - : (d) == string2 - 1 ? *(end1 - 1) : *(d)] \ +#define WORDCHAR_P(d) \ + (re_syntax_table[(d) == end1 ? *string2 \ + : (d) == string2 - 1 ? *(end1 - 1) : *(d)] \ == Sword) static int wordchar_p(const char *d, const char *end1, const char *string2) @@ -2758,25 +2763,25 @@ wordchar_p(const char *d, const char *end1, const char *string2) /* Test if the character before D and the one at D differ with respect * to being word-constituent. */ -#define AT_WORD_BOUNDARY(d) \ - (AT_STRINGS_BEG (d) || at_strings_end(d,end2) \ +#define AT_WORD_BOUNDARY(d) \ + (AT_STRINGS_BEG (d) || at_strings_end(d,end2) \ || WORDCHAR_P (d - 1) != WORDCHAR_P (d)) /* Free everything we malloc. */ #ifdef REGEX_MALLOC #define FREE_VAR(var) if (var) free (var); var = NULL -#define FREE_VARIABLES() \ - do { \ - FREE_VAR (fail_stack.stack); \ - FREE_VAR (regstart); \ - FREE_VAR (regend); \ - FREE_VAR (old_regstart); \ - FREE_VAR (old_regend); \ - FREE_VAR (best_regstart); \ - FREE_VAR (best_regend); \ - FREE_VAR (reg_info); \ - FREE_VAR (reg_dummy); \ - FREE_VAR (reg_info_dummy); \ +#define FREE_VARIABLES() \ + do { \ + FREE_VAR (fail_stack.stack); \ + FREE_VAR (regstart); \ + FREE_VAR (regend); \ + FREE_VAR (old_regstart); \ + FREE_VAR (old_regend); \ + FREE_VAR (best_regstart); \ + FREE_VAR (best_regend); \ + FREE_VAR (reg_info); \ + FREE_VAR (reg_dummy); \ + FREE_VAR (reg_info_dummy); \ } while (0) #else /* not REGEX_MALLOC */ /* Some MIPS systems (at least) want this to free alloca'd storage. */ @@ -3012,7 +3017,7 @@ int stop; for (;;) { DEBUG_PRINT2("\n0x%x: ", p); - if (p == pend) { /* End of pattern means we might have succeeded. */ + if (p == pend) { /* End of pattern means we might have succeeded. */ DEBUG_PRINT1("end of pattern ... "); /* If we haven't matched the entire string, and we want the @@ -3020,7 +3025,7 @@ int stop; if (d != end_match_2) { DEBUG_PRINT1("backtracking.\n"); - if (!FAIL_STACK_EMPTY()) { /* More failure points to try. */ + if (!FAIL_STACK_EMPTY()) { /* More failure points to try. */ boolean same_str_p = (FIRST_STRING_P(match_end) == MATCHING_IN_FIRST_STRING); @@ -3059,24 +3064,26 @@ restore_best_regs: regend[mcnt] = best_regend[mcnt]; } } - } /* d != end_match_2 */ + } /* d != end_match_2 */ DEBUG_PRINT1("Accepting match.\n"); /* If caller wants register contents data back, do it. */ if (regs && !bufp->no_sub) { /* Have the register data arrays been allocated? */ - if (bufp->regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. We need one - * extra element beyond `num_regs' for the `-1' marker - * GNU code uses. */ + if (bufp->regs_allocated == REGS_UNALLOCATED) { + /* No. So allocate them with malloc. We need one + * extra element beyond `num_regs' for the `-1' marker + * GNU code uses. */ regs->num_regs = max(RE_NREGS, num_regs + 1); regs->start = TALLOC(regs->num_regs, regoff_t); regs->end = TALLOC(regs->num_regs, regoff_t); if (regs->start == NULL || regs->end == NULL) return -2; bufp->regs_allocated = REGS_REALLOCATE; - } else if (bufp->regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already - * allocated, reallocate them. If we need fewer, just - * leave it alone. */ + } else if (bufp->regs_allocated == REGS_REALLOCATE) { + /* Yes. If we need more elements than were already + * allocated, reallocate them. If we need fewer, just + * leave it alone. */ if (regs->num_regs < num_regs + 1) { regs->num_regs = num_regs + 1; RETALLOC(regs->start, regs->num_regs, regoff_t); @@ -3113,7 +3120,7 @@ restore_best_regs: * -1 at the end. */ for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++) regs->start[mcnt] = regs->end[mcnt] = -1; - } /* regs && !bufp->no_sub */ + } /* regs && !bufp->no_sub */ FREE_VARIABLES(); DEBUG_PRINT4("%u failure points pushed, %u popped (%u remain).\n", nfailure_points_pushed, nfailure_points_popped, @@ -3135,15 +3142,15 @@ restore_best_regs: switch ((re_opcode_t) * p++) #endif { - /* Ignore these. Used to ignore the n of succeed_n's which - * currently have n == 0. */ + /* Ignore these. Used to ignore the n of succeed_n's which + * currently have n == 0. */ case no_op: DEBUG_PRINT1("EXECUTING no_op.\n"); break; - /* Match the next n pattern characters exactly. The following - * byte in the pattern defines n, and the n bytes after that - * are the characters to match. */ + /* Match the next n pattern characters exactly. The following + * byte in the pattern defines n, and the n bytes after that + * are the characters to match. */ case exactn: mcnt = *p++; DEBUG_PRINT2("EXECUTING exactn %d.\n", mcnt); @@ -3166,7 +3173,7 @@ restore_best_regs: SET_REGS_MATCHED(); break; - /* Match any character except possibly a newline or a null. */ + /* Match any character except possibly a newline or a null. */ case anychar: DEBUG_PRINT1("EXECUTING anychar.\n"); @@ -3189,7 +3196,7 @@ restore_best_regs: DEBUG_PRINT2("EXECUTING charset%s.\n", not ? "_not" : ""); PREFETCH(); - c = TRANSLATE(*d); /* The character to match. */ + c = TRANSLATE(*d); /* The character to match. */ /* Cast to `unsigned' instead of `unsigned char' in case the * bit list is a full 32 bytes long. */ @@ -3216,11 +3223,11 @@ restore_best_regs: DEBUG_PRINT3("EXECUTING start_memory %d (%d):\n", *p, p[1]); /* Find out if this group can match the empty string. */ - p1 = p; /* To send to group_match_null_string_p. */ + p1 = p; /* To send to group_match_null_string_p. */ if (REG_MATCH_NULL_STRING_P(reg_info[*p]) == MATCH_NULL_UNSET_VALUE) REG_MATCH_NULL_STRING_P(reg_info[*p]) - = group_match_null_string_p(&p1, pend, reg_info); + = group_match_null_string_p(&p1, pend, reg_info); /* Save the position in the string where we were the last time * we were at this open-group operator in case the group is @@ -3229,7 +3236,7 @@ restore_best_regs: * the string in case this attempt to match fails. */ old_regstart[*p] = REG_MATCH_NULL_STRING_P(reg_info[*p]) ? REG_UNSET(regstart[*p]) ? d : regstart[*p] - : regstart[*p]; + : regstart[*p]; DEBUG_PRINT2(" old_regstart: %d\n", POINTER_TO_OFFSET(old_regstart[*p])); @@ -3251,9 +3258,9 @@ restore_best_regs: p += 2; break; - /* The stop_memory opcode represents the end of a group. Its - * arguments are the same as start_memory's: the register - * number, and the number of inner groups. */ + /* The stop_memory opcode represents the end of a group. Its + * arguments are the same as start_memory's: the register + * number, and the number of inner groups. */ case stop_memory: DEBUG_PRINT3("EXECUTING stop_memory %d (%d):\n", *p, p[1]); @@ -3264,7 +3271,7 @@ restore_best_regs: * the string in case this attempt to match fails. */ old_regend[*p] = REG_MATCH_NULL_STRING_P(reg_info[*p]) ? REG_UNSET(regend[*p]) ? d : regend[*p] - : regend[*p]; + : regend[*p]; DEBUG_PRINT2(" old_regend: %d\n", POINTER_TO_OFFSET(old_regend[*p])); @@ -3279,10 +3286,11 @@ restore_best_regs: if (lowest_active_reg == highest_active_reg) { lowest_active_reg = NO_LOWEST_ACTIVE_REG; highest_active_reg = NO_HIGHEST_ACTIVE_REG; - } else { /* We must scan for the new highest active register, since - * it isn't necessarily one less than now: consider - * (a(b)c(d(e)f)g). When group 3 ends, after the f), the - * new highest active register is 1. */ + } else { + /* We must scan for the new highest active register, since + * it isn't necessarily one less than now: consider + * (a(b)c(d(e)f)g). When group 3 ends, after the f), the + * new highest active register is 1. */ unsigned char r = *p - 1; while (r > 0 && !IS_ACTIVE(reg_info[r])) r--; @@ -3373,11 +3381,11 @@ restore_best_regs: p += 2; break; - /* \ has been turned into a `duplicate' command which is - * followed by the numeric value of as the register number. */ + /* \ has been turned into a `duplicate' command which is + * followed by the numeric value of as the register number. */ case duplicate: { register const char *d2, *dend2; - int regno = *p++; /* Get which register to match against. */ + int regno = *p++; /* Get which register to match against. */ DEBUG_PRINT2("EXECUTING duplicate %d.\n", regno); /* Can't back reference a group which we've never matched. */ @@ -3449,7 +3457,7 @@ restore_best_regs: /* In all other cases, we fail. */ goto fail; - /* endline is the dual of begline. */ + /* endline is the dual of begline. */ case endline: DEBUG_PRINT1("EXECUTING endline.\n"); @@ -3464,36 +3472,36 @@ restore_best_regs: } goto fail; - /* Match at the very beginning of the data. */ + /* Match at the very beginning of the data. */ case begbuf: DEBUG_PRINT1("EXECUTING begbuf.\n"); if (AT_STRINGS_BEG(d)) break; goto fail; - /* Match at the very end of the data. */ + /* Match at the very end of the data. */ case endbuf: DEBUG_PRINT1("EXECUTING endbuf.\n"); if (at_strings_end(d,end2)) break; goto fail; - /* on_failure_keep_string_jump is used to optimize `.*\n'. It - * pushes NULL as the value for the string on the stack. Then - * `pop_failure_point' will keep the current value for the - * string, instead of restoring it. To see why, consider - * matching `foo\nbar' against `.*\n'. The .* matches the foo; - * then the . fails against the \n. But the next thing we want - * to do is match the \n against the \n; if we restored the - * string value, we would be back at the foo. - * - * Because this is used only in specific cases, we don't need to - * check all the things that `on_failure_jump' does, to make - * sure the right things get saved on the stack. Hence we don't - * share its code. The only reason to push anything on the - * stack at all is that otherwise we would have to change - * `anychar's code to do something besides goto fail in this - * case; that seems worse than this. */ + /* on_failure_keep_string_jump is used to optimize `.*\n'. It + * pushes NULL as the value for the string on the stack. Then + * `pop_failure_point' will keep the current value for the + * string, instead of restoring it. To see why, consider + * matching `foo\nbar' against `.*\n'. The .* matches the foo; + * then the . fails against the \n. But the next thing we want + * to do is match the \n against the \n; if we restored the + * string value, we would be back at the foo. + * + * Because this is used only in specific cases, we don't need to + * check all the things that `on_failure_jump' does, to make + * sure the right things get saved on the stack. Hence we don't + * share its code. The only reason to push anything on the + * stack at all is that otherwise we would have to change + * `anychar's code to do something besides goto fail in this + * case; that seems worse than this. */ case on_failure_keep_string_jump: DEBUG_PRINT1("EXECUTING on_failure_keep_string_jump"); @@ -3503,18 +3511,18 @@ restore_best_regs: PUSH_FAILURE_POINT(p + mcnt, NULL, -2); break; - /* Uses of on_failure_jump: - * - * Each alternative starts with an on_failure_jump that points - * to the beginning of the next alternative. Each alternative - * except the last ends with a jump that in effect jumps past - * the rest of the alternatives. (They really jump to the - * ending jump of the following alternative, because tensioning - * these jumps is a hassle.) - * - * Repeats start with an on_failure_jump that points past both - * the repetition text and either the following jump or - * pop_failure_jump back to this on_failure_jump. */ + /* Uses of on_failure_jump: + * + * Each alternative starts with an on_failure_jump that points + * to the beginning of the next alternative. Each alternative + * except the last ends with a jump that in effect jumps past + * the rest of the alternatives. (They really jump to the + * ending jump of the following alternative, because tensioning + * these jumps is a hassle.) + * + * Repeats start with an on_failure_jump that points past both + * the repetition text and either the following jump or + * pop_failure_jump back to this on_failure_jump. */ case on_failure_jump: on_failure: DEBUG_PRINT1("EXECUTING on_failure_jump"); @@ -3553,8 +3561,8 @@ on_failure: PUSH_FAILURE_POINT(p + mcnt, d, -2); break; - /* A smart repeat ends with `maybe_pop_jump'. - * We change it to either `pop_failure_jump' or `jump'. */ + /* A smart repeat ends with `maybe_pop_jump'. + * We change it to either `pop_failure_jump' or `jump'. */ case maybe_pop_jump: EXTRACT_NUMBER_AND_INCR(mcnt, p); DEBUG_PRINT2("EXECUTING maybe_pop_jump %d.\n", mcnt); @@ -3578,7 +3586,7 @@ on_failure: while (p2 + 2 < pend && ((re_opcode_t) * p2 == stop_memory || (re_opcode_t) * p2 == start_memory)) - p2 += 3; /* Skip over args, too. */ + p2 += 3; /* Skip over args, too. */ /* If we're at the end of the pattern, we can change. */ if (p2 == pend) { @@ -3591,7 +3599,7 @@ on_failure: } else if ((re_opcode_t) * p2 == exactn || (bufp->newline_anchor && (re_opcode_t) * p2 == endline)) { register unsigned char c - = *p2 == (unsigned char) endline ? '\n' : p2[2]; + = *p2 == (unsigned char) endline ? '\n' : p2[2]; p1 = p + mcnt; /* p1[0] ... p1[2] are the `on_failure_jump' corresponding @@ -3618,20 +3626,20 @@ on_failure: } } } - p -= 2; /* Point at relative address again. */ + p -= 2; /* Point at relative address again. */ if ((re_opcode_t) p[-1] != pop_failure_jump) { p[-1] = (unsigned char) jump; DEBUG_PRINT1(" Match => jump.\n"); goto unconditional_jump; } - /* Note fall through. */ - - /* The end of a simple repeat has a pop_failure_jump back to - * its matching on_failure_jump, where the latter will push a - * failure point. The pop_failure_jump takes off failure - * points put on by this pop_failure_jump's matching - * on_failure_jump; we got through the pattern to here from the - * matching on_failure_jump, so didn't fail. */ + /* Note fall through. */ + + /* The end of a simple repeat has a pop_failure_jump back to + * its matching on_failure_jump, where the latter will push a + * failure point. The pop_failure_jump takes off failure + * points put on by this pop_failure_jump's matching + * on_failure_jump; we got through the pattern to here from the + * matching on_failure_jump, so didn't fail. */ case pop_failure_jump: { /* We need to pass separate storage for the lowest and * highest registers, even though we don't care about the @@ -3655,23 +3663,23 @@ on_failure: /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: - EXTRACT_NUMBER_AND_INCR(mcnt, p); /* Get the amount to jump. */ + EXTRACT_NUMBER_AND_INCR(mcnt, p); /* Get the amount to jump. */ DEBUG_PRINT2("EXECUTING jump %d ", mcnt); - p += mcnt; /* Do the jump. */ + p += mcnt; /* Do the jump. */ DEBUG_PRINT2("(to 0x%x).\n", p); break; - /* We need this opcode so we can detect where alternatives end - * in `group_match_null_string_p' et al. */ + /* We need this opcode so we can detect where alternatives end + * in `group_match_null_string_p' et al. */ case jump_past_alt: DEBUG_PRINT1("EXECUTING jump_past_alt.\n"); goto unconditional_jump; - /* Normally, the on_failure_jump pushes a failure point, which - * then gets popped at pop_failure_jump. We will end up at - * pop_failure_jump, also, and with a pattern of, say, `a+', we - * are skipping over the on_failure_jump, so we have to push - * something meaningless for pop_failure_jump to pop. */ + /* Normally, the on_failure_jump pushes a failure point, which + * then gets popped at pop_failure_jump. We will end up at + * pop_failure_jump, also, and with a pattern of, say, `a+', we + * are skipping over the on_failure_jump, so we have to push + * something meaningless for pop_failure_jump to pop. */ case dummy_failure_jump: DEBUG_PRINT1("EXECUTING dummy_failure_jump.\n"); /* It doesn't matter what we push for the string here. What @@ -3679,11 +3687,11 @@ unconditional_jump: PUSH_FAILURE_POINT(0, 0, -2); goto unconditional_jump; - /* At the end of an alternative, we need to push a dummy failure - * point in case we are followed by a `pop_failure_jump', because - * we don't want the failure point for the alternative to be - * popped. For example, matching `(a|ab)*' against `aab' - * requires that we match the `ab' alternative. */ + /* At the end of an alternative, we need to push a dummy failure + * point in case we are followed by a `pop_failure_jump', because + * we don't want the failure point for the alternative to be + * popped. For example, matching `(a|ab)*' against `aab' + * requires that we match the `ab' alternative. */ case push_dummy_failure: DEBUG_PRINT1("EXECUTING push_dummy_failure.\n"); /* See comments just above at `dummy_failure_jump' about the @@ -3691,8 +3699,8 @@ unconditional_jump: PUSH_FAILURE_POINT(0, 0, -2); break; - /* Have to succeed matching what follows at least n times. - * After that, handle like `on_failure_jump'. */ + /* Have to succeed matching what follows at least n times. + * After that, handle like `on_failure_jump'. */ case succeed_n: EXTRACT_NUMBER(mcnt, p + 2); DEBUG_PRINT2("EXECUTING succeed_n %d.\n", mcnt); @@ -3784,11 +3792,11 @@ unconditional_jump: default: abort(); } - continue; /* Successfully executed one pattern command; keep going. */ + continue; /* Successfully executed one pattern command; keep going. */ /* We goto here if a matching operation fails. */ fail: - if (!FAIL_STACK_EMPTY()) { /* A restart point is known. Restore to that state. */ + if (!FAIL_STACK_EMPTY()) { /* A restart point is known. Restore to that state. */ DEBUG_PRINT1("\nFAIL:\n"); POP_FAILURE_POINT(d, p, lowest_active_reg, highest_active_reg, @@ -3828,16 +3836,16 @@ fail: if (d >= string1 && d <= end1) dend = end_match_1; } else - break; /* Matching at this starting point really fails. */ - } /* for (;;) */ + break; /* Matching at this starting point really fails. */ + } /* for (;;) */ if (best_regs_set) goto restore_best_regs; FREE_VARIABLES(); - return -1; /* Failure to match. */ -} /* re_match_2 */ + return -1; /* Failure to match. */ +} /* re_match_2 */ /* Subroutine definitions for re_match_2. */ @@ -3864,7 +3872,7 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t * matching stop_memory. */ switch ((re_opcode_t) * p1) { - /* Could be either a loop or a series of alternatives. */ + /* Could be either a loop or a series of alternatives. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR(mcnt, p1); @@ -3927,8 +3935,8 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t if (!alt_match_null_string_p(p1, p1 + mcnt, reg_info)) return false; - p1 += mcnt; /* Get past the n-th alternative. */ - } /* if mcnt > 0 */ + p1 += mcnt; /* Get past the n-th alternative. */ + } /* if mcnt > 0 */ break; case stop_memory: @@ -3940,10 +3948,10 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t if (!common_op_match_null_string_p(&p1, end, reg_info)) return false; } - } /* while p1 < end */ + } /* while p1 < end */ return false; -} /* group_match_null_string_p */ +} /* group_match_null_string_p */ /* Similar to group_match_null_string_p, but doesn't deal with alternatives: * It expects P to be the first byte of a single alternative and END one @@ -3960,7 +3968,7 @@ alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type * to one that can't. */ switch ((re_opcode_t) * p1) { - /* It's a loop. */ + /* It's a loop. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR(mcnt, p1); @@ -3971,10 +3979,10 @@ alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type if (!common_op_match_null_string_p(&p1, end, reg_info)) return false; } - } /* while p1 < end */ + } /* while p1 < end */ return true; -} /* alt_match_null_string_p */ +} /* alt_match_null_string_p */ /* Deals with the ops common to group_match_null_string_p and * alt_match_null_string_p. @@ -4016,7 +4024,7 @@ common_op_match_null_string_p( unsigned char **p, unsigned char *end, register_i return false; break; - /* If this is an optimized succeed_n for zero times, make the jump. */ + /* If this is an optimized succeed_n for zero times, make the jump. */ case jump: EXTRACT_NUMBER_AND_INCR(mcnt, p1); if (mcnt >= 0) @@ -4053,7 +4061,7 @@ common_op_match_null_string_p( unsigned char **p, unsigned char *end, register_i *p = p1; return true; -} /* common_op_match_null_string_p */ +} /* common_op_match_null_string_p */ /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN * bytes; nonzero otherwise. */ @@ -4116,8 +4124,8 @@ int cflags; { reg_errcode_t ret; unsigned syntax - = (cflags & REG_EXTENDED) ? - RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; + = (cflags & REG_EXTENDED) ? + RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; @@ -4143,7 +4151,7 @@ int cflags; preg->translate = NULL; /* If REG_NEWLINE is set, newlines are treated differently. */ - if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ + if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ @@ -4257,7 +4265,7 @@ regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) if (!msg) msg = "Success"; - msg_size = strlen(msg) + 1; /* Includes the null. */ + msg_size = strlen(msg) + 1; /* Includes the null. */ if (errbuf_size != 0) { if (msg_size > errbuf_size) { @@ -4300,3 +4308,4 @@ regex_t *preg; * trim-versions-without-asking: nil * End: */ + diff --git a/compat/GnuRegex.h b/compat/GnuRegex.h index a59a19dea6..b81653748a 100644 --- a/compat/GnuRegex.h +++ b/compat/GnuRegex.h @@ -26,375 +26,375 @@ extern "C" { #endif - /* Definitions for data structures and routines for the regular - * expression library, version 0.12. - * - * Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ - - /* POSIX says that must be included (by the caller) before - * . */ - - /* The following bits are used to determine the regexp syntax we - * recognize. The set/not-set meanings are chosen so that Emacs syntax - * remains the value 0. The bits are given in alphabetical order, and - * the definitions shifted by one from the previous bit; thus, when we - * add or remove a bit, only one other definition need change. */ - typedef unsigned reg_syntax_t; - - /* If this bit is not set, then \ inside a bracket expression is literal. - * If set, then such a \ quotes the following character. */ +/* Definitions for data structures and routines for the regular + * expression library, version 0.12. + * + * Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ + +/* POSIX says that must be included (by the caller) before + * . */ + +/* The following bits are used to determine the regexp syntax we + * recognize. The set/not-set meanings are chosen so that Emacs syntax + * remains the value 0. The bits are given in alphabetical order, and + * the definitions shifted by one from the previous bit; thus, when we + * add or remove a bit, only one other definition need change. */ +typedef unsigned reg_syntax_t; + +/* If this bit is not set, then \ inside a bracket expression is literal. + * If set, then such a \ quotes the following character. */ #define RE_BACKSLASH_ESCAPE_IN_LISTS (1) - /* If this bit is not set, then + and ? are operators, and \+ and \? are - * literals. - * If set, then \+ and \? are operators and + and ? are literals. */ +/* If this bit is not set, then + and ? are operators, and \+ and \? are + * literals. + * If set, then \+ and \? are operators and + and ? are literals. */ #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) - /* If this bit is set, then character classes are supported. They are: - * [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], - * [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. - * If not set, then character classes are not supported. */ +/* If this bit is set, then character classes are supported. They are: + * [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + * [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + * If not set, then character classes are not supported. */ #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) - /* If this bit is set, then ^ and $ are always anchors (outside bracket - * expressions, of course). - * If this bit is not set, then it depends: - * ^ is an anchor if it is at the beginning of a regular - * expression or after an open-group or an alternation operator; - * $ is an anchor if it is at the end of a regular expression, or - * before a close-group or an alternation operator. - * - * This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because - * POSIX draft 11.2 says that * etc. in leading positions is undefined. - * We already implemented a previous draft which made those constructs - * invalid, though, so we haven't changed the code back. */ +/* If this bit is set, then ^ and $ are always anchors (outside bracket + * expressions, of course). + * If this bit is not set, then it depends: + * ^ is an anchor if it is at the beginning of a regular + * expression or after an open-group or an alternation operator; + * $ is an anchor if it is at the end of a regular expression, or + * before a close-group or an alternation operator. + * + * This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + * POSIX draft 11.2 says that * etc. in leading positions is undefined. + * We already implemented a previous draft which made those constructs + * invalid, though, so we haven't changed the code back. */ #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) - /* If this bit is set, then special characters are always special - * regardless of where they are in the pattern. - * If this bit is not set, then special characters are special only in - * some contexts; otherwise they are ordinary. Specifically, - * * + ? and intervals are only special when not after the beginning, - * open-group, or alternation operator. */ +/* If this bit is set, then special characters are always special + * regardless of where they are in the pattern. + * If this bit is not set, then special characters are special only in + * some contexts; otherwise they are ordinary. Specifically, + * * + ? and intervals are only special when not after the beginning, + * open-group, or alternation operator. */ #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) - /* If this bit is set, then *, +, ?, and { cannot be first in an re or - * immediately after an alternation or begin-group operator. */ +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + * immediately after an alternation or begin-group operator. */ #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) - /* If this bit is set, then . matches newline. - * If not set, then it doesn't. */ +/* If this bit is set, then . matches newline. + * If not set, then it doesn't. */ #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) - /* If this bit is set, then . doesn't match NUL. - * If not set, then it does. */ +/* If this bit is set, then . doesn't match NUL. + * If not set, then it does. */ #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) - /* If this bit is set, nonmatching lists [^...] do not match newline. - * If not set, they do. */ +/* If this bit is set, nonmatching lists [^...] do not match newline. + * If not set, they do. */ #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) - /* If this bit is set, either \{...\} or {...} defines an - * interval, depending on RE_NO_BK_BRACES. - * If not set, \{, \}, {, and } are literals. */ +/* If this bit is set, either \{...\} or {...} defines an + * interval, depending on RE_NO_BK_BRACES. + * If not set, \{, \}, {, and } are literals. */ #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - /* If this bit is set, +, ? and | aren't recognized as operators. - * If not set, they are. */ +/* If this bit is set, +, ? and | aren't recognized as operators. + * If not set, they are. */ #define RE_LIMITED_OPS (RE_INTERVALS << 1) - /* If this bit is set, newline is an alternation operator. - * If not set, newline is literal. */ +/* If this bit is set, newline is an alternation operator. + * If not set, newline is literal. */ #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) - /* If this bit is set, then `{...}' defines an interval, and \{ and \} - * are literals. - * If not set, then `\{...\}' defines an interval. */ +/* If this bit is set, then `{...}' defines an interval, and \{ and \} + * are literals. + * If not set, then `\{...\}' defines an interval. */ #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) - /* If this bit is set, (...) defines a group, and \( and \) are literals. - * If not set, \(...\) defines a group, and ( and ) are literals. */ +/* If this bit is set, (...) defines a group, and \( and \) are literals. + * If not set, \(...\) defines a group, and ( and ) are literals. */ #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) - /* If this bit is set, then \ matches . - * If not set, then \ is a back-reference. */ +/* If this bit is set, then \ matches . + * If not set, then \ is a back-reference. */ #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) - /* If this bit is set, then | is an alternation operator, and \| is literal. - * If not set, then \| is an alternation operator, and | is literal. */ +/* If this bit is set, then | is an alternation operator, and \| is literal. + * If not set, then \| is an alternation operator, and | is literal. */ #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) - /* If this bit is set, then an ending range point collating higher - * than the starting range point, as in [z-a], is invalid. - * If not set, then when ending range point collates higher than the - * starting range point, the range is ignored. */ +/* If this bit is set, then an ending range point collating higher + * than the starting range point, as in [z-a], is invalid. + * If not set, then when ending range point collates higher than the + * starting range point, the range is ignored. */ #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) - /* If this bit is set, then an unmatched ) is ordinary. - * If not set, then an unmatched ) is invalid. */ +/* If this bit is set, then an unmatched ) is ordinary. + * If not set, then an unmatched ) is invalid. */ #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - /* Define combinations of the above bits for the standard possibilities. - * (The [[[ comments delimit what gets put into the Texinfo file, so - * don't delete them!) */ - /* [[[begin syntaxes]]] */ +/* Define combinations of the above bits for the standard possibilities. + * (The [[[ comments delimit what gets put into the Texinfo file, so + * don't delete them!) */ +/* [[[begin syntaxes]]] */ #define RE_SYNTAX_EMACS 0 -#define RE_SYNTAX_AWK \ - (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ +#define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_UNMATCHED_RIGHT_PAREN_ORD) -#define RE_SYNTAX_POSIX_AWK \ +#define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) -#define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ +#define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) -#define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ +#define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) -#define RE_SYNTAX_POSIX_EGREP \ +#define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) - /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC - /* Syntax bits common to both basic and extended POSIX regex syntax. */ -#define _RE_SYNTAX_POSIX_COMMON \ - (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +#define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) -#define RE_SYNTAX_POSIX_BASIC \ +#define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) - /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes - * RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this - * isn't minimal, since other operators, such as \`, aren't disabled. */ -#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + * RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + * isn't minimal, since other operators, such as \`, aren't disabled. */ +#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) -#define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ +#define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_UNMATCHED_RIGHT_PAREN_ORD) - /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS - * replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ -#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) - /* [[[end syntaxes]]] */ - - /* Maximum number of duplicates an interval can allow. Some systems - * (erroneously) define this in other header files, but we want our - * value, so remove any previous define. */ +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS + * replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ +#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +/* Maximum number of duplicates an interval can allow. Some systems + * (erroneously) define this in other header files, but we want our + * value, so remove any previous define. */ #ifdef RE_DUP_MAX #undef RE_DUP_MAX #endif #define RE_DUP_MAX ((1 << 15) - 1) - /* POSIX `cflags' bits (i.e., information for `regcomp'). */ +/* POSIX `cflags' bits (i.e., information for `regcomp'). */ - /* If this bit is set, then use extended regular expression syntax. - * If not set, then use basic regular expression syntax. */ +/* If this bit is set, then use extended regular expression syntax. + * If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 - /* If this bit is set, then ignore case when matching. - * If not set, then case is significant. */ +/* If this bit is set, then ignore case when matching. + * If not set, then case is significant. */ #define REG_ICASE (REG_EXTENDED << 1) - /* If this bit is set, then anchors do not match at newline - * characters in the string. - * If not set, then anchors do match at newlines. */ +/* If this bit is set, then anchors do not match at newline + * characters in the string. + * If not set, then anchors do match at newlines. */ #define REG_NEWLINE (REG_ICASE << 1) - /* If this bit is set, then report only success or fail in regexec. - * If not set, then returns differ between not matching and errors. */ +/* If this bit is set, then report only success or fail in regexec. + * If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (REG_NEWLINE << 1) - /* POSIX `eflags' bits (i.e., information for regexec). */ +/* POSIX `eflags' bits (i.e., information for regexec). */ - /* If this bit is set, then the beginning-of-line operator doesn't match - * the beginning of the string (presumably because it's not the - * beginning of a line). - * If not set, then the beginning-of-line operator does match the - * beginning of the string. */ +/* If this bit is set, then the beginning-of-line operator doesn't match + * the beginning of the string (presumably because it's not the + * beginning of a line). + * If not set, then the beginning-of-line operator does match the + * beginning of the string. */ #define REG_NOTBOL 1 - /* Like REG_NOTBOL, except for the end-of-line. */ +/* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) - /* If any error codes are removed, changed, or added, update the - * `re_error_msg' table in regex.c. */ - typedef enum { - REG_NOERROR = 0, /* Success. */ - REG_NOMATCH, /* Didn't find a match (for regexec). */ - - /* POSIX regcomp return error codes. (In the order listed in the - * standard.) */ - REG_BADPAT, /* Invalid pattern. */ - REG_ECOLLATE, /* Not implemented. */ - REG_ECTYPE, /* Invalid character class name. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_ESUBREG, /* Invalid back reference. */ - REG_EBRACK, /* Unmatched left bracket. */ - REG_EPAREN, /* Parenthesis imbalance. */ - REG_EBRACE, /* Unmatched \{. */ - REG_BADBR, /* Invalid contents of \{\}. */ - REG_ERANGE, /* Invalid range end. */ - REG_ESPACE, /* Ran out of memory. */ - REG_BADRPT, /* No preceding re for repetition op. */ - - /* Error codes we've added. */ - REG_EEND, /* Premature end. */ - REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ - REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ - } reg_errcode_t; - - /* This data structure represents a compiled pattern. Before calling - * the pattern compiler, the fields `buffer', `allocated', `fastmap', - * `translate', and `no_sub' can be set. After the pattern has been - * compiled, the `re_nsub' field is available. All other fields are - * private to the regex routines. */ - - struct re_pattern_buffer { - /* [[[begin pattern_buffer]]] */ - /* Space that holds the compiled pattern. It is declared as - * `unsigned char *' because its elements are - * sometimes used as array indexes. */ - unsigned char *buffer; - - /* Number of bytes to which `buffer' points. */ - unsigned long allocated; - - /* Number of bytes actually used in `buffer'. */ - unsigned long used; - - /* Syntax setting with which the pattern was compiled. */ - reg_syntax_t syntax; - - /* Pointer to a fastmap, if any, otherwise zero. re_search uses - * the fastmap, if there is one, to skip over impossible - * starting points for matches. */ - char *fastmap; - - /* Either a translate table to apply to all characters before - * comparing them, or zero for no translation. The translation - * is applied to a pattern when it is compiled and to a string - * when it is matched. */ - char *translate; - - /* Number of subexpressions found by the compiler. */ - size_t re_nsub; - - /* Zero if this pattern cannot match the empty string, one else. - * Well, in truth it's used only in `re_search_2', to see - * whether or not we should use the fastmap, so we don't set - * this absolutely perfectly; see `re_compile_fastmap' (the - * `duplicate' case). */ - unsigned can_be_null:1; - - /* If REGS_UNALLOCATED, allocate space in the `regs' structure - * for `max (RE_NREGS, re_nsub + 1)' groups. - * If REGS_REALLOCATE, reallocate space if necessary. - * If REGS_FIXED, use what's there. */ +/* If any error codes are removed, changed, or added, update the + * `re_error_msg' table in regex.c. */ +typedef enum { + REG_NOERROR = 0, /* Success. */ + REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + * standard.) */ + REG_BADPAT, /* Invalid pattern. */ + REG_ECOLLATE, /* Not implemented. */ + REG_ECTYPE, /* Invalid character class name. */ + REG_EESCAPE, /* Trailing backslash. */ + REG_ESUBREG, /* Invalid back reference. */ + REG_EBRACK, /* Unmatched left bracket. */ + REG_EPAREN, /* Parenthesis imbalance. */ + REG_EBRACE, /* Unmatched \{. */ + REG_BADBR, /* Invalid contents of \{\}. */ + REG_ERANGE, /* Invalid range end. */ + REG_ESPACE, /* Ran out of memory. */ + REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + REG_EEND, /* Premature end. */ + REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ +} reg_errcode_t; + +/* This data structure represents a compiled pattern. Before calling + * the pattern compiler, the fields `buffer', `allocated', `fastmap', + * `translate', and `no_sub' can be set. After the pattern has been + * compiled, the `re_nsub' field is available. All other fields are + * private to the regex routines. */ + +struct re_pattern_buffer { + /* [[[begin pattern_buffer]]] */ + /* Space that holds the compiled pattern. It is declared as + * `unsigned char *' because its elements are + * sometimes used as array indexes. */ + unsigned char *buffer; + + /* Number of bytes to which `buffer' points. */ + unsigned long allocated; + + /* Number of bytes actually used in `buffer'. */ + unsigned long used; + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t syntax; + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses + * the fastmap, if there is one, to skip over impossible + * starting points for matches. */ + char *fastmap; + + /* Either a translate table to apply to all characters before + * comparing them, or zero for no translation. The translation + * is applied to a pattern when it is compiled and to a string + * when it is matched. */ + char *translate; + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + * Well, in truth it's used only in `re_search_2', to see + * whether or not we should use the fastmap, so we don't set + * this absolutely perfectly; see `re_compile_fastmap' (the + * `duplicate' case). */ + unsigned can_be_null:1; + + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + * for `max (RE_NREGS, re_nsub + 1)' groups. + * If REGS_REALLOCATE, reallocate space if necessary. + * If REGS_FIXED, use what's there. */ #define REGS_UNALLOCATED 0 #define REGS_REALLOCATE 1 #define REGS_FIXED 2 - unsigned regs_allocated:2; + unsigned regs_allocated:2; - /* Set to zero when `regex_compile' compiles a pattern; set to one - * by `re_compile_fastmap' if it updates the fastmap. */ - unsigned fastmap_accurate:1; + /* Set to zero when `regex_compile' compiles a pattern; set to one + * by `re_compile_fastmap' if it updates the fastmap. */ + unsigned fastmap_accurate:1; - /* If set, `re_match_2' does not return information about - * subexpressions. */ - unsigned no_sub:1; + /* If set, `re_match_2' does not return information about + * subexpressions. */ + unsigned no_sub:1; - /* If set, a beginning-of-line anchor doesn't match at the - * beginning of the string. */ - unsigned not_bol:1; + /* If set, a beginning-of-line anchor doesn't match at the + * beginning of the string. */ + unsigned not_bol:1; - /* Similarly for an end-of-line anchor. */ - unsigned not_eol:1; + /* Similarly for an end-of-line anchor. */ + unsigned not_eol:1; - /* If true, an anchor at a newline matches. */ - unsigned newline_anchor:1; + /* If true, an anchor at a newline matches. */ + unsigned newline_anchor:1; - /* [[[end pattern_buffer]]] */ - }; + /* [[[end pattern_buffer]]] */ +}; - typedef struct re_pattern_buffer regex_t; +typedef struct re_pattern_buffer regex_t; - /* search.c (search_buffer) in Emacs needs this one opcode value. It is - * defined both in `regex.c' and here. */ +/* search.c (search_buffer) in Emacs needs this one opcode value. It is + * defined both in `regex.c' and here. */ #define RE_EXACTN_VALUE 1 - - /* Type for byte offsets within the string. POSIX mandates this. */ - typedef int regoff_t; - - /* This is the structure we store register match data in. See - * regex.texinfo for a full description of what registers match. */ - struct re_registers { - unsigned num_regs; - regoff_t *start; - regoff_t *end; - }; - - /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - * `re_match_2' returns information about at least this many registers - * the first time a `regs' structure is passed. */ + +/* Type for byte offsets within the string. POSIX mandates this. */ +typedef int regoff_t; + +/* This is the structure we store register match data in. See + * regex.texinfo for a full description of what registers match. */ +struct re_registers { + unsigned num_regs; + regoff_t *start; + regoff_t *end; +}; + +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + * `re_match_2' returns information about at least this many registers + * the first time a `regs' structure is passed. */ #ifndef RE_NREGS #define RE_NREGS 30 #endif - /* POSIX specification for registers. Aside from the different names than - * `re_registers', POSIX uses an array of structures, instead of a - * structure of arrays. */ - typedef struct { - regoff_t rm_so; /* Byte offset from string's start to substring's start. */ - regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ - } regmatch_t; - - /* Declarations for routines. */ - - /* To avoid duplicating every routine declaration -- once with a - * prototype (if we are ANSI), and once without (if we aren't) -- we - * use the following macro to declare argument types. This - * unfortunately clutters up the declarations a bit, but I think it's - * worth it. */ - - /* POSIX compatibility. */ - extern int regcomp(regex_t * preg, const char *pattern, int cflags); - extern int regexec(const regex_t * preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); - extern size_t regerror(int errcode, const regex_t * preg, char *errbuf, size_t errbuf_size); - extern void regfree(regex_t * preg); +/* POSIX specification for registers. Aside from the different names than + * `re_registers', POSIX uses an array of structures, instead of a + * structure of arrays. */ +typedef struct { + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ +} regmatch_t; + +/* Declarations for routines. */ + +/* To avoid duplicating every routine declaration -- once with a + * prototype (if we are ANSI), and once without (if we aren't) -- we + * use the following macro to declare argument types. This + * unfortunately clutters up the declarations a bit, but I think it's + * worth it. */ + +/* POSIX compatibility. */ +extern int regcomp(regex_t * preg, const char *pattern, int cflags); +extern int regexec(const regex_t * preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); +extern size_t regerror(int errcode, const regex_t * preg, char *errbuf, size_t errbuf_size); +extern void regfree(regex_t * preg); #ifdef __cplusplus } @@ -410,3 +410,4 @@ extern "C" { * trim-versions-without-asking: nil * End: */ + diff --git a/compat/assert.cc b/compat/assert.cc index 183f5340ea..1e1e9d2784 100644 --- a/compat/assert.cc +++ b/compat/assert.cc @@ -13,3 +13,4 @@ void xassert(const char *expr, const char *file, int line) fprintf(stderr, "assertion failed: %s:%d: \"%s\"\n", file, line, expr); abort(); } + diff --git a/compat/assert.h b/compat/assert.h index c1a49357be..7f08f94e94 100644 --- a/compat/assert.h +++ b/compat/assert.h @@ -25,3 +25,4 @@ extern void xassert(const char *, const char *, int); #endif /* SQUID_ASSERT_H */ + diff --git a/compat/cmsg.h b/compat/cmsg.h index b2bb7ce2b8..c8ea453ed0 100644 --- a/compat/cmsg.h +++ b/compat/cmsg.h @@ -140,3 +140,4 @@ struct sockaddr_un { #endif #endif /* SQUID_COMPAT_CMSG_H */ + diff --git a/compat/compat.cc b/compat/compat.cc index 31aad1f290..399ffc6793 100644 --- a/compat/compat.cc +++ b/compat/compat.cc @@ -10,3 +10,4 @@ #include "compat.h" void (*failure_notify) (const char *) = NULL; + diff --git a/compat/compat.h b/compat/compat.h index ac5a6c238f..03dd7f64cd 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -116,3 +116,4 @@ #include "compat/cppunit.h" #endif /* _SQUID_COMPAT_H */ + diff --git a/compat/compat_shared.h b/compat/compat_shared.h index 70e571ae58..66f9af128e 100644 --- a/compat/compat_shared.h +++ b/compat/compat_shared.h @@ -273,3 +273,4 @@ const char * squid_strnstr(const char *s, const char *find, size_t slen); #endif #endif /* _SQUID_COMPAT_SHARED_H */ + diff --git a/compat/cppunit.h b/compat/cppunit.h index 22e8456b6e..34d06ee2ac 100644 --- a/compat/cppunit.h +++ b/compat/cppunit.h @@ -39,3 +39,4 @@ #endif /* HAVE_UNIQUE_PTR */ #endif /* HAVE_CPPUNIT_EXTENSIONS_HELPERMACROS_H */ #endif /* SQUID_COMPAT_CPPUNIT_H */ + diff --git a/compat/cpu.h b/compat/cpu.h index a02a2c38ba..a0c9f2417b 100644 --- a/compat/cpu.h +++ b/compat/cpu.h @@ -69,3 +69,4 @@ inline int sched_getaffinity(int, size_t, cpu_set_t *) { return ENOTSUP; } #endif /* HAVE_CPU_AFFINITY */ #endif /* SQUID_COMPAT_CPU_H */ + diff --git a/compat/debug.cc b/compat/debug.cc index b298a06bfa..4dd6a695e8 100644 --- a/compat/debug.cc +++ b/compat/debug.cc @@ -27,3 +27,4 @@ debug(const char *format,...) } #endif /* __GNUC__ */ + diff --git a/compat/debug.h b/compat/debug.h index 2e045ee294..1848989ba3 100644 --- a/compat/debug.h +++ b/compat/debug.h @@ -38,3 +38,4 @@ void debug(const char *format,...); #endif #endif /* COMPAT_DEBUG_H */ + diff --git a/compat/drand48.c b/compat/drand48.c index 2cdee3edcd..530fdd25b3 100644 --- a/compat/drand48.c +++ b/compat/drand48.c @@ -14,21 +14,21 @@ #if !HAVE_DRAND48 -#define N 16 -#define MASK ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1) -#define LOW(x) ((unsigned)(x) & MASK) -#define HIGH(x) LOW((x) >> N) -#define MUL(x, y, z) { long l = (long)(x) * (long)(y); \ - (z)[0] = LOW(l); (z)[1] = HIGH(l); } -#define CARRY(x, y) ((long)(x) + (long)(y) > MASK) -#define ADDEQU(x, y, z) (z = CARRY(x, (y)), x = LOW(x + (y))) -#define X0 0x330E -#define X1 0xABCD -#define X2 0x1234 -#define A0 0xE66D -#define A1 0xDEEC -#define A2 0x5 -#define C 0xB +#define N 16 +#define MASK ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1) +#define LOW(x) ((unsigned)(x) & MASK) +#define HIGH(x) LOW((x) >> N) +#define MUL(x, y, z) { long l = (long)(x) * (long)(y); \ + (z)[0] = LOW(l); (z)[1] = HIGH(l); } +#define CARRY(x, y) ((long)(x) + (long)(y) > MASK) +#define ADDEQU(x, y, z) (z = CARRY(x, (y)), x = LOW(x + (y))) +#define X0 0x330E +#define X1 0xABCD +#define X2 0x1234 +#define A0 0xE66D +#define A1 0xDEEC +#define A2 0x5 +#define C 0xB static void next(void); static unsigned x[3] = {X0, X1, X2}, a[3] = {A0, A1, A2}, c = C; @@ -61,3 +61,4 @@ next(void) } #endif /* HAVE_DRAND48 */ + diff --git a/compat/drand48.h b/compat/drand48.h index 76f1e844d1..22303598a2 100644 --- a/compat/drand48.h +++ b/compat/drand48.h @@ -15,3 +15,4 @@ SQUIDCEXTERN double drand48(void); #endif #endif + diff --git a/compat/eui64_aton.c b/compat/eui64_aton.c index 5b8f523900..f12fd7c459 100644 --- a/compat/eui64_aton.c +++ b/compat/eui64_aton.c @@ -144,3 +144,4 @@ good: } #endif /* !SQUID_EUI64_ATON */ + diff --git a/compat/eui64_aton.h b/compat/eui64_aton.h index cc78d92651..4785e75aae 100644 --- a/compat/eui64_aton.h +++ b/compat/eui64_aton.h @@ -59,24 +59,24 @@ extern "C" { #define SQUID_EUI64_ATON 1 - /** - * Size of the ASCII representation of an EUI-64. - */ +/** + * Size of the ASCII representation of an EUI-64. + */ #define EUI64_SIZ 24 - /** - * The number of bytes in an EUI-64. - */ +/** + * The number of bytes in an EUI-64. + */ #define EUI64_LEN 8 - /** - * Structure of an IEEE EUI-64. - */ - struct eui64 { - uint8_t octet[EUI64_LEN]; - }; +/** + * Structure of an IEEE EUI-64. + */ +struct eui64 { + uint8_t octet[EUI64_LEN]; +}; - int eui64_aton(const char *a, struct eui64 *e); +int eui64_aton(const char *a, struct eui64 *e); #if defined(__cplusplus) } #endif @@ -84,3 +84,4 @@ extern "C" { #endif /* !_SYS_EUI64_H */ #endif /* HAVE_SYS_EUI64_H */ #endif /* SQUID_COMPAT_EUI64_ATON_H */ + diff --git a/compat/fdsetsize.h b/compat/fdsetsize.h index 1c6abbab65..a343100efa 100644 --- a/compat/fdsetsize.h +++ b/compat/fdsetsize.h @@ -18,8 +18,8 @@ /* FD_SETSIZE must be redefined before including sys/types.h */ #if 0 /* AYJ: would dearly like to use this to enforce include order - but at present some helpers don't follow the squid include methodology. - that will need fixing later. + but at present some helpers don't follow the squid include methodology. + that will need fixing later. */ #ifdef _SYS_TYPES_H #error squid_fdsetsize.h for FDSETSIZE must be included before sys/types.h @@ -98,3 +98,4 @@ #endif #endif /* SQUID_FDSETSIZE_H */ + diff --git a/compat/getaddrinfo.c b/compat/getaddrinfo.c index 350135f49e..4d46ffc5dd 100644 --- a/compat/getaddrinfo.c +++ b/compat/getaddrinfo.c @@ -13,7 +13,7 @@ * Update/Maintenance History: * * 15-Aug-2007 : Copied from fetchmail 6.3.8 - * - added protection around libray headers + * - added protection around libray headers * * 16-Aug-2007 : Altered configure checks * Un-hacked slightly to use system gethostbyname() @@ -313,18 +313,18 @@ xgai_strerror (int ecode) { static const char *eai_descr[] = { "no error", - "address family for nodename not supported", /* EAI_ADDRFAMILY */ - "temporary failure in name resolution", /* EAI_AGAIN */ - "invalid value for ai_flags", /* EAI_BADFLAGS */ - "non-recoverable failure in name resolution", /* EAI_FAIL */ - "ai_family not supported", /* EAI_FAMILY */ - "memory allocation failure", /* EAI_MEMORY */ - "no address associated with nodename", /* EAI_NODATA */ - "nodename nor servname provided, or not known", /* EAI_NONAME */ - "servname not supported for ai_socktype", /* EAI_SERVICE */ - "ai_socktype not supported", /* EAI_SOCKTYPE */ - "system error returned in errno", /* EAI_SYSTEM */ - "argument buffer overflow", /* EAI_OVERFLOW */ + "address family for nodename not supported", /* EAI_ADDRFAMILY */ + "temporary failure in name resolution", /* EAI_AGAIN */ + "invalid value for ai_flags", /* EAI_BADFLAGS */ + "non-recoverable failure in name resolution", /* EAI_FAIL */ + "ai_family not supported", /* EAI_FAMILY */ + "memory allocation failure", /* EAI_MEMORY */ + "no address associated with nodename", /* EAI_NODATA */ + "nodename nor servname provided, or not known", /* EAI_NONAME */ + "servname not supported for ai_socktype", /* EAI_SERVICE */ + "ai_socktype not supported", /* EAI_SOCKTYPE */ + "system error returned in errno", /* EAI_SYSTEM */ + "argument buffer overflow", /* EAI_OVERFLOW */ }; if (ecode < 0 || ecode > (int) (sizeof eai_descr/ sizeof eai_descr[0])) @@ -333,3 +333,4 @@ xgai_strerror (int ecode) } #endif /* HAVE_GETADDRINFO */ + diff --git a/compat/getaddrinfo.h b/compat/getaddrinfo.h index c2a42deece..0b5af56bbc 100644 --- a/compat/getaddrinfo.h +++ b/compat/getaddrinfo.h @@ -16,7 +16,7 @@ * Update/Maintenance History: * * 15-Aug-2007 : Copied from fetchmail 6.3.8 - * - added protection around libray headers + * - added protection around libray headers * * 16-Aug-2007 : Altered configure checks * Un-hacked slightly to use system gethostbyname() @@ -56,14 +56,14 @@ On Windows the following definitions are already available, may be that this could be needed on some other platform */ #if 0 struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - socklen_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for nodename */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ + int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ + socklen_t ai_addrlen; /* length of ai_addr */ + char *ai_canonname; /* canonical name for nodename */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ }; /* Supposed to be defined in */ @@ -100,17 +100,18 @@ struct addrinfo { /* RFC 2553 / Posix resolver */ SQUIDCEXTERN int xgetaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res); -#define getaddrinfo xgetaddrinfo +#define getaddrinfo xgetaddrinfo /* Free addrinfo structure and associated storage */ SQUIDCEXTERN void xfreeaddrinfo (struct addrinfo *ai); -#define freeaddrinfo xfreeaddrinfo +#define freeaddrinfo xfreeaddrinfo /* Convert error return from getaddrinfo() to string */ SQUIDCEXTERN const char *xgai_strerror (int code); #if !defined(gai_strerror) -#define gai_strerror xgai_strerror +#define gai_strerror xgai_strerror #endif #endif /* HAVE_GETADDRINFO */ #endif /* _getaddrinfo_h */ + diff --git a/compat/getnameinfo.c b/compat/getnameinfo.c index a8b7851e4b..100354a57d 100644 --- a/compat/getnameinfo.c +++ b/compat/getnameinfo.c @@ -26,7 +26,7 @@ */ #include "squid.h" -/* KAME: getnameinfo.c,v 1.72 2005/01/13 04:12:03 itojun Exp */ +/* KAME: getnameinfo.c,v 1.72 2005/01/13 04:12:03 itojun Exp */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -133,13 +133,15 @@ static const struct afd { int a_portoff; } afdl [] = { #if INET6 - {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6), + { PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6), offsetof(struct sockaddr_in6, sin6_addr), - offsetof(struct sockaddr_in6, sin6_port)}, + offsetof(struct sockaddr_in6, sin6_port) + }, #endif - {PF_INET, sizeof(struct in_addr), sizeof(struct sockaddr_in), - offsetof(struct sockaddr_in, sin_addr), - offsetof(struct sockaddr_in, sin_port)}, + { PF_INET, sizeof(struct in_addr), sizeof(struct sockaddr_in), + offsetof(struct sockaddr_in, sin_addr), + offsetof(struct sockaddr_in, sin_port) + }, {0, 0, 0, 0, 0}, }; @@ -171,7 +173,7 @@ int flags; if (sa == NULL) return EAI_FAIL; -#if HAVE_SA_LEN /*XXX*/ +#if HAVE_SA_LEN /*XXX*/ if (sa->sa_len != salen) return EAI_FAIL; #endif @@ -423,3 +425,4 @@ int flags; } #endif /* INET6 */ #endif + diff --git a/compat/getnameinfo.h b/compat/getnameinfo.h index e15efc60e0..605f6ca112 100644 --- a/compat/getnameinfo.h +++ b/compat/getnameinfo.h @@ -20,7 +20,8 @@ SQUIDCEXTERN int xgetnameinfo(const struct sockaddr *sa, char *serv, size_t servlen, int flags ); -#define getnameinfo xgetnameinfo +#define getnameinfo xgetnameinfo #endif /* HAVE_GETNAMEINFO */ #endif /* _getnameinfo_h */ + diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c index e14879dbec..a99ae61ec2 100644 --- a/compat/inet_ntop.c +++ b/compat/inet_ntop.c @@ -14,9 +14,9 @@ * Update/Maintenance History: * * 24-Sep-2007 : Copied from bind 9.3.3 - * - Added protection around libray headers - * - Altered configure checks - * - Un-hacked slightly to use system gethostbyname() + * - Added protection around libray headers + * - Altered configure checks + * - Un-hacked slightly to use system gethostbyname() * * 06-Oct-2007 : Various fixes to allow the build on MinGW * @@ -100,11 +100,11 @@ static const char *inet_ntop6 (const u_char *src, char *dst, size_t size); /* char * * inet_ntop(af, src, dst, size) - * convert a network format address to presentation format. + * convert a network format address to presentation format. * return: - * pointer to presentation format address (`dst'), or NULL (see errno). + * pointer to presentation format address (`dst'), or NULL (see errno). * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ const char * xinet_ntop(af, src, dst, size) @@ -127,14 +127,14 @@ size_t size; /* const char * * inet_ntop4(src, dst, size) - * format an IPv4 address + * format an IPv4 address * return: - * `dst' (as a const) + * `dst' (as a const) * notes: - * (1) uses no statics - * (2) takes a u_char* not an in_addr as input + * (1) uses no statics + * (2) takes a u_char* not an in_addr as input * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ static const char * inet_ntop4(src, dst, size) @@ -155,9 +155,9 @@ size_t size; /* const char * * inet_ntop6(src, dst, size) - * convert IPv6 binary address into presentation (printable) format + * convert IPv6 binary address into presentation (printable) format * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ static const char * inet_ntop6(src, dst, size) @@ -179,8 +179,8 @@ size_t size; /* * Preprocess: - * Copy the input (bytewise) array into a wordwise array. - * Find the longest run of 0x00's in src[] for :: shorthanding. + * Copy the input (bytewise) array into a wordwise array. + * Find the longest run of 0x00's in src[] for :: shorthanding. */ memset(words, '\0', sizeof words); for (i = 0; i < NS_IN6ADDRSZ; i++) @@ -254,3 +254,4 @@ size_t size; } #endif /* HAVE_INET_NTOP */ + diff --git a/compat/inet_ntop.h b/compat/inet_ntop.h index 11aa427d83..454a8a8bd9 100644 --- a/compat/inet_ntop.h +++ b/compat/inet_ntop.h @@ -25,3 +25,4 @@ SQUIDCEXTERN const char * xinet_ntop(int af, const void *src, char *dst, size_t #endif #endif /* _INC_INET_NTOP_H */ + diff --git a/compat/inet_pton.c b/compat/inet_pton.c index 342290c694..7e158b805c 100644 --- a/compat/inet_pton.c +++ b/compat/inet_pton.c @@ -89,19 +89,19 @@ static const char rcsid[] = "inet_pton.c,v 1.2.206.2 2005/07/28 07:43:18 marka E * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ -static int inet_pton4 (const char *src, u_char *dst); -static int inet_pton6 (const char *src, u_char *dst); +static int inet_pton4 (const char *src, u_char *dst); +static int inet_pton6 (const char *src, u_char *dst); /* int * inet_pton(af, src, dst) - * convert from presentation format (which usually means ASCII printable) - * to network format (which is usually some kind of binary format). + * convert from presentation format (which usually means ASCII printable) + * to network format (which is usually some kind of binary format). * return: - * 1 if the address was valid for the specified address family - * 0 if the address wasn't valid (`dst' is untouched in this case) - * -1 if some other error occurred (`dst' is untouched in this case, too) + * 1 if the address was valid for the specified address family + * 0 if the address wasn't valid (`dst' is untouched in this case) + * -1 if some other error occurred (`dst' is untouched in this case, too) * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ int xinet_pton(af, src, dst) @@ -123,13 +123,13 @@ void *dst; /* int * inet_pton4(src, dst) - * like inet_aton() but without all the hexadecimal and shorthand. + * like inet_aton() but without all the hexadecimal and shorthand. * return: - * 1 if `src' is a valid dotted quad, else 0. + * 1 if `src' is a valid dotted quad, else 0. * notice: - * does not touch `dst' unless it's returning 1. + * does not touch `dst' unless it's returning 1. * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ static int inet_pton4(src, dst) @@ -175,16 +175,16 @@ u_char *dst; /* int * inet_pton6(src, dst) - * convert presentation level address to network order binary form. + * convert presentation level address to network order binary form. * return: - * 1 if `src' is a valid [RFC1884 2.2] address, else 0. + * 1 if `src' is a valid [RFC1884 2.2] address, else 0. * notice: - * (1) does not touch `dst' unless it's returning 1. - * (2) :: in a full address is silently ignored. + * (1) does not touch `dst' unless it's returning 1. + * (2) :: in a full address is silently ignored. * credit: - * inspired by Mark Andrews. + * inspired by Mark Andrews. * author: - * Paul Vixie, 1996. + * Paul Vixie, 1996. */ static int inet_pton6(src, dst) @@ -242,7 +242,7 @@ u_char *dst; inet_pton4(curtok, tp) > 0) { tp += NS_INADDRSZ; seen_xdigits = 0; - break; /* '\0' was seen by inet_pton4(). */ + break; /* '\0' was seen by inet_pton4(). */ } return (0); } @@ -275,3 +275,4 @@ u_char *dst; } #endif /* HAVE_INET_PTON */ + diff --git a/compat/inet_pton.h b/compat/inet_pton.h index a6e99dd0a6..d0d46c49c6 100644 --- a/compat/inet_pton.h +++ b/compat/inet_pton.h @@ -28,3 +28,4 @@ SQUIDCEXTERN int xinet_pton(int af, const char *src, void *dst); #endif #endif /* _INC_INET_NTOP_H */ + diff --git a/compat/initgroups.h b/compat/initgroups.h index 05d10831ef..25eb2464f2 100644 --- a/compat/initgroups.h +++ b/compat/initgroups.h @@ -15,3 +15,4 @@ SQUIDCEXTERN int initgroups(const char *user, gid_t group); #endif #endif /* SQUID_INITGROPS_H */ + diff --git a/compat/memrchr.cc b/compat/memrchr.cc index 491e13b680..1715ba0acd 100644 --- a/compat/memrchr.cc +++ b/compat/memrchr.cc @@ -38,13 +38,14 @@ memrchr(const void *s, int c, size_t n) const unsigned char *cp; if (n != 0) { - cp = (unsigned char *)s + n; - do { - if (*(--cp) == (unsigned char)c) - return((void *)cp); - } while (--n != 0); + cp = (unsigned char *)s + n; + do { + if (*(--cp) == (unsigned char)c) + return((void *)cp); + } while (--n != 0); } return((void *)0); } #endif + diff --git a/compat/memrchr.h b/compat/memrchr.h index 9b3c1d8566..1ad7c7247b 100644 --- a/compat/memrchr.h +++ b/compat/memrchr.h @@ -35,3 +35,4 @@ void *memrchr(const void *s, int c, size_t n); #endif #endif /* SQUID_COMPAT_MEMRCHR_H */ + diff --git a/compat/mswindows.cc b/compat/mswindows.cc index c348e5cbf2..2aaad223e4 100644 --- a/compat/mswindows.cc +++ b/compat/mswindows.cc @@ -208,8 +208,8 @@ _free_osfhnd(int filehandle) _osfhnd(filehandle) = (long) INVALID_HANDLE_VALUE; return (0); } else { - errno = EBADF; /* bad handle */ - _doserrno = 0L; /* not an OS error */ + errno = EBADF; /* bad handle */ + _doserrno = 0L; /* not an OS error */ return -1; } } @@ -355,3 +355,4 @@ syslog(int priority, const char *fmt, ...) /* note: this is all MSWindows-specific code; all of it should be conditional */ #endif /* _SQUID_WINDOWS_ */ + diff --git a/compat/os/aix.h b/compat/os/aix.h index 05c64600b5..ed90c1393e 100644 --- a/compat/os/aix.h +++ b/compat/os/aix.h @@ -32,3 +32,4 @@ #endif /* _SQUID_AIX_ */ #endif /* SQUID_OS_AIX_H */ + diff --git a/compat/os/android.h b/compat/os/android.h index f0562fa3ab..ea1cd42e16 100644 --- a/compat/os/android.h +++ b/compat/os/android.h @@ -18,3 +18,4 @@ #endif /* _SQUID_ANDROID_ */ #endif /* SQUID_OS_ANDROID_H */ + diff --git a/compat/os/dragonfly.h b/compat/os/dragonfly.h index 03c329f385..476d6b8ad7 100644 --- a/compat/os/dragonfly.h +++ b/compat/os/dragonfly.h @@ -26,3 +26,4 @@ #endif /* _SQUID_DRAGONFLY_ */ #endif /* SQUID_OS_DRAGONFLY_H */ + diff --git a/compat/os/freebsd.h b/compat/os/freebsd.h index 22a167f7e7..c3534ae006 100644 --- a/compat/os/freebsd.h +++ b/compat/os/freebsd.h @@ -41,3 +41,4 @@ #endif /* _SQUID_FREEBSD_ */ #endif /* SQUID_OS_FREEBSD_H */ + diff --git a/compat/os/hpux.h b/compat/os/hpux.h index 6a64febf66..eaa293c8b8 100644 --- a/compat/os/hpux.h +++ b/compat/os/hpux.h @@ -40,3 +40,4 @@ #endif /* _SQUID_HPUX_ */ #endif /* SQUID_OS_HPUX_H */ + diff --git a/compat/os/linux.h b/compat/os/linux.h index d1303eec88..dcddb5b31e 100644 --- a/compat/os/linux.h +++ b/compat/os/linux.h @@ -72,3 +72,4 @@ typedef uint32_t __u32; #endif /* _SQUID_LINUX_ */ #endif /* SQUID_OS_LINUX_H */ + diff --git a/compat/os/macosx.h b/compat/os/macosx.h index a972e1a7da..855f91dedb 100644 --- a/compat/os/macosx.h +++ b/compat/os/macosx.h @@ -35,3 +35,4 @@ #endif /* _SQUID_APPLE_ */ #endif /* SQUID_OS_MACOSX_H */ + diff --git a/compat/os/mswindows.h b/compat/os/mswindows.h index e80fd6a124..1d3e6eb2fe 100644 --- a/compat/os/mswindows.h +++ b/compat/os/mswindows.h @@ -70,7 +70,7 @@ #endif #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -# define __USE_FILE_OFFSET64 1 +# define __USE_FILE_OFFSET64 1 #endif #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ @@ -179,7 +179,7 @@ SQUIDCEXTERN int WIN32_truncate(const char *pathname, off_t length); #define O_RANDOM _O_RANDOM #endif #ifndef O_NDELAY -#define O_NDELAY 0 +#define O_NDELAY 0 #endif #ifndef S_IFMT @@ -226,16 +226,16 @@ SQUIDCEXTERN int WIN32_truncate(const char *pathname, off_t length); #endif #if defined(_MSC_VER) -#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) +#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) #endif -#define SIGHUP 1 /* hangup */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ +#define SIGHUP 1 /* hangup */ +#define SIGKILL 9 /* kill (cannot be caught or ignored) */ +#define SIGBUS 10 /* bus error */ +#define SIGPIPE 13 /* write on a pipe with no one to read it */ +#define SIGCHLD 20 /* to parent on child stop or exit */ +#define SIGUSR1 30 /* user defined signal 1 */ +#define SIGUSR2 31 /* user defined signal 2 */ #if _SQUID_MINGW_ typedef unsigned char boolean; @@ -267,8 +267,8 @@ struct group { #if !HAVE_GETTIMEOFDAY struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ }; #endif @@ -812,27 +812,27 @@ WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f) #else /* #ifdef __cplusplus */ #define connect(s,n,l) \ - (SOCKET_ERROR == connect(_get_osfhandle(s),n,l) ? \ - (WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1, -1) : 0) + (SOCKET_ERROR == connect(_get_osfhandle(s),n,l) ? \ + (WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1, -1) : 0) #define gethostbyname(n) \ - (NULL == ((HOSTENT FAR*)(ws32_result = (int)gethostbyname(n))) ? \ - (errno = WSAGetLastError()), (HOSTENT FAR*)NULL : (HOSTENT FAR*)ws32_result) + (NULL == ((HOSTENT FAR*)(ws32_result = (int)gethostbyname(n))) ? \ + (errno = WSAGetLastError()), (HOSTENT FAR*)NULL : (HOSTENT FAR*)ws32_result) #define gethostname(n,l) \ - (SOCKET_ERROR == gethostname(n,l) ? \ - (errno = WSAGetLastError()), -1 : 0) + (SOCKET_ERROR == gethostname(n,l) ? \ + (errno = WSAGetLastError()), -1 : 0) #define recv(s,b,l,f) \ - (SOCKET_ERROR == (ws32_result = recv(_get_osfhandle(s),b,l,f)) ? \ - (errno = WSAGetLastError()), -1 : ws32_result) + (SOCKET_ERROR == (ws32_result = recv(_get_osfhandle(s),b,l,f)) ? \ + (errno = WSAGetLastError()), -1 : ws32_result) #define sendto(s,b,l,f,t,tl) \ - (SOCKET_ERROR == (ws32_result = sendto(_get_osfhandle(s),b,l,f,t,tl)) ? \ - (errno = WSAGetLastError()), -1 : ws32_result) + (SOCKET_ERROR == (ws32_result = sendto(_get_osfhandle(s),b,l,f,t,tl)) ? \ + (errno = WSAGetLastError()), -1 : ws32_result) #define select(n,r,w,e,t) \ - (SOCKET_ERROR == (ws32_result = select(n,r,w,e,t)) ? \ - (errno = WSAGetLastError()), -1 : ws32_result) + (SOCKET_ERROR == (ws32_result = select(n,r,w,e,t)) ? \ + (errno = WSAGetLastError()), -1 : ws32_result) #define socket(f,t,p) \ - (INVALID_SOCKET == ((SOCKET)(ws32_result = (int)socket(f,t,p))) ? \ - ((WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1), -1) : \ - (SOCKET)_open_osfhandle(ws32_result,0)) + (INVALID_SOCKET == ((SOCKET)(ws32_result = (int)socket(f,t,p))) ? \ + ((WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1), -1) : \ + (SOCKET)_open_osfhandle(ws32_result,0)) #define write _write /* Needed in util.c */ #define open _open /* Needed in win32lib.c */ #endif /* #ifdef __cplusplus */ @@ -845,26 +845,26 @@ WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f) #if HAVE_SYS_RESOURCE_H #include #else -#define RUSAGE_SELF 0 /* calling process */ -#define RUSAGE_CHILDREN -1 /* terminated child processes */ +#define RUSAGE_SELF 0 /* calling process */ +#define RUSAGE_CHILDREN -1 /* terminated child processes */ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ - long ru_maxrss; /* integral max resident set size */ - long ru_ixrss; /* integral shared text memory size */ - long ru_idrss; /* integral unshared data size */ - long ru_isrss; /* integral unshared stack size */ - long ru_minflt; /* page reclaims */ - long ru_majflt; /* page faults */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary context switches */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ + long ru_maxrss; /* integral max resident set size */ + long ru_ixrss; /* integral shared text memory size */ + long ru_idrss; /* integral unshared data size */ + long ru_isrss; /* integral unshared stack size */ + long ru_minflt; /* page reclaims */ + long ru_majflt; /* page faults */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary context switches */ }; #endif /* HAVE_SYS_RESOURCE_H */ @@ -996,3 +996,4 @@ void WIN32_maperror(unsigned long WIN32_oserrno); #endif /* _SQUID_WINDOWS_ */ #endif /* SQUID_OS_MSWINDOWS_H */ + diff --git a/compat/os/netbsd.h b/compat/os/netbsd.h index 2f144b7fb9..7f1e094b9b 100644 --- a/compat/os/netbsd.h +++ b/compat/os/netbsd.h @@ -31,3 +31,4 @@ #endif /* _SQUID_NETBSD_ */ #endif /* SQUID_OS_NETBSD_H */ + diff --git a/compat/os/next.h b/compat/os/next.h index 08d342e3e0..830636706a 100644 --- a/compat/os/next.h +++ b/compat/os/next.h @@ -55,3 +55,4 @@ #endif /* _SQUID_NEXT_ */ #endif /* SQUID_OS_NEXT_H */ + diff --git a/compat/os/openbsd.h b/compat/os/openbsd.h index d8f6c23f95..2b1782961a 100644 --- a/compat/os/openbsd.h +++ b/compat/os/openbsd.h @@ -48,3 +48,4 @@ #endif /* _SQUID_OPENBSD_ */ #endif /* SQUID_OS_OPENBSD_H */ + diff --git a/compat/os/opensolaris_10_netdb.h b/compat/os/opensolaris_10_netdb.h index 4011d04fc8..2387d34aeb 100644 --- a/compat/os/opensolaris_10_netdb.h +++ b/compat/os/opensolaris_10_netdb.h @@ -15,14 +15,14 @@ * Use is subject to license terms. */ -/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ /* * BIND 4.9.3: * * Copyright (c) 1980, 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,8 +34,8 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -81,7 +81,7 @@ */ #ifndef _NETDB_H -#define _NETDB_H +#define _NETDB_H #include #include @@ -90,398 +90,399 @@ #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #include -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif -#define _PATH_HEQUIV "/etc/hosts.equiv" -#define _PATH_HOSTS "/etc/hosts" -#define _PATH_IPNODES "/etc/inet/ipnodes" -#define _PATH_IPSECALGS "/etc/inet/ipsecalgs" -#define _PATH_NETMASKS "/etc/netmasks" -#define _PATH_NETWORKS "/etc/networks" -#define _PATH_PROTOCOLS "/etc/protocols" -#define _PATH_SERVICES "/etc/services" - - struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#define h_addr h_addr_list[0] /* address, for backward compatiblity */ - }; - - /* - * addrinfo introduced with IPv6 for Protocol-Independent Hostname - * and Service Name Translation. - */ +#define _PATH_HEQUIV "/etc/hosts.equiv" +#define _PATH_HOSTS "/etc/hosts" +#define _PATH_IPNODES "/etc/inet/ipnodes" +#define _PATH_IPSECALGS "/etc/inet/ipsecalgs" +#define _PATH_NETMASKS "/etc/netmasks" +#define _PATH_NETWORKS "/etc/networks" +#define _PATH_PROTOCOLS "/etc/protocols" +#define _PATH_SERVICES "/etc/services" + +struct hostent { + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ + int h_addrtype; /* host address type */ + int h_length; /* length of address */ + char **h_addr_list; /* list of addresses from name server */ +#define h_addr h_addr_list[0] /* address, for backward compatiblity */ +}; + +/* + * addrinfo introduced with IPv6 for Protocol-Independent Hostname + * and Service Name Translation. + */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) - struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ +struct addrinfo { + int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ #ifdef __sparcv9 - int _ai_pad; /* for backwards compat with old size_t */ + int _ai_pad; /* for backwards compat with old size_t */ #endif /* __sparcv9 */ - socklen_t ai_addrlen; - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ - }; - - /* addrinfo flags */ -#define AI_PASSIVE 0x0008 /* intended for bind() + listen() */ -#define AI_CANONNAME 0x0010 /* return canonical version of host */ -#define AI_NUMERICHOST 0x0020 /* use numeric node address string */ -#define AI_NUMERICSERV 0x0040 /* servname is assumed numeric */ - - /* getipnodebyname() flags */ -#define AI_V4MAPPED 0x0001 /* IPv4 mapped addresses if no IPv6 */ -#define AI_ALL 0x0002 /* IPv6 and IPv4 mapped addresses */ -#define AI_ADDRCONFIG 0x0004 /* AAAA or A records only if IPv6/IPv4 cnfg'd */ - - /* - * These were defined in RFC 2553 but not SUSv3 - * or RFC 3493 which obsoleted 2553. - */ + socklen_t ai_addrlen; + char *ai_canonname; /* canonical name for hostname */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ +}; + +/* addrinfo flags */ +#define AI_PASSIVE 0x0008 /* intended for bind() + listen() */ +#define AI_CANONNAME 0x0010 /* return canonical version of host */ +#define AI_NUMERICHOST 0x0020 /* use numeric node address string */ +#define AI_NUMERICSERV 0x0040 /* servname is assumed numeric */ + +/* getipnodebyname() flags */ +#define AI_V4MAPPED 0x0001 /* IPv4 mapped addresses if no IPv6 */ +#define AI_ALL 0x0002 /* IPv6 and IPv4 mapped addresses */ +#define AI_ADDRCONFIG 0x0004 /* AAAA or A records only if IPv6/IPv4 cnfg'd */ + +/* + * These were defined in RFC 2553 but not SUSv3 + * or RFC 3493 which obsoleted 2553. + */ #if !defined(_XPG6) || defined(__EXTENSIONS__) -#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) +#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) - /* addrinfo errors */ -#define EAI_ADDRFAMILY 1 /* address family not supported */ -#define EAI_NODATA 7 /* no address */ +/* addrinfo errors */ +#define EAI_ADDRFAMILY 1 /* address family not supported */ +#define EAI_NODATA 7 /* no address */ #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ -#define EAI_AGAIN 2 /* DNS temporary failure */ -#define EAI_BADFLAGS 3 /* invalid ai_flags */ -#define EAI_FAIL 4 /* DNS non-recoverable failure */ -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_MEMORY 6 /* memory allocation failure */ -#define EAI_NONAME 8 /* host/servname not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ -#define EAI_SYSTEM 11 /* system error in errno */ -#define EAI_OVERFLOW 12 /* argument buffer overflow */ -#define EAI_PROTOCOL 13 -#define EAI_MAX 14 - - /* getnameinfo flags */ -#define NI_NOFQDN 0x0001 -#define NI_NUMERICHOST 0x0002 /* return numeric form of address */ -#define NI_NAMEREQD 0x0004 /* request DNS name */ -#define NI_NUMERICSERV 0x0008 -#define NI_DGRAM 0x0010 +#define EAI_AGAIN 2 /* DNS temporary failure */ +#define EAI_BADFLAGS 3 /* invalid ai_flags */ +#define EAI_FAIL 4 /* DNS non-recoverable failure */ +#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_MEMORY 6 /* memory allocation failure */ +#define EAI_NONAME 8 /* host/servname not known */ +#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_SYSTEM 11 /* system error in errno */ +#define EAI_OVERFLOW 12 /* argument buffer overflow */ +#define EAI_PROTOCOL 13 +#define EAI_MAX 14 + +/* getnameinfo flags */ +#define NI_NOFQDN 0x0001 +#define NI_NUMERICHOST 0x0002 /* return numeric form of address */ +#define NI_NAMEREQD 0x0004 /* request DNS name */ +#define NI_NUMERICSERV 0x0008 +#define NI_DGRAM 0x0010 #if !defined(_XPG6) || defined(__EXTENSIONS__) - /* Not listed in any standards document */ -#define NI_WITHSCOPEID 0x0020 -#define NI_NUMERICSCOPE 0x0040 +/* Not listed in any standards document */ +#define NI_WITHSCOPEID 0x0020 +#define NI_NUMERICSCOPE 0x0040 - /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */ -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 +/* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */ +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ - /* - * Scope delimit character - */ -#define SCOPE_DELIMITER '%' +/* + * Scope delimit character + */ +#define SCOPE_DELIMITER '%' - /* - * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols - * and algorithms. - */ +/* + * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols + * and algorithms. + */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) - typedef struct ipsecalgent { - char **a_names; /* algorithm names */ - int a_proto_num; /* protocol number */ - int a_alg_num; /* algorithm number */ - char *a_mech_name; /* encryption framework mechanism name */ - int *a_block_sizes; /* supported block sizes */ - int *a_key_sizes; /* supported key sizes */ - int a_key_increment; /* key size increment */ - int *a_mech_params; /* mechanism specific parameters */ - int a_alg_flags; /* algorithm flags */ - } ipsecalgent_t; - - /* well-known IPsec protocol numbers */ - -#define IPSEC_PROTO_AH 2 -#define IPSEC_PROTO_ESP 3 +typedef struct ipsecalgent { + char **a_names; /* algorithm names */ + int a_proto_num; /* protocol number */ + int a_alg_num; /* algorithm number */ + char *a_mech_name; /* encryption framework mechanism name */ + int *a_block_sizes; /* supported block sizes */ + int *a_key_sizes; /* supported key sizes */ + int a_key_increment; /* key size increment */ + int *a_mech_params; /* mechanism specific parameters */ + int a_alg_flags; /* algorithm flags */ +} ipsecalgent_t; + +/* well-known IPsec protocol numbers */ + +#define IPSEC_PROTO_AH 2 +#define IPSEC_PROTO_ESP 3 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ - /* - * Assumption here is that a network number - * fits in 32 bits -- probably a poor one. - */ - struct netent { - char *n_name; /* official name of net */ - char **n_aliases; /* alias list */ - int n_addrtype; /* net address type */ - in_addr_t n_net; /* network # */ - }; - - struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ - }; - - struct servent { - char *s_name; /* official service name */ - char **s_aliases; /* alias list */ - int s_port; /* port # */ - char *s_proto; /* protocol to use */ - }; - -#ifdef __STDC__ +/* + * Assumption here is that a network number + * fits in 32 bits -- probably a poor one. + */ +struct netent { + char *n_name; /* official name of net */ + char **n_aliases; /* alias list */ + int n_addrtype; /* net address type */ + in_addr_t n_net; /* network # */ +}; + +struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol # */ +}; + +struct servent { + char *s_name; /* official service name */ + char **s_aliases; /* alias list */ + int s_port; /* port # */ + char *s_proto; /* protocol to use */ +}; + +#ifdef __STDC__ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) - struct hostent *gethostbyname_r - (const char *, struct hostent *, char *, int, int *h_errnop); - struct hostent *gethostbyaddr_r - (const char *, int, int, struct hostent *, char *, int, int *h_errnop); - struct hostent *getipnodebyname(const char *, int, int, int *); - struct hostent *getipnodebyaddr(const void *, size_t, int, int *); - void freehostent(struct hostent *); - struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop); - - struct servent *getservbyname_r - (const char *name, const char *, struct servent *, char *, int); - struct servent *getservbyport_r - (int port, const char *, struct servent *, char *, int); - struct servent *getservent_r(struct servent *, char *, int); - - struct netent *getnetbyname_r - (const char *, struct netent *, char *, int); - struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int); - struct netent *getnetent_r(struct netent *, char *, int); - - struct protoent *getprotobyname_r - (const char *, struct protoent *, char *, int); - struct protoent *getprotobynumber_r - (int, struct protoent *, char *, int); - struct protoent *getprotoent_r(struct protoent *, char *, int); - - int getnetgrent_r(char **, char **, char **, char *, int); - int innetgr(const char *, const char *, const char *, const char *); +struct hostent *gethostbyname_r +(const char *, struct hostent *, char *, int, int *h_errnop); +struct hostent *gethostbyaddr_r +(const char *, int, int, struct hostent *, char *, int, int *h_errnop); +struct hostent *getipnodebyname(const char *, int, int, int *); +struct hostent *getipnodebyaddr(const void *, size_t, int, int *); +void freehostent(struct hostent *); +struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop); + +struct servent *getservbyname_r +(const char *name, const char *, struct servent *, char *, int); +struct servent *getservbyport_r +(int port, const char *, struct servent *, char *, int); +struct servent *getservent_r(struct servent *, char *, int); + +struct netent *getnetbyname_r +(const char *, struct netent *, char *, int); +struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int); +struct netent *getnetent_r(struct netent *, char *, int); + +struct protoent *getprotobyname_r +(const char *, struct protoent *, char *, int); +struct protoent *getprotobynumber_r +(int, struct protoent *, char *, int); +struct protoent *getprotoent_r(struct protoent *, char *, int); + +int getnetgrent_r(char **, char **, char **, char *, int); +int innetgr(const char *, const char *, const char *, const char *); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ - /* Old interfaces that return a pointer to a static area; MT-unsafe */ - struct hostent *gethostbyname(const char *); - struct hostent *gethostent(void); - struct netent *getnetbyaddr(in_addr_t, int); - struct netent *getnetbyname(const char *); - struct netent *getnetent(void); - struct protoent *getprotobyname(const char *); - struct protoent *getprotobynumber(int); - struct protoent *getprotoent(void); - struct servent *getservbyname(const char *, const char *); - struct servent *getservbyport(int, const char *); - struct servent *getservent(void); - - /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */ +/* Old interfaces that return a pointer to a static area; MT-unsafe */ +struct hostent *gethostbyname(const char *); +struct hostent *gethostent(void); +struct netent *getnetbyaddr(in_addr_t, int); +struct netent *getnetbyname(const char *); +struct netent *getnetent(void); +struct protoent *getprotobyname(const char *); +struct protoent *getprotobynumber(int); +struct protoent *getprotoent(void); +struct servent *getservbyname(const char *, const char *); +struct servent *getservbyport(int, const char *); +struct servent *getservent(void); + +/* gethostbyaddr() second argument is a size_t only in unix95/unix98 */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) - struct hostent *gethostbyaddr(const void *, socklen_t, int); +struct hostent *gethostbyaddr(const void *, socklen_t, int); #else - struct hostent *gethostbyaddr(const void *, size_t, int); +struct hostent *gethostbyaddr(const void *, size_t, int); #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) - int endhostent(void); - int endnetent(void); - int endprotoent(void); - int endservent(void); - int sethostent(int); - int setnetent(int); - int setprotoent(int); - int setservent(int); +int endhostent(void); +int endnetent(void); +int endprotoent(void); +int endservent(void); +int sethostent(int); +int setnetent(int); +int setprotoent(int); +int setservent(int); #else - void endhostent(void); - void endnetent(void); - void endprotoent(void); - void endservent(void); - void sethostent(int); - void setnetent(int); - void setprotoent(int); - void setservent(int); +void endhostent(void); +void endnetent(void); +void endprotoent(void); +void endservent(void); +void sethostent(int); +void setnetent(int); +void setprotoent(int); +void setservent(int); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) -#ifdef _XPG6 -#ifdef __PRAGMA_REDEFINE_EXTNAME +#ifdef _XPG6 +#ifdef __PRAGMA_REDEFINE_EXTNAME #pragma redefine_extname getaddrinfo __xnet_getaddrinfo -#else /* __PRAGMA_REDEFINE_EXTNAME */ -#define getaddrinfo __xnet_getaddrinfo -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* _XPG6 */ - - int getaddrinfo(const char *_RESTRICT_KYWD1, - const char *_RESTRICT_KYWD2, - const struct addrinfo *_RESTRICT_KYWD3, - struct addrinfo **_RESTRICT_KYWD4); - void freeaddrinfo(struct addrinfo *); - const char *gai_strerror(int); - int getnameinfo(const struct sockaddr *_RESTRICT_KYWD1, - socklen_t, char *_RESTRICT_KYWD2, socklen_t, - char *_RESTRICT_KYWD3, socklen_t, int); +#else /* __PRAGMA_REDEFINE_EXTNAME */ +#define getaddrinfo __xnet_getaddrinfo +#endif /* __PRAGMA_REDEFINE_EXTNAME */ +#endif /* _XPG6 */ + +int getaddrinfo(const char *_RESTRICT_KYWD1, + const char *_RESTRICT_KYWD2, + const struct addrinfo *_RESTRICT_KYWD3, + struct addrinfo **_RESTRICT_KYWD4); +void freeaddrinfo(struct addrinfo *); +const char *gai_strerror(int); +int getnameinfo(const struct sockaddr *_RESTRICT_KYWD1, + socklen_t, char *_RESTRICT_KYWD2, socklen_t, + char *_RESTRICT_KYWD3, socklen_t, int); #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) - int getnetgrent(char **, char **, char **); - int setnetgrent(const char *); - int endnetgrent(void); - int rcmd(char **, unsigned short, - const char *, const char *, const char *, int *); - int rcmd_af(char **, unsigned short, - const char *, const char *, const char *, int *, int); - int rresvport_af(int *, int); - int rresvport_addr(int *, struct sockaddr_storage *); - int rexec(char **, unsigned short, - const char *, const char *, const char *, int *); - int rexec_af(char **, unsigned short, - const char *, const char *, const char *, int *, int); - int rresvport(int *); - int ruserok(const char *, int, const char *, const char *); - /* BIND */ - struct hostent *gethostbyname2(const char *, int); - void herror(const char *); - const char *hstrerror(int); - /* End BIND */ - - /* IPsec algorithm prototype definitions */ - struct ipsecalgent *getipsecalgbyname(const char *, int, int *); - struct ipsecalgent *getipsecalgbynum(int, int, int *); - int getipsecprotobyname(const char *doi_name); - char *getipsecprotobynum(int doi_domain); - void freeipsecalgent(struct ipsecalgent *ptr); - /* END IPsec algorithm prototype definitions */ +int getnetgrent(char **, char **, char **); +int setnetgrent(const char *); +int endnetgrent(void); +int rcmd(char **, unsigned short, + const char *, const char *, const char *, int *); +int rcmd_af(char **, unsigned short, + const char *, const char *, const char *, int *, int); +int rresvport_af(int *, int); +int rresvport_addr(int *, struct sockaddr_storage *); +int rexec(char **, unsigned short, + const char *, const char *, const char *, int *); +int rexec_af(char **, unsigned short, + const char *, const char *, const char *, int *, int); +int rresvport(int *); +int ruserok(const char *, int, const char *, const char *); +/* BIND */ +struct hostent *gethostbyname2(const char *, int); +void herror(const char *); +const char *hstrerror(int); +/* End BIND */ + +/* IPsec algorithm prototype definitions */ +struct ipsecalgent *getipsecalgbyname(const char *, int, int *); +struct ipsecalgent *getipsecalgbynum(int, int, int *); +int getipsecprotobyname(const char *doi_name); +char *getipsecprotobynum(int doi_domain); +void freeipsecalgent(struct ipsecalgent *ptr); +/* END IPsec algorithm prototype definitions */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ - struct hostent *gethostbyname_r(); - struct hostent *gethostbyaddr_r(); - struct hostent *getipnodebyname(); - struct hostent *getipnodebyaddr(); - void freehostent(); - struct hostent *gethostent_r(); - struct servent *getservbyname_r(); - struct servent *getservbyport_r(); - struct servent *getservent_r(); - struct netent *getnetbyname_r(); - struct netent *getnetbyaddr_r(); - struct netent *getnetent_r(); - struct protoent *getprotobyname_r(); - struct protoent *getprotobynumber_r(); - struct protoent *getprotoent_r(); - int getnetgrent_r(); - int innetgr(); - - /* Old interfaces that return a pointer to a static area; MT-unsafe */ - struct hostent *gethostbyname(); - struct hostent *gethostbyaddr(); - struct hostent *gethostent(); - struct netent *getnetbyname(); - struct netent *getnetbyaddr(); - struct netent *getnetent(); - struct servent *getservbyname(); - struct servent *getservbyport(); - struct servent *getservent(); - struct protoent *getprotobyname(); - struct protoent *getprotobynumber(); - struct protoent *getprotoent(); - int getnetgrent(); - - int sethostent(); - int endhostent(); - int setnetent(); - int endnetent(); - int setservent(); - int endservent(); - int setprotoent(); - int endprotoent(); - int setnetgrent(); - int endnetgrent(); - int rcmd(); - int rcmd_af(); - int rexec(); - int rexec_af(); - int rresvport(); - int rresvport_af(); - int rresvport_addr(); - int ruserok(); - /* BIND */ - struct hostent *gethostbyname2(); - void herror(); - char *hstrerror(); - /* IPv6 prototype definitons */ - int getaddrinfo(); - void freeaddrinfo(); - const char *gai_strerror(); - int getnameinfo(); - /* END IPv6 prototype definitions */ - /* End BIND */ +#else /* __STDC__ */ +struct hostent *gethostbyname_r(); +struct hostent *gethostbyaddr_r(); +struct hostent *getipnodebyname(); +struct hostent *getipnodebyaddr(); +void freehostent(); +struct hostent *gethostent_r(); +struct servent *getservbyname_r(); +struct servent *getservbyport_r(); +struct servent *getservent_r(); +struct netent *getnetbyname_r(); +struct netent *getnetbyaddr_r(); +struct netent *getnetent_r(); +struct protoent *getprotobyname_r(); +struct protoent *getprotobynumber_r(); +struct protoent *getprotoent_r(); +int getnetgrent_r(); +int innetgr(); + +/* Old interfaces that return a pointer to a static area; MT-unsafe */ +struct hostent *gethostbyname(); +struct hostent *gethostbyaddr(); +struct hostent *gethostent(); +struct netent *getnetbyname(); +struct netent *getnetbyaddr(); +struct netent *getnetent(); +struct servent *getservbyname(); +struct servent *getservbyport(); +struct servent *getservent(); +struct protoent *getprotobyname(); +struct protoent *getprotobynumber(); +struct protoent *getprotoent(); +int getnetgrent(); + +int sethostent(); +int endhostent(); +int setnetent(); +int endnetent(); +int setservent(); +int endservent(); +int setprotoent(); +int endprotoent(); +int setnetgrent(); +int endnetgrent(); +int rcmd(); +int rcmd_af(); +int rexec(); +int rexec_af(); +int rresvport(); +int rresvport_af(); +int rresvport_addr(); +int ruserok(); +/* BIND */ +struct hostent *gethostbyname2(); +void herror(); +char *hstrerror(); +/* IPv6 prototype definitons */ +int getaddrinfo(); +void freeaddrinfo(); +const char *gai_strerror(); +int getnameinfo(); +/* END IPv6 prototype definitions */ +/* End BIND */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) - /* IPsec algorithm prototype definitions */ - struct ipsecalgent *getalgbyname(); - struct ipsecalgent *getalgbydoi(); - int getdoidomainbyname(); - const char *getdoidomainbynum(); - void freealgent(); - /* END IPsec algorithm prototype definitions */ +/* IPsec algorithm prototype definitions */ +struct ipsecalgent *getalgbyname(); +struct ipsecalgent *getalgbydoi(); +int getdoidomainbyname(); +const char *getdoidomainbynum(); +void freealgent(); +/* END IPsec algorithm prototype definitions */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#endif /* __STDC__ */ +#endif /* __STDC__ */ - /* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver) - */ +/* + * Error return codes from gethostbyname() and gethostbyaddr() + * (when using the resolver) + */ - extern int h_errno; +extern int h_errno; -#ifdef _REENTRANT -#ifdef __STDC__ - extern int *__h_errno(void); +#ifdef _REENTRANT +#ifdef __STDC__ +extern int *__h_errno(void); #else - extern int *__h_errno(); -#endif /* __STDC__ */ - - /* Only #define h_errno if there is no conflict with other use */ -#ifdef H_ERRNO_IS_FUNCTION -#define h_errno (*__h_errno()) -#endif /* NO_H_ERRNO_DEFINE */ -#endif /* _REENTRANT */ - - /* - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in extern int h_errno). - */ -#define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */ -#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /* Valid name, no data record of requested type */ +extern int *__h_errno(); +#endif /* __STDC__ */ + +/* Only #define h_errno if there is no conflict with other use */ +#ifdef H_ERRNO_IS_FUNCTION +#define h_errno (*__h_errno()) +#endif /* NO_H_ERRNO_DEFINE */ +#endif /* _REENTRANT */ + +/* + * Error return codes from gethostbyname() and gethostbyaddr() + * (left in extern int h_errno). + */ +#define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */ +#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ +#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ +#define NO_DATA 4 /* Valid name, no data record of requested type */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ +#define NO_ADDRESS NO_DATA /* no address, look for MX record */ - /* BIND */ -#define NETDB_INTERNAL -1 /* see errno */ -#define NETDB_SUCCESS 0 /* no problem */ - /* End BIND */ +/* BIND */ +#define NETDB_INTERNAL -1 /* see errno */ +#define NETDB_SUCCESS 0 /* no problem */ +/* End BIND */ -#define MAXHOSTNAMELEN 256 +#define MAXHOSTNAMELEN 256 -#define MAXALIASES 35 -#define MAXADDRS 35 +#define MAXALIASES 35 +#define MAXADDRS 35 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#ifdef __cplusplus +#ifdef __cplusplus } #endif -#endif /* _NETDB_H */ +#endif /* _NETDB_H */ + diff --git a/compat/os/os2.h b/compat/os/os2.h index 83f9b35997..c35c7d1fc0 100644 --- a/compat/os/os2.h +++ b/compat/os/os2.h @@ -25,3 +25,4 @@ #endif /* _SQUID_OS2_ */ #endif /* SQUID_OS_OS2_H */ + diff --git a/compat/os/qnx.h b/compat/os/qnx.h index ee77fb24b8..f8706022d6 100644 --- a/compat/os/qnx.h +++ b/compat/os/qnx.h @@ -24,3 +24,4 @@ #endif /* _SQUID_QNX_ */ #endif /* SQUID_OS_QNX_H */ + diff --git a/compat/os/sgi.h b/compat/os/sgi.h index cc6ab1d0ab..a58e1ca4d5 100644 --- a/compat/os/sgi.h +++ b/compat/os/sgi.h @@ -18,7 +18,7 @@ ****************************************************************************/ #if !defined(_SVR4_SOURCE) -#define _SVR4_SOURCE /* for tempnam(3) */ +#define _SVR4_SOURCE /* for tempnam(3) */ #endif #if USE_ASYNC_IO @@ -36,3 +36,4 @@ #endif /* _SQUID_SGI_ */ #endif /* SQUID_OS_SGI_H */ + diff --git a/compat/os/solaris.h b/compat/os/solaris.h index 25ed114153..ce19adf72e 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -28,14 +28,14 @@ #if defined(i386) || defined(__i386) #if !HAVE_PAD128_T typedef union { - long double _q; - int32_t _l[4]; + long double _q; + int32_t _l[4]; } pad128_t; #endif #if !HAVE_UPAD128_T typedef union { - long double _q; - uint32_t _l[4]; + long double _q; + uint32_t _l[4]; } upad128_t; #endif #endif @@ -105,3 +105,4 @@ SQUIDCEXTERN int gethostname(char *, int); #endif /* _SQUID_SOLARIS_ */ #endif /* SQUID_OS_SOALRIS_H */ + diff --git a/compat/os/sunos.h b/compat/os/sunos.h index b5bd2a035b..c5bed8678a 100644 --- a/compat/os/sunos.h +++ b/compat/os/sunos.h @@ -29,3 +29,4 @@ #endif /* _SQUID_SUNOS_ */ #endif /* SQUID_OS_SUNOS_H */ + diff --git a/compat/osdetect.h b/compat/osdetect.h index 25b114f6aa..2eae264cdf 100644 --- a/compat/osdetect.h +++ b/compat/osdetect.h @@ -31,25 +31,25 @@ #define _SQUID_SUNOS_ 1 #endif /* __SVR4 */ -#elif defined(__hpux) /* HP-UX - SysV-like? */ +#elif defined(__hpux) /* HP-UX - SysV-like? */ #define _SQUID_HPUX_ 1 -#elif defined(__osf__) /* OSF/1 */ +#elif defined(__osf__) /* OSF/1 */ #define _SQUID_OSF_ 1 -#elif defined(_AIX) /* AIX */ +#elif defined(_AIX) /* AIX */ #define _SQUID_AIX_ 1 -#elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */ +#elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */ #define _SQUID_LINUX_ 1 -#elif defined(__FreeBSD__) /* FreeBSD */ +#elif defined(__FreeBSD__) /* FreeBSD */ #define _SQUID_FREEBSD_ 1 #elif defined(__FreeBSD_kernel__) /* GNU/kFreeBSD */ #define _SQUID_KFREEBSD_ 1 -#elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */ +#elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */ #define _SQUID_SGI_ 1 #elif defined(__NeXT__) @@ -90,3 +90,4 @@ #endif /* OS automatic detection */ #endif /* SQUID_COMPAT_OSDETECT_H */ + diff --git a/compat/psignal.c b/compat/psignal.c index bcb6321ad1..4d77c5264a 100644 --- a/compat/psignal.c +++ b/compat/psignal.c @@ -27,3 +27,4 @@ psignal( int sig, const char* msg ) else fputs( "(unknown)\n", stderr ); } + diff --git a/compat/psignal.h b/compat/psignal.h index 4b55d3dd54..34fde97cc0 100644 --- a/compat/psignal.h +++ b/compat/psignal.h @@ -16,3 +16,4 @@ extern void psignal(int sig, const char* msg); #endif /* __SQUID_PSIGNAL_H */ + diff --git a/compat/shm.cc b/compat/shm.cc index 3029e06bb1..4a2de0e9ce 100644 --- a/compat/shm.cc +++ b/compat/shm.cc @@ -33,3 +33,4 @@ shm_portable_segment_name_is_path() return false; #endif } + diff --git a/compat/shm.h b/compat/shm.h index a3b249acd1..f3db8ff9a5 100644 --- a/compat/shm.h +++ b/compat/shm.h @@ -51,3 +51,4 @@ extern "C" { bool shm_portable_segment_name_is_path(); #endif /* SQUID_COMPAT_CPU_H */ + diff --git a/compat/statvfs.cc b/compat/statvfs.cc index d95f393484..6089433aec 100644 --- a/compat/statvfs.cc +++ b/compat/statvfs.cc @@ -82,3 +82,4 @@ xstatvfs(const char *path, struct statvfs *sfs) } #endif /* HAVE_STATVFS */ + diff --git a/compat/statvfs.h b/compat/statvfs.h index 66d0a8f225..3b3d51ef27 100644 --- a/compat/statvfs.h +++ b/compat/statvfs.h @@ -32,7 +32,6 @@ #endif #endif /* !HAVE_STATVFS */ - #if HAVE_STATVFS #define xstatvfs statvfs @@ -63,3 +62,4 @@ int xstatvfs(const char *path, struct statvfs *buf); #endif #endif /* _SQUID_COMPAT_XSTATVFS_H */ + diff --git a/compat/stdio.h b/compat/stdio.h index e0d2d48258..b180751852 100644 --- a/compat/stdio.h +++ b/compat/stdio.h @@ -63,3 +63,4 @@ inline FILE * tmpfile(void) { return tmpfile64(); } #endif #endif /* _SQUID_COMPAT_STDIO_H */ + diff --git a/compat/stdvarargs.h b/compat/stdvarargs.h index 3d8b718101..337edc88fb 100644 --- a/compat/stdvarargs.h +++ b/compat/stdvarargs.h @@ -47,3 +47,4 @@ #endif #endif /* _SQUID_STDVARARGS_H */ + diff --git a/compat/strerror.c b/compat/strerror.c index ef0d39186f..1aca01a4ad 100644 --- a/compat/strerror.c +++ b/compat/strerror.c @@ -23,3 +23,4 @@ strerror(int ern) { return sys_errlist[ern]; } + diff --git a/compat/strnrchr.c b/compat/strnrchr.c index 6a46af4a95..def4d7a6bf 100644 --- a/compat/strnrchr.c +++ b/compat/strnrchr.c @@ -22,3 +22,4 @@ strnrchr(const char *s, size_t count, int c) } return rv; } + diff --git a/compat/strnrchr.h b/compat/strnrchr.h index 466d741178..d7af85c66b 100644 --- a/compat/strnrchr.h +++ b/compat/strnrchr.h @@ -22,3 +22,4 @@ SQUIDCEXTERN const char *strnrchr(const char *s, size_t count, int c); #endif /* COMPAT_STRNRCHR_H_ */ + diff --git a/compat/strnstr.cc b/compat/strnstr.cc index 700f5a3151..2fbab7ef86 100644 --- a/compat/strnstr.cc +++ b/compat/strnstr.cc @@ -16,9 +16,9 @@ * Update/Maintenance History: * * 26-Apr-2008 : Copied from FreeBSD via OpenGrok - * - added protection around libray headers - * - added squid_ prefix for uniqueness - * so we can use it where OS copy is broken. + * - added protection around libray headers + * - added squid_ prefix for uniqueness + * so we can use it where OS copy is broken. * * Original License and code follows. */ @@ -30,7 +30,7 @@ /*- * Copyright (c) 2001 Mike Barcroft * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. @@ -59,7 +59,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)strstr.c 8.1 (Berkeley) 6/4/93 + * @(#)strstr.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/string/strnstr.c,v 1.2.2.1 2001/12/09 06:50:03 mike Exp $ * $DragonFly: src/lib/libc/string/strnstr.c,v 1.4 2006/03/20 17:24:20 dillon Exp $ */ @@ -98,3 +98,4 @@ squid_strnstr(const char *s, const char *find, size_t slen) #endif /* !HAVE_STRNSTR */ #endif /* SQUID_COMPAT_STRNSTR_CC_ */ + diff --git a/compat/strtoll.c b/compat/strtoll.c index 07493a9894..701c5931ce 100644 --- a/compat/strtoll.c +++ b/compat/strtoll.c @@ -20,8 +20,8 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. + * This product includes software developed by the University of + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/compat/strtoll.h b/compat/strtoll.h index fce15a8d23..af57d4d722 100644 --- a/compat/strtoll.h +++ b/compat/strtoll.h @@ -23,3 +23,4 @@ SQUIDCEXTERN int64_t strtoll(const char *nptr, char **endptr, int base); #endif /* !HAVE_STRTOLL */ #endif /* _SQUID_COMPAT_STRTOLL_H */ + diff --git a/compat/tempnam.c b/compat/tempnam.c index 8077781b1f..e4f39a19a5 100644 --- a/compat/tempnam.c +++ b/compat/tempnam.c @@ -31,20 +31,20 @@ #undef TMP_MAX -#define _tmp "/tmp/" -#define lengthof_tmp 5 +#define _tmp "/tmp/" +#define lengthof_tmp 5 #ifndef LONG_BIT -#define LONG_BIT (CHAR_BIT * 4) /* assume sizeof(long) == 4 */ +#define LONG_BIT (CHAR_BIT * 4) /* assume sizeof(long) == 4 */ #endif -#define L_tmpmin (lengthof_tmp + 5) /* 5 chars for pid. */ +#define L_tmpmin (lengthof_tmp + 5) /* 5 chars for pid. */ #if (L_tmpnam > L_tmpmin) -#if (L_tmpnam > L_tmpmin + LONG_BIT / 6) /* base 64 */ -#define TMP_MAX ULONG_MAX +#if (L_tmpnam > L_tmpmin + LONG_BIT / 6) /* base 64 */ +#define TMP_MAX ULONG_MAX #else -#define TMP_MAX ((1L << (6 * (L_tmpnam - L_tmpmin))) - 1) +#define TMP_MAX ((1L << (6 * (L_tmpnam - L_tmpmin))) - 1) #endif #else #ifndef L_tmpnam @@ -60,10 +60,10 @@ _tmpnam(void) static const char digits[] = #if (L_tmpnam >= L_tmpmin + LONG_BIT / 4) "0123456789abcdef"; -#define TMP_BASE 16 +#define TMP_BASE 16 #else "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; -#define TMP_BASE 64 +#define TMP_BASE 64 #endif static unsigned long lastcount = 0; static char buffer[L_tmpnam + 1]; @@ -72,7 +72,7 @@ _tmpnam(void) pid_t pid = getpid(); if (sizeof(_tmp) - 1 != lengthof_tmp) - abort(); /* Consistency error. */ + abort(); /* Consistency error. */ for (;;) { register int i = L_tmpnam; @@ -135,3 +135,4 @@ main() return 1; } #endif + diff --git a/compat/tempnam.h b/compat/tempnam.h index dfcdf7fdd8..fbb4d03f9f 100644 --- a/compat/tempnam.h +++ b/compat/tempnam.h @@ -31,3 +31,4 @@ extern char *tempnam(const char *, const char *); #endif /* SQUID_TEMPNAM_H */ + diff --git a/compat/testPreCompiler.h b/compat/testPreCompiler.h index 7898e25796..c623b6ac48 100644 --- a/compat/testPreCompiler.h +++ b/compat/testPreCompiler.h @@ -30,3 +30,4 @@ protected: }; #endif /* SQUID_COMPAT_TESTS_TESTPRECOMPILER_H */ + diff --git a/compat/types.h b/compat/types.h index 125860122c..be85b0aa82 100644 --- a/compat/types.h +++ b/compat/types.h @@ -124,3 +124,4 @@ typedef long mtyp_t; #endif #endif /* SQUID_TYPES_H */ + diff --git a/compat/valgrind.h b/compat/valgrind.h index b6f6ad6583..1adde27204 100644 --- a/compat/valgrind.h +++ b/compat/valgrind.h @@ -43,3 +43,4 @@ #endif /* WITH_VALGRIND */ #endif /* SQUID_CONFIG_H */ + diff --git a/compat/xalloc.cc b/compat/xalloc.cc index 3c3bc559dd..a9215d64ac 100644 --- a/compat/xalloc.cc +++ b/compat/xalloc.cc @@ -176,3 +176,4 @@ free_const(const void *s_const) PROF_stop(free); PROF_stop(free_const); } + diff --git a/compat/xalloc.h b/compat/xalloc.h index 2e7f3f924c..9cea431d54 100644 --- a/compat/xalloc.h +++ b/compat/xalloc.h @@ -13,63 +13,63 @@ extern "C" { #endif - /** - * xcalloc() - same as calloc(3). Used for portability. - * Never returns NULL; fatal on error. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - void *xcalloc(size_t n, size_t sz); +/** + * xcalloc() - same as calloc(3). Used for portability. + * Never returns NULL; fatal on error. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +void *xcalloc(size_t n, size_t sz); - /** - * xmalloc() - same as malloc(3). Used for portability. - * Never returns NULL; fatal on error. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - void *xmalloc(size_t sz); +/** + * xmalloc() - same as malloc(3). Used for portability. + * Never returns NULL; fatal on error. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +void *xmalloc(size_t sz); - /** - * xrealloc() - same as realloc(3). Used for portability. - * Never returns NULL; fatal on error. - */ - void *xrealloc(void *s, size_t sz); +/** + * xrealloc() - same as realloc(3). Used for portability. + * Never returns NULL; fatal on error. + */ +void *xrealloc(void *s, size_t sz); - /** - * free_const() - Same as free(3). Used for portability. - * Accepts pointers to dynamically allocated const data. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - void free_const(const void *s); +/** + * free_const() - Same as free(3). Used for portability. + * Accepts pointers to dynamically allocated const data. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +void free_const(const void *s); - /** - * xfree() - same as free(3). Used for portability. - * Accepts pointers to dynamically allocated const data. - * Will not call free(3) if the pointer is NULL. - * - * Pointer is left with a value on completion. - * Use safe_free() if the pointer needs to be set to NULL afterward. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - static inline void xfree(const void *p) { if (p) free_const(p); } +/** + * xfree() - same as free(3). Used for portability. + * Accepts pointers to dynamically allocated const data. + * Will not call free(3) if the pointer is NULL. + * + * Pointer is left with a value on completion. + * Use safe_free() if the pointer needs to be set to NULL afterward. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +static inline void xfree(const void *p) { if (p) free_const(p); } - /** - * safe_free() - same as free(3). Used for portability. - * Accepts pointers to dynamically allocated const data. - * Will not call free(3) if the pointer is NULL. - * Sets the pointer to NULL on completion. - * - * Use xfree() if the pointer does not need to be set afterward. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ +/** + * safe_free() - same as free(3). Used for portability. + * Accepts pointers to dynamically allocated const data. + * Will not call free(3) if the pointer is NULL. + * Sets the pointer to NULL on completion. + * + * Use xfree() if the pointer does not need to be set afterward. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ #define safe_free(x) while ((x)) { free_const((x)); (x) = NULL; } #ifdef __cplusplus @@ -81,3 +81,4 @@ extern void malloc_statistics(void (*func) (int, int, int, void *), void *data); #endif #endif /* _SQUID_COMPAT_XALLOC_H */ + diff --git a/compat/xis.h b/compat/xis.h index 0f4b08d95c..500fdb3b1e 100644 --- a/compat/xis.h +++ b/compat/xis.h @@ -28,3 +28,4 @@ #define xisgraph(x) isgraph((unsigned char)x) #endif /* _SQUID_COMPAT_XIS_H */ + diff --git a/compat/xstrerror.cc b/compat/xstrerror.cc index 74cebb3f56..b0e61f3a79 100644 --- a/compat/xstrerror.cc +++ b/compat/xstrerror.cc @@ -107,3 +107,4 @@ xstrerr(int error) return xstrerror_buf; } + diff --git a/compat/xstrerror.h b/compat/xstrerror.h index e488034947..0b69e9f1b1 100644 --- a/compat/xstrerror.h +++ b/compat/xstrerror.h @@ -27,3 +27,4 @@ extern const char * xstrerr(int error); #endif /* _SQUID_COMPAT_XSTRERROR_H */ + diff --git a/compat/xstring.cc b/compat/xstring.cc index 7958456db6..49077644a4 100644 --- a/compat/xstring.cc +++ b/compat/xstring.cc @@ -79,3 +79,4 @@ xstrndup(const char *s, size_t n) p = xstrncpy((char *)xmalloc(sz), s, sz); return p; } + diff --git a/compat/xstring.h b/compat/xstring.h index a7625bd991..8d3124d798 100644 --- a/compat/xstring.h +++ b/compat/xstring.h @@ -17,40 +17,40 @@ extern "C" { #endif - /** - * xstrdup() - same as strdup(3). Used for portability. - * Never returns NULL; fatal on error. - * - * Sets errno to EINVAL if a NULL pointer is passed. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - char *xstrdup(const char *s); +/** + * xstrdup() - same as strdup(3). Used for portability. + * Never returns NULL; fatal on error. + * + * Sets errno to EINVAL if a NULL pointer is passed. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +char *xstrdup(const char *s); #ifdef strdup #undef strdup #endif #define strdup(X) xstrdup((X)) - /* - * xstrncpy() - similar to strncpy(3) but terminates string - * always with '\0' if (n != 0 and dst != NULL), - * and doesn't do padding - */ - char *xstrncpy(char *dst, const char *src, size_t n); +/* + * xstrncpy() - similar to strncpy(3) but terminates string + * always with '\0' if (n != 0 and dst != NULL), + * and doesn't do padding + */ +char *xstrncpy(char *dst, const char *src, size_t n); - /** - * xstrndup() - same as strndup(3). Used for portability. - * Never returns NULL; fatal on error. - * - * Sets errno to EINVAL if a NULL pointer or negative - * length is passed. - * - * Define failure_notify to receive error message. - * otherwise perror() is used to display it. - */ - char *xstrndup(const char *s, size_t n); +/** + * xstrndup() - same as strndup(3). Used for portability. + * Never returns NULL; fatal on error. + * + * Sets errno to EINVAL if a NULL pointer or negative + * length is passed. + * + * Define failure_notify to receive error message. + * otherwise perror() is used to display it. + */ +char *xstrndup(const char *s, size_t n); #ifdef strndup #undef strndup @@ -62,3 +62,4 @@ extern "C" { #endif #endif /* SQUID_COMPAT_XSTRING_H */ + diff --git a/compat/xstrto.cc b/compat/xstrto.cc index c4b59c0a7f..7e5bbd8f32 100644 --- a/compat/xstrto.cc +++ b/compat/xstrto.cc @@ -28,8 +28,8 @@ * Update/Maintenance History: * * 12-Sep-2010 : Copied from iptables xtables.c - * - xtables_strtoui renamed to xstrtoui - * - xtables_strtoul renamed to xstrtoul + * - xtables_strtoui renamed to xstrtoui + * - xtables_strtoul renamed to xstrtoul * * Original License and code follows. */ @@ -100,3 +100,4 @@ xstrtoui(const char *s, char **end, unsigned int *value, } #endif /* SQUID_XSTRTO_C_ */ + diff --git a/compat/xstrto.h b/compat/xstrto.h index 597546f0b2..9cd52e3501 100644 --- a/compat/xstrto.h +++ b/compat/xstrto.h @@ -40,3 +40,4 @@ bool xstrtoui(const char *s, char **end, unsigned int *value, #endif /* __cplusplus */ #endif /* _SQUID_XSTRTO_H */ + diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index ad38f21452..42310442fa 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -6,6 +6,7 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ + section 00 Announcement Server section 00 Client Database section 00 Debug Routines diff --git a/helpers/basic_auth/LDAP/basic_ldap_auth.cc b/helpers/basic_auth/LDAP/basic_ldap_auth.cc index cd0fe59f2b..6587e6d508 100644 --- a/helpers/basic_auth/LDAP/basic_ldap_auth.cc +++ b/helpers/basic_auth/LDAP/basic_ldap_auth.cc @@ -388,7 +388,7 @@ main(int argc, char **argv) fprintf(stderr, "ERROR: Your LDAP library does not have URI support\n"); exit(1); #endif - /* Fall thru to -h */ + /* Fall thru to -h */ case 'h': if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; @@ -796,3 +796,4 @@ readSecret(const char *filename) return 0; } + diff --git a/helpers/basic_auth/MSNT/allowusers.cc b/helpers/basic_auth/MSNT/allowusers.cc index d5963ec8de..2c78d800b2 100644 --- a/helpers/basic_auth/MSNT/allowusers.cc +++ b/helpers/basic_auth/MSNT/allowusers.cc @@ -30,7 +30,7 @@ static usersfile AllowUsers; static int init = 0; /* shared */ -char Allowuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ +char Allowuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ int Read_allowusers(void) @@ -56,3 +56,4 @@ Check_forallowchange(void) { Check_forfilechange(&AllowUsers); } + diff --git a/helpers/basic_auth/MSNT/confload.cc b/helpers/basic_auth/MSNT/confload.cc index 5bbff43e4f..3096e97aff 100644 --- a/helpers/basic_auth/MSNT/confload.cc +++ b/helpers/basic_auth/MSNT/confload.cc @@ -41,7 +41,7 @@ #define MAXSERVERS 5 #define NTHOSTLEN 65 -extern char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ +extern char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ extern char Allowuserpath[MAXPATHLEN]; typedef struct _ServerTuple { @@ -50,8 +50,8 @@ typedef struct _ServerTuple { char domain[NTHOSTLEN]; } ServerTuple; -ServerTuple ServerArray[MAXSERVERS]; /* Array of servers to query */ -int Serversqueried = 0; /* Number of servers queried */ +ServerTuple ServerArray[MAXSERVERS]; /* Array of servers to query */ +int Serversqueried = 0; /* Number of servers queried */ /* Declarations */ @@ -68,7 +68,7 @@ int OpenConfigFile(void) { FILE *ConfigFile; - char Confbuf[2049]; /* Line reading buffer */ + char Confbuf[2049]; /* Line reading buffer */ /* Initialise defaults */ @@ -244,7 +244,7 @@ QueryServerForUser(int x, char *username, char *password) result = Valid_User(username, password, ServerArray[x].pdc, ServerArray[x].bdc, ServerArray[x].domain); - switch (result) { /* Write any helpful syslog messages */ + switch (result) { /* Write any helpful syslog messages */ case 0: break; case 1: @@ -271,3 +271,4 @@ QueryServerForUser(int x, char *username, char *password) * 2 - Protocol error. * 3 - Logon error; Incorrect password or username given. */ + diff --git a/helpers/basic_auth/MSNT/denyusers.cc b/helpers/basic_auth/MSNT/denyusers.cc index 3d33b368e2..67da05ab28 100644 --- a/helpers/basic_auth/MSNT/denyusers.cc +++ b/helpers/basic_auth/MSNT/denyusers.cc @@ -31,7 +31,7 @@ static usersfile DenyUsers; static int init = 0; /* shared */ -char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ +char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */ int Read_denyusers(void) @@ -111,8 +111,8 @@ Check_forchange(int signal) void Checktimer() { - static time_t Lasttime; /* The last time the timer was checked */ - static time_t Currenttime; /* The current time */ + static time_t Lasttime; /* The last time the timer was checked */ + static time_t Currenttime; /* The current time */ Currenttime = time(NULL); @@ -124,3 +124,4 @@ Checktimer() Lasttime = Currenttime; } } + diff --git a/helpers/basic_auth/MSNT/msntauth.cc b/helpers/basic_auth/MSNT/msntauth.cc index 9390fd340c..dd77ad3879 100644 --- a/helpers/basic_auth/MSNT/msntauth.cc +++ b/helpers/basic_auth/MSNT/msntauth.cc @@ -128,7 +128,7 @@ main(int argc, char **argv) puts("ERR"); continue; } - Checktimer(); /* Check if the user lists have changed */ + Checktimer(); /* Check if the user lists have changed */ rfc1738_unescape(username); rfc1738_unescape(password); @@ -151,3 +151,4 @@ main(int argc, char **argv) return 0; } + diff --git a/helpers/basic_auth/MSNT/msntauth.h b/helpers/basic_auth/MSNT/msntauth.h index b18f24428c..1ba18b5f95 100644 --- a/helpers/basic_auth/MSNT/msntauth.h +++ b/helpers/basic_auth/MSNT/msntauth.h @@ -21,3 +21,4 @@ extern int Check_ifuserallowed(char *ConnectingUser); extern void Check_forallowchange(void); #endif /* _SQUID_HELPERS_BASIC_AUTH_MSNT_MSNTAUTH_H */ + diff --git a/helpers/basic_auth/MSNT/usersfile.cc b/helpers/basic_auth/MSNT/usersfile.cc index 8b3af5b089..63001e864b 100644 --- a/helpers/basic_auth/MSNT/usersfile.cc +++ b/helpers/basic_auth/MSNT/usersfile.cc @@ -31,7 +31,7 @@ #include "usersfile.h" -#define NAMELEN 50 /* Maximum username length */ +#define NAMELEN 50 /* Maximum username length */ static int name_cmp(const void *a, const void *b) @@ -177,7 +177,7 @@ Check_userlist(usersfile * uf, char *User) void Check_forfilechange(usersfile * uf) { - struct stat ChkBuf; /* Stat data buffer */ + struct stat ChkBuf; /* Stat data buffer */ /* Stat the allowed users file. If it cannot be accessed, return. */ @@ -188,7 +188,7 @@ Check_forfilechange(usersfile * uf) if (errno == ENOENT) { uf->LMT = 0; free_names(uf); - } else { /* Report error when accessing file */ + } else { /* Report error when accessing file */ syslog(LOG_ERR, "%s: %s", uf->path, strerror(errno)); } return; @@ -203,3 +203,4 @@ Check_forfilechange(usersfile * uf) syslog(LOG_INFO, "Check_forfilechange: Reloading user list '%s'.", uf->path); Read_usersfile(NULL, uf); } + diff --git a/helpers/basic_auth/MSNT/usersfile.h b/helpers/basic_auth/MSNT/usersfile.h index 300217e619..816dc3a09e 100644 --- a/helpers/basic_auth/MSNT/usersfile.h +++ b/helpers/basic_auth/MSNT/usersfile.h @@ -17,3 +17,4 @@ typedef struct { int Read_usersfile(const char *path, usersfile * uf); int Check_userlist(usersfile * uf, char *User); void Check_forfilechange(usersfile * uf); + diff --git a/helpers/basic_auth/MSNT/valid.cc b/helpers/basic_auth/MSNT/valid.cc index e5b124a9f7..31704493ea 100644 --- a/helpers/basic_auth/MSNT/valid.cc +++ b/helpers/basic_auth/MSNT/valid.cc @@ -36,13 +36,13 @@ Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOM SMB_Init(); con = SMB_Connect_Server(NULL, SERVER, DOMAIN); - if (con == NULL) { /* Error ... */ + if (con == NULL) { /* Error ... */ con = SMB_Connect_Server(NULL, BACKUP, DOMAIN); if (con == NULL) { return (NTV_SERVER_ERROR); } } - if (SMB_Negotiate(con, supportedDialects) < 0) { /* An error */ + if (SMB_Negotiate(con, supportedDialects) < 0) { /* An error */ SMB_Discon(con, 0); return (NTV_PROTOCOL_ERROR); } @@ -53,3 +53,4 @@ Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOM SMB_Discon(con, 0); return (NTV_NO_ERROR); } + diff --git a/helpers/basic_auth/MSNT/valid.h b/helpers/basic_auth/MSNT/valid.h index 07539277d9..73dca1c676 100644 --- a/helpers/basic_auth/MSNT/valid.h +++ b/helpers/basic_auth/MSNT/valid.h @@ -18,3 +18,4 @@ int Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOMAIN); #endif + diff --git a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc index 216b6213a6..4895a4f0a4 100644 --- a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc +++ b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc @@ -127,7 +127,7 @@ main(int argc, char **argv) } while (fgets(buf, HELPER_INPUT_BUFFER, stdin) != NULL) { if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if (stat(argv[1], &sb) == 0) { if (sb.st_mtime != change_time) { read_passwd_file(argv[1]); @@ -187,3 +187,4 @@ main(int argc, char **argv) } exit(0); } + diff --git a/helpers/basic_auth/NCSA/crypt_md5.cc b/helpers/basic_auth/NCSA/crypt_md5.cc index 8cfad8ccfd..6c0ad146b1 100644 --- a/helpers/basic_auth/NCSA/crypt_md5.cc +++ b/helpers/basic_auth/NCSA/crypt_md5.cc @@ -29,7 +29,7 @@ #include -static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ +static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; static void md5to64(char *s, unsigned long v, int n) diff --git a/helpers/basic_auth/NCSA/crypt_md5.h b/helpers/basic_auth/NCSA/crypt_md5.h index 0e1dfe9d00..2fa9ab4eb1 100644 --- a/helpers/basic_auth/NCSA/crypt_md5.h +++ b/helpers/basic_auth/NCSA/crypt_md5.h @@ -29,3 +29,4 @@ char *crypt_md5(const char *pw, const char *salt); char *md5sum(const char *s); #endif /* _CRYPT_MD5_H */ + diff --git a/helpers/basic_auth/NIS/basic_nis_auth.cc b/helpers/basic_auth/NIS/basic_nis_auth.cc index 7527722a13..367ae9a689 100644 --- a/helpers/basic_auth/NIS/basic_nis_auth.cc +++ b/helpers/basic_auth/NIS/basic_nis_auth.cc @@ -54,7 +54,7 @@ main(int argc, char **argv) while (fgets(buf, 256, stdin) != NULL) { if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if ((user = strtok(buf, " ")) == NULL) { printf("ERR\n"); @@ -90,3 +90,4 @@ main(int argc, char **argv) } exit(0); } + diff --git a/helpers/basic_auth/NIS/nis_support.cc b/helpers/basic_auth/NIS/nis_support.cc index 0c3c73734b..0e57ee5235 100644 --- a/helpers/basic_auth/NIS/nis_support.cc +++ b/helpers/basic_auth/NIS/nis_support.cc @@ -37,7 +37,7 @@ #include "nis_support.h" -#define NO_YPERR 0 /* There is no error */ +#define NO_YPERR 0 /* There is no error */ char * get_nis_password(char *user, char *nisdomain, char *nismap) @@ -69,9 +69,10 @@ get_nis_password(char *user, char *nisdomain, char *nismap) case YPERR_YPBIND: syslog(LOG_ERR, "Squid Authentication through ypbind failure: can't communicate with ypbind"); return NULL; - case YPERR_KEY: /* No such key in map */ + case YPERR_KEY: /* No such key in map */ return NULL; default: return NULL; } } + diff --git a/helpers/basic_auth/NIS/nis_support.h b/helpers/basic_auth/NIS/nis_support.h index 9679887717..b12047fcb4 100644 --- a/helpers/basic_auth/NIS/nis_support.h +++ b/helpers/basic_auth/NIS/nis_support.h @@ -1,9 +1,10 @@ -/* - * Copyright (C) 1996-2014 The Squid Software Foundation and contributors - * - * Squid software is distributed under GPLv2+ license and includes - * contributions from numerous individuals and organizations. - * Please see the COPYING and CONTRIBUTORS files for details. - */ - -extern char * get_nis_password(char *user, char *nisdomain, char *nismap); +/* + * Copyright (C) 1996-2014 The Squid Software Foundation and contributors + * + * Squid software is distributed under GPLv2+ license and includes + * contributions from numerous individuals and organizations. + * Please see the COPYING and CONTRIBUTORS files for details. + */ + +extern char * get_nis_password(char *user, char *nisdomain, char *nismap); + diff --git a/helpers/basic_auth/PAM/basic_pam_auth.cc b/helpers/basic_auth/PAM/basic_pam_auth.cc index 6cda25a202..e47af74598 100644 --- a/helpers/basic_auth/PAM/basic_pam_auth.cc +++ b/helpers/basic_auth/PAM/basic_pam_auth.cc @@ -58,17 +58,17 @@ * * Version 2.0, 2002-01-07 * One shot mode, command line options - * man page + * man page * * Version 1.3, 1999-12-10 - * Bugfix release 1.3 to work around Solaris 2.6 + * Bugfix release 1.3 to work around Solaris 2.6 * brokenness (not sending arguments to conversation * functions) * * Version 1.2, internal release * * Version 1.1, 1999-05-11 - * Initial version + * Initial version */ #include "squid.h" #include "helpers/defines.h" @@ -97,7 +97,7 @@ #endif #if _SQUID_SOLARIS_ -static char *password = NULL; /* Workaround for Solaris 2.6 brokenness */ +static char *password = NULL; /* Workaround for Solaris 2.6 brokenness */ #endif extern "C" int password_conversation(int num_msg, PAM_CONV_FUNC_CONST_PARM struct pam_message **msg, @@ -224,7 +224,7 @@ start: ++password_buf; rfc1738_unescape(user); rfc1738_unescape(password_buf); - conv.appdata_ptr = (char *) password_buf; /* from buf above. not allocated */ + conv.appdata_ptr = (char *) password_buf; /* from buf above. not allocated */ if (no_realm) { /* Remove DOMAIN\.. and ...@domain from the user name in case the user @@ -310,3 +310,4 @@ error: } return 0; } + diff --git a/helpers/basic_auth/RADIUS/basic_radius_auth.cc b/helpers/basic_auth/RADIUS/basic_radius_auth.cc index b7bd2bc910..a7b82b4ac3 100644 --- a/helpers/basic_auth/RADIUS/basic_radius_auth.cc +++ b/helpers/basic_auth/RADIUS/basic_radius_auth.cc @@ -92,9 +92,9 @@ #endif /* AYJ: helper input buffer may be a lot larger than this used to expect... */ -#define MAXPWNAM 254 -#define MAXPASS 254 -#define MAXLINE 254 +#define MAXPWNAM 254 +#define MAXPASS 254 +#define MAXLINE 254 static void md5_calc(uint8_t out[16], void *in, size_t len); @@ -440,7 +440,7 @@ authenticate(int socket_fd, const char *username, const char *passwd) } FD_ZERO(&readfds); FD_SET(socket_fd, &readfds); - if (select(socket_fd + 1, &readfds, NULL, NULL, &tv) == 0) /* Select timeout */ + if (select(socket_fd + 1, &readfds, NULL, NULL, &tv) == 0) /* Select timeout */ break; salen = sizeof(saremote); len = recvfrom(socket_fd, recv_buffer, sizeof(i_recv_buffer), @@ -617,3 +617,4 @@ main(int argc, char **argv) close(sockfd); exit(1); } + diff --git a/helpers/basic_auth/RADIUS/radius-util.cc b/helpers/basic_auth/RADIUS/radius-util.cc index 36e37b726e..5fcd5ae540 100644 --- a/helpers/basic_auth/RADIUS/radius-util.cc +++ b/helpers/basic_auth/RADIUS/radius-util.cc @@ -9,34 +9,34 @@ // 2008-05-14: rename to radius-util.* to avoid name clashes with squid util.* /* * - * RADIUS - * Remote Authentication Dial In User Service + * RADIUS + * Remote Authentication Dial In User Service * * - * Livingston Enterprises, Inc. - * 6920 Koll Center Parkway - * Pleasanton, CA 94566 + * Livingston Enterprises, Inc. + * 6920 Koll Center Parkway + * Pleasanton, CA 94566 * - * Copyright 1992 Livingston Enterprises, Inc. - * Copyright 1997 Cistron Internet Services B.V. + * Copyright 1992 Livingston Enterprises, Inc. + * Copyright 1997 Cistron Internet Services B.V. * - * Permission to use, copy, modify, and distribute this software for any - * purpose and without fee is hereby granted, provided that this - * copyright and permission notice appear on all copies and supporting - * documentation, the name of Livingston Enterprises, Inc. not be used - * in advertising or publicity pertaining to distribution of the - * program without specific prior permission, and notice be given - * in supporting documentation that copying and distribution is by - * permission of Livingston Enterprises, Inc. + * Permission to use, copy, modify, and distribute this software for any + * purpose and without fee is hereby granted, provided that this + * copyright and permission notice appear on all copies and supporting + * documentation, the name of Livingston Enterprises, Inc. not be used + * in advertising or publicity pertaining to distribution of the + * program without specific prior permission, and notice be given + * in supporting documentation that copying and distribution is by + * permission of Livingston Enterprises, Inc. * - * Livingston Enterprises, Inc. makes no representations about - * the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. + * Livingston Enterprises, Inc. makes no representations about + * the suitability of this software for any purpose. It is + * provided "as is" without express or implied warranty. * */ /* - * util.c Miscellanous generic functions. + * util.c Miscellanous generic functions. * */ @@ -65,12 +65,12 @@ char util_sccsid[] = #endif /* - * Check for valid IP address in standard dot notation. + * Check for valid IP address in standard dot notation. */ static int good_ipaddr(char *addr) { - int dot_count; - int digit_count; + int dot_count; + int digit_count; dot_count = 0; digit_count = 0; @@ -96,17 +96,17 @@ static int good_ipaddr(char *addr) } /* - * Return an IP address in host long notation from - * one supplied in standard dot notation. + * Return an IP address in host long notation from + * one supplied in standard dot notation. */ static uint32_t ipstr2long(char *ip_str) { - char buf[6]; - char *ptr; - int i; - int count; - uint32_t ipaddr; - int cur_byte; + char buf[6]; + char *ptr; + int i; + int count; + uint32_t ipaddr; + int cur_byte; ipaddr = (uint32_t)0; for (i = 0; i < 4; ++i) { @@ -137,12 +137,12 @@ static uint32_t ipstr2long(char *ip_str) } /* - * Return an IP address in host long notation from a host - * name or address in dot notation. + * Return an IP address in host long notation from a host + * name or address in dot notation. */ uint32_t get_ipaddr(char *host) { - struct hostent *hp; + struct hostent *hp; if (good_ipaddr(host) == 0) { return(ipstr2long(host)); @@ -151,3 +151,4 @@ uint32_t get_ipaddr(char *host) } return(ntohl(*(uint32_t *)hp->h_addr)); } + diff --git a/helpers/basic_auth/RADIUS/radius-util.h b/helpers/basic_auth/RADIUS/radius-util.h index f5ecb73dff..fe5b464da2 100644 --- a/helpers/basic_auth/RADIUS/radius-util.h +++ b/helpers/basic_auth/RADIUS/radius-util.h @@ -12,4 +12,5 @@ #include "util.h" /* util.c */ -uint32_t get_ipaddr (char *); +uint32_t get_ipaddr (char *); + diff --git a/helpers/basic_auth/RADIUS/radius.h b/helpers/basic_auth/RADIUS/radius.h index ff7036ab49..bb6b669cfe 100644 --- a/helpers/basic_auth/RADIUS/radius.h +++ b/helpers/basic_auth/RADIUS/radius.h @@ -8,195 +8,195 @@ /* * - * RADIUS - * Remote Authentication Dial In User Service + * RADIUS + * Remote Authentication Dial In User Service * * - * Livingston Enterprises, Inc. - * 6920 Koll Center Parkway - * Pleasanton, CA 94566 + * Livingston Enterprises, Inc. + * 6920 Koll Center Parkway + * Pleasanton, CA 94566 * - * Copyright 1992 Livingston Enterprises, Inc. + * Copyright 1992 Livingston Enterprises, Inc. * - * Permission to use, copy, modify, and distribute this software for any - * purpose and without fee is hereby granted, provided that this - * copyright and permission notice appear on all copies and supporting - * documentation, the name of Livingston Enterprises, Inc. not be used - * in advertising or publicity pertaining to distribution of the - * program without specific prior permission, and notice be given - * in supporting documentation that copying and distribution is by - * permission of Livingston Enterprises, Inc. + * Permission to use, copy, modify, and distribute this software for any + * purpose and without fee is hereby granted, provided that this + * copyright and permission notice appear on all copies and supporting + * documentation, the name of Livingston Enterprises, Inc. not be used + * in advertising or publicity pertaining to distribution of the + * program without specific prior permission, and notice be given + * in supporting documentation that copying and distribution is by + * permission of Livingston Enterprises, Inc. * - * Livingston Enterprises, Inc. makes no representations about - * the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. + * Livingston Enterprises, Inc. makes no representations about + * the suitability of this software for any purpose. It is + * provided "as is" without express or implied warranty. * */ /* - * @(#)radius.h 2.0 03-Aug-1996 + * @(#)radius.h 2.0 03-Aug-1996 */ -#define AUTH_VECTOR_LEN 16 -#define AUTH_PASS_LEN 16 -#define AUTH_STRING_LEN 128 /* maximum of 254 */ +#define AUTH_VECTOR_LEN 16 +#define AUTH_PASS_LEN 16 +#define AUTH_STRING_LEN 128 /* maximum of 254 */ typedef struct pw_auth_hdr { - u_char code; - u_char id; - uint16_t length; - u_char vector[AUTH_VECTOR_LEN]; - u_char data[2]; + u_char code; + u_char id; + uint16_t length; + u_char vector[AUTH_VECTOR_LEN]; + u_char data[2]; } AUTH_HDR; -#define AUTH_HDR_LEN 20 -#define CHAP_VALUE_LENGTH 16 - -#define PW_AUTH_UDP_PORT 1812 -#define PW_ACCT_UDP_PORT 1813 - -#define VENDORPEC_USR 429 - -#define PW_TYPE_STRING 0 -#define PW_TYPE_INTEGER 1 -#define PW_TYPE_IPADDR 2 -#define PW_TYPE_DATE 3 - -#define PW_AUTHENTICATION_REQUEST 1 -#define PW_AUTHENTICATION_ACK 2 -#define PW_AUTHENTICATION_REJECT 3 -#define PW_ACCOUNTING_REQUEST 4 -#define PW_ACCOUNTING_RESPONSE 5 -#define PW_ACCOUNTING_STATUS 6 -#define PW_PASSWORD_REQUEST 7 -#define PW_PASSWORD_ACK 8 -#define PW_PASSWORD_REJECT 9 -#define PW_ACCOUNTING_MESSAGE 10 -#define PW_ACCESS_CHALLENGE 11 - -#define PW_USER_NAME 1 -#define PW_PASSWORD 2 -#define PW_CHAP_PASSWORD 3 -#define PW_NAS_IP_ADDRESS 4 -#define PW_NAS_PORT_ID 5 -#define PW_SERVICE_TYPE 6 -#define PW_FRAMED_PROTOCOL 7 -#define PW_FRAMED_IP_ADDRESS 8 -#define PW_FRAMED_IP_NETMASK 9 -#define PW_FRAMED_ROUTING 10 -#define PW_FILTER_ID 11 -#define PW_FRAMED_MTU 12 -#define PW_FRAMED_COMPRESSION 13 -#define PW_LOGIN_IP_HOST 14 -#define PW_LOGIN_SERVICE 15 -#define PW_LOGIN_TCP_PORT 16 -#define PW_OLD_PASSWORD 17 -#define PW_REPLY_MESSAGE 18 -#define PW_CALLBACK_NUMBER 19 -#define PW_CALLBACK_ID 20 -#define PW_EXPIRATION 21 -#define PW_FRAMED_ROUTE 22 -#define PW_FRAMED_IPXNET 23 -#define PW_STATE 24 -#define PW_CLASS 25 -#define PW_VENDOR_SPECIFIC 26 -#define PW_SESSION_TIMEOUT 27 -#define PW_IDLE_TIMEOUT 28 -#define PW_CALLED_STATION_ID 30 -#define PW_CALLING_STATION_ID 31 -#define PW_NAS_ID 32 -#define PW_PROXY_STATE 33 - -#define PW_ACCT_STATUS_TYPE 40 -#define PW_ACCT_DELAY_TIME 41 -#define PW_ACCT_INPUT_OCTETS 42 -#define PW_ACCT_OUTPUT_OCTETS 43 -#define PW_ACCT_SESSION_ID 44 -#define PW_ACCT_AUTHENTIC 45 -#define PW_ACCT_SESSION_TIME 46 -#define PW_ACCT_INPUT_PACKETS 47 -#define PW_ACCT_OUTPUT_PACKETS 48 - -#define PW_CHAP_CHALLENGE 60 -#define PW_NAS_PORT_TYPE 61 -#define PW_PORT_LIMIT 62 -#define PW_CONNECT_INFO 77 - -#define PW_HUNTGROUP_NAME 221 -#define PW_AUTHTYPE 1000 -#define PW_PREFIX 1003 -#define PW_SUFFIX 1004 -#define PW_GROUP 1005 -#define PW_CRYPT_PASSWORD 1006 -#define PW_CONNECT_RATE 1007 -#define PW_USER_CATEGORY 1029 -#define PW_GROUP_NAME 1030 -#define PW_SIMULTANEOUS_USE 1034 -#define PW_STRIP_USERNAME 1035 -#define PW_FALL_THROUGH 1036 -#define PW_ADD_PORT_TO_IP_ADDRESS 1037 -#define PW_EXEC_PROGRAM 1038 -#define PW_EXEC_PROGRAM_WAIT 1039 -#define PW_HINT 1040 -#define PAM_AUTH_ATTR 1041 -#define PW_LOGIN_TIME 1042 +#define AUTH_HDR_LEN 20 +#define CHAP_VALUE_LENGTH 16 + +#define PW_AUTH_UDP_PORT 1812 +#define PW_ACCT_UDP_PORT 1813 + +#define VENDORPEC_USR 429 + +#define PW_TYPE_STRING 0 +#define PW_TYPE_INTEGER 1 +#define PW_TYPE_IPADDR 2 +#define PW_TYPE_DATE 3 + +#define PW_AUTHENTICATION_REQUEST 1 +#define PW_AUTHENTICATION_ACK 2 +#define PW_AUTHENTICATION_REJECT 3 +#define PW_ACCOUNTING_REQUEST 4 +#define PW_ACCOUNTING_RESPONSE 5 +#define PW_ACCOUNTING_STATUS 6 +#define PW_PASSWORD_REQUEST 7 +#define PW_PASSWORD_ACK 8 +#define PW_PASSWORD_REJECT 9 +#define PW_ACCOUNTING_MESSAGE 10 +#define PW_ACCESS_CHALLENGE 11 + +#define PW_USER_NAME 1 +#define PW_PASSWORD 2 +#define PW_CHAP_PASSWORD 3 +#define PW_NAS_IP_ADDRESS 4 +#define PW_NAS_PORT_ID 5 +#define PW_SERVICE_TYPE 6 +#define PW_FRAMED_PROTOCOL 7 +#define PW_FRAMED_IP_ADDRESS 8 +#define PW_FRAMED_IP_NETMASK 9 +#define PW_FRAMED_ROUTING 10 +#define PW_FILTER_ID 11 +#define PW_FRAMED_MTU 12 +#define PW_FRAMED_COMPRESSION 13 +#define PW_LOGIN_IP_HOST 14 +#define PW_LOGIN_SERVICE 15 +#define PW_LOGIN_TCP_PORT 16 +#define PW_OLD_PASSWORD 17 +#define PW_REPLY_MESSAGE 18 +#define PW_CALLBACK_NUMBER 19 +#define PW_CALLBACK_ID 20 +#define PW_EXPIRATION 21 +#define PW_FRAMED_ROUTE 22 +#define PW_FRAMED_IPXNET 23 +#define PW_STATE 24 +#define PW_CLASS 25 +#define PW_VENDOR_SPECIFIC 26 +#define PW_SESSION_TIMEOUT 27 +#define PW_IDLE_TIMEOUT 28 +#define PW_CALLED_STATION_ID 30 +#define PW_CALLING_STATION_ID 31 +#define PW_NAS_ID 32 +#define PW_PROXY_STATE 33 + +#define PW_ACCT_STATUS_TYPE 40 +#define PW_ACCT_DELAY_TIME 41 +#define PW_ACCT_INPUT_OCTETS 42 +#define PW_ACCT_OUTPUT_OCTETS 43 +#define PW_ACCT_SESSION_ID 44 +#define PW_ACCT_AUTHENTIC 45 +#define PW_ACCT_SESSION_TIME 46 +#define PW_ACCT_INPUT_PACKETS 47 +#define PW_ACCT_OUTPUT_PACKETS 48 + +#define PW_CHAP_CHALLENGE 60 +#define PW_NAS_PORT_TYPE 61 +#define PW_PORT_LIMIT 62 +#define PW_CONNECT_INFO 77 + +#define PW_HUNTGROUP_NAME 221 +#define PW_AUTHTYPE 1000 +#define PW_PREFIX 1003 +#define PW_SUFFIX 1004 +#define PW_GROUP 1005 +#define PW_CRYPT_PASSWORD 1006 +#define PW_CONNECT_RATE 1007 +#define PW_USER_CATEGORY 1029 +#define PW_GROUP_NAME 1030 +#define PW_SIMULTANEOUS_USE 1034 +#define PW_STRIP_USERNAME 1035 +#define PW_FALL_THROUGH 1036 +#define PW_ADD_PORT_TO_IP_ADDRESS 1037 +#define PW_EXEC_PROGRAM 1038 +#define PW_EXEC_PROGRAM_WAIT 1039 +#define PW_HINT 1040 +#define PAM_AUTH_ATTR 1041 +#define PW_LOGIN_TIME 1042 /* - * INTEGER TRANSLATIONS + * INTEGER TRANSLATIONS */ -/* USER TYPES */ +/* USER TYPES */ -#define PW_LOGIN_USER 1 -#define PW_FRAMED_USER 2 -#define PW_DIALBACK_LOGIN_USER 3 -#define PW_DIALBACK_FRAMED_USER 4 +#define PW_LOGIN_USER 1 +#define PW_FRAMED_USER 2 +#define PW_DIALBACK_LOGIN_USER 3 +#define PW_DIALBACK_FRAMED_USER 4 -/* FRAMED PROTOCOLS */ +/* FRAMED PROTOCOLS */ -#define PW_PPP 1 -#define PW_SLIP 2 +#define PW_PPP 1 +#define PW_SLIP 2 -/* FRAMED ROUTING VALUES */ +/* FRAMED ROUTING VALUES */ -#define PW_NONE 0 -#define PW_BROADCAST 1 -#define PW_LISTEN 2 -#define PW_BROADCAST_LISTEN 3 +#define PW_NONE 0 +#define PW_BROADCAST 1 +#define PW_LISTEN 2 +#define PW_BROADCAST_LISTEN 3 -/* FRAMED COMPRESSION TYPES */ +/* FRAMED COMPRESSION TYPES */ -#define PW_VAN_JACOBSEN_TCP_IP 1 +#define PW_VAN_JACOBSEN_TCP_IP 1 -/* LOGIN SERVICES */ +/* LOGIN SERVICES */ -#define PW_TELNET 0 -#define PW_RLOGIN 1 -#define PW_TCP_CLEAR 2 -#define PW_PORTMASTER 3 +#define PW_TELNET 0 +#define PW_RLOGIN 1 +#define PW_TCP_CLEAR 2 +#define PW_PORTMASTER 3 -/* AUTHENTICATION LEVEL */ +/* AUTHENTICATION LEVEL */ -#define PW_AUTHTYPE_LOCAL 0 -#define PW_AUTHTYPE_SYSTEM 1 -#define PW_AUTHTYPE_SECURID 2 -#define PW_AUTHTYPE_CRYPT 3 -#define PW_AUTHTYPE_REJECT 4 -#define PW_AUTHTYPE_PAM 253 -#define PW_AUTHTYPE_ACCEPT 254 +#define PW_AUTHTYPE_LOCAL 0 +#define PW_AUTHTYPE_SYSTEM 1 +#define PW_AUTHTYPE_SECURID 2 +#define PW_AUTHTYPE_CRYPT 3 +#define PW_AUTHTYPE_REJECT 4 +#define PW_AUTHTYPE_PAM 253 +#define PW_AUTHTYPE_ACCEPT 254 -/* PORT TYPES */ -#define PW_NAS_PORT_ASYNC 0 -#define PW_NAS_PORT_SYNC 1 -#define PW_NAS_PORT_ISDN 2 -#define PW_NAS_PORT_ISDN_V120 3 -#define PW_NAS_PORT_ISDN_V110 4 +/* PORT TYPES */ +#define PW_NAS_PORT_ASYNC 0 +#define PW_NAS_PORT_SYNC 1 +#define PW_NAS_PORT_ISDN 2 +#define PW_NAS_PORT_ISDN_V120 3 +#define PW_NAS_PORT_ISDN_V110 4 -/* STATUS TYPES */ +/* STATUS TYPES */ -#define PW_STATUS_START 1 -#define PW_STATUS_STOP 2 -#define PW_STATUS_ALIVE 3 -#define PW_STATUS_ACCOUNTING_ON 7 -#define PW_STATUS_ACCOUNTING_OFF 8 +#define PW_STATUS_START 1 +#define PW_STATUS_STOP 2 +#define PW_STATUS_ALIVE 3 +#define PW_STATUS_ACCOUNTING_ON 7 +#define PW_STATUS_ACCOUNTING_OFF 8 diff --git a/helpers/basic_auth/SASL/basic_sasl_auth.cc b/helpers/basic_auth/SASL/basic_sasl_auth.cc index 2c84a24459..1f68c7cf34 100644 --- a/helpers/basic_auth/SASL/basic_sasl_auth.cc +++ b/helpers/basic_auth/SASL/basic_sasl_auth.cc @@ -46,7 +46,7 @@ #include #endif -#define APP_NAME_SASL "basic_sasl_auth" +#define APP_NAME_SASL "basic_sasl_auth" int main(int argc, char *argv[]) @@ -128,3 +128,4 @@ main(int argc, char *argv[]) sasl_done(); return 0; } + diff --git a/helpers/basic_auth/SMB/basic_smb_auth.cc b/helpers/basic_auth/SMB/basic_smb_auth.cc index 0e86527c42..1c4d46c89b 100644 --- a/helpers/basic_auth/SMB/basic_smb_auth.cc +++ b/helpers/basic_auth/SMB/basic_smb_auth.cc @@ -31,18 +31,18 @@ #include -#define NMB_UNICAST 1 -#define NMB_BROADCAST 2 +#define NMB_UNICAST 1 +#define NMB_BROADCAST 2 struct SMBDOMAIN { - const char *name; /* domain name */ - const char *sname; /* match this with user input */ - const char *passthrough; /* pass-through authentication */ - const char *nmbaddr; /* name service address */ - int nmbcast; /* broadcast or unicast */ - char *authshare; /* share name of auth file */ - const char *authfile; /* pathname of auth file */ - struct SMBDOMAIN *next; /* linked list */ + const char *name; /* domain name */ + const char *sname; /* match this with user input */ + const char *passthrough; /* pass-through authentication */ + const char *nmbaddr; /* name service address */ + int nmbcast; /* broadcast or unicast */ + char *authshare; /* share name of auth file */ + const char *authfile; /* pathname of auth file */ + struct SMBDOMAIN *next; /* linked list */ }; struct SMBDOMAIN *firstdom = NULL; @@ -236,6 +236,7 @@ main(int argc, char *argv[]) SEND_OK(""); else SEND_ERR(""); - } /* while (1) */ + } /* while (1) */ return 0; } + diff --git a/helpers/basic_auth/SSPI/basic_sspi_auth.cc b/helpers/basic_auth/SSPI/basic_sspi_auth.cc index 5e9a6c4b43..b6794fba5e 100644 --- a/helpers/basic_auth/SSPI/basic_sspi_auth.cc +++ b/helpers/basic_auth/SSPI/basic_sspi_auth.cc @@ -100,7 +100,7 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "FATAL: Unknown option: -%c\n", opt); usage(argv[0]); @@ -149,13 +149,13 @@ main(int argc, char **argv) } if ((p = strchr(wstr, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if ((p = strchr(wstr, '\r')) != NULL) - *p = '\0'; /* strip \r */ + *p = '\0'; /* strip \r */ /* Clear any current settings */ username[0] = '\0'; password[0] = '\0'; - sscanf(wstr, "%s %s", username, password); /* Extract parameters */ + sscanf(wstr, "%s %s", username, password); /* Extract parameters */ debug("Got %s from Squid\n", wstr); @@ -179,3 +179,4 @@ main(int argc, char **argv) } return 0; } + diff --git a/helpers/basic_auth/SSPI/valid.cc b/helpers/basic_auth/SSPI/valid.cc index a0650e1bd1..dc2425dc5f 100644 --- a/helpers/basic_auth/SSPI/valid.cc +++ b/helpers/basic_auth/SSPI/valid.cc @@ -61,8 +61,8 @@ int Valid_Group(char *UserName, char *Group) { int result = FALSE; - WCHAR wszUserName[256]; // Unicode user name - WCHAR wszGroup[256]; // Unicode Group + WCHAR wszUserName[256]; // Unicode user name + WCHAR wszGroup[256]; // Unicode Group LPLOCALGROUP_USERS_INFO_0 pBuf = NULL; LPLOCALGROUP_USERS_INFO_0 pTmpBuf; @@ -186,3 +186,4 @@ Valid_User(char *UserName, char *Password, char *Group) } return result; } + diff --git a/helpers/basic_auth/SSPI/valid.h b/helpers/basic_auth/SSPI/valid.h index ea78c9fa0c..b785ffecdd 100644 --- a/helpers/basic_auth/SSPI/valid.h +++ b/helpers/basic_auth/SSPI/valid.h @@ -68,7 +68,7 @@ extern char Default_NTDomain[DNLEN+1]; extern const char * errormsg; /* Debugging stuff */ -#if defined(__GNUC__) /* this is really a gcc-ism */ +#if defined(__GNUC__) /* this is really a gcc-ism */ #include static char *__foo; #define debug(X...) if (debug_enabled) { \ @@ -94,3 +94,4 @@ debug(char *format,...) int Valid_User(char *,char *, char *); #endif + diff --git a/helpers/basic_auth/fake/fake.cc b/helpers/basic_auth/fake/fake.cc index fcf2711eb7..04e24780ff 100644 --- a/helpers/basic_auth/fake/fake.cc +++ b/helpers/basic_auth/fake/fake.cc @@ -105,7 +105,7 @@ main(int argc, char *argv[]) char *p; if ((p = strchr(buf, '\n')) != NULL) { - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ buflen = p - buf; /* length is known already */ } else buflen = strlen(buf); /* keep this so we only scan the buffer for \0 once per loop */ @@ -118,3 +118,4 @@ main(int argc, char *argv[]) debug("%s build " __DATE__ ", " __TIME__ " shutting down...\n", program_name); exit(0); } + diff --git a/helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc b/helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc index 176afb0845..c78fa4f563 100644 --- a/helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc +++ b/helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc @@ -57,12 +57,12 @@ passwd_auth(char *user, char *passwd) struct passwd *pwd; pwd = getpwnam(user); if (pwd == NULL) { - return 0; /* User does not exist */ + return 0; /* User does not exist */ } else { if (strcmp(pwd->pw_passwd, (char *) crypt(passwd, pwd->pw_passwd))) { - return 2; /* Wrong password */ + return 2; /* Wrong password */ } else { - return 1; /* Authentication Sucessful */ + return 1; /* Authentication Sucessful */ } } } @@ -74,12 +74,12 @@ shadow_auth(char *user, char *passwd) struct spwd *pwd; pwd = getspnam(user); if (pwd == NULL) { - return passwd_auth(user, passwd); /* Fall back to passwd_auth */ + return passwd_auth(user, passwd); /* Fall back to passwd_auth */ } else { if (strcmp(pwd->sp_pwdp, crypt(passwd, pwd->sp_pwdp))) { - return 2; /* Wrong password */ + return 2; /* Wrong password */ } else { - return 1; /* Authentication Sucessful */ + return 1; /* Authentication Sucessful */ } } } @@ -96,7 +96,7 @@ main(int argc, char **argv) while (fgets(buf, HELPER_INPUT_BUFFER, stdin) != NULL) { if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if ((user = strtok(buf, " ")) == NULL) { SEND_ERR("No Username"); @@ -125,3 +125,4 @@ main(int argc, char **argv) } return 0; } + diff --git a/helpers/defines.h b/helpers/defines.h index 89f1841f23..648fd8352d 100644 --- a/helpers/defines.h +++ b/helpers/defines.h @@ -43,18 +43,19 @@ * useful and shared between helpers. */ -#define HELPER_INPUT_BUFFER 8196 +#define HELPER_INPUT_BUFFER 8196 /* send OK result to Squid with a string parameter. */ -#define SEND_OK(x) fprintf(stdout, "OK %s\n",x) +#define SEND_OK(x) fprintf(stdout, "OK %s\n",x) /* send ERR result to Squid with a string parameter. */ -#define SEND_ERR(x) fprintf(stdout, "ERR %s\n",x) +#define SEND_ERR(x) fprintf(stdout, "ERR %s\n",x) /* send ERR result to Squid with a string parameter. */ -#define SEND_BH(x) fprintf(stdout, "BH %s\n",x) +#define SEND_BH(x) fprintf(stdout, "BH %s\n",x) /* send TT result to Squid with a string parameter. */ -#define SEND_TT(x) fprintf(stdout, "TT %s\n",x) +#define SEND_TT(x) fprintf(stdout, "TT %s\n",x) #endif /* __SQUID_HELPERS_DEFINES_H */ + diff --git a/helpers/digest_auth/LDAP/digest_common.h b/helpers/digest_auth/LDAP/digest_common.h index 3577986333..43a524bb0d 100644 --- a/helpers/digest_auth/LDAP/digest_common.h +++ b/helpers/digest_auth/LDAP/digest_common.h @@ -52,3 +52,4 @@ typedef void HandleArguments(int, char **); typedef void HHA1Creator(RequestData *); #endif /* SQUID_DIGEST_COMMON_H_ */ + diff --git a/helpers/digest_auth/LDAP/digest_pw_auth.cc b/helpers/digest_auth/LDAP/digest_pw_auth.cc index ab0ff3c00b..050c6c409d 100644 --- a/helpers/digest_auth/LDAP/digest_pw_auth.cc +++ b/helpers/digest_auth/LDAP/digest_pw_auth.cc @@ -55,7 +55,7 @@ ParseBuffer(char *buf, RequestData * requestData) char *p; requestData->parsed = 0; if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ p = NULL; requestData->channelId = strtoll(buf, &p, 10); @@ -120,3 +120,4 @@ main(int argc, char **argv) DoOneRequest(buf); exit(0); } + diff --git a/helpers/digest_auth/LDAP/ldap_backend.cc b/helpers/digest_auth/LDAP/ldap_backend.cc index 0d5fd92f06..5482d60ffe 100644 --- a/helpers/digest_auth/LDAP/ldap_backend.cc +++ b/helpers/digest_auth/LDAP/ldap_backend.cc @@ -430,7 +430,7 @@ LDAPArguments(int argc, char **argv) fprintf(stderr, "ERROR: Your LDAP library does not have URI support\n"); return 1; #endif - /* Fall thru to -h */ + /* Fall thru to -h */ case 'h': if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; @@ -660,3 +660,4 @@ LDAPHHA1(RequestData * requestData) } } + diff --git a/helpers/digest_auth/LDAP/ldap_backend.h b/helpers/digest_auth/LDAP/ldap_backend.h index 51e16fd1be..b6a8bccc15 100644 --- a/helpers/digest_auth/LDAP/ldap_backend.h +++ b/helpers/digest_auth/LDAP/ldap_backend.h @@ -14,3 +14,4 @@ extern int LDAPArguments(int argc, char **argv); extern void LDAPHHA1(RequestData * requestData); + diff --git a/helpers/digest_auth/eDirectory/digest_common.h b/helpers/digest_auth/eDirectory/digest_common.h index d250fbf50f..15a863526b 100644 --- a/helpers/digest_auth/eDirectory/digest_common.h +++ b/helpers/digest_auth/eDirectory/digest_common.h @@ -55,3 +55,4 @@ typedef void HandleArguments(int, char **); typedef void HHA1Creator(RequestData *); #endif /* SQUID_DIGEST_COMMON_H_ */ + diff --git a/helpers/digest_auth/eDirectory/digest_pw_auth.cc b/helpers/digest_auth/eDirectory/digest_pw_auth.cc index 0da947dea2..533794972c 100644 --- a/helpers/digest_auth/eDirectory/digest_pw_auth.cc +++ b/helpers/digest_auth/eDirectory/digest_pw_auth.cc @@ -54,7 +54,7 @@ ParseBuffer(char *buf, RequestData * requestData) char *p; requestData->parsed = 0; if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ p = NULL; requestData->channelId = strtoll(buf, &p, 10); @@ -119,3 +119,4 @@ main(int argc, char **argv) DoOneRequest(buf); exit(0); } + diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.cc b/helpers/digest_auth/eDirectory/edir_ldapext.cc index 82e081d3a5..a1efb8e446 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.cc +++ b/helpers/digest_auth/eDirectory/edir_ldapext.cc @@ -13,7 +13,7 @@ * * Original copyright & license follows: * - * Copyright (C) Vince Brimhall 2004-2005 + * Copyright (C) Vince Brimhall 2004-2005 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,16 +59,16 @@ #include "edir_ldapext.h" -#define NMASLDAP_GET_LOGIN_CONFIG_REQUEST "2.16.840.1.113719.1.39.42.100.3" -#define NMASLDAP_GET_LOGIN_CONFIG_RESPONSE "2.16.840.1.113719.1.39.42.100.4" -#define NMASLDAP_SET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.11" -#define NMASLDAP_SET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.12" -#define NMASLDAP_GET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.13" -#define NMASLDAP_GET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.14" +#define NMASLDAP_GET_LOGIN_CONFIG_REQUEST "2.16.840.1.113719.1.39.42.100.3" +#define NMASLDAP_GET_LOGIN_CONFIG_RESPONSE "2.16.840.1.113719.1.39.42.100.4" +#define NMASLDAP_SET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.11" +#define NMASLDAP_SET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.12" +#define NMASLDAP_GET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.13" +#define NMASLDAP_GET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.14" -#define NMAS_LDAP_EXT_VERSION 1 +#define NMAS_LDAP_EXT_VERSION 1 -#define SMB_MALLOC_ARRAY(type, nelem) calloc(sizeof(type), nelem) +#define SMB_MALLOC_ARRAY(type, nelem) calloc(sizeof(type), nelem) #define DEBUG(level, args) /********************************************************************** @@ -161,7 +161,7 @@ static int berEncodeLoginData( unsigned int i; unsigned int elemCnt = methodIDLen / sizeof(unsigned int); - char *utf8ObjPtr=NULL; + char *utf8ObjPtr=NULL; int utf8ObjSize = 0; char *utf8TagPtr = NULL; @@ -276,7 +276,7 @@ static int berDecodeLoginData( **********************************************************************/ static int getLoginConfig( - LDAP *ld, + LDAP *ld, char *objectDN, unsigned int methodIDLen, unsigned int *methodID, @@ -346,9 +346,9 @@ static int getLoginConfig( **********************************************************************/ static int nmasldap_get_simple_pwd( - LDAP *ld, + LDAP *ld, char *objectDN, - size_t pwdLen, + size_t pwdLen, char *pwd ) { int err = 0; @@ -404,9 +404,9 @@ static int nmasldap_get_simple_pwd( **********************************************************************/ static int nmasldap_get_password( - LDAP *ld, + LDAP *ld, char *objectDN, - size_t *pwdSize, /* in bytes */ + size_t *pwdSize, /* in bytes */ unsigned char *pwd ) { int err = 0; diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.h b/helpers/digest_auth/eDirectory/edir_ldapext.h index 4387d7938e..40e38a7254 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.h +++ b/helpers/digest_auth/eDirectory/edir_ldapext.h @@ -1,9 +1,10 @@ -/* - * Copyright (C) 1996-2014 The Squid Software Foundation and contributors - * - * Squid software is distributed under GPLv2+ license and includes - * contributions from numerous individuals and organizations. - * Please see the COPYING and CONTRIBUTORS files for details. - */ - -int nds_get_password(LDAP *ld, char *object_dn, size_t * pwd_len, char *pwd); +/* + * Copyright (C) 1996-2014 The Squid Software Foundation and contributors + * + * Squid software is distributed under GPLv2+ license and includes + * contributions from numerous individuals and organizations. + * Please see the COPYING and CONTRIBUTORS files for details. + */ + +int nds_get_password(LDAP *ld, char *object_dn, size_t * pwd_len, char *pwd); + diff --git a/helpers/digest_auth/eDirectory/ldap_backend.cc b/helpers/digest_auth/eDirectory/ldap_backend.cc index ec6b6baa03..da113c7f2e 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.cc +++ b/helpers/digest_auth/eDirectory/ldap_backend.cc @@ -457,7 +457,7 @@ LDAPArguments(int argc, char **argv) fprintf(stderr, "ERROR: Your LDAP library does not have URI support\n"); return 1; #endif - /* Fall thru to -h */ + /* Fall thru to -h */ case 'h': if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; @@ -691,3 +691,4 @@ LDAPHHA1(RequestData * requestData) } } + diff --git a/helpers/digest_auth/eDirectory/ldap_backend.h b/helpers/digest_auth/eDirectory/ldap_backend.h index cfcbf4570e..e2edbd52fa 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.h +++ b/helpers/digest_auth/eDirectory/ldap_backend.h @@ -14,3 +14,4 @@ #include "digest_common.h" extern int LDAPArguments(int argc, char **argv); extern void LDAPHHA1(RequestData * requestData); + diff --git a/helpers/digest_auth/file/digest_common.h b/helpers/digest_auth/file/digest_common.h index b30217f844..6a06dcfb0e 100644 --- a/helpers/digest_auth/file/digest_common.h +++ b/helpers/digest_auth/file/digest_common.h @@ -47,3 +47,4 @@ typedef void HandleArguments(int, char **); typedef void HHA1Creator(RequestData *); #endif /* SQUID_DIGEST_COMMON_H_ */ + diff --git a/helpers/digest_auth/file/digest_file_auth.cc b/helpers/digest_auth/file/digest_file_auth.cc index bfd58c25af..b4d24c5197 100644 --- a/helpers/digest_auth/file/digest_file_auth.cc +++ b/helpers/digest_auth/file/digest_file_auth.cc @@ -56,7 +56,7 @@ ParseBuffer(char *buf, RequestData * requestData) char *p; requestData->parsed = 0; if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ p = NULL; requestData->channelId = strtoll(buf, &p, 10); @@ -118,3 +118,4 @@ main(int argc, char **argv) DoOneRequest(buf); return 0; } + diff --git a/helpers/digest_auth/file/text_backend.cc b/helpers/digest_auth/file/text_backend.cc index 228c9e9b0a..053ca4aead 100644 --- a/helpers/digest_auth/file/text_backend.cc +++ b/helpers/digest_auth/file/text_backend.cc @@ -195,3 +195,4 @@ TextHHA1(RequestData * requestData) DigestCalcHA1("md5", requestData->user, requestData->realm, u->passwd, NULL, NULL, HA1, requestData->HHA1); } } + diff --git a/helpers/digest_auth/file/text_backend.h b/helpers/digest_auth/file/text_backend.h index d4efa145c2..ef720d1e25 100644 --- a/helpers/digest_auth/file/text_backend.h +++ b/helpers/digest_auth/file/text_backend.h @@ -10,3 +10,4 @@ extern void TextArguments(int argc, char **argv); extern void TextHHA1(RequestData * requestData); + diff --git a/helpers/external_acl/AD_group/ext_ad_group_acl.cc b/helpers/external_acl/AD_group/ext_ad_group_acl.cc index 6b73f8ca93..3b17abe3f7 100644 --- a/helpers/external_acl/AD_group/ext_ad_group_acl.cc +++ b/helpers/external_acl/AD_group/ext_ad_group_acl.cc @@ -385,7 +385,7 @@ wccmparray(const wchar_t * str, const wchar_t ** array) static int wcstrcmparray(const wchar_t * str, const char **array) { - WCHAR wszGroup[GNLEN + 1]; // Unicode Group + WCHAR wszGroup[GNLEN + 1]; // Unicode Group while (*array) { MultiByteToWideChar(CP_ACP, 0, *array, @@ -525,7 +525,7 @@ Valid_Local_Groups(char *UserName, const char **Groups) { int result = 0; char *Domain_Separator; - WCHAR wszUserName[UNLEN + 1]; /* Unicode user name */ + WCHAR wszUserName[UNLEN + 1]; /* Unicode user name */ LPLOCALGROUP_USERS_INFO_0 pBuf; LPLOCALGROUP_USERS_INFO_0 pTmpBuf; @@ -602,7 +602,7 @@ int Valid_Global_Groups(char *UserName, const char **Groups) { int result = 0; - WCHAR wszUser[DNLEN + UNLEN + 2]; /* Unicode user name */ + WCHAR wszUser[DNLEN + UNLEN + 2]; /* Unicode user name */ char NTDomain[DNLEN + UNLEN + 2]; char *domain_qualify = NULL; @@ -756,12 +756,12 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "%s: FATAL: Unknown option: -%c. Exiting\n", program_name, opt); usage(argv[0]); exit(1); - break; /* not reached */ + break; /* not reached */ } } return; @@ -777,7 +777,7 @@ main(int argc, char *argv[]) const char *groups[512]; int n; - if (argc > 0) { /* should always be true */ + if (argc > 0) { /* should always be true */ program_name = strrchr(argv[0], '/'); if (program_name == NULL) program_name = argv[0]; @@ -824,9 +824,9 @@ main(int argc, char *argv[]) continue; } if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if ((p = strchr(buf, '\r')) != NULL) - *p = '\0'; /* strip \r */ + *p = '\0'; /* strip \r */ debug("Got '%s' from Squid (length: %d).\n", buf, strlen(buf)); @@ -857,3 +857,4 @@ main(int argc, char *argv[]) } return 0; } + diff --git a/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc b/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc index 4379f813d2..aac306a64a 100644 --- a/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc +++ b/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc @@ -257,7 +257,7 @@ main(int argc, char **argv) fprintf(stderr, "FATAL: Your LDAP library does not have URI support\n"); exit(1); #endif - /* Fall thru to -h */ + /* Fall thru to -h */ case 'h': if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; @@ -835,3 +835,4 @@ readSecret(const char *filename) return 0; } + diff --git a/helpers/external_acl/LM_group/ext_lm_group_acl.cc b/helpers/external_acl/LM_group/ext_lm_group_acl.cc index 421aaf80ea..6955efdce6 100644 --- a/helpers/external_acl/LM_group/ext_lm_group_acl.cc +++ b/helpers/external_acl/LM_group/ext_lm_group_acl.cc @@ -219,7 +219,7 @@ GetDomainName(void) static int wcstrcmparray(const wchar_t * str, const char **array) { - WCHAR wszGroup[GNLEN + 1]; // Unicode Group + WCHAR wszGroup[GNLEN + 1]; // Unicode Group while (*array) { MultiByteToWideChar(CP_ACP, 0, *array, @@ -238,7 +238,7 @@ Valid_Local_Groups(char *UserName, const char **Groups) { int result = 0; char *Domain_Separator; - WCHAR wszUserName[UNLEN + 1]; // Unicode user name + WCHAR wszUserName[UNLEN + 1]; // Unicode user name LPLOCALGROUP_USERS_INFO_0 pBuf = NULL; LPLOCALGROUP_USERS_INFO_0 pTmpBuf; @@ -312,11 +312,11 @@ int Valid_Global_Groups(char *UserName, const char **Groups) { int result = 0; - WCHAR wszUserName[UNLEN + 1]; // Unicode user name + WCHAR wszUserName[UNLEN + 1]; // Unicode user name - WCHAR wszLocalDomain[DNLEN + 1]; // Unicode Local Domain + WCHAR wszLocalDomain[DNLEN + 1]; // Unicode Local Domain - WCHAR wszUserDomain[DNLEN + 1]; // Unicode User Domain + WCHAR wszUserDomain[DNLEN + 1]; // Unicode User Domain char NTDomain[DNLEN + UNLEN + 2]; char *domain_qualify; @@ -495,12 +495,12 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "%s: FATAL: Unknown option: -%c. Exiting\n", program_name, opt); usage(argv[0]); exit(1); - break; /* not reached */ + break; /* not reached */ } } return; @@ -516,7 +516,7 @@ main(int argc, char *argv[]) const char *groups[512]; int n; - if (argc > 0) { /* should always be true */ + if (argc > 0) { /* should always be true */ program_name = strrchr(argv[0], '/'); if (program_name == NULL) program_name = argv[0]; @@ -566,9 +566,9 @@ main(int argc, char *argv[]) continue; } if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ if ((p = strchr(buf, '\r')) != NULL) - *p = '\0'; /* strip \r */ + *p = '\0'; /* strip \r */ debug("Got '%s' from Squid (length: %d).\n", buf, strlen(buf)); @@ -597,3 +597,4 @@ main(int argc, char *argv[]) } return 0; } + diff --git a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc index 93df533cef..58cfb808b7 100644 --- a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc +++ b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc @@ -40,8 +40,8 @@ #include "rfc1738.h" #include "util.h" -#define EDUI_PROGRAM_NAME "ext_edirectory_userip_acl" -#define EDUI_PROGRAM_VERSION "2.1" +#define EDUI_PROGRAM_NAME "ext_edirectory_userip_acl" +#define EDUI_PROGRAM_VERSION "2.1" /* System includes */ #ifndef _GNU_SOURCE @@ -69,9 +69,9 @@ #endif #ifdef HELPER_INPUT_BUFFER -#define EDUI_MAXLEN HELPER_INPUT_BUFFER +#define EDUI_MAXLEN HELPER_INPUT_BUFFER #else -#define EDUI_MAXLEN 4096 /* Modified to improve performance, unless HELPER_INPUT_BUFFER exists */ +#define EDUI_MAXLEN 4096 /* Modified to improve performance, unless HELPER_INPUT_BUFFER exists */ #endif /* ldap compile options */ @@ -90,14 +90,14 @@ #endif /* conf_t - status flags */ -#define EDUI_MODE_INIT 0x01 -#define EDUI_MODE_DEBUG 0x02 /* Replace with Squid's debug system */ -#define EDUI_MODE_TLS 0x04 -#define EDUI_MODE_IPV4 0x08 -#define EDUI_MODE_IPV6 0x10 -#define EDUI_MODE_GROUP 0x20 /* Group is REQUIRED */ -#define EDUI_MODE_PERSIST 0x40 /* Persistent LDAP connections */ -#define EDUI_MODE_KILL 0x80 +#define EDUI_MODE_INIT 0x01 +#define EDUI_MODE_DEBUG 0x02 /* Replace with Squid's debug system */ +#define EDUI_MODE_TLS 0x04 +#define EDUI_MODE_IPV4 0x08 +#define EDUI_MODE_IPV6 0x10 +#define EDUI_MODE_GROUP 0x20 /* Group is REQUIRED */ +#define EDUI_MODE_PERSIST 0x40 /* Persistent LDAP connections */ +#define EDUI_MODE_KILL 0x80 /* conf_t - Program configuration struct typedef */ typedef struct { @@ -107,7 +107,7 @@ typedef struct { char attrib[EDUI_MAXLEN]; char dn[EDUI_MAXLEN]; char passwd[EDUI_MAXLEN]; - char search_filter[EDUI_MAXLEN]; /* Base search_filter that gets copied to edui_ldap_t */ + char search_filter[EDUI_MAXLEN]; /* Base search_filter that gets copied to edui_ldap_t */ int ver; int scope; int port; @@ -157,15 +157,15 @@ typedef struct { char host[EDUI_MAXLEN]; char dn[EDUI_MAXLEN]; char passwd[EDUI_MAXLEN]; - char search_filter[EDUI_MAXLEN]; /* search_group gets appended here by GroupLDAP */ - char search_ip[EDUI_MAXLEN]; /* Could be IPv4 or IPv6, set by ConvertIP */ + char search_filter[EDUI_MAXLEN]; /* search_group gets appended here by GroupLDAP */ + char search_ip[EDUI_MAXLEN]; /* Could be IPv4 or IPv6, set by ConvertIP */ char userid[EDUI_MAXLEN]; /* Resulting userid */ unsigned int status; unsigned int port; - unsigned long type; /* Type of bind */ + unsigned long type; /* Type of bind */ int ver; int scope; - int err; /* LDAP error code */ + int err; /* LDAP error code */ time_t idle_time; int num_ent; /* Number of entry's found via search */ int num_val; /* Number of value's found via getval */ @@ -569,11 +569,11 @@ InitLDAP(edui_ldap_t *l) l->port = 0; l->scope = -1; l->type = 0; - l->err = -1; /* Set error to LDAP_SUCCESS by default */ + l->err = -1; /* Set error to LDAP_SUCCESS by default */ l->ver = 0; l->idle_time = 0; - l->num_ent = 0; /* Number of entries in l->lm */ - l->num_val = 0; /* Number of entries in l->val */ + l->num_ent = 0; /* Number of entries in l->lm */ + l->num_val = 0; /* Number of entries in l->val */ /* Set default settings from conf */ if (edui_conf.basedn[0] != '\0') @@ -601,19 +601,19 @@ static int OpenLDAP(edui_ldap_t *l, char *h, unsigned int p) { if ((l == NULL) || (h == NULL)) return LDAP_ERR_NULL; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized, or might be in use */ - if (l->status & LDAP_OPEN_S) return LDAP_ERR_OPEN; /* Already open */ - if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized, or might be in use */ + if (l->status & LDAP_OPEN_S) return LDAP_ERR_OPEN; /* Already open */ + if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ xstrncpy(l->host, h, sizeof(l->host)); if (p > 0) l->port = p; else - l->port = LDAP_PORT; /* Default is port 389 */ + l->port = LDAP_PORT; /* Default is port 389 */ #ifdef NETSCAPE_SSL if (l->port == LDAPS_PORT) - l->status |= (LDAP_SSL_S | LDAP_TLS_S); /* SSL Port: 636 */ + l->status |= (LDAP_SSL_S | LDAP_TLS_S); /* SSL Port: 636 */ #endif #ifdef USE_LDAP_INIT @@ -623,7 +623,7 @@ OpenLDAP(edui_ldap_t *l, char *h, unsigned int p) #endif if (l->lp == NULL) { l->err = LDAP_CONNECT_ERROR; - return LDAP_ERR_CONNECT; /* Unable to connect */ + return LDAP_ERR_CONNECT; /* Unable to connect */ } else { /* set status */ // l->status &= ~(LDAP_INIT_S); @@ -644,8 +644,8 @@ CloseLDAP(edui_ldap_t *l) int s; if (l == NULL) return LDAP_ERR_NULL; if (l->lp == NULL) return LDAP_ERR_NULL; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Connection not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Connection not open */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Connection not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Connection not open */ if (l->lm != NULL) { ldap_msgfree(l->lm); @@ -661,10 +661,10 @@ CloseLDAP(edui_ldap_t *l) if (s == LDAP_SUCCESS) { l->status = LDAP_INIT_S; l->idle_time = 0; - l->err = s; /* Set LDAP error code */ + l->err = s; /* Set LDAP error code */ return LDAP_ERR_SUCCESS; } else { - l->err = s; /* Set LDAP error code */ + l->err = s; /* Set LDAP error code */ return LDAP_ERR_FAILED; } } @@ -681,18 +681,18 @@ SetVerLDAP(edui_ldap_t *l, int v) if (l == NULL) return LDAP_ERR_NULL; if ((v > 3) || (v < 1)) return LDAP_ERR_PARAM; if (l->lp == NULL) return LDAP_ERR_POINTER; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ /* set version */ x = ldap_set_option(l->lp, LDAP_OPT_PROTOCOL_VERSION, &v); if (x == LDAP_SUCCESS) { l->ver = v; - l->err = x; /* Set LDAP error code */ + l->err = x; /* Set LDAP error code */ return LDAP_ERR_SUCCESS; } else { - l->err = x; /* Set LDAP error code */ + l->err = x; /* Set LDAP error code */ return LDAP_ERR_FAILED; } } @@ -707,10 +707,10 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) { int s; if (l == NULL) return LDAP_ERR_NULL; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ - if (l->lp == NULL) return LDAP_ERR_POINTER; /* Error */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */ + if (l->lp == NULL) return LDAP_ERR_POINTER; /* Error */ /* Copy details - dn and pw CAN be NULL for anonymous and/or TLS */ if (dn != NULL) { @@ -752,13 +752,13 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) break; #endif #ifdef LDAP_AUTH_TLS - case LDAP_AUTH_TLS: /* Added for chicken switch to TLS-enabled without using SSL */ + case LDAP_AUTH_TLS: /* Added for chicken switch to TLS-enabled without using SSL */ l->type = t; break; #endif default: l->type = LDAP_AUTH_NONE; - break; /* Default to anonymous bind */ + break; /* Default to anonymous bind */ } /* Bind */ @@ -769,11 +769,11 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) #endif s = ldap_bind_s(l->lp, l->dn, l->passwd, l->type); if (s == LDAP_SUCCESS) { - l->status |= LDAP_BIND_S; /* Success */ - l->err = s; /* Set LDAP error code */ + l->status |= LDAP_BIND_S; /* Success */ + l->err = s; /* Set LDAP error code */ return LDAP_ERR_SUCCESS; } else { - l->err = s; /* Set LDAP error code */ + l->err = s; /* Set LDAP error code */ return LDAP_ERR_FAILED; } } @@ -795,12 +795,12 @@ ConvertIP(edui_ldap_t *l, char *ip) void *y, *z; size_t s; long x; - int i, j, t, swi; /* IPv6 "::" cut over toggle */ + int i, j, t, swi; /* IPv6 "::" cut over toggle */ if (l == NULL) return LDAP_ERR_NULL; if (ip == NULL) return LDAP_ERR_PARAM; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ y = memchr((void *)ip, ':', EDUI_MAXLEN); z = memchr((void *)ip, '.', EDUI_MAXLEN); @@ -837,7 +837,7 @@ ConvertIP(edui_ldap_t *l, char *ip) *(obj) = '\0'; /* StringSplit() will zero out bufa & obj at each call */ memset(l->search_ip, '\0', sizeof(l->search_ip)); - xstrncpy(bufa, ip, sizeof(bufa)); /* To avoid segfaults, use bufa instead of ip */ + xstrncpy(bufa, ip, sizeof(bufa)); /* To avoid segfaults, use bufa instead of ip */ swi = 0; if (l->status & LDAP_IPV6_S) { /* Search for :: in string */ @@ -845,13 +845,13 @@ ConvertIP(edui_ldap_t *l, char *ip) /* bufa starts with a ::, so just copy and clear */ xstrncpy(bufb, bufa, sizeof(bufb)); *(bufa) = '\0'; - ++swi; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } else if ((bufa[0] == ':') && (bufa[1] != ':')) { /* bufa starts with a :, a typo so just fill in a ':', cat and clear */ bufb[0] = ':'; strncat(bufb, bufa, strlen(bufa)); *(bufa) = '\0'; - ++swi; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } else { p = strstr(bufa, "::"); if (p != NULL) { @@ -861,7 +861,7 @@ ConvertIP(edui_ldap_t *l, char *ip) memcpy(bufb, p, i); *p = '\0'; bufb[i] = '\0'; - ++swi; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } } } @@ -876,39 +876,39 @@ ConvertIP(edui_ldap_t *l, char *ip) errno = 0; x = strtol(obj, (char **)NULL, 10); if (((x < 0) || (x > 255)) || ((errno != 0) && (x == 0)) || ((obj[0] != '0') && (x == 0))) - return LDAP_ERR_OOB; /* Out of bounds -- Invalid address */ + return LDAP_ERR_OOB; /* Out of bounds -- Invalid address */ memset(hexc, '\0', sizeof(hexc)); int hlen = snprintf(hexc, sizeof(hexc), "%02X", (int)x); strncat(l->search_ip, hexc, hlen); } else - break; /* reached end of octet */ + break; /* reached end of octet */ } else if (l->status & LDAP_IPV6_S) { /* Break down IPv6 address */ if (swi > 1) - t = StringSplit(bufb, ':', obj, sizeof(obj)); /* After "::" */ + t = StringSplit(bufb, ':', obj, sizeof(obj)); /* After "::" */ else - t = StringSplit(bufa, ':', obj, sizeof(obj)); /* Before "::" */ + t = StringSplit(bufa, ':', obj, sizeof(obj)); /* Before "::" */ /* Convert octet by size (t) - and fill 0's */ - switch (t) { /* IPv6 is already in HEX, copy contents */ + switch (t) { /* IPv6 is already in HEX, copy contents */ case 4: hexc[0] = (char) toupper((int)obj[0]); i = (int)hexc[0]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[1] = (char) toupper((int)obj[1]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); hexc[0] = (char) toupper((int)obj[2]); i = (int)hexc[0]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[1] = (char) toupper((int)obj[3]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); break; @@ -917,17 +917,17 @@ ConvertIP(edui_ldap_t *l, char *ip) hexc[1] = (char) toupper((int)obj[0]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); hexc[0] = (char) toupper((int)obj[1]); i = (int)hexc[0]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[1] = (char) toupper((int)obj[2]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); break; @@ -936,11 +936,11 @@ ConvertIP(edui_ldap_t *l, char *ip) hexc[0] = (char) toupper((int)obj[0]); i = (int)hexc[0]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[1] = (char) toupper((int)obj[1]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); break; @@ -950,7 +950,7 @@ ConvertIP(edui_ldap_t *l, char *ip) hexc[1] = (char) toupper((int)obj[0]); i = (int)hexc[1]; if (!isxdigit(i)) - return LDAP_ERR_OOB; /* Out of bounds */ + return LDAP_ERR_OOB; /* Out of bounds */ hexc[2] = '\0'; strncat(l->search_ip, hexc, 2); break; @@ -969,8 +969,8 @@ ConvertIP(edui_ldap_t *l, char *ip) if (bufb[i] == ':') ++j; } - --j; /* Preceding "::" doesn't count */ - t = 8 - (strlen(l->search_ip) / 4) - j; /* Remainder */ + --j; /* Preceding "::" doesn't count */ + t = 8 - (strlen(l->search_ip) / 4) - j; /* Remainder */ if (t > 0) { for (i = 0; i < t; ++i) strncat(l->search_ip, "0000", 4); @@ -1067,10 +1067,10 @@ SearchFilterLDAP(edui_ldap_t *l, char *group) int swi; char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], bufc[EDUI_MAXLEN], bufd[EDUI_MAXLEN], bufg[EDUI_MAXLEN]; if (l == NULL) return LDAP_ERR_NULL; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not Bound */ - if (l->search_ip[0] == '\0') return LDAP_ERR_DATA; /* Search IP is required */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not Bound */ + if (l->search_ip[0] == '\0') return LDAP_ERR_DATA; /* Search IP is required */ /* Zero out if not already */ memset(bufa, '\0', sizeof(bufa)); @@ -1160,15 +1160,15 @@ SearchLDAP(edui_ldap_t *l, int scope, char *filter, char **attrs) int s; char ft[EDUI_MAXLEN]; if (l == NULL) return LDAP_ERR_NULL; - if ((scope < 0) || (filter == NULL)) return LDAP_ERR_PARAM; /* If attrs is NULL, then all attrs will return */ + if ((scope < 0) || (filter == NULL)) return LDAP_ERR_PARAM; /* If attrs is NULL, then all attrs will return */ if (l->lp == NULL) return LDAP_ERR_POINTER; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ - if (l->status & LDAP_SEARCH_S) return LDAP_ERR_SEARCHED; /* Already searching */ - if (l->basedn[0] == '\0') return LDAP_ERR_DATA; /* We require a basedn */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ + if (l->status & LDAP_SEARCH_S) return LDAP_ERR_SEARCHED; /* Already searching */ + if (l->basedn[0] == '\0') return LDAP_ERR_DATA; /* We require a basedn */ if (l->lm != NULL) - ldap_msgfree(l->lm); /* Make sure l->lm is empty */ + ldap_msgfree(l->lm); /* Make sure l->lm is empty */ xstrncpy(ft, filter, sizeof(ft)); @@ -1189,10 +1189,10 @@ SearchLDAP(edui_ldap_t *l, int scope, char *filter, char **attrs) break; } if (s == LDAP_SUCCESS) { - l->status |= (LDAP_SEARCH_S); /* Mark as searched */ + l->status |= (LDAP_SEARCH_S); /* Mark as searched */ l->err = s; - l->idle_time = 0; /* Connection in use, reset idle timer */ - l->num_ent = ldap_count_entries(l->lp, l->lm); /* Counted */ + l->idle_time = 0; /* Connection in use, reset idle timer */ + l->num_ent = ldap_count_entries(l->lp, l->lm); /* Counted */ return LDAP_ERR_SUCCESS; } else { l->err = s; @@ -1219,29 +1219,29 @@ SearchIPLDAP(edui_ldap_t *l) LDAPMessage *ent; if (l == NULL) return LDAP_ERR_NULL; if (l->lp == NULL) return LDAP_ERR_POINTER; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ - if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ - if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ - if (!(l->status & LDAP_SEARCH_S)) return LDAP_ERR_NOT_SEARCHED; /* Not searched */ + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ + if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */ + if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */ + if (!(l->status & LDAP_SEARCH_S)) return LDAP_ERR_NOT_SEARCHED; /* Not searched */ if (l->num_ent <= 0) { debug("l->num_ent: %d\n", l->num_ent); - return LDAP_ERR_DATA; /* No entries found */ + return LDAP_ERR_DATA; /* No entries found */ } if (l->val != NULL) - ldap_value_free_len(l->val); /* Clear data before populating */ + ldap_value_free_len(l->val); /* Clear data before populating */ l->num_val = 0; if (l->status & LDAP_VAL_S) - l->status &= ~(LDAP_VAL_S); /* Clear VAL bit */ + l->status &= ~(LDAP_VAL_S); /* Clear VAL bit */ if (edui_conf.attrib[0] == '\0') - xstrncpy(edui_conf.attrib, "cn", sizeof(edui_conf.attrib)); /* Make sure edui_conf.attrib is set */ + xstrncpy(edui_conf.attrib, "cn", sizeof(edui_conf.attrib)); /* Make sure edui_conf.attrib is set */ /* Sift through entries */ struct berval **ber = NULL; for (ent = ldap_first_entry(l->lp, l->lm); ent != NULL; ent = ldap_next_entry(l->lp, ent)) { l->val = ldap_get_values_len(l->lp, ent, "networkAddress"); - ber = ldap_get_values_len(l->lp, ent, edui_conf.attrib); /* edui_conf.attrib is the mapping */ + ber = ldap_get_values_len(l->lp, ent, edui_conf.attrib); /* edui_conf.attrib is the mapping */ if (l->val != NULL) { - x = ldap_count_values_len(l->val); /* We got x values ... */ + x = ldap_count_values_len(l->val); /* We got x values ... */ l->num_val = x; if (x > 0) { /* Display all values */ @@ -1250,21 +1250,21 @@ SearchIPLDAP(edui_ldap_t *l) memcpy(bufa, l->val[i]->bv_val, j); z = BinarySplit(bufa, j, '#', bufb, sizeof(bufb)); /* BINARY DEBUGGING * - local_printfx("value[%" PRIuSIZE "]: BinarySplit(", (size_t) i); - for (k = 0; k < z; ++k) { - c = (int) bufb[k]; - if (c < 0) - c = c + 256; - local_printfx("%02X", c); - } - local_printfx(", "); - for (k = 0; k < (j - z - 1); ++k) { - c = (int) bufa[k]; - if (c < 0) - c = c + 256; - local_printfx("%02X", c); - } - local_printfx("): %" PRIuSIZE "\n", (size_t) z); + local_printfx("value[%" PRIuSIZE "]: BinarySplit(", (size_t) i); + for (k = 0; k < z; ++k) { + c = (int) bufb[k]; + if (c < 0) + c = c + 256; + local_printfx("%02X", c); + } + local_printfx(", "); + for (k = 0; k < (j - z - 1); ++k) { + c = (int) bufa[k]; + if (c < 0) + c = c + 256; + local_printfx("%02X", c); + } + local_printfx("): %" PRIuSIZE "\n", (size_t) z); * BINARY DEBUGGING */ z = j - z - 1; j = atoi(bufb); @@ -1272,7 +1272,7 @@ SearchIPLDAP(edui_ldap_t *l) /* IPv4 address (eDirectory 8.7 and below) */ /* bufa is the address, just compare it */ if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv4 */ + break; /* Not looking for IPv4 */ for (k = 0; k < z; ++k) { c = (int) bufa[k]; if (c < 0) @@ -1300,14 +1300,14 @@ SearchIPLDAP(edui_ldap_t *l) l->num_val = 0; l->err = LDAP_SUCCESS; l->status &= ~(LDAP_SEARCH_S); - return LDAP_ERR_SUCCESS; /* We got our userid */ + return LDAP_ERR_SUCCESS; /* We got our userid */ } /* Not matched, continue */ } else if ((j == 8) || (j == 9)) { /* IPv4 (UDP/TCP) address (eDirectory 8.8 and higher) */ /* bufa + 2 is the address (skip 2 digit port) */ if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv4 */ + break; /* Not looking for IPv4 */ for (k = 2; k < z; ++k) { c = (int) bufa[k]; if (c < 0) @@ -1335,14 +1335,14 @@ SearchIPLDAP(edui_ldap_t *l) l->num_val = 0; l->err = LDAP_SUCCESS; l->status &= ~(LDAP_SEARCH_S); - return LDAP_ERR_SUCCESS; /* We got our userid */ + return LDAP_ERR_SUCCESS; /* We got our userid */ } /* Not matched, continue */ } else if ((j == 10) || (j == 11)) { /* IPv6 (UDP/TCP) address (eDirectory 8.8 and higher) */ /* bufa + 2 is the address (skip 2 digit port) */ if (!(l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv6 */ + break; /* Not looking for IPv6 */ for (k = 2; k < z; ++k) { c = (int) bufa[k]; if (c < 0) @@ -1370,11 +1370,11 @@ SearchIPLDAP(edui_ldap_t *l) l->num_val = 0; l->err = LDAP_SUCCESS; l->status &= ~(LDAP_SEARCH_S); - return LDAP_ERR_SUCCESS; /* We got our userid */ + return LDAP_ERR_SUCCESS; /* We got our userid */ } /* Not matched, continue */ } -// else { +// else { /* Others are unsupported */ // } } @@ -1405,7 +1405,7 @@ SearchIPLDAP(edui_ldap_t *l) l->num_val = 0; l->err = LDAP_NO_SUCH_OBJECT; l->status &= ~(LDAP_SEARCH_S); - return LDAP_ERR_NOTFOUND; /* Not found ... Sorry :) */ + return LDAP_ERR_NOTFOUND; /* Not found ... Sorry :) */ } /* @@ -1531,27 +1531,27 @@ MainSafe(int argc, char **argv) return 1; case 'd': if (!(edui_conf.mode & EDUI_MODE_DEBUG)) - edui_conf.mode |= EDUI_MODE_DEBUG; /* Don't set mode more than once */ - debug_enabled = 1; /* Official Squid-3 Debug Mode */ + edui_conf.mode |= EDUI_MODE_DEBUG; /* Don't set mode more than once */ + debug_enabled = 1; /* Official Squid-3 Debug Mode */ break; case '4': if (!(edui_conf.mode & EDUI_MODE_IPV4) || !(edui_conf.mode & EDUI_MODE_IPV6)) - edui_conf.mode |= EDUI_MODE_IPV4; /* Don't set mode more than once */ + edui_conf.mode |= EDUI_MODE_IPV4; /* Don't set mode more than once */ break; case '6': if (!(edui_conf.mode & EDUI_MODE_IPV4) || !(edui_conf.mode & EDUI_MODE_IPV6)) - edui_conf.mode |= EDUI_MODE_IPV6; /* Don't set mode more than once */ + edui_conf.mode |= EDUI_MODE_IPV6; /* Don't set mode more than once */ break; case 'Z': if (!(edui_conf.mode & EDUI_MODE_TLS)) - edui_conf.mode |= EDUI_MODE_TLS; /* Don't set mode more than once */ + edui_conf.mode |= EDUI_MODE_TLS; /* Don't set mode more than once */ break; case 'P': if (!(edui_conf.mode & EDUI_MODE_PERSIST)) - edui_conf.mode |= EDUI_MODE_PERSIST; /* Don't set mode more than once */ + edui_conf.mode |= EDUI_MODE_PERSIST; /* Don't set mode more than once */ break; case 'v': - ++i; /* Set LDAP version */ + ++i; /* Set LDAP version */ if (argv[i] != NULL) { edui_conf.ver = atoi(argv[i]); if (edui_conf.ver < 1) @@ -1565,7 +1565,7 @@ MainSafe(int argc, char **argv) } break; case 't': - ++i; /* Set Persistent timeout */ + ++i; /* Set Persistent timeout */ if (argv[i] != NULL) { edui_conf.persist_timeout = atoi(argv[i]); if (edui_conf.persist_timeout < 0) @@ -1577,7 +1577,7 @@ MainSafe(int argc, char **argv) } break; case 'b': - ++i; /* Set Base DN */ + ++i; /* Set Base DN */ if (argv[i] != NULL) xstrncpy(edui_conf.basedn, argv[i], sizeof(edui_conf.basedn)); else { @@ -1587,7 +1587,7 @@ MainSafe(int argc, char **argv) } break; case 'H': - ++i; /* Set Hostname */ + ++i; /* Set Hostname */ if (argv[i] != NULL) xstrncpy(edui_conf.host, argv[i], sizeof(edui_conf.host)); else { @@ -1597,7 +1597,7 @@ MainSafe(int argc, char **argv) } break; case 'p': - ++i; /* Set port */ + ++i; /* Set port */ if (argv[i] != NULL) edui_conf.port = atoi(argv[i]); else { @@ -1607,7 +1607,7 @@ MainSafe(int argc, char **argv) } break; case 'D': - ++i; /* Set Bind DN */ + ++i; /* Set Bind DN */ if (argv[i] != NULL) xstrncpy(edui_conf.dn, argv[i], sizeof(edui_conf.dn)); else { @@ -1617,7 +1617,7 @@ MainSafe(int argc, char **argv) } break; case 'W': - ++i; /* Set Bind PWD */ + ++i; /* Set Bind PWD */ if (argv[i] != NULL) xstrncpy(edui_conf.passwd, argv[i], sizeof(edui_conf.passwd)); else { @@ -1627,7 +1627,7 @@ MainSafe(int argc, char **argv) } break; case 'F': - ++i; /* Set Search Filter */ + ++i; /* Set Search Filter */ if (argv[i] != NULL) xstrncpy(edui_conf.search_filter, argv[i], sizeof(edui_conf.search_filter)); else { @@ -1638,10 +1638,10 @@ MainSafe(int argc, char **argv) break; case 'G': if (!(edui_conf.mode & EDUI_MODE_GROUP)) - edui_conf.mode |= EDUI_MODE_GROUP; /* Don't set mode more than once */ + edui_conf.mode |= EDUI_MODE_GROUP; /* Don't set mode more than once */ break; case 's': - ++i; /* Set Scope Level */ + ++i; /* Set Scope Level */ if (argv[i] != NULL) { if (!strncmp(argv[i], "base", 4)) edui_conf.scope = 0; @@ -1650,7 +1650,7 @@ MainSafe(int argc, char **argv) else if (!strncmp(argv[i], "sub", 4)) edui_conf.scope = 2; else - edui_conf.scope = 1; /* Default is 'one' */ + edui_conf.scope = 1; /* Default is 'one' */ } else { local_printfx("No parameters given for 's'.\n"); DisplayUsage(); @@ -1658,7 +1658,7 @@ MainSafe(int argc, char **argv) } break; case 'u': - ++i; /* Set Search Attribute */ + ++i; /* Set Search Attribute */ if (argv[i] != NULL) { xstrncpy(edui_conf.attrib, argv[i], sizeof(edui_conf.attrib)); } else { @@ -1667,7 +1667,7 @@ MainSafe(int argc, char **argv) return 1; } break; - case '-': /* We got a second '-' ... ignore */ + case '-': /* We got a second '-' ... ignore */ break; default: local_printfx("Invalid parameter - '%c'.\n", argv[i][j]); @@ -1683,22 +1683,22 @@ MainSafe(int argc, char **argv) } /* Set predefined required paremeters if none are given, localhost:LDAP_PORT, etc */ - if (edui_conf.host[0] == '\0') /* Default to localhost */ + if (edui_conf.host[0] == '\0') /* Default to localhost */ xstrncpy(edui_conf.host, "localhost", sizeof(edui_conf.host)); if (edui_conf.port < 0) - edui_conf.port = LDAP_PORT; /* Default: LDAP_PORT */ + edui_conf.port = LDAP_PORT; /* Default: LDAP_PORT */ if ((edui_conf.mode & EDUI_MODE_IPV4) && (edui_conf.mode & EDUI_MODE_IPV6)) - edui_conf.mode &= ~(EDUI_MODE_IPV6); /* Default to IPv4 */ + edui_conf.mode &= ~(EDUI_MODE_IPV6); /* Default to IPv4 */ if (edui_conf.ver < 0) edui_conf.ver = 2; if (!(edui_conf.mode & EDUI_MODE_TLS)) - edui_conf.mode |= EDUI_MODE_TLS; /* eDirectory requires TLS mode */ + edui_conf.mode |= EDUI_MODE_TLS; /* eDirectory requires TLS mode */ if ((edui_conf.mode & EDUI_MODE_TLS) && (edui_conf.ver < 3)) - edui_conf.ver = 3; /* TLS requires version 3 */ + edui_conf.ver = 3; /* TLS requires version 3 */ if (edui_conf.persist_timeout < 0) - edui_conf.persist_timeout = 600; /* Default: 600 seconds (10 minutes) */ + edui_conf.persist_timeout = 600; /* Default: 600 seconds (10 minutes) */ if (edui_conf.scope < 0) - edui_conf.scope = 1; /* Default: one */ + edui_conf.scope = 1; /* Default: one */ if (edui_conf.search_filter[0] == '\0') xstrncpy(edui_conf.search_filter, "(&(objectclass=User)(networkAddress=*))", sizeof(edui_conf.search_filter)); if (edui_conf.attrib[0] == '\0') @@ -1766,7 +1766,7 @@ MainSafe(int argc, char **argv) if (!(edui_ldap.status & LDAP_INIT_S)) { InitLDAP(&edui_ldap); debug("InitLDAP() -> %s\n", ErrLDAP(LDAP_ERR_SUCCESS)); - if (edui_conf.mode & EDUI_MODE_PERSIST) /* Setup persistant mode */ + if (edui_conf.mode & EDUI_MODE_PERSIST) /* Setup persistant mode */ edui_ldap.status |= LDAP_PERSIST_S; } if ((edui_ldap.status & LDAP_IDLE_S) && (edui_elap > 0)) { @@ -1880,7 +1880,7 @@ MainSafe(int argc, char **argv) local_printfx("ERR message=\"(SearchIPLDAP: %s)\"\n", ErrLDAP(x)); } else { debug("SearchIPLDAP(-, %s) -> %s\n", edui_ldap.userid, ErrLDAP(x)); - local_printfx("OK user=%s\n", edui_ldap.userid); /* Got userid --> OK user= */ + local_printfx("OK user=%s\n", edui_ldap.userid); /* Got userid --> OK user= */ } } /* Clear for next query */ @@ -1920,7 +1920,7 @@ MainSafe(int argc, char **argv) local_printfx("ERR message=\"(SearchIPLDAP: %s)\"\n", ErrLDAP(x)); } else { debug("SearchIPLDAP(-, %s) -> %s\n", edui_ldap.userid, ErrLDAP(x)); - local_printfx("OK user=%s\n", edui_ldap.userid); /* Got a userid --> OK user= */ + local_printfx("OK user=%s\n", edui_ldap.userid); /* Got a userid --> OK user= */ } } } @@ -1950,3 +1950,4 @@ main(int argc, char **argv) x = MainSafe(argc, argv); return x; } + diff --git a/helpers/external_acl/file_userip/ext_file_userip_acl.cc b/helpers/external_acl/file_userip/ext_file_userip_acl.cc index 2f54152a70..e5cc1b7572 100644 --- a/helpers/external_acl/file_userip/ext_file_userip_acl.cc +++ b/helpers/external_acl/file_userip/ext_file_userip_acl.cc @@ -59,7 +59,7 @@ struct ip_user_dict *load_dict(FILE *); int dict_lookup(struct ip_user_dict *, char *, char *); /** Size of lines read from the dictionary file */ -#define DICT_BUFFER_SIZE 8196 +#define DICT_BUFFER_SIZE 8196 /** This function parses the dictionary file and loads it * in memory. All IP addresses are processed with a bitwise AND @@ -70,14 +70,14 @@ int dict_lookup(struct ip_user_dict *, char *, char *); */ struct ip_user_dict * load_dict(FILE * FH) { - struct ip_user_dict *current_entry; /* the structure used to - store data */ - struct ip_user_dict *first_entry = NULL; /* the head of the - linked list */ + struct ip_user_dict *current_entry; /* the structure used to + store data */ + struct ip_user_dict *first_entry = NULL; /* the head of the + linked list */ char line[DICT_BUFFER_SIZE]; /* the buffer for the lines read - from the dict file */ - char *tmpbuf; /* for the address before the - bitwise AND */ + from the dict file */ + char *tmpbuf; /* for the address before the + bitwise AND */ /* the pointer to the first entry in the linked list */ first_entry = (struct ip_user_dict*)malloc(sizeof(struct ip_user_dict)); @@ -184,15 +184,15 @@ match_user(char *dict_username, char *username) } } return 0; -} /* match_user */ +} /* match_user */ int match_group(char *dict_group, char *username) { - struct group *g; /* a struct to hold group entries */ - ++dict_group; /* the @ should be the first char - so we rip it off by incrementing - * the pointer by one */ + struct group *g; /* a struct to hold group entries */ + ++dict_group; /* the @ should be the first char + so we rip it off by incrementing + * the pointer by one */ if ((g = getgrnam(dict_group)) == NULL) { debug("Group does not exist '%s'\n", dict_group); @@ -290,3 +290,4 @@ main (int argc, char *argv[]) fclose (FH); return 0; } + diff --git a/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc b/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc index 37b7841b76..8ae4359af6 100644 --- a/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc +++ b/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc @@ -346,7 +346,7 @@ main(int argc, char *const argv[]) #if HAVE_KRB5 krb5_cleanup(); #endif - exit(1); /* BIIG buffer */ + exit(1); /* BIIG buffer */ } SEND_BH("fgets NULL"); clean_args(&margs); @@ -483,3 +483,4 @@ main(int argc, char *const argv[]) } } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support.h b/helpers/external_acl/kerberos_ldap_group/support.h index e762e1df4d..0fd9479754 100644 --- a/helpers/external_acl/kerberos_ldap_group/support.h +++ b/helpers/external_acl/kerberos_ldap_group/support.h @@ -184,3 +184,4 @@ void krb5_cleanup(void); #endif #define PROGRAM "kerberos_ldap_group" + diff --git a/helpers/external_acl/kerberos_ldap_group/support_group.cc b/helpers/external_acl/kerberos_ldap_group/support_group.cc index 137bde529d..2057a12e1b 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_group.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_group.cc @@ -387,13 +387,13 @@ create_gd(struct main_args *margs) cleanup(); return (1); } - while (*p) { /* loop over group list */ - if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ + while (*p) { /* loop over group list */ + if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ ++p; continue; } - if (*p == '@') { /* end of group name - start of domain name */ - if (p == gp) { /* empty group name not allowed */ + if (*p == '@') { /* end of group name - start of domain name */ + if (p == gp) { /* empty group name not allowed */ debug((char *) "%s| %s: ERROR: No group defined for domain %s\n", LogTime(), PROGRAM, p); cleanup(); return (1); @@ -408,40 +408,40 @@ create_gd(struct main_args *margs) gdsp = init_gd(); gdsp->group = xstrdup(gp); gdsp->next = gdspn; - dp = p; /* after @ starts new domain name */ - } else if (*p == ':') { /* end of group name or end of domain name */ - if (p == gp) { /* empty group name not allowed */ + dp = p; /* after @ starts new domain name */ + } else if (*p == ':') { /* end of group name or end of domain name */ + if (p == gp) { /* empty group name not allowed */ debug((char *) "%s| %s: ERROR: No group defined for domain %s\n", LogTime(), PROGRAM, p); cleanup(); return (1); } *p = '\0'; ++p; - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ gdsp->domain = xstrdup(dp); dp = NULL; - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ gdsp = init_gd(); gdsp->group = xstrdup(gp); gdsp->next = gdspn; } gdspn = gdsp; - gp = p; /* after : starts new group name */ + gp = p; /* after : starts new group name */ debug((char *) "%s| %s: INFO: Group %s Domain %s\n", LogTime(), PROGRAM, gdsp->group, gdsp->domain ? gdsp->domain : "NULL"); } else ++p; } - if (p == gp) { /* empty group name not allowed */ + if (p == gp) { /* empty group name not allowed */ debug((char *) "%s| %s: ERROR: No group defined for domain %s\n", LogTime(), PROGRAM, p); cleanup(); return (1); } - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ gdsp->domain = xstrdup(dp); - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ gdsp = init_gd(); gdsp->group = xstrdup(gp); - if (gdspn) /* Have already an existing structure */ + if (gdspn) /* Have already an existing structure */ gdsp->next = gdspn; } debug((char *) "%s| %s: INFO: Group %s Domain %s\n", LogTime(), PROGRAM, gdsp->group, gdsp->domain ? gdsp->domain : "NULL"); @@ -452,3 +452,4 @@ create_gd(struct main_args *margs) return (0); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_krb5.cc b/helpers/external_acl/kerberos_ldap_group/support_krb5.cc index 240cbd00c6..4f2db6b200 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_krb5.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_krb5.cc @@ -226,9 +226,9 @@ krb5_create_cache(char *domain) debug((char *) "%s| %s: DEBUG: Get default keytab file name\n", LogTime(), PROGRAM); krb5_kt_default_name(kparam.context, buf, KT_PATH_MAX); - p = strchr(buf, ':'); /* Find the end if "FILE:" */ + p = strchr(buf, ':'); /* Find the end if "FILE:" */ if (p) - ++p; /* step past : */ + ++p; /* step past : */ keytab_name = xstrdup(p ? p : buf); debug((char *) "%s| %s: DEBUG: Got default keytab file name %s\n", LogTime(), PROGRAM, keytab_name); @@ -487,3 +487,4 @@ cleanup: return (retval); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_ldap.cc b/helpers/external_acl/kerberos_ldap_group/support_ldap.cc index 3afe03cbcd..c57687e487 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_ldap.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_ldap.cc @@ -1389,3 +1389,4 @@ cleanup: return (retval); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_log.cc b/helpers/external_acl/kerberos_ldap_group/support_log.cc index f0683ed3ea..e4cda8931b 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_log.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_log.cc @@ -91,3 +91,4 @@ warn(char *format,...) #endif /* __GNUC__ */ #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_lserver.cc b/helpers/external_acl/kerberos_ldap_group/support_lserver.cc index a0f1163636..6d0427883a 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_lserver.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_lserver.cc @@ -86,13 +86,13 @@ create_ls(struct main_args *margs) debug((char *) "%s| %s: DEBUG: No ldap servers defined.\n", LogTime(), PROGRAM); return (0); } - while (*p) { /* loop over group list */ - if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ + while (*p) { /* loop over group list */ + if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ ++p; continue; } - if (*p == '@') { /* end of group name - start of domain name */ - if (p == np) { /* empty group name not allowed */ + if (*p == '@') { /* end of group name - start of domain name */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No ldap servers defined for domain %s\n", LogTime(), PROGRAM, p); free_ls(lssp); return (1); @@ -107,40 +107,40 @@ create_ls(struct main_args *margs) lssp = init_ls(); lssp->lserver = xstrdup(np); lssp->next = lsspn; - dp = p; /* after @ starts new domain name */ - } else if (*p == ':') { /* end of group name or end of domain name */ - if (p == np) { /* empty group name not allowed */ + dp = p; /* after @ starts new domain name */ + } else if (*p == ':') { /* end of group name or end of domain name */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No ldap servers defined for domain %s\n", LogTime(), PROGRAM, p); free_ls(lssp); return (1); } *p = '\0'; ++p; - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ lssp->domain = xstrdup(dp); dp = NULL; - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ lssp = init_ls(); lssp->lserver = xstrdup(np); lssp->next = lsspn; } lsspn = lssp; - np = p; /* after : starts new group name */ + np = p; /* after : starts new group name */ debug((char *) "%s| %s: DEBUG: ldap server %s Domain %s\n", LogTime(), PROGRAM, lssp->lserver, lssp->domain?lssp->domain:"NULL"); } else ++p; } - if (p == np) { /* empty group name not allowed */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No ldap servers defined for domain %s\n", LogTime(), PROGRAM, p); free_ls(lssp); return (1); } - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ lssp->domain = xstrdup(dp); - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ lssp = init_ls(); lssp->lserver = xstrdup(np); - if (lsspn) /* Have already an existing structure */ + if (lsspn) /* Have already an existing structure */ lssp->next = lsspn; } debug((char *) "%s| %s: DEBUG: ldap server %s Domain %s\n", LogTime(), PROGRAM, lssp->lserver, lssp->domain?lssp->domain:"NULL"); @@ -149,3 +149,4 @@ create_ls(struct main_args *margs) return (0); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_member.cc b/helpers/external_acl/kerberos_ldap_group/support_member.cc index 569be0b40e..7b1d9c6ed9 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_member.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_member.cc @@ -143,3 +143,4 @@ check_memberof(struct main_args *margs, char *user, char *domain) return (0); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_netbios.cc b/helpers/external_acl/kerberos_ldap_group/support_netbios.cc index 428cdd27f4..80c45aeb01 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_netbios.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_netbios.cc @@ -87,13 +87,13 @@ create_nd(struct main_args *margs) debug((char *) "%s| %s: DEBUG: No netbios names defined.\n", LogTime(), PROGRAM); return (0); } - while (*p) { /* loop over group list */ - if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ + while (*p) { /* loop over group list */ + if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ ++p; continue; } - if (*p == '@') { /* end of group name - start of domain name */ - if (p == np) { /* empty group name not allowed */ + if (*p == '@') { /* end of group name - start of domain name */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No netbios name defined for domain %s\n", LogTime(), PROGRAM, p); free_nd(ndsp); return (1); @@ -108,25 +108,25 @@ create_nd(struct main_args *margs) ndsp = init_nd(); ndsp->netbios = xstrdup(np); ndsp->next = ndspn; - dp = p; /* after @ starts new domain name */ - } else if (*p == ':') { /* end of group name or end of domain name */ - if (p == np) { /* empty group name not allowed */ + dp = p; /* after @ starts new domain name */ + } else if (*p == ':') { /* end of group name or end of domain name */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No netbios name defined for domain %s\n", LogTime(), PROGRAM, p); free_nd(ndsp); return (1); } *p = '\0'; ++p; - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ ndsp->domain = xstrdup(dp); dp = NULL; - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ ndsp = init_nd(); ndsp->netbios = xstrdup(np); ndsp->next = ndspn; } ndspn = ndsp; - np = p; /* after : starts new group name */ + np = p; /* after : starts new group name */ if (!ndsp->domain || !strcmp(ndsp->domain, "")) { debug((char *) "%s| %s: DEBUG: No domain defined for netbios name %s\n", LogTime(), PROGRAM, ndsp->netbios); free_nd(ndsp); @@ -136,14 +136,14 @@ create_nd(struct main_args *margs) } else ++p; } - if (p == np) { /* empty group name not allowed */ + if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No netbios name defined for domain %s\n", LogTime(), PROGRAM, p); free_nd(ndsp); return (1); } - if (dp) { /* end of domain name */ + if (dp) { /* end of domain name */ ndsp->domain = xstrdup(dp); - } else { /* end of group name and no domain name */ + } else { /* end of group name and no domain name */ ndsp = init_nd(); ndsp->netbios = xstrdup(np); ndsp->next = ndspn; @@ -177,3 +177,4 @@ get_netbios_name(struct main_args *margs, char *netbios) return NULL; } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_resolv.cc b/helpers/external_acl/kerberos_ldap_group/support_resolv.cc index e6387261c7..cc6f2b7c26 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_resolv.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_resolv.cc @@ -316,7 +316,7 @@ get_ldap_hostname_list(struct main_args *margs, struct hstruct **hlist, size_t n } } p = buffer; - p += 6 * NS_INT16SZ; /* Header(6*16bit) = id + flags + 4*section count */ + p += 6 * NS_INT16SZ; /* Header(6*16bit) = id + flags + 4*section count */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < header size\n", LogTime(), PROGRAM, len); goto finalise; @@ -325,8 +325,8 @@ get_ldap_hostname_list(struct main_args *margs, struct hstruct **hlist, size_t n error((char *) "%s| %s: ERROR: Error while expanding query name with dn_expand: %s\n", LogTime(), PROGRAM, strerror(errno)); goto finalise; } - p += size; /* Query name */ - p += 2 * NS_INT16SZ; /* Query type + class (2*16bit) */ + p += size; /* Query name */ + p += 2 * NS_INT16SZ; /* Query type + class (2*16bit) */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < header + query name,type,class \n", LogTime(), PROGRAM, len); goto finalise; @@ -337,37 +337,37 @@ get_ldap_hostname_list(struct main_args *margs, struct hstruct **hlist, size_t n error((char *) "%s| %s: ERROR: Error while expanding answer name with dn_expand: %s\n", LogTime(), PROGRAM, strerror(errno)); goto finalise; } - p += size; /* Resource Record name */ + p += size; /* Resource Record name */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < header + query name,type,class + answer name\n", LogTime(), PROGRAM, len); goto finalise; } - NS_GET16(type, p); /* RR type (16bit) */ - p += NS_INT16SZ + NS_INT32SZ; /* RR class + ttl (16bit+32bit) */ + NS_GET16(type, p); /* RR type (16bit) */ + p += NS_INT16SZ + NS_INT32SZ; /* RR class + ttl (16bit+32bit) */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < header + query name,type,class + answer name + RR type,class,ttl\n", LogTime(), PROGRAM, len); goto finalise; } - NS_GET16(rdlength, p); /* RR data length (16bit) */ + NS_GET16(rdlength, p); /* RR data length (16bit) */ - if (type == ns_t_srv) { /* SRV record */ + if (type == ns_t_srv) { /* SRV record */ int priority, weight, port; char host[NS_MAXDNAME]; if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < header + query name,type,class + answer name + RR type,class,ttl + RR data length\n", LogTime(), PROGRAM, len); goto finalise; } - NS_GET16(priority, p); /* Priority (16bit) */ + NS_GET16(priority, p); /* Priority (16bit) */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < SRV RR + priority\n", LogTime(), PROGRAM, len); goto finalise; } - NS_GET16(weight, p); /* Weight (16bit) */ + NS_GET16(weight, p); /* Weight (16bit) */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < SRV RR + priority + weight\n", LogTime(), PROGRAM, len); goto finalise; } - NS_GET16(port, p); /* Port (16bit) */ + NS_GET16(port, p); /* Port (16bit) */ if (p > buffer + len) { error((char *) "%s| %s: ERROR: Message to small: %d < SRV RR + priority + weight + port\n", LogTime(), PROGRAM, len); goto finalise; @@ -451,3 +451,4 @@ cleanup: return (nhosts); } #endif + diff --git a/helpers/external_acl/kerberos_ldap_group/support_sasl.cc b/helpers/external_acl/kerberos_ldap_group/support_sasl.cc index e481260a80..e502360419 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_sasl.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_sasl.cc @@ -43,21 +43,21 @@ #include #elif HAVE_SASL_DARWIN typedef struct sasl_interact { - unsigned long id; /* same as client/user callback ID */ - const char *challenge; /* presented to user (e.g. OTP challenge) */ - const char *prompt; /* presented to user (e.g. "Username: ") */ - const char *defresult; /* default result string */ - const void *result; /* set to point to result */ - unsigned len; /* set to length of result */ + unsigned long id; /* same as client/user callback ID */ + const char *challenge; /* presented to user (e.g. OTP challenge) */ + const char *prompt; /* presented to user (e.g. "Username: ") */ + const char *defresult; /* default result string */ + const void *result; /* set to point to result */ + unsigned len; /* set to length of result */ } sasl_interact_t; -#define SASL_CB_USER 0x4001 /* client user identity to login as */ -#define SASL_CB_AUTHNAME 0x4002 /* client authentication name */ -#define SASL_CB_PASS 0x4004 /* client passphrase-based secret */ -#define SASL_CB_ECHOPROMPT 0x4005 /* challenge and client enterred result */ -#define SASL_CB_NOECHOPROMPT 0x4006 /* challenge and client enterred result */ -#define SASL_CB_GETREALM 0x4008 /* realm to attempt authentication in */ -#define SASL_CB_LIST_END 0 /* end of list */ +#define SASL_CB_USER 0x4001 /* client user identity to login as */ +#define SASL_CB_AUTHNAME 0x4002 /* client authentication name */ +#define SASL_CB_PASS 0x4004 /* client passphrase-based secret */ +#define SASL_CB_ECHOPROMPT 0x4005 /* challenge and client enterred result */ +#define SASL_CB_NOECHOPROMPT 0x4006 /* challenge and client enterred result */ +#define SASL_CB_GETREALM 0x4008 /* realm to attempt authentication in */ +#define SASL_CB_LIST_END 0 /* end of list */ #endif #if HAVE_SASL_H || HAVE_SASL_SASL_H || HAVE_SASL_DARWIN @@ -287,3 +287,4 @@ dummy(void) #endif #endif + diff --git a/helpers/external_acl/session/ext_session_acl.cc b/helpers/external_acl/session/ext_session_acl.cc index 18fee814ba..c65d78e1dc 100644 --- a/helpers/external_acl/session/ext_session_acl.cc +++ b/helpers/external_acl/session/ext_session_acl.cc @@ -233,3 +233,4 @@ int main(int argc, char **argv) shutdown_db(); return 0; } + diff --git a/helpers/external_acl/time_quota/ext_time_quota_acl.cc b/helpers/external_acl/time_quota/ext_time_quota_acl.cc index ab9fcbe411..102c212ca9 100644 --- a/helpers/external_acl/time_quota/ext_time_quota_acl.cc +++ b/helpers/external_acl/time_quota/ext_time_quota_acl.cc @@ -253,10 +253,10 @@ static void parseTime(const char *s, time_t *secs, time_t *start) static void readConfig(const char *filename) { char line[TQ_BUFFERSIZE]; /* the buffer for the lines read - from the dict file */ - char *cp; /* a char pointer used to parse - each line */ - char *username; /* for the username */ + from the dict file */ + char *cp; /* a char pointer used to parse + each line */ + char *username; /* for the username */ char *budget; char *period; FILE *FH; @@ -461,3 +461,4 @@ int main(int argc, char **argv) shutdown_db(); return 0; } + diff --git a/helpers/external_acl/unix_group/check_group.cc b/helpers/external_acl/unix_group/check_group.cc index ccd63395b6..a221a9acd4 100644 --- a/helpers/external_acl/unix_group/check_group.cc +++ b/helpers/external_acl/unix_group/check_group.cc @@ -176,7 +176,7 @@ main(int argc, char *argv[]) } else { fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt); } - // fall through to display help texts. + // fall through to display help texts. default: usage(argv[0]); @@ -238,3 +238,4 @@ main(int argc, char *argv[]) } return 0; } + diff --git a/helpers/log_daemon/file/log_file_daemon.cc b/helpers/log_daemon/file/log_file_daemon.cc index e6445e6388..36e3b16f59 100644 --- a/helpers/log_daemon/file/log_file_daemon.cc +++ b/helpers/log_daemon/file/log_file_daemon.cc @@ -31,7 +31,7 @@ #include "defines.h" /* parse buffer - ie, length of longest expected line */ -#define LOGFILE_BUF_LEN 65536 +#define LOGFILE_BUF_LEN 65536 static void rotate(const char *path, int rotate_count) @@ -176,3 +176,4 @@ main(int argc, char *argv[]) fp = NULL; exit(0); } + diff --git a/helpers/negotiate_auth/SSPI/negotiate_sspi_auth.cc b/helpers/negotiate_auth/SSPI/negotiate_sspi_auth.cc index 6ec38082e4..b92d8ad6e3 100644 --- a/helpers/negotiate_auth/SSPI/negotiate_sspi_auth.cc +++ b/helpers/negotiate_auth/SSPI/negotiate_sspi_auth.cc @@ -115,7 +115,7 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "ERROR: unknown option: -%c. Exiting\n", opt); usage(); @@ -166,10 +166,10 @@ try_again: } else debug("Got '%s' from Squid\n", buf); - if (memcmp(buf, "YR ", 3) == 0) { /* refresh-request */ + if (memcmp(buf, "YR ", 3) == 0) { /* refresh-request */ /* figure out what we got */ decodedLen = base64_decode(decoded, sizeof(decoded), buf + 3); - if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ + if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ SEND("NA * Packet format error, couldn't base64-decode"); return 1; } @@ -178,7 +178,7 @@ try_again: if (status == SSP_OK) { if (Done) { - lc(cred); /* let's lowercase them for our convenience */ + lc(cred); /* let's lowercase them for our convenience */ have_serverblob = 0; Done = FALSE; if (Negotiate_packet_debug_enabled) { @@ -206,14 +206,14 @@ try_again: SEND("BH can't obtain server blob"); return 1; } - if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ + if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ if (!have_serverblob) { SEND("BH invalid server blob"); return 1; } /* figure out what we got */ decodedLen = base64_decode(decoded, sizeof(decoded), buf+3); - if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ + if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ SEND("NA * Packet format error, couldn't base64-decode"); return 1; } @@ -225,7 +225,7 @@ try_again: FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ (LPTSTR) & ErrorMessage, 0, NULL); @@ -238,7 +238,7 @@ try_again: return 1; } if (Done) { - lc(cred); /* let's lowercase them for our convenience */ + lc(cred); /* let's lowercase them for our convenience */ have_serverblob = 0; Done = FALSE; if (Negotiate_packet_debug_enabled) { @@ -264,7 +264,7 @@ try_again: return 1; } - } else { /* not an auth-request */ + } else { /* not an auth-request */ SEND("BH illegal request received"); fprintf(stderr, "Illegal request received: '%s'\n", buf); return 1; @@ -300,3 +300,4 @@ main(int argc, char *argv[]) } exit(0); } + diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos.h b/helpers/negotiate_auth/kerberos/negotiate_kerberos.h index 85208cdcc0..14d0705433 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos.h +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos.h @@ -161,3 +161,4 @@ char *get_ad_groups(char *ad_groups, krb5_context context, krb5_pac pac); #else #define HAVE_PAC_SUPPORT 0 #endif + diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc index e3f836d016..58bd591cd3 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc @@ -392,12 +392,12 @@ main(int argc, char *const argv[]) struct stat fstat; char *ktp; #endif - if (optarg) + if (optarg) keytab_name = xstrdup(optarg); - else { + else { fprintf(stderr, "ERROR: keytab file not given\n"); - exit(1); - } + exit(1); + } /* * Some sanity checks */ @@ -428,12 +428,12 @@ main(int argc, char *const argv[]) #if HAVE_SYS_STAT_H struct stat dstat; #endif - if (optarg) + if (optarg) rcache_dir = xstrdup(optarg); - else { + else { fprintf(stderr, "ERROR: replay cache directory not given\n"); - exit(1); - } + exit(1); + } /* * Some sanity checks */ @@ -457,20 +457,20 @@ main(int argc, char *const argv[]) #endif break; case 't': - if (optarg) + if (optarg) rcache_type = xstrdup(optarg); - else { + else { fprintf(stderr, "ERROR: replay cache type not given\n"); - exit(1); - } + exit(1); + } break; case 's': - if (optarg) + if (optarg) service_principal = xstrdup(optarg); - else { + else { fprintf(stderr, "ERROR: service principal not given\n"); - exit(1); - } + exit(1); + } break; default: fprintf(stderr, "Usage: \n"); @@ -589,7 +589,7 @@ main(int argc, char *const argv[]) strerror(ferror(stdin))); fprintf(stdout, "BH input error\n"); - exit(1); /* BIIG buffer */ + exit(1); /* BIIG buffer */ } fprintf(stdout, "BH input error\n"); exit(0); @@ -871,3 +871,4 @@ main(int argc, char *const argv[]) } } #endif /* HAVE_GSSAPI */ + diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc index 455edf71b1..c5031ceb2a 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc @@ -251,3 +251,4 @@ main(int argc, char *argv[]) } #endif /* HAVE_GSSAPI */ + diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc index 3b8ebc4fcb..d084ee4a18 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc @@ -462,3 +462,4 @@ k5clean: return NULL; } #endif + diff --git a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc index ccb1fcf3d7..ef6a5487a4 100644 --- a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc +++ b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc @@ -401,3 +401,4 @@ main(int argc, char *const argv[]) return 1; } + diff --git a/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc b/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc index 36dda7d843..fc17f25345 100644 --- a/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc +++ b/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc @@ -107,8 +107,8 @@ int Valid_Group(char *UserName, char *Group) { int result = FALSE; - WCHAR wszUserName[UNLEN+1]; // Unicode user name - WCHAR wszGroup[GNLEN+1]; // Unicode Group + WCHAR wszUserName[UNLEN+1]; // Unicode user name + WCHAR wszGroup[GNLEN+1]; // Unicode Group LPLOCALGROUP_USERS_INFO_0 pBuf = NULL; LPLOCALGROUP_USERS_INFO_0 pTmpBuf; @@ -290,7 +290,7 @@ ntlm_check_auth(ntlm_authenticate * auth, char *user, char *domain, int auth_len { int x; int rv; - char credentials[DNLEN+UNLEN+2]; /* we can afford to waste */ + char credentials[DNLEN+UNLEN+2]; /* we can afford to waste */ if (!NTLM_LocalCall) { @@ -320,7 +320,7 @@ ntlm_check_auth(ntlm_authenticate * auth, char *user, char *domain, int auth_len debug("Login attempt had result %d\n", rv); - if (!rv) { /* failed */ + if (!rv) { /* failed */ return NTLM_SSPI_ERROR; } @@ -402,7 +402,7 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "unknown option: -%c. Exiting\n", opt); usage(); @@ -430,7 +430,7 @@ manage_request() /* NP: for some reason this helper sometimes needs to accept * from clients that send no negotiate packet. */ if (memcpy(local_nego.hdr.signature, "NTLMSSP", 8) != 0) { - memset(&local_nego, 0, sizeof(ntlm_negotiate)); /* reset */ + memset(&local_nego, 0, sizeof(ntlm_negotiate)); /* reset */ memcpy(local_nego.hdr.signature, "NTLMSSP", 8); /* set the signature */ local_nego.hdr.type = le32toh(NTLM_NEGOTIATE); /* this is a challenge */ local_nego.flags = le32toh(NTLM_NEGOTIATE_ALWAYS_SIGN | @@ -465,7 +465,7 @@ manage_request() hex_dump(reinterpret_cast(decoded), decodedLen); } else debug("Got '%s' from Squid\n", buf); - if (memcmp(buf, "YR", 2) == 0) { /* refresh-request */ + if (memcmp(buf, "YR", 2) == 0) { /* refresh-request */ /* figure out what we got */ if (strlen(buf) > 3) decodedLen = base64_decode(decoded, sizeof(decoded), buf+3); @@ -474,7 +474,7 @@ manage_request() memcpy(decoded, &local_nego, sizeof(local_nego)); decodedLen = sizeof(local_nego); } - if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ + if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ SEND_ERR("message=\"Packet format error, couldn't base64-decode\""); return 1; } @@ -511,18 +511,18 @@ manage_request() case NTLM_CHALLENGE: SEND_ERR("message=\"Got a challenge. We refuse to have our authority disputed\""); return 1; - /* notreached */ + /* notreached */ case NTLM_AUTHENTICATE: SEND_ERR("message=\"Got authentication request instead of negotiate request\""); return 1; - /* notreached */ + /* notreached */ default: helperfail("message=\"unknown refresh-request packet type\""); return 1; } return 1; } - if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ + if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ if (!have_challenge) { helperfail("message=\"invalid challenge\""); return 1; @@ -530,7 +530,7 @@ manage_request() /* figure out what we got */ decodedLen = base64_decode(decoded, sizeof(decoded), buf+3); - if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ + if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ SEND_ERR("message=\"Packet format error, couldn't base64-decode\""); return 1; } @@ -546,11 +546,11 @@ manage_request() case NTLM_NEGOTIATE: SEND_ERR("message=\"Invalid negotiation request received\""); return 1; - /* notreached */ + /* notreached */ case NTLM_CHALLENGE: SEND_ERR("message=\"Got a challenge. We refuse to have our authority disputed\""); return 1; - /* notreached */ + /* notreached */ case NTLM_AUTHENTICATE: { /* check against SSPI */ int err = ntlm_check_auth((ntlm_authenticate *) decoded, user, domain, decodedLen); @@ -602,7 +602,7 @@ manage_request() return 1; } return 1; - } else { /* not an auth-request */ + } else { /* not an auth-request */ helperfail("message=\"illegal request received\""); fprintf(stderr, "Illegal request received: '%s'\n", buf); return 1; @@ -638,3 +638,4 @@ main(int argc, char *argv[]) } exit(0); } + diff --git a/helpers/ntlm_auth/fake/ntlm_fake_auth.cc b/helpers/ntlm_auth/fake/ntlm_fake_auth.cc index d4ed91777e..ecdc5da324 100644 --- a/helpers/ntlm_auth/fake/ntlm_fake_auth.cc +++ b/helpers/ntlm_auth/fake/ntlm_fake_auth.cc @@ -115,7 +115,7 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "unknown option: -%c. Exiting\n", opt); usage(); @@ -150,11 +150,11 @@ main(int argc, char *argv[]) debug("%s build " __DATE__ ", " __TIME__ " starting up...\n", my_program_name); while (fgets(buf, HELPER_INPUT_BUFFER, stdin) != NULL) { - user[0] = '\0'; /*no user code */ - domain[0] = '\0'; /*no domain code */ + user[0] = '\0'; /*no user code */ + domain[0] = '\0'; /*no domain code */ if ((p = strchr(buf, '\n')) != NULL) - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ buflen = strlen(buf); /* keep this so we only scan the buffer for \0 once per loop */ if (buflen > 3) { decodedLen = base64_decode(decodedBuf, sizeof(decodedBuf), buf+3); @@ -214,3 +214,4 @@ main(int argc, char *argv[]) } exit(0); } + diff --git a/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc b/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc index 3b762f7094..48a76c9ac4 100644 --- a/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc +++ b/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc @@ -73,7 +73,7 @@ typedef struct _dc dc; struct _dc { char *domain; char *controller; - time_t dead; /* 0 if it's alive, otherwise time of death */ + time_t dead; /* 0 if it's alive, otherwise time of death */ dc *next; }; @@ -90,10 +90,10 @@ void manage_request(void); static unsigned char challenge[NTLM_NONCE_LEN]; static unsigned char lmencoded_empty_pass[ENCODED_PASS_LEN], -ntencoded_empty_pass[ENCODED_PASS_LEN]; + ntencoded_empty_pass[ENCODED_PASS_LEN]; SMB_Handle_Type handle = NULL; int ntlm_errno; -static char credentials[MAX_USERNAME_LEN+MAX_DOMAIN_LEN+2]; /* we can afford to waste */ +static char credentials[MAX_USERNAME_LEN+MAX_DOMAIN_LEN+2]; /* we can afford to waste */ static char my_domain[100], my_domain_controller[100]; static char errstr[1001]; #if DEBUG @@ -146,17 +146,17 @@ init_challenge(char *domain, char *domain_controller) smberr = SMB_Get_Last_Error(); SMB_Get_Error_Msg(smberr, errstr, 1000); - if (handle == NULL) { /* couldn't connect */ + if (handle == NULL) { /* couldn't connect */ debug("Couldn't connect to SMB Server. Error:%s\n", errstr); return 1; } - if (SMB_Negotiate(handle, SMB_Prots) < 0) { /* An error */ + if (SMB_Negotiate(handle, SMB_Prots) < 0) { /* An error */ debug("Error negotiating protocol with SMB Server\n"); SMB_Discon(handle, 0); handle = NULL; return 2; } - if (handle->Security == 0) { /* share-level security, unuseable */ + if (handle->Security == 0) { /* share-level security, unuseable */ debug("SMB Server uses share-level security .. we need user security.\n"); SMB_Discon(handle, 0); handle = NULL; @@ -208,7 +208,7 @@ ntlm_check_auth(ntlm_authenticate * auth, int auth_length) char *user; lstring tmp; - if (handle == NULL) { /*if null we aren't connected, but it shouldn't happen */ + if (handle == NULL) { /*if null we aren't connected, but it shouldn't happen */ debug("Weird, we've been disconnected\n"); ntlm_errno = NTLM_ERR_NOT_CONNECTED; return NULL; @@ -291,11 +291,11 @@ ntlm_check_auth(ntlm_authenticate * auth, int auth_length) rv = SMB_Logon_Server(handle, user, pass, domain, 1); debug("Login attempt had result %d\n", rv); - if (rv != NTLM_ERR_NONE) { /* failed */ + if (rv != NTLM_ERR_NONE) { /* failed */ ntlm_errno = rv; return NULL; } - *(user - 1) = '\\'; /* hack. Performing, but ugly. */ + *(user - 1) = '\\'; /* hack. Performing, but ugly. */ debug("credentials: %s\n", credentials); return credentials; @@ -398,11 +398,11 @@ process_options(int argc, char *argv[]) new_dc->domain = d; new_dc->controller = c; new_dc->dead = 0; - if (controllers == NULL) { /* first controller */ + if (controllers == NULL) { /* first controller */ controllers = new_dc; last_dc = new_dc; } else { - last_dc->next = new_dc; /* can't be null */ + last_dc->next = new_dc; /* can't be null */ last_dc = new_dc; } } @@ -411,7 +411,7 @@ process_options(int argc, char *argv[]) usage(); exit(1); } - last_dc->next = controllers; /* close the queue, now it's circular */ + last_dc->next = controllers; /* close the queue, now it's circular */ } /** @@ -431,7 +431,7 @@ obtain_challenge() /* mark helper as retry-worthy if it's so. */ debug("Reviving DC\n"); current_dc->dead = 0; - } else { /* skip it */ + } else { /* skip it */ debug("Skipping it\n"); continue; } @@ -442,7 +442,7 @@ obtain_challenge() debug("make_challenge retuned %p\n", ch); if (ch) { debug("Got it\n"); - return ch; /* All went OK, returning */ + return ch; /* All went OK, returning */ } /* Huston, we've got a problem. Take this DC out of the loop */ debug("Marking DC as DEAD\n"); @@ -467,21 +467,21 @@ manage_request() if (fgets(buf, NTLM_BLOB_BUFFER_SIZE, stdin) == NULL) { fprintf(stderr, "fgets() failed! dying..... errno=%d (%s)\n", errno, strerror(errno)); - exit(1); /* BIIG buffer */ + exit(1); /* BIIG buffer */ } debug("managing request\n"); - ch2 = (char*)memchr(buf, '\n', NTLM_BLOB_BUFFER_SIZE); /* safer against overrun than strchr */ + ch2 = (char*)memchr(buf, '\n', NTLM_BLOB_BUFFER_SIZE); /* safer against overrun than strchr */ if (ch2) { - *ch2 = '\0'; /* terminate the string at newline. */ + *ch2 = '\0'; /* terminate the string at newline. */ ch = ch2; } debug("ntlm authenticator. Got '%s' from Squid\n", buf); - if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ + if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */ /* figure out what we got */ int decodedLen = base64_decode(decoded, sizeof(decoded), buf+3); - if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ + if ((size_t)decodedLen < sizeof(ntlmhdr)) { /* decoding failure, return error */ SEND("NA Packet format error, couldn't base64-decode"); return; } @@ -497,11 +497,11 @@ manage_request() case NTLM_NEGOTIATE: SEND("NA Invalid negotiation request received"); return; - /* notreached */ + /* notreached */ case NTLM_CHALLENGE: SEND("NA Got a challenge. We refuse to have our authority disputed"); return; - /* notreached */ + /* notreached */ case NTLM_AUTHENTICATE: /* check against the DC */ signal(SIGALRM, timeout_during_auth); @@ -517,7 +517,7 @@ manage_request() } if (cred == NULL) { int smblib_err, smb_errorclass, smb_errorcode, nb_error; - if (ntlm_errno == NTLM_ERR_LOGON) { /* hackish */ + if (ntlm_errno == NTLM_ERR_LOGON) { /* hackish */ SEND("NA Logon Failure"); return; } @@ -533,7 +533,7 @@ manage_request() smblib_err, smb_errorclass, smb_errorcode, nb_error); /* Should I use smblib_err? Actually it seems I can do as well * without it.. */ - if (nb_error != 0) { /* netbios-level error */ + if (nb_error != 0) { /* netbios-level error */ SEND("BH NetBios error!"); fprintf(stderr, "NetBios error code %d (%s)\n", nb_error, RFCNB_Error_Strings[abs(nb_error)]); @@ -548,9 +548,9 @@ manage_request() /*this is the most important one for errors */ debug("DOS error\n"); switch (smb_errorcode) { - /* two categories matter to us: those which could be - * server errors, and those which are auth errors */ - case SMBD_noaccess: /* 5 */ + /* two categories matter to us: those which could be + * server errors, and those which are auth errors */ + case SMBD_noaccess: /* 5 */ SEND("NA Access denied"); return; case SMBD_badformat: @@ -566,10 +566,10 @@ manage_request() SEND("BH DOS Error"); return; } - case SMBC_ERRSRV: /* server errors */ + case SMBC_ERRSRV: /* server errors */ debug("Server error"); switch (smb_errorcode) { - /* mostly same as above */ + /* mostly same as above */ case SMBV_badpw: SEND("NA Bad password"); return; @@ -580,7 +580,7 @@ manage_request() SEND("BH Server Error"); return; } - case SMBC_ERRHRD: /* hardware errors don't really matter */ + case SMBC_ERRHRD: /* hardware errors don't really matter */ SEND("BH Domain Controller Hardware error"); return; case SMBC_ERRCMD: @@ -591,7 +591,7 @@ manage_request() return; } - lc(cred); /* let's lowercase them for our convenience */ + lc(cred); /* let's lowercase them for our convenience */ SEND2("AF %s", cred); return; default: @@ -601,7 +601,7 @@ manage_request() /* notreached */ return; } - if (memcmp(buf, "YR", 2) == 0) { /* refresh-request */ + if (memcmp(buf, "YR", 2) == 0) { /* refresh-request */ dc_disconnect(); ch = obtain_challenge(); /* Robert says we can afford to wait forever. I'll trust him on this @@ -651,3 +651,4 @@ main(int argc, char *argv[]) /* notreached */ return 0; } + diff --git a/helpers/url_rewrite/LFS/rredir.cc b/helpers/url_rewrite/LFS/rredir.cc index 5c02b0cbc7..cf7e4c744e 100644 --- a/helpers/url_rewrite/LFS/rredir.cc +++ b/helpers/url_rewrite/LFS/rredir.cc @@ -107,3 +107,4 @@ dont_redirect: return 0; } + diff --git a/helpers/url_rewrite/fake/fake.cc b/helpers/url_rewrite/fake/fake.cc index 55cea0885f..89336b30c3 100644 --- a/helpers/url_rewrite/fake/fake.cc +++ b/helpers/url_rewrite/fake/fake.cc @@ -80,7 +80,7 @@ process_options(int argc, char *argv[]) exit(0); case '?': opt = optopt; - /* fall thru to default */ + /* fall thru to default */ default: fprintf(stderr, "unknown option: -%c. Exiting\n", opt); usage(); @@ -110,7 +110,7 @@ main(int argc, char *argv[]) char *p; if ((p = strchr(buf, '\n')) != NULL) { - *p = '\0'; /* strip \n */ + *p = '\0'; /* strip \n */ buflen = p - buf; /* length is known already */ } else buflen = strlen(buf); /* keep this so we only scan the buffer for \0 once per loop */ @@ -130,3 +130,4 @@ main(int argc, char *argv[]) debug("%s build " __DATE__ ", " __TIME__ " shutting down...\n", my_program_name); return 0; } + diff --git a/include/Range.h b/include/Range.h index 74238d0426..03781aa3b0 100644 --- a/include/Range.h +++ b/include/Range.h @@ -56,3 +56,4 @@ Range::size() const } #endif /* SQUID_RANGE_H */ + diff --git a/include/SquidNew.h b/include/SquidNew.h index 3ebc169136..89557951ae 100644 --- a/include/SquidNew.h +++ b/include/SquidNew.h @@ -38,3 +38,4 @@ _SQUID_EXTERNNEW_ void operator delete[] (void *address) throw() #endif /* !__SUNPRO_CC && !__clang__*/ #endif /* SQUID_NEW_H */ + diff --git a/include/asn1.h b/include/asn1.h index 9b028d67ba..3809fa241d 100644 --- a/include/asn1.h +++ b/include/asn1.h @@ -46,63 +46,64 @@ typedef u_char oid; #define MAX_SUBID 0xFF #endif -#define MAX_OID_LEN 128 /* max subid's in an oid, per SNMP spec. */ - -#define ASN_BOOLEAN (0x01) -#define ASN_INTEGER (0x02) -#define ASN_BIT_STR (0x03) -#define ASN_OCTET_STR (0x04) -#define ASN_NULL (0x05) -#define ASN_OBJECT_ID (0x06) -#define ASN_SEQUENCE (0x10) -#define ASN_SET (0x11) - -#define ASN_UNIVERSAL (0x00) +#define MAX_OID_LEN 128 /* max subid's in an oid, per SNMP spec. */ + +#define ASN_BOOLEAN (0x01) +#define ASN_INTEGER (0x02) +#define ASN_BIT_STR (0x03) +#define ASN_OCTET_STR (0x04) +#define ASN_NULL (0x05) +#define ASN_OBJECT_ID (0x06) +#define ASN_SEQUENCE (0x10) +#define ASN_SET (0x11) + +#define ASN_UNIVERSAL (0x00) #define ASN_APPLICATION (0x40) -#define ASN_CONTEXT (0x80) -#define ASN_PRIVATE (0xC0) +#define ASN_CONTEXT (0x80) +#define ASN_PRIVATE (0xC0) -#define ASN_PRIMITIVE (0x00) -#define ASN_CONSTRUCTOR (0x20) +#define ASN_PRIMITIVE (0x00) +#define ASN_CONSTRUCTOR (0x20) -#define ASN_LONG_LEN (0x80) +#define ASN_LONG_LEN (0x80) #define ASN_EXTENSION_ID (0x1F) -#define ASN_BIT8 (0x80) +#define ASN_BIT8 (0x80) -#define IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR) -#define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) +#define IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR) +#define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) #ifdef __cplusplus extern "C" { #endif - u_char *asn_build_header(u_char *, int *, u_char, int); - u_char *asn_parse_int(u_char *, int *, u_char *, int *, int); - u_char *asn_parse_unsigned_int(u_char *, int *, u_char *, u_int *, int); - u_char *asn_build_int(u_char *, int *, u_char, int *, int); - u_char *asn_build_unsigned_int(u_char *, int *, u_char, u_int *, int); - u_char *asn_parse_string(u_char *, int *, u_char *, u_char *, int *); - u_char *asn_build_string(u_char *, int *, u_char, u_char *, int); - u_char *asn_parse_header(u_char *, int *, u_char *); - u_char *asn_build_header_with_truth(u_char *, int *, u_char, int, int); - - u_char *asn_parse_length(u_char *, u_int *); - u_char *asn_build_length(u_char *, int *, int, int); - u_char *asn_parse_objid(u_char *, int *, u_char *, oid *, int *); - u_char *asn_build_objid(u_char *, int *, u_char, oid *, int); - u_char *asn_parse_null(u_char *, int *, u_char *); - u_char *asn_build_null(u_char *, int *, u_char); +u_char *asn_build_header(u_char *, int *, u_char, int); +u_char *asn_parse_int(u_char *, int *, u_char *, int *, int); +u_char *asn_parse_unsigned_int(u_char *, int *, u_char *, u_int *, int); +u_char *asn_build_int(u_char *, int *, u_char, int *, int); +u_char *asn_build_unsigned_int(u_char *, int *, u_char, u_int *, int); +u_char *asn_parse_string(u_char *, int *, u_char *, u_char *, int *); +u_char *asn_build_string(u_char *, int *, u_char, u_char *, int); +u_char *asn_parse_header(u_char *, int *, u_char *); +u_char *asn_build_header_with_truth(u_char *, int *, u_char, int, int); + +u_char *asn_parse_length(u_char *, u_int *); +u_char *asn_build_length(u_char *, int *, int, int); +u_char *asn_parse_objid(u_char *, int *, u_char *, oid *, int *); +u_char *asn_build_objid(u_char *, int *, u_char, oid *, int); +u_char *asn_parse_null(u_char *, int *, u_char *); +u_char *asn_build_null(u_char *, int *, u_char); #if 0 - u_char *asn_parse_bitstring(u_char *, int *, u_char *, u_char *, int *); - u_char *asn_build_bitstring(u_char *, int *, u_char, u_char *, int); +u_char *asn_parse_bitstring(u_char *, int *, u_char *, u_char *, int *); +u_char *asn_build_bitstring(u_char *, int *, u_char, u_char *, int); #endif - u_char *asn_build_exception(u_char *, int *, u_char); +u_char *asn_build_exception(u_char *, int *, u_char); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_ASN1_H */ +#endif /* SQUID_SNMP_ASN1_H */ + diff --git a/include/base64.h b/include/base64.h index c387026814..87b3e70357 100644 --- a/include/base64.h +++ b/include/base64.h @@ -13,47 +13,48 @@ extern "C" { #endif - // Decoding functions - - /// Calculate the decoded length of a given nul-terminated encoded string. - /// NULL pointer and empty strings are accepted, result is zero. - /// Any return value <= zero means no decoded result can be produced. - extern int base64_decode_len(const char *encodedData); - - /// Decode a base-64 encoded blob into a provided buffer. - /// Will not terminate the resulting string. - /// In-place decoding overlap is supported if result is equal or earlier that the source pointer. - /// - /// \return number of bytes filled in result. - extern int base64_decode(char *result, unsigned int result_max_size, const char *encoded); - - // Encoding functions - - /// Calculate the buffer size required to hold the encoded form of - /// a string of length 'decodedLen' including all terminator bytes. - extern int base64_encode_len(int decodedLen); - - /// Base-64 encode a string into a given buffer. - /// Will not terminate the resulting string. - /// \return the number of bytes filled in result. - extern int base64_encode(char *result, int result_max_size, const char *data, int data_size); - - /// Base-64 encode a string into a given buffer. - /// Will terminate the resulting string. - /// \return the number of bytes filled in result. Including the terminator. - extern int base64_encode_str(char *result, int result_max_size, const char *data, int data_size); - - // Old encoder. Now a wrapper for the new. Takes a binary array of known length. - // Output is presented in a static buffer which will only remain valid until next call. - // Ensures a nul-terminated result. Will always return non-NULL. - extern const char *base64_encode_bin(const char *data, int len); - - // Old encoder. Now a wrapper for the new. - // Output is presented in a static buffer which will only remain valid until next call. - // Ensures a nul-terminated result. Will always return non-NULL. - extern const char *old_base64_encode(const char *decoded); +// Decoding functions + +/// Calculate the decoded length of a given nul-terminated encoded string. +/// NULL pointer and empty strings are accepted, result is zero. +/// Any return value <= zero means no decoded result can be produced. +extern int base64_decode_len(const char *encodedData); + +/// Decode a base-64 encoded blob into a provided buffer. +/// Will not terminate the resulting string. +/// In-place decoding overlap is supported if result is equal or earlier that the source pointer. +/// +/// \return number of bytes filled in result. +extern int base64_decode(char *result, unsigned int result_max_size, const char *encoded); + +// Encoding functions + +/// Calculate the buffer size required to hold the encoded form of +/// a string of length 'decodedLen' including all terminator bytes. +extern int base64_encode_len(int decodedLen); + +/// Base-64 encode a string into a given buffer. +/// Will not terminate the resulting string. +/// \return the number of bytes filled in result. +extern int base64_encode(char *result, int result_max_size, const char *data, int data_size); + +/// Base-64 encode a string into a given buffer. +/// Will terminate the resulting string. +/// \return the number of bytes filled in result. Including the terminator. +extern int base64_encode_str(char *result, int result_max_size, const char *data, int data_size); + +// Old encoder. Now a wrapper for the new. Takes a binary array of known length. +// Output is presented in a static buffer which will only remain valid until next call. +// Ensures a nul-terminated result. Will always return non-NULL. +extern const char *base64_encode_bin(const char *data, int len); + +// Old encoder. Now a wrapper for the new. +// Output is presented in a static buffer which will only remain valid until next call. +// Ensures a nul-terminated result. Will always return non-NULL. +extern const char *old_base64_encode(const char *decoded); #ifdef __cplusplus } #endif #endif /* _SQUID_BASE64_H */ + diff --git a/include/cache_snmp.h b/include/cache_snmp.h index a62f7ac4c6..a1e70a57fb 100644 --- a/include/cache_snmp.h +++ b/include/cache_snmp.h @@ -270,3 +270,4 @@ enum { #endif /* SQUID_SNMP */ #endif /* SQUID_CACHE_SNMP_H */ + diff --git a/include/charset.h b/include/charset.h index b734a37629..ef8916ef0c 100644 --- a/include/charset.h +++ b/include/charset.h @@ -18,3 +18,4 @@ extern char *latin1_to_utf8(char *out, size_t size, const char *in); #endif /* _SQUID_CHARSET_H */ + diff --git a/include/getfullhostname.h b/include/getfullhostname.h index 3ee692e1d9..308ce2bed1 100644 --- a/include/getfullhostname.h +++ b/include/getfullhostname.h @@ -12,3 +12,4 @@ SQUIDCEXTERN const char *getfullhostname(void); #endif /* _SQUID_GETFULLHOSTNAME_H */ + diff --git a/include/hash.h b/include/hash.h index 1e31fbdf98..677eabbcc4 100644 --- a/include/hash.h +++ b/include/hash.h @@ -62,6 +62,7 @@ SQUIDCEXTERN const char *hashKeyStr(hash_link *); * HASH_SIZE 33493 // prime number < 32768 * HASH_SIZE 65357 // prime number < 65536 */ -#define DEFAULT_HASH_SIZE 7951 /* prime number < 8192 */ +#define DEFAULT_HASH_SIZE 7951 /* prime number < 8192 */ #endif /* SQUID_HASH_H */ + diff --git a/include/heap.h b/include/heap.h index 43a40bc9e9..93928222bb 100644 --- a/include/heap.h +++ b/include/heap.h @@ -19,8 +19,8 @@ * the top of the heap (as in the smallest object key value). Child nodes * are larger than their parent. ****************************************************************************/ -#ifndef SQUID_HEAP_H -#define SQUID_HEAP_H +#ifndef SQUID_HEAP_H +#define SQUID_HEAP_H /* * Function for generating heap keys. The first argument will typically be @@ -53,8 +53,8 @@ typedef struct _heap { heap_mutex_t lock; unsigned long size; unsigned long last; - heap_key_func *gen_key; /* key generator for heap */ - heap_key age; /* aging factor for heap */ + heap_key_func *gen_key; /* key generator for heap */ + heap_key age; /* aging factor for heap */ heap_node **nodes; } heap; @@ -99,10 +99,10 @@ SQUIDCEXTERN heap_t heap_update(heap *, heap_node * elm, heap_t dat); /* * Generate a heap key for a given data object. Alternative macro form: */ -#ifdef MACRO_DEBUG +#ifdef MACRO_DEBUG SQUIDCEXTERN heap_key heap_gen_key(heap * hp, heap_t dat); #else -#define heap_gen_key(hp,md) ((hp)->gen_key((md),(hp)->age)) +#define heap_gen_key(hp,md) ((hp)->gen_key((md),(hp)->age)) #endif /* MACRO_DEBUG */ /* @@ -134,12 +134,12 @@ SQUIDCEXTERN heap_t heap_peep(heap *, int n); /* * Is the heap empty? How many nodes (data objects) are in it? */ -#ifdef MACRO_DEBUG +#ifdef MACRO_DEBUG SQUIDCEXTERN int heap_empty(heap *); SQUIDCEXTERN int heap_nodes(heap *); #else /* MACRO_DEBUG */ -#define heap_nodes(heap) ((heap)->last) -#define heap_empty(heap) ((heap)->last <= 0 ? 1 : 0) +#define heap_nodes(heap) ((heap)->last) +#define heap_empty(heap) ((heap)->last <= 0 ? 1 : 0) #endif /* MACRO_DEBUG */ /* @@ -151,3 +151,4 @@ SQUIDCEXTERN void heap_printnode(char *msg, heap_node * elm); SQUIDCEXTERN int verify_heap_property(heap *); #endif /* SQUID_HEAP_H */ + diff --git a/include/html_quote.h b/include/html_quote.h index 2258894e80..1e64d0c4ff 100644 --- a/include/html_quote.h +++ b/include/html_quote.h @@ -18,3 +18,4 @@ extern char *html_quote(const char *); #endif /* _SQUID_HTML_QUOTE_H */ + diff --git a/include/leakcheck.h b/include/leakcheck.h index eca3a28e6b..d8e529a816 100644 --- a/include/leakcheck.h +++ b/include/leakcheck.h @@ -19,3 +19,4 @@ #endif #endif + diff --git a/include/md5.h b/include/md5.h index c9a4b30712..05f4aea92a 100644 --- a/include/md5.h +++ b/include/md5.h @@ -68,3 +68,4 @@ SQUIDCEXTERN void SquidMD5Transform(uint32_t buf[4], uint32_t const in[16]); #endif /* HAVE_NETTLE_MD5_H */ #endif /* SQUID_MD5_H */ + diff --git a/include/memMeter.h b/include/memMeter.h index f765b12fe6..2fd7741570 100644 --- a/include/memMeter.h +++ b/include/memMeter.h @@ -27,3 +27,4 @@ public: #define memMeterDel(m, sz) { (m).level -= (sz); } #endif /* _MEM_METER_H_ */ + diff --git a/include/parse.h b/include/parse.h index b178232820..4c4ba42aa0 100644 --- a/include/parse.h +++ b/include/parse.h @@ -10,7 +10,7 @@ #define SQUID_PARSE_H /*********************************************************** - Copyright 1989 by Carnegie Mellon University + Copyright 1989 by Carnegie Mellon University All Rights Reserved @@ -48,52 +48,53 @@ struct enum_list { * A tree in the format of the tree structure of the MIB. */ struct snmp_mib_tree { - struct snmp_mib_tree *child_list; /* list of children of this node */ - struct snmp_mib_tree *next_peer; /* Next node in list of peers */ + struct snmp_mib_tree *child_list; /* list of children of this node */ + struct snmp_mib_tree *next_peer; /* Next node in list of peers */ struct snmp_mib_tree *parent; - char label[64]; /* This node's textual name */ - u_int subid; /* This node's integer subidentifier */ - int type; /* This node's object type */ - struct enum_list *enums; /* (optional) list of enumerated integers (otherwise NULL) */ - void (*printer) (char *buf, variable_list *var, void *foo, int quiet); /* Value printing function */ + char label[64]; /* This node's textual name */ + u_int subid; /* This node's integer subidentifier */ + int type; /* This node's object type */ + struct enum_list *enums; /* (optional) list of enumerated integers (otherwise NULL) */ + void (*printer) (char *buf, variable_list *var, void *foo, int quiet); /* Value printing function */ }; /* non-aggregate types for tree end nodes */ -#define TYPE_OTHER 0 -#define TYPE_OBJID 1 -#define TYPE_OCTETSTR 2 -#define TYPE_INTEGER 3 -#define TYPE_NETADDR 4 -#define TYPE_IPADDR 5 -#define TYPE_COUNTER 6 -#define TYPE_GAUGE 7 -#define TYPE_TIMETICKS 8 -#define TYPE_OPAQUE 9 -#define TYPE_NULL 10 +#define TYPE_OTHER 0 +#define TYPE_OBJID 1 +#define TYPE_OCTETSTR 2 +#define TYPE_INTEGER 3 +#define TYPE_NETADDR 4 +#define TYPE_IPADDR 5 +#define TYPE_COUNTER 6 +#define TYPE_GAUGE 7 +#define TYPE_TIMETICKS 8 +#define TYPE_OPAQUE 9 +#define TYPE_NULL 10 #ifdef __cplusplus extern "C" { #endif - void init_mib(char *); - int read_objid(char *, oid *, int *); - void print_objid(oid *, int); - void sprint_objid(char *, oid *, int); - void print_variable(oid *, int, struct variable_list *); - void sprint_variable(char *, oid *, int, struct variable_list *); - void sprint_value(char *, oid *, int, struct variable_list *); - void print_value(oid *, int, struct variable_list *); +void init_mib(char *); +int read_objid(char *, oid *, int *); +void print_objid(oid *, int); +void sprint_objid(char *, oid *, int); +void print_variable(oid *, int, struct variable_list *); +void sprint_variable(char *, oid *, int, struct variable_list *); +void sprint_value(char *, oid *, int, struct variable_list *); +void print_value(oid *, int, struct variable_list *); - /*void print_variable_list(struct variable_list *); */ - /*void print_variable_list_value(struct variable_list *); */ - /*void print_type(struct variable_list *); */ - void print_oid_nums(oid *, int); +/*void print_variable_list(struct variable_list *); */ +/*void print_variable_list_value(struct variable_list *); */ +/*void print_type(struct variable_list *); */ +void print_oid_nums(oid *, int); - struct snmp_mib_tree *read_mib(char *); +struct snmp_mib_tree *read_mib(char *); #ifdef __cplusplus } #endif -#endif /* SQUID_PARSE_H */ +#endif /* SQUID_PARSE_H */ + diff --git a/include/radix.h b/include/radix.h index 5f81b42d50..78714edaad 100644 --- a/include/radix.h +++ b/include/radix.h @@ -7,7 +7,7 @@ */ #ifndef SQUID_RADIX_H -#define SQUID_RADIX_H +#define SQUID_RADIX_H /* * Copyright (c) 1988, 1989, 1993 @@ -51,31 +51,31 @@ struct squid_radix_node { - struct squid_radix_mask *rn_mklist; /* list of masks contained in subtree */ + struct squid_radix_mask *rn_mklist; /* list of masks contained in subtree */ - struct squid_radix_node *rn_p; /* parent */ - short rn_b; /* bit offset; -1-index(netmask) */ - char rn_bmask; /* node: mask for bit test */ - unsigned char rn_flags; /* enumerated next */ -#define RNF_NORMAL 1 /* leaf contains normal route */ -#define RNF_ROOT 2 /* leaf is root leaf for tree */ -#define RNF_ACTIVE 4 /* This node is alive (for rtfree) */ + struct squid_radix_node *rn_p; /* parent */ + short rn_b; /* bit offset; -1-index(netmask) */ + char rn_bmask; /* node: mask for bit test */ + unsigned char rn_flags; /* enumerated next */ +#define RNF_NORMAL 1 /* leaf contains normal route */ +#define RNF_ROOT 2 /* leaf is root leaf for tree */ +#define RNF_ACTIVE 4 /* This node is alive (for rtfree) */ union { - struct { /* leaf only data: */ - char *rn_Key; /* object of search */ - char *rn_Mask; /* netmask, if present */ + struct { /* leaf only data: */ + char *rn_Key; /* object of search */ + char *rn_Mask; /* netmask, if present */ struct squid_radix_node *rn_Dupedkey; } rn_leaf; - struct { /* node only data: */ - int rn_Off; /* where to start compare */ + struct { /* node only data: */ + int rn_Off; /* where to start compare */ - struct squid_radix_node *rn_L; /* progeny */ + struct squid_radix_node *rn_L; /* progeny */ - struct squid_radix_node *rn_R; /* progeny */ + struct squid_radix_node *rn_R; /* progeny */ } rn_node; } rn_u; #ifdef RN_DEBUG @@ -96,51 +96,51 @@ struct squid_radix_node { */ struct squid_radix_mask { - short rm_b; /* bit offset; -1-index(netmask) */ - char rm_unused; /* cf. rn_bmask */ - unsigned char rm_flags; /* cf. rn_flags */ + short rm_b; /* bit offset; -1-index(netmask) */ + char rm_unused; /* cf. rn_bmask */ + unsigned char rm_flags; /* cf. rn_flags */ - struct squid_radix_mask *rm_mklist; /* more masks to try */ + struct squid_radix_mask *rm_mklist; /* more masks to try */ union { - char *rmu_mask; /* the mask */ + char *rmu_mask; /* the mask */ - struct squid_radix_node *rmu_leaf; /* for normal routes */ + struct squid_radix_node *rmu_leaf; /* for normal routes */ } rm_rmu; - int rm_refs; /* # of references to this struct */ + int rm_refs; /* # of references to this struct */ }; struct squid_radix_node_head { struct squid_radix_node *rnh_treetop; - int rnh_addrsize; /* permit, but not require fixed keys */ - int rnh_pktsize; /* permit, but not require fixed keys */ + int rnh_addrsize; /* permit, but not require fixed keys */ + int rnh_pktsize; /* permit, but not require fixed keys */ - struct squid_radix_node *(*rnh_addaddr) /* add based on sockaddr */ + struct squid_radix_node *(*rnh_addaddr) /* add based on sockaddr */ (void *v, void *mask, struct squid_radix_node_head * head, struct squid_radix_node nodes[]); - struct squid_radix_node *(*rnh_addpkt) /* add based on packet hdr */ + struct squid_radix_node *(*rnh_addpkt) /* add based on packet hdr */ (void *v, void *mask, struct squid_radix_node_head * head, struct squid_radix_node nodes[]); - struct squid_radix_node *(*rnh_deladdr) /* remove based on sockaddr */ + struct squid_radix_node *(*rnh_deladdr) /* remove based on sockaddr */ (void *v, void *mask, struct squid_radix_node_head * head); - struct squid_radix_node *(*rnh_delpkt) /* remove based on packet hdr */ + struct squid_radix_node *(*rnh_delpkt) /* remove based on packet hdr */ (void *v, void *mask, struct squid_radix_node_head * head); - struct squid_radix_node *(*rnh_matchaddr) /* locate based on sockaddr */ + struct squid_radix_node *(*rnh_matchaddr) /* locate based on sockaddr */ (void *v, struct squid_radix_node_head * head); - struct squid_radix_node *(*rnh_lookup) /* locate based on sockaddr */ + struct squid_radix_node *(*rnh_lookup) /* locate based on sockaddr */ (void *v, void *mask, struct squid_radix_node_head * head); - struct squid_radix_node *(*rnh_matchpkt) /* locate based on packet hdr */ + struct squid_radix_node *(*rnh_matchpkt) /* locate based on packet hdr */ (void *v, struct squid_radix_node_head * head); - int (*rnh_walktree) /* traverse tree */ + int (*rnh_walktree) /* traverse tree */ (struct squid_radix_node_head * head, int (*f) (struct squid_radix_node *, void *), void *w); - struct squid_radix_node rnh_nodes[3]; /* empty tree for common case */ + struct squid_radix_node rnh_nodes[3]; /* empty tree for common case */ }; SQUIDCEXTERN void squid_rn_init (void); @@ -169,3 +169,4 @@ SQUIDCEXTERN struct squid_radix_node *squid_rn_search_m(void *, struct squid_rad SQUIDCEXTERN struct squid_radix_node *squid_rn_lookup(void *, void *, struct squid_radix_node_head *); #endif /* SQUID_RADIX_H */ + diff --git a/include/rfc1035.h b/include/rfc1035.h index c4ed6dded3..87fd600aa4 100644 --- a/include/rfc1035.h +++ b/include/rfc1035.h @@ -110,3 +110,4 @@ SQUIDCEXTERN int rfc1035QuestionPack(char *buf, SQUIDCEXTERN int rfc1035RRPack(char *buf, size_t sz, const rfc1035_rr * RR); #endif /* SQUID_RFC1035_H */ + diff --git a/include/rfc1123.h b/include/rfc1123.h index 394eddb360..d7ebde6772 100644 --- a/include/rfc1123.h +++ b/include/rfc1123.h @@ -13,11 +13,12 @@ extern "C" { #endif - extern const char *mkhttpdlogtime(const time_t *); - extern const char *mkrfc1123(time_t); - extern time_t parse_rfc1123(const char *str); +extern const char *mkhttpdlogtime(const time_t *); +extern const char *mkrfc1123(time_t); +extern time_t parse_rfc1123(const char *str); #ifdef __cplusplus } #endif #endif /* _SQUID_RFC1123_H */ + diff --git a/include/rfc1738.h b/include/rfc1738.h index 9a8da76545..20ef78527b 100644 --- a/include/rfc1738.h +++ b/include/rfc1738.h @@ -13,58 +13,59 @@ extern "C" { #endif - /* Encoder rfc1738_do_escape flag values. */ +/* Encoder rfc1738_do_escape flag values. */ #define RFC1738_ESCAPE_CTRLS 1 #define RFC1738_ESCAPE_UNSAFE 2 #define RFC1738_ESCAPE_RESERVED 4 #define RFC1738_ESCAPE_ALL (RFC1738_ESCAPE_UNSAFE|RFC1738_ESCAPE_RESERVED|RFC1738_ESCAPE_CTRLS) - // exclusions +// exclusions #define RFC1738_ESCAPE_NOSPACE 128 #define RFC1738_ESCAPE_NOPERCENT 256 - // Backward compatibility +// Backward compatibility #define RFC1738_ESCAPE_UNESCAPED (RFC1738_ESCAPE_UNSAFE|RFC1738_ESCAPE_CTRLS|RFC1738_ESCAPE_NOPERCENT) - /** - * \group rfc1738 RFC 1738 URL-escaping library - * - * Public API is formed of a triplet of encode functions mapping to the rfc1738_do_encode() engine. - * - * ASCII characters are split into four groups: - * \item SAFE Characters which are safe to occur in any URL. For example A,B,C - * \item CTRLS Binary control codes. Dangerous to include in URLs. - * \item UNSAFE Characters which are completely usafe to occur in any URL. For example; backspace, tab, space, newline. - * \item RESERVED Characters which are reserved for special meaning and may only occur in certain parts of a URL. - * - * Returns a static buffer containing the RFC 1738 compliant, escaped version of the given url. - * - * \param flags RFC1738_ESCAPE_CTRLS Encode the blatantly dangerous binary codes. - * \param flags RFC1738_ESCAPE_UNSAFE Encode printable unsafe characters (excluding CTRLs). - * \param flags RFC1738_ESCAPE_RESERVED Encode reserved characters. - * \param flags RFC1738_ESCAPE_ALL Encode all binary CTRL, unsafe and reserved characters. - * \param flags RFC1738_ESCAPE_NOSPACE Ignore the space whitespace character. - * \param flags RFC1738_ESCAPE_NOPERCENT Ignore the escaping delimiter '%'. - */ - extern char *rfc1738_do_escape(const char *url, int flags); +/** + * \group rfc1738 RFC 1738 URL-escaping library + * + * Public API is formed of a triplet of encode functions mapping to the rfc1738_do_encode() engine. + * + * ASCII characters are split into four groups: + * \item SAFE Characters which are safe to occur in any URL. For example A,B,C + * \item CTRLS Binary control codes. Dangerous to include in URLs. + * \item UNSAFE Characters which are completely usafe to occur in any URL. For example; backspace, tab, space, newline. + * \item RESERVED Characters which are reserved for special meaning and may only occur in certain parts of a URL. + * + * Returns a static buffer containing the RFC 1738 compliant, escaped version of the given url. + * + * \param flags RFC1738_ESCAPE_CTRLS Encode the blatantly dangerous binary codes. + * \param flags RFC1738_ESCAPE_UNSAFE Encode printable unsafe characters (excluding CTRLs). + * \param flags RFC1738_ESCAPE_RESERVED Encode reserved characters. + * \param flags RFC1738_ESCAPE_ALL Encode all binary CTRL, unsafe and reserved characters. + * \param flags RFC1738_ESCAPE_NOSPACE Ignore the space whitespace character. + * \param flags RFC1738_ESCAPE_NOPERCENT Ignore the escaping delimiter '%'. + */ +extern char *rfc1738_do_escape(const char *url, int flags); - /* Old API functions */ +/* Old API functions */ - /* Default RFC 1738 escaping. Escape all UNSAFE characters and binary CTRL codes */ +/* Default RFC 1738 escaping. Escape all UNSAFE characters and binary CTRL codes */ #define rfc1738_escape(x) rfc1738_do_escape(x, RFC1738_ESCAPE_UNSAFE|RFC1738_ESCAPE_CTRLS) - /* Escape a partial URL. Encoding every binary code, unsafe or reserved character. */ +/* Escape a partial URL. Encoding every binary code, unsafe or reserved character. */ #define rfc1738_escape_part(x) rfc1738_do_escape(x, RFC1738_ESCAPE_ALL) - /* Escape a URL. Encoding every unsafe characters but skipping reserved and already-encoded bytes. - * Suitable for safely encoding an absolute URL which may be encoded but is not trusted. */ +/* Escape a URL. Encoding every unsafe characters but skipping reserved and already-encoded bytes. + * Suitable for safely encoding an absolute URL which may be encoded but is not trusted. */ #define rfc1738_escape_unescaped(x) rfc1738_do_escape(x, RFC1738_ESCAPE_UNSAFE|RFC1738_ESCAPE_CTRLS|RFC1738_ESCAPE_NOPERCENT) - /** - * Unescape a URL string according to RFC 1738 specification. - * String is unescaped in-place - */ - extern void rfc1738_unescape(char *url); +/** + * Unescape a URL string according to RFC 1738 specification. + * String is unescaped in-place + */ +extern void rfc1738_unescape(char *url); #ifdef __cplusplus } #endif #endif /* _SQUID_INCLUDE_RFC1738_H */ + diff --git a/include/rfc2181.h b/include/rfc2181.h index ff627bfdb4..67d4217ca2 100644 --- a/include/rfc2181.h +++ b/include/rfc2181.h @@ -24,9 +24,10 @@ * Squid accepts up to 255 character Hostname and Fully-Qualified Domain Names. * Squid still NULL-terminates its FQDN and hotsname strings. */ -#define RFC2181_MAXHOSTNAMELEN 256 +#define RFC2181_MAXHOSTNAMELEN 256 /** Back-port macro for old squid code still using SQUIDHOSTNAMELEN without RFC reference. */ -#define SQUIDHOSTNAMELEN RFC2181_MAXHOSTNAMELEN +#define SQUIDHOSTNAMELEN RFC2181_MAXHOSTNAMELEN #endif /* _SQUID_INCLUDE_RFC1123_H */ + diff --git a/include/rfc2617.h b/include/rfc2617.h index a1d8ca89fa..efaf3fc3da 100644 --- a/include/rfc2617.h +++ b/include/rfc2617.h @@ -28,40 +28,41 @@ extern "C" { #endif #define HASHLEN 16 - typedef char HASH[HASHLEN]; +typedef char HASH[HASHLEN]; #define HASHHEXLEN 32 - typedef char HASHHEX[HASHHEXLEN + 1]; +typedef char HASHHEX[HASHHEXLEN + 1]; - /* calculate H(A1) as per HTTP Digest spec */ - extern void DigestCalcHA1( - const char *pszAlg, - const char *pszUserName, - const char *pszRealm, - const char *pszPassword, - const char *pszNonce, - const char *pszCNonce, - HASH HA1, - HASHHEX SessionKey - ); +/* calculate H(A1) as per HTTP Digest spec */ +extern void DigestCalcHA1( + const char *pszAlg, + const char *pszUserName, + const char *pszRealm, + const char *pszPassword, + const char *pszNonce, + const char *pszCNonce, + HASH HA1, + HASHHEX SessionKey +); - /* calculate request-digest/response-digest as per HTTP Digest spec */ - extern void DigestCalcResponse( - const HASHHEX HA1, /* H(A1) */ - const char *pszNonce, /* nonce from server */ - const char *pszNonceCount, /* 8 hex digits */ - const char *pszCNonce, /* client nonce */ - const char *pszQop, /* qop-value: "", "auth", "auth-int" */ - const char *pszMethod, /* method from the request */ - const char *pszDigestUri, /* requested URL */ - const HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ - HASHHEX Response /* request-digest or response-digest */ - ); +/* calculate request-digest/response-digest as per HTTP Digest spec */ +extern void DigestCalcResponse( + const HASHHEX HA1, /* H(A1) */ + const char *pszNonce, /* nonce from server */ + const char *pszNonceCount, /* 8 hex digits */ + const char *pszCNonce, /* client nonce */ + const char *pszQop, /* qop-value: "", "auth", "auth-int" */ + const char *pszMethod, /* method from the request */ + const char *pszDigestUri, /* requested URL */ + const HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ + HASHHEX Response /* request-digest or response-digest */ +); - extern void CvtHex(const HASH Bin, HASHHEX Hex); +extern void CvtHex(const HASH Bin, HASHHEX Hex); - extern void CvtBin(const HASHHEX Hex, HASH Bin); +extern void CvtBin(const HASHHEX Hex, HASH Bin); #ifdef __cplusplus } #endif #endif /* SQUID_RFC2617_H */ + diff --git a/include/rfc2671.h b/include/rfc2671.h index 3ecf675253..bd525177ea 100644 --- a/include/rfc2671.h +++ b/include/rfc2671.h @@ -15,3 +15,4 @@ SQUIDCEXTERN int rfc2671RROptPack(char *buf, size_t sz, ssize_t edns_sz); #endif /* SQUID_RFC3596_H */ + diff --git a/include/rfc3596.h b/include/rfc3596.h index 3bad604563..9ec00b8a03 100644 --- a/include/rfc3596.h +++ b/include/rfc3596.h @@ -53,3 +53,4 @@ SQUIDCEXTERN ssize_t rfc3596BuildHostQuery(const char *hostname, #define RFC1035_TYPE_AAAA 28 #endif /* SQUID_RFC3596_H */ + diff --git a/include/snmp-internal.h b/include/snmp-internal.h index 1006a1899e..9919e9f4dd 100644 --- a/include/snmp-internal.h +++ b/include/snmp-internal.h @@ -33,8 +33,9 @@ * **********************************************************************/ -#define SNMP_PORT 161 -#define SNMP_TRAP_PORT 162 -#define SNMP_MAX_LEN 484 +#define SNMP_PORT 161 +#define SNMP_TRAP_PORT 162 +#define SNMP_MAX_LEN 484 #endif /* SQUID_SNMP_INTERNAL_H */ + diff --git a/include/snmp-mib.h b/include/snmp-mib.h index 8a43e30623..a1601ae563 100644 --- a/include/snmp-mib.h +++ b/include/snmp-mib.h @@ -35,10 +35,11 @@ * ***************************************************************************/ -#include /* Need OID Definition */ -#include /* Need variable_list */ +#include /* Need OID Definition */ +#include /* Need variable_list */ #if 0 -#include /* Then the function definitions */ +#include /* Then the function definitions */ #endif #endif /* SQUID_SNMP_MIB_H */ + diff --git a/include/snmp.h b/include/snmp.h index aa51ea3a69..0297e51f60 100644 --- a/include/snmp.h +++ b/include/snmp.h @@ -68,3 +68,4 @@ #include "snmp_impl.h" #endif /* SQUID_SNMP_H */ + diff --git a/include/snmp_api.h b/include/snmp_api.h index 3bbcd1c83a..de131a4352 100644 --- a/include/snmp_api.h +++ b/include/snmp_api.h @@ -10,7 +10,7 @@ #define SQUID_SNMP_API_H /*********************************************************** - Copyright 1989 by Carnegie Mellon University + Copyright 1989 by Carnegie Mellon University All Rights Reserved @@ -38,13 +38,13 @@ SOFTWARE. /* * Set fields in session and pdu to the following to get a default or unconfigured value. */ -#define SNMP_DEFAULT_COMMUNITY_LEN 0 /* to get a default community name */ -#define SNMP_DEFAULT_RETRIES 3 -#define SNMP_DEFAULT_TIMEOUT 1 -#define SNMP_DEFAULT_REMPORT 0 -#define SNMP_DEFAULT_PEERNAME NULL -#define SNMP_DEFAULT_ENTERPRISE_LENGTH 0 -#define SNMP_DEFAULT_TIME 0 +#define SNMP_DEFAULT_COMMUNITY_LEN 0 /* to get a default community name */ +#define SNMP_DEFAULT_RETRIES 3 +#define SNMP_DEFAULT_TIMEOUT 1 +#define SNMP_DEFAULT_REMPORT 0 +#define SNMP_DEFAULT_PEERNAME NULL +#define SNMP_DEFAULT_ENTERPRISE_LENGTH 0 +#define SNMP_DEFAULT_TIME 0 #define SNMP_DEFAULT_MAXREPETITIONS 5 #define SNMP_DEFAULT_MACREPEATERS 0 @@ -52,128 +52,129 @@ SOFTWARE. extern "C" { #endif - /* Parse the buffer pointed to by arg3, of length arg4, into pdu arg2. - * - * Returns the community of the incoming PDU, or NULL - */ - u_char *snmp_parse(struct snmp_session *, struct snmp_pdu *, u_char *, int); - - /* Encode pdu arg2 into buffer arg3. arg4 contains the size of - * the buffer. - */ - int snmp_build(struct snmp_session *, struct snmp_pdu *, u_char *, int *); - - /* - * struct snmp_session *snmp_open(session) - * struct snmp_session *session; - * - * Sets up the session with the snmp_session information provided - * by the user. Then opens and binds the necessary UDP port. - * A handle to the created session is returned (this is different than - * the pointer passed to snmp_open()). On any error, NULL is returned - * and snmp_errno is set to the appropriate error code. - */ +/* Parse the buffer pointed to by arg3, of length arg4, into pdu arg2. + * + * Returns the community of the incoming PDU, or NULL + */ +u_char *snmp_parse(struct snmp_session *, struct snmp_pdu *, u_char *, int); + +/* Encode pdu arg2 into buffer arg3. arg4 contains the size of + * the buffer. + */ +int snmp_build(struct snmp_session *, struct snmp_pdu *, u_char *, int *); + +/* + * struct snmp_session *snmp_open(session) + * struct snmp_session *session; + * + * Sets up the session with the snmp_session information provided + * by the user. Then opens and binds the necessary UDP port. + * A handle to the created session is returned (this is different than + * the pointer passed to snmp_open()). On any error, NULL is returned + * and snmp_errno is set to the appropriate error code. + */ #if 0 - struct snmp_session *snmp_open(struct snmp_session *); - - /* - * int snmp_close(session) - * struct snmp_session *session; - * - * Close the input session. Frees all data allocated for the session, - * dequeues any pending requests, and closes any sockets allocated for - * the session. Returns 0 on error, 1 otherwise. - */ - int snmp_close(struct snmp_session *); - - /* - * int snmp_send(session, pdu) - * struct snmp_session *session; - * struct snmp_pdu *pdu; - * - * Sends the input pdu on the session after calling snmp_build to create - * a serialized packet. If necessary, set some of the pdu data from the - * session defaults. Add a request corresponding to this pdu to the list - * of outstanding requests on this session, then send the pdu. - * Returns the request id of the generated packet if applicable, otherwise 1. - * On any error, 0 is returned. - * The pdu is freed by snmp_send() unless a failure occured. - */ - int snmp_send(struct snmp_session *, struct snmp_pdu *); - - /* - * void snmp_read(fdset) - * fd_set *fdset; - * - * Checks to see if any of the fd's set in the fdset belong to - * snmp. Each socket with it's fd set has a packet read from it - * and snmp_parse is called on the packet received. The resulting pdu - * is passed to the callback routine for that session. If the callback - * routine returns successfully, the pdu and it's request are deleted. - */ - void snmp_read(fd_set *); - - /* - * int snmp_select_info(numfds, fdset, timeout, block) - * int *numfds; - * fd_set *fdset; - * struct timeval *timeout; - * int *block; - * - * Returns info about what snmp requires from a select statement. - * numfds is the number of fds in the list that are significant. - * All file descriptors opened for SNMP are OR'd into the fdset. - * If activity occurs on any of these file descriptors, snmp_read - * should be called with that file descriptor set. - * - * The timeout is the latest time that SNMP can wait for a timeout. The - * select should be done with the minimum time between timeout and any other - * timeouts necessary. This should be checked upon each invocation of select. - * If a timeout is received, snmp_timeout should be called to check if the - * timeout was for SNMP. (snmp_timeout is idempotent) - * - * Block is 1 if the select is requested to block indefinitely, rather than time out. - * If block is input as 1, the timeout value will be treated as undefined, but it must - * be available for setting in snmp_select_info. On return, if block is true, the value - * of timeout will be undefined. - * - * snmp_select_info returns the number of open sockets. (i.e. The number of sessions open) - */ - int snmp_select_info(int *, fd_set *, struct timeval *, int *); - - /* - * void snmp_timeout(); - * - * snmp_timeout should be called whenever the timeout from snmp_select_info expires, - * but it is idempotent, so snmp_timeout can be polled (probably a cpu expensive - * proposition). snmp_timeout checks to see if any of the sessions have an - * outstanding request that has timed out. If it finds one (or more), and that - * pdu has more retries available, a new packet is formed from the pdu and is - * resent. If there are no more retries available, the callback for the session - * is used to alert the user of the timeout. - */ - void snmp_timeout(void); - - /* - * This routine must be supplied by the application: - * - * int callback(operation, session, reqid, pdu, magic) - * int operation; - * struct snmp_session *session; The session authenticated under. - * int reqid; The request id of this pdu (0 for TRAP) - * struct snmp_pdu *pdu; The pdu information. - * void *magic A link to the data for this routine. - * - * Returns 1 if request was successful, 0 if it should be kept pending. - * Any data in the pdu must be copied because it will be freed elsewhere. - * Operations are defined below: - */ - - void snmp_api_stats(void *); +struct snmp_session *snmp_open(struct snmp_session *); + +/* + * int snmp_close(session) + * struct snmp_session *session; + * + * Close the input session. Frees all data allocated for the session, + * dequeues any pending requests, and closes any sockets allocated for + * the session. Returns 0 on error, 1 otherwise. + */ +int snmp_close(struct snmp_session *); + +/* + * int snmp_send(session, pdu) + * struct snmp_session *session; + * struct snmp_pdu *pdu; + * + * Sends the input pdu on the session after calling snmp_build to create + * a serialized packet. If necessary, set some of the pdu data from the + * session defaults. Add a request corresponding to this pdu to the list + * of outstanding requests on this session, then send the pdu. + * Returns the request id of the generated packet if applicable, otherwise 1. + * On any error, 0 is returned. + * The pdu is freed by snmp_send() unless a failure occured. + */ +int snmp_send(struct snmp_session *, struct snmp_pdu *); + +/* + * void snmp_read(fdset) + * fd_set *fdset; + * + * Checks to see if any of the fd's set in the fdset belong to + * snmp. Each socket with it's fd set has a packet read from it + * and snmp_parse is called on the packet received. The resulting pdu + * is passed to the callback routine for that session. If the callback + * routine returns successfully, the pdu and it's request are deleted. + */ +void snmp_read(fd_set *); + +/* + * int snmp_select_info(numfds, fdset, timeout, block) + * int *numfds; + * fd_set *fdset; + * struct timeval *timeout; + * int *block; + * + * Returns info about what snmp requires from a select statement. + * numfds is the number of fds in the list that are significant. + * All file descriptors opened for SNMP are OR'd into the fdset. + * If activity occurs on any of these file descriptors, snmp_read + * should be called with that file descriptor set. + * + * The timeout is the latest time that SNMP can wait for a timeout. The + * select should be done with the minimum time between timeout and any other + * timeouts necessary. This should be checked upon each invocation of select. + * If a timeout is received, snmp_timeout should be called to check if the + * timeout was for SNMP. (snmp_timeout is idempotent) + * + * Block is 1 if the select is requested to block indefinitely, rather than time out. + * If block is input as 1, the timeout value will be treated as undefined, but it must + * be available for setting in snmp_select_info. On return, if block is true, the value + * of timeout will be undefined. + * + * snmp_select_info returns the number of open sockets. (i.e. The number of sessions open) + */ +int snmp_select_info(int *, fd_set *, struct timeval *, int *); + +/* + * void snmp_timeout(); + * + * snmp_timeout should be called whenever the timeout from snmp_select_info expires, + * but it is idempotent, so snmp_timeout can be polled (probably a cpu expensive + * proposition). snmp_timeout checks to see if any of the sessions have an + * outstanding request that has timed out. If it finds one (or more), and that + * pdu has more retries available, a new packet is formed from the pdu and is + * resent. If there are no more retries available, the callback for the session + * is used to alert the user of the timeout. + */ +void snmp_timeout(void); + +/* + * This routine must be supplied by the application: + * + * int callback(operation, session, reqid, pdu, magic) + * int operation; + * struct snmp_session *session; The session authenticated under. + * int reqid; The request id of this pdu (0 for TRAP) + * struct snmp_pdu *pdu; The pdu information. + * void *magic A link to the data for this routine. + * + * Returns 1 if request was successful, 0 if it should be kept pending. + * Any data in the pdu must be copied because it will be freed elsewhere. + * Operations are defined below: + */ + +void snmp_api_stats(void *); #endif #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_API_H */ +#endif /* SQUID_SNMP_API_H */ + diff --git a/include/snmp_api_error.h b/include/snmp_api_error.h index 475ab0ae96..4d2d70a56a 100644 --- a/include/snmp_api_error.h +++ b/include/snmp_api_error.h @@ -36,11 +36,11 @@ ***************************************************************************/ /* Error return values */ -#define SNMPERR_GENERR -1 -#define SNMPERR_BAD_LOCPORT -2 /* local port was already in use */ -#define SNMPERR_BAD_ADDRESS -3 -#define SNMPERR_BAD_SESSION -4 -#define SNMPERR_TOO_LONG -5 /* data too long for provided buffer */ +#define SNMPERR_GENERR -1 +#define SNMPERR_BAD_LOCPORT -2 /* local port was already in use */ +#define SNMPERR_BAD_ADDRESS -3 +#define SNMPERR_BAD_SESSION -4 +#define SNMPERR_TOO_LONG -5 /* data too long for provided buffer */ #define SNMPERR_ASN_ENCODE -6 #define SNMPERR_ASN_DECODE -7 @@ -54,23 +54,24 @@ #define SNMPERR_PACKET_ERR -14 #define SNMPERR_NO_RESPONSE -15 -#define SNMPERR_LAST -16 /* Last error message */ +#define SNMPERR_LAST -16 /* Last error message */ #ifdef __cplusplus extern "C" { #endif - /* extern int snmp_errno */ +/* extern int snmp_errno */ - const char *snmp_api_error(int); - int snmp_api_errno(void); +const char *snmp_api_error(int); +int snmp_api_errno(void); - const char *api_errstring(int); /* Backwards compatibility */ - void snmp_set_api_error(int); +const char *api_errstring(int); /* Backwards compatibility */ +void snmp_set_api_error(int); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_API_ERROR_H */ +#endif /* SQUID_SNMP_API_ERROR_H */ + diff --git a/include/snmp_api_util.h b/include/snmp_api_util.h index db67b4e53f..4029ad7375 100644 --- a/include/snmp_api_util.h +++ b/include/snmp_api_util.h @@ -13,7 +13,7 @@ #include "snmp_pdu.h" /*********************************************************** - Copyright 1997 by Carnegie Mellon University + Copyright 1997 by Carnegie Mellon University All Rights Reserved @@ -46,12 +46,12 @@ SOFTWARE. */ struct request_list { struct request_list *next_request; - int request_id; /* request id */ - int retries; /* Number of retries */ - u_int timeout; /* length to wait for timeout */ - struct timeval time; /* Time this request was made */ - struct timeval expire; /* time this request is due to expire */ - struct snmp_pdu *pdu; /* The pdu for this request (saved so it can be retransmitted */ + int request_id; /* request id */ + int retries; /* Number of retries */ + u_int timeout; /* length to wait for timeout */ + struct timeval time; /* Time this request was made */ + struct timeval expire; /* time this request is due to expire */ + struct snmp_pdu *pdu; /* The pdu for this request (saved so it can be retransmitted */ }; /* @@ -64,9 +64,9 @@ struct session_list { }; struct snmp_internal_session { - int sd; /* socket descriptor for this connection */ - struct sockaddr_in addr; /* address of connected peer */ - struct request_list *requests; /* Info about outstanding requests */ + int sd; /* socket descriptor for this connection */ + struct sockaddr_in addr; /* address of connected peer */ + struct request_list *requests; /* Info about outstanding requests */ }; /* Define these here, as they aren't defined normall under @@ -93,13 +93,14 @@ struct snmp_internal_session { extern "C" { #endif - int snmp_get_socket_session(struct snmp_session *session_); - int snmp_select_info_session(struct snmp_session *session_, struct timeval *timeout); - int snmp_timeout_session(struct snmp_session *sp_); +int snmp_get_socket_session(struct snmp_session *session_); +int snmp_select_info_session(struct snmp_session *session_, struct timeval *timeout); +int snmp_timeout_session(struct snmp_session *sp_); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_API_UTIL_H */ +#endif /* SQUID_SNMP_API_UTIL_H */ + diff --git a/include/snmp_client.h b/include/snmp_client.h index 80ed13fcd7..466ab9ed12 100644 --- a/include/snmp_client.h +++ b/include/snmp_client.h @@ -10,7 +10,7 @@ #define SQUID_SNMP_CLIENT_H /*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University + Copyright 1988, 1989 by Carnegie Mellon University All Rights Reserved @@ -34,8 +34,8 @@ struct synch_state { int waiting; int status; /* status codes */ -#define STAT_SUCCESS 0 -#define STAT_ERROR 1 +#define STAT_SUCCESS 0 +#define STAT_ERROR 1 #define STAT_TIMEOUT 2 int reqid; struct snmp_pdu *pdu; @@ -45,21 +45,22 @@ struct synch_state { extern "C" { #endif - extern struct synch_state snmp_synch_state; +extern struct synch_state snmp_synch_state; - /* Synchronize Input with Agent */ - int snmp_synch_input(int, struct snmp_session *, int, - struct snmp_pdu *, void *); +/* Synchronize Input with Agent */ +int snmp_synch_input(int, struct snmp_session *, int, + struct snmp_pdu *, void *); - /* Synchronize Response with Agent */ - int snmp_synch_response(struct snmp_session *, struct snmp_pdu *, - struct snmp_pdu **); +/* Synchronize Response with Agent */ +int snmp_synch_response(struct snmp_session *, struct snmp_pdu *, + struct snmp_pdu **); - /* Synchronize Setup */ - void snmp_synch_setup(struct snmp_session *); +/* Synchronize Setup */ +void snmp_synch_setup(struct snmp_session *); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_CLIENT_H */ +#endif /* SQUID_SNMP_CLIENT_H */ + diff --git a/include/snmp_coexist.h b/include/snmp_coexist.h index 48881e46b6..b2e97f7acf 100644 --- a/include/snmp_coexist.h +++ b/include/snmp_coexist.h @@ -39,11 +39,12 @@ extern "C" { #endif - int snmp_coexist_V2toV1(struct snmp_pdu *); - int snmp_coexist_V1toV2(struct snmp_pdu *); +int snmp_coexist_V2toV1(struct snmp_pdu *); +int snmp_coexist_V1toV2(struct snmp_pdu *); #ifdef __cplusplus } #endif #endif /* SQUID_SNMP_COEXISTANCE_H */ + diff --git a/include/snmp_debug.h b/include/snmp_debug.h index 0d39e43d6d..8251a76a56 100644 --- a/include/snmp_debug.h +++ b/include/snmp_debug.h @@ -12,3 +12,4 @@ SQUIDCEXTERN void snmplib_debug(int, const char *,...) PRINTF_FORMAT_ARG2; #endif /* SQUID_SNMP_DEBUG_H */ + diff --git a/include/snmp_error.h b/include/snmp_error.h index 24f415f9fc..5f1f92ca47 100644 --- a/include/snmp_error.h +++ b/include/snmp_error.h @@ -65,10 +65,11 @@ extern "C" { #endif - const char *snmp_errstring(int); +const char *snmp_errstring(int); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_ERROR_H */ +#endif /* SQUID_SNMP_ERROR_H */ + diff --git a/include/snmp_impl.h b/include/snmp_impl.h index ca4f78f008..9893167766 100644 --- a/include/snmp_impl.h +++ b/include/snmp_impl.h @@ -17,7 +17,7 @@ * */ /*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University + Copyright 1988, 1989 by Carnegie Mellon University All Rights Reserved @@ -50,19 +50,19 @@ SOFTWARE. #endif #endif -#define SID_MAX_LEN 64 +#define SID_MAX_LEN 64 -#define READ 1 -#define WRITE 0 +#define READ 1 +#define WRITE 0 #define SNMP_RESERVE1 0 #define SNMP_RESERVE2 1 #define SNMP_COMMIT 2 #define SNMP_FREE 3 -#define RONLY 0xAAAA /* read access for everyone */ -#define RWRITE 0xAABA /* add write access for community private */ -#define NOACCESS 0x0000 /* no access for anybody */ +#define RONLY 0xAAAA /* read access for everyone */ +#define RWRITE 0xAABA /* add write access for community private */ +#define NOACCESS 0x0000 /* no access for anybody */ struct trapVar { oid *varName; @@ -74,3 +74,4 @@ struct trapVar { }; #endif /* SQUID_SNMP_IMPL_H */ + diff --git a/include/snmp_msg.h b/include/snmp_msg.h index 385b74d384..3d56ff66cf 100644 --- a/include/snmp_msg.h +++ b/include/snmp_msg.h @@ -37,19 +37,20 @@ #include "snmp_pdu.h" -#define SNMP_VERSION_1 0 /* RFC 1157 */ -#define SNMP_VERSION_2 1 /* RFC 1901 */ +#define SNMP_VERSION_1 0 /* RFC 1157 */ +#define SNMP_VERSION_2 1 /* RFC 1901 */ #ifdef __cplusplus extern "C" { #endif - u_char *snmp_msg_Encode(u_char *, int *, u_char *, int, int, struct snmp_pdu *); - u_char *snmp_msg_Decode(u_char *, int *, u_char *, int *, int *, struct snmp_pdu *); +u_char *snmp_msg_Encode(u_char *, int *, u_char *, int, int, struct snmp_pdu *); +u_char *snmp_msg_Decode(u_char *, int *, u_char *, int *, int *, struct snmp_pdu *); #ifdef __cplusplus } #endif -#endif /* SQUID_SNMP_MSG_H */ +#endif /* SQUID_SNMP_MSG_H */ + diff --git a/include/snmp_pdu.h b/include/snmp_pdu.h index 524c4b3d66..828df7c948 100644 --- a/include/snmp_pdu.h +++ b/include/snmp_pdu.h @@ -46,55 +46,55 @@ extern "C" { #endif - /* An SNMP PDU */ - struct snmp_pdu { - int command; /* Type of this PDU */ - struct sockaddr_in address; /* Address of peer */ - - int reqid; /* Integer32: Request id */ - int errstat; /* INTEGER: Error status */ - int errindex; /* INTEGER: Error index */ - - /* SNMPv2 Bulk Request */ - int non_repeaters; /* INTEGER: */ - int max_repetitions; /* INTEGER: */ - - struct variable_list *variables; /* Variable Bindings */ - - /* Trap information */ - oid *enterprise; /* System OID */ - int enterprise_length; - struct sockaddr_in agent_addr; /* address of object generating trap */ - int trap_type; /* generic trap type */ - int specific_type; /* specific type */ - u_int time; /* Uptime */ - }; - - struct snmp_pdu *snmp_pdu_create(int); - struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *); - struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int); - struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int); - void snmp_free_pdu(struct snmp_pdu *); - void snmp_pdu_free(struct snmp_pdu *); - - u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *); - u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *); - - /* Add a NULL Variable to a PDU */ - void snmp_add_null_var(struct snmp_pdu *, oid *, int); - - /* RFC 1905: Protocol Operations for SNMPv2 - * - * RFC 1157: A Simple Network Management Protocol (SNMP) - * - * PDU Types - */ -#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0) +/* An SNMP PDU */ +struct snmp_pdu { + int command; /* Type of this PDU */ + struct sockaddr_in address; /* Address of peer */ + + int reqid; /* Integer32: Request id */ + int errstat; /* INTEGER: Error status */ + int errindex; /* INTEGER: Error index */ + + /* SNMPv2 Bulk Request */ + int non_repeaters; /* INTEGER: */ + int max_repetitions; /* INTEGER: */ + + struct variable_list *variables; /* Variable Bindings */ + + /* Trap information */ + oid *enterprise; /* System OID */ + int enterprise_length; + struct sockaddr_in agent_addr; /* address of object generating trap */ + int trap_type; /* generic trap type */ + int specific_type; /* specific type */ + u_int time; /* Uptime */ +}; + +struct snmp_pdu *snmp_pdu_create(int); +struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *); +struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int); +struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int); +void snmp_free_pdu(struct snmp_pdu *); +void snmp_pdu_free(struct snmp_pdu *); + +u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *); +u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *); + +/* Add a NULL Variable to a PDU */ +void snmp_add_null_var(struct snmp_pdu *, oid *, int); + +/* RFC 1905: Protocol Operations for SNMPv2 + * + * RFC 1157: A Simple Network Management Protocol (SNMP) + * + * PDU Types + */ +#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0) #define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1) #define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2) #ifdef UNUSED_CODE #define SNMP_PDU_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3) -#define TRP_REQ_MSG (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4) /*Obsolete */ +#define TRP_REQ_MSG (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4) /*Obsolete */ #endif #define SNMP_PDU_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5) #ifdef UNUSED_CODE @@ -102,18 +102,18 @@ extern "C" { #define SNMP_PDU_V2TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7) #define SNMP_PDU_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x8) #endif -#define MAX_BINDINGS 2147483647 /* PDU Defaults */ -#define SNMP_DEFAULT_ERRSTAT -1 -#define SNMP_DEFAULT_ERRINDEX -1 -#define SNMP_DEFAULT_ADDRESS 0 -#define SNMP_DEFAULT_REQID 0 - - /* RFC 1907: Management Information Base for SNMPv2 - * - * RFC 1157: A Simple Network Management Protocol (SNMP) - * - * Trap Types - */ +#define MAX_BINDINGS 2147483647 /* PDU Defaults */ +#define SNMP_DEFAULT_ERRSTAT -1 +#define SNMP_DEFAULT_ERRINDEX -1 +#define SNMP_DEFAULT_ADDRESS 0 +#define SNMP_DEFAULT_REQID 0 + +/* RFC 1907: Management Information Base for SNMPv2 + * + * RFC 1157: A Simple Network Management Protocol (SNMP) + * + * Trap Types + */ #if UNUSED_CODE #define SNMP_TRAP_COLDSTART (0x0) #define SNMP_TRAP_WARMSTART (0x1) @@ -129,3 +129,4 @@ extern "C" { #endif #endif /* SQUID_SNMP_PDU_H */ + diff --git a/include/snmp_session.h b/include/snmp_session.h index 17ee4c8f3a..6d594ca12f 100644 --- a/include/snmp_session.h +++ b/include/snmp_session.h @@ -34,18 +34,19 @@ **********************************************************************/ struct snmp_session { - int Version; /* SNMP Version for this session */ + int Version; /* SNMP Version for this session */ - u_char *community; /* community for outgoing requests. */ - int community_len; /* Length of community name. */ - int retries; /* Number of retries before timeout. */ - int timeout; /* Number of uS until first timeout, then exponential backoff */ - char *peername; /* Domain name or dotted IP address of default peer */ - unsigned short remote_port; /* UDP port number of peer. */ - unsigned short local_port; /* My UDP port number, 0 for default, picked randomly */ + u_char *community; /* community for outgoing requests. */ + int community_len; /* Length of community name. */ + int retries; /* Number of retries before timeout. */ + int timeout; /* Number of uS until first timeout, then exponential backoff */ + char *peername; /* Domain name or dotted IP address of default peer */ + unsigned short remote_port; /* UDP port number of peer. */ + unsigned short local_port; /* My UDP port number, 0 for default, picked randomly */ }; #define RECEIVED_MESSAGE 1 -#define TIMED_OUT 2 +#define TIMED_OUT 2 #endif /* SQUID_SNMP_SESSION_H */ + diff --git a/include/snmp_util.h b/include/snmp_util.h index 36f4261857..b4a5af9a68 100644 --- a/include/snmp_util.h +++ b/include/snmp_util.h @@ -13,46 +13,47 @@ extern "C" { #endif - /* call a function at regular intervals (in seconds): */ - extern void snmp_alarm(int ival, void (*handler) (void)); +/* call a function at regular intervals (in seconds): */ +extern void snmp_alarm(int ival, void (*handler) (void)); - /* service for filedescriptors: */ +/* service for filedescriptors: */ - extern void fd_add(int fd, void (*func) (int fd)); - extern void fd_service(void); +extern void fd_add(int fd, void (*func) (int fd)); +extern void fd_service(void); - /* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ - /* - * SNMP Agent extension for Spacer-Controler Management - * - * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy - */ +/* + * SNMP Agent extension for Spacer-Controler Management + * + * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy + */ - /* Function to safely copy a string, and ensure the last - * character is always '\0'. */ - void strcpy_safe(char *str, int str_len, char *val); +/* Function to safely copy a string, and ensure the last + * character is always '\0'. */ +void strcpy_safe(char *str, int str_len, char *val); - /* Function to get IP address of this agent - * WARNING: this scans all interfaces (slow) */ - u_long Util_local_ip_address(void); +/* Function to get IP address of this agent + * WARNING: this scans all interfaces (slow) */ +u_long Util_local_ip_address(void); - /* Function to get the current time in seconds */ - long Util_time_now(void); +/* Function to get the current time in seconds */ +long Util_time_now(void); - /* Function to determine how long the agent has been running - * (WARNING: this seems rather slow) */ - long Util_time_running(); +/* Function to determine how long the agent has been running + * (WARNING: this seems rather slow) */ +long Util_time_running(); - /* Read data from file */ - int Util_file_read(char *file, int offset, char *data, int dataSz); +/* Read data from file */ +int Util_file_read(char *file, int offset, char *data, int dataSz); - /* Write data into file */ - int Util_file_write(char *file, int offset, char *data, int dataSz); +/* Write data into file */ +int Util_file_write(char *file, int offset, char *data, int dataSz); - /* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ #ifdef __cplusplus } #endif #endif /* SQUID_SNMP_UTIL_H */ + diff --git a/include/snmp_vars.h b/include/snmp_vars.h index d98c4a9538..d6ad2eb625 100644 --- a/include/snmp_vars.h +++ b/include/snmp_vars.h @@ -41,50 +41,50 @@ extern "C" { #endif - struct variable_list { - struct variable_list *next_variable; /* NULL for last variable */ - oid *name; /* Object identifier of variable */ - int name_length; /* number of subid's in name */ - u_char type; /* ASN type of variable */ - union { /* value of variable */ - int *integer; - u_char *string; - oid *objid; - } val; - int val_len; - }; - - struct variable_list *snmp_var_new(oid *, int); - struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char); - struct variable_list *snmp_var_clone(struct variable_list *); - void snmp_var_free(struct variable_list *); - - u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int); - u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int); - -#define MAX_NAME_LEN 64 /* number of subid's in a objid */ - - /* RFC 1902: Structure of Management Information for SNMPv2 - * - * Defined Types - */ +struct variable_list { + struct variable_list *next_variable; /* NULL for last variable */ + oid *name; /* Object identifier of variable */ + int name_length; /* number of subid's in name */ + u_char type; /* ASN type of variable */ + union { /* value of variable */ + int *integer; + u_char *string; + oid *objid; + } val; + int val_len; +}; + +struct variable_list *snmp_var_new(oid *, int); +struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char); +struct variable_list *snmp_var_clone(struct variable_list *); +void snmp_var_free(struct variable_list *); + +u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int); +u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int); + +#define MAX_NAME_LEN 64 /* number of subid's in a objid */ + +/* RFC 1902: Structure of Management Information for SNMPv2 + * + * Defined Types + */ #define SMI_INTEGER ASN_INTEGER #define SMI_STRING ASN_OCTET_STR #define SMI_OBJID ASN_OBJECT_ID #define SMI_NULLOBJ ASN_NULL -#define SMI_IPADDRESS (ASN_APPLICATION | 0) /* OCTET STRING, net byte order */ -#define SMI_COUNTER32 (ASN_APPLICATION | 1) /* INTEGER */ -#define SMI_GAUGE32 (ASN_APPLICATION | 2) /* INTEGER */ +#define SMI_IPADDRESS (ASN_APPLICATION | 0) /* OCTET STRING, net byte order */ +#define SMI_COUNTER32 (ASN_APPLICATION | 1) /* INTEGER */ +#define SMI_GAUGE32 (ASN_APPLICATION | 2) /* INTEGER */ #define SMI_UNSIGNED32 SMI_GAUGE32 -#define SMI_TIMETICKS (ASN_APPLICATION | 3) /* INTEGER */ -#define SMI_OPAQUE (ASN_APPLICATION | 4) /* OCTET STRING */ -#define SMI_COUNTER64 (ASN_APPLICATION | 6) /* INTEGER */ - - /* constants for enums for the MIB nodes - * cachePeerAddressType (InetAddressType / ASN_INTEGER) - * cacheClientAddressType (InetAddressType / ASN_INTEGER) - * Defined Types - */ +#define SMI_TIMETICKS (ASN_APPLICATION | 3) /* INTEGER */ +#define SMI_OPAQUE (ASN_APPLICATION | 4) /* OCTET STRING */ +#define SMI_COUNTER64 (ASN_APPLICATION | 6) /* INTEGER */ + +/* constants for enums for the MIB nodes + * cachePeerAddressType (InetAddressType / ASN_INTEGER) + * cacheClientAddressType (InetAddressType / ASN_INTEGER) + * Defined Types + */ #ifndef INETADDRESSTYPE_ENUMS #define INETADDRESSTYPE_ENUMS @@ -98,31 +98,32 @@ extern "C" { #endif /* INETADDRESSTYPE_ENUMS */ - /* - * RFC 1905: Protocol Operations for SNMPv2 - * - * Variable binding. - * - * VarBind ::= - * SEQUENCE { - * name ObjectName - * CHOICE { - * value ObjectSyntax - * unSpecified NULL - * noSuchObject[0] NULL - * noSuchInstance[1] NULL - * endOfMibView[2] NULL - * } - * } - */ +/* + * RFC 1905: Protocol Operations for SNMPv2 + * + * Variable binding. + * + * VarBind ::= + * SEQUENCE { + * name ObjectName + * CHOICE { + * value ObjectSyntax + * unSpecified NULL + * noSuchObject[0] NULL + * noSuchInstance[1] NULL + * endOfMibView[2] NULL + * } + * } + */ #define SMI_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x0) /* noSuchObject[0] */ #define SMI_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x1) /* noSuchInstance[1] */ #define SMI_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x2) /* endOfMibView[2] */ - typedef struct variable variable; - typedef struct variable_list variable_list; +typedef struct variable variable; +typedef struct variable_list variable_list; #ifdef __cplusplus } #endif #endif /* SQUID_SNMP_VARS_H */ + diff --git a/include/splay.h b/include/splay.h index eae7380d33..bc3a207463 100644 --- a/include/splay.h +++ b/include/splay.h @@ -169,7 +169,7 @@ SplayNode::remove(Value const dataToRemove, SPLAYCMP * compare) SplayNode *result = splay(dataToRemove, compare); - if (splayLastResult == 0) { /* found it */ + if (splayLastResult == 0) { /* found it */ SplayNode *newTop; if (result->left == NULL) { @@ -185,7 +185,7 @@ SplayNode::remove(Value const dataToRemove, SPLAYCMP * compare) return newTop; } - return result; /* It wasn't there */ + return result; /* It wasn't there */ } template @@ -249,7 +249,7 @@ SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const break; if ((splayLastResult = compare(dataToFind, top->left->data)) < 0) { - y = top->left; /* rotate right */ + y = top->left; /* rotate right */ top->left = y->right; y->right = top; top = y; @@ -258,7 +258,7 @@ SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const break; } - r->left = top; /* link right */ + r->left = top; /* link right */ r = top; top = top->left; } else if (splayLastResult > 0) { @@ -266,7 +266,7 @@ SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const break; if ((splayLastResult = compare(dataToFind, top->right->data)) > 0) { - y = top->right; /* rotate left */ + y = top->right; /* rotate left */ top->right = y->left; y->left = top; top = y; @@ -275,7 +275,7 @@ SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const break; } - l->right = top; /* link left */ + l->right = top; /* link left */ l = top; top = top->right; } else { @@ -283,7 +283,7 @@ SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const } } - l->right = top->left; /* assemble */ + l->right = top->left; /* assemble */ r->left = top->right; top->left = N.right; top->right = N.left; @@ -516,3 +516,4 @@ SplayConstIterator::operator * () const #endif /* cplusplus */ #endif /* SQUID_SPLAY_H */ + diff --git a/include/squid.h b/include/squid.h index d7f439a557..316a837498 100644 --- a/include/squid.h +++ b/include/squid.h @@ -9,7 +9,7 @@ #ifndef SQUID_CONFIG_H #define SQUID_CONFIG_H -#include "autoconf.h" /* For GNU autoconf variables */ +#include "autoconf.h" /* For GNU autoconf variables */ #if !defined(HAVE_SQUID) /* sub-packages define their own version details */ @@ -44,7 +44,7 @@ #ifdef USE_POSIX_REGEX #ifndef USE_RE_SYNTAX -#define USE_RE_SYNTAX REG_EXTENDED /* default Syntax */ +#define USE_RE_SYNTAX REG_EXTENDED /* default Syntax */ #endif #endif @@ -98,3 +98,4 @@ using namespace Squid; #include "leakcheck.h" #endif /* SQUID_CONFIG_H */ + diff --git a/include/sspwin32.h b/include/sspwin32.h index f3083e8fbf..39e9f6db52 100644 --- a/include/sspwin32.h +++ b/include/sspwin32.h @@ -35,7 +35,7 @@ extern "C" { #include #include - typedef char * SSP_blobP; +typedef char * SSP_blobP; #define WINNT_SECURITY_DLL "security.dll" #define WIN2K_SECURITY_DLL "secur32.dll" @@ -50,16 +50,16 @@ extern "C" { #define SSP_OK 1 #define SSP_ERROR 2 - HMODULE LoadSecurityDll(int, const char *); - void UnloadSecurityDll(void); - BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR); - BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *); - const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *); - const char * WINAPI SSP_MakeChallenge(PVOID, int); - const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *); +HMODULE LoadSecurityDll(int, const char *); +void UnloadSecurityDll(void); +BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR); +BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *); +const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *); +const char * WINAPI SSP_MakeChallenge(PVOID, int); +const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *); - extern BOOL Use_Unicode; - extern BOOL NTLM_LocalCall; +extern BOOL Use_Unicode; +extern BOOL NTLM_LocalCall; #if defined(__cplusplus) } @@ -67,3 +67,4 @@ extern "C" { #endif /* _SQUID_WINDOWS_ */ #endif /* LIBSSPWIN32_H_ */ + diff --git a/include/util.h b/include/util.h index fe8ecf9412..8229ca23aa 100644 --- a/include/util.h +++ b/include/util.h @@ -70,3 +70,4 @@ int statMemoryAccounted(void); SQUIDCEXTERN unsigned int RoundTo(const unsigned int num, const unsigned int what); #endif /* SQUID_UTIL_H */ + diff --git a/include/uudecode.h b/include/uudecode.h index 0dc1638b1e..a3f4c716ab 100644 --- a/include/uudecode.h +++ b/include/uudecode.h @@ -18,3 +18,4 @@ extern char *uudecode(const char *); #endif /* _SQUID_UUDECODE_H */ + diff --git a/include/version.h b/include/version.h index b5004467e4..d579ffc719 100644 --- a/include/version.h +++ b/include/version.h @@ -21,3 +21,4 @@ #ifndef APP_FULLNAME #define APP_FULLNAME PACKAGE "/" VERSION #endif + diff --git a/include/xusleep.h b/include/xusleep.h index efbae83a34..d0968a1382 100644 --- a/include/xusleep.h +++ b/include/xusleep.h @@ -12,3 +12,4 @@ SQUIDCEXTERN int xusleep(unsigned int); #endif /* _INC_XUSLEEP_H */ + diff --git a/lib/Splay.cc b/lib/Splay.cc index ae38e35791..409929c313 100644 --- a/lib/Splay.cc +++ b/lib/Splay.cc @@ -22,3 +22,4 @@ #include "util.h" int splayLastResult = 0; + diff --git a/lib/base64.c b/lib/base64.c index fdaf14b70c..a9d19e31f6 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -81,18 +81,18 @@ base64_decode(char *result, unsigned int result_size, const char *p) /* One quantum of four encoding characters/24 bit */ if (j+4 <= result_size) { // Speed optimization: plenty of space, avoid some per-byte checks. - result[j++] = (val >> 16) & 0xff; /* High 8 bits */ - result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ - result[j++] = val & 0xff; /* Low 8 bits */ + result[j++] = (val >> 16) & 0xff; /* High 8 bits */ + result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ + result[j++] = val & 0xff; /* Low 8 bits */ } else { // part-quantum goes a bit slower with per-byte checks - result[j++] = (val >> 16) & 0xff; /* High 8 bits */ + result[j++] = (val >> 16) & 0xff; /* High 8 bits */ if (j == result_size) return j; - result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ + result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ if (j == result_size) return j; - result[j++] = val & 0xff; /* Low 8 bits */ + result[j++] = val & 0xff; /* Low 8 bits */ } if (j == result_size) return j; @@ -212,3 +212,4 @@ base64_encode(char *result, int result_size, const char *data, int data_size) } return (out_cnt >= result_size?result_size:out_cnt); } + diff --git a/lib/charset.c b/lib/charset.c index a0ce11be5c..19193d57ce 100644 --- a/lib/charset.c +++ b/lib/charset.c @@ -31,3 +31,4 @@ latin1_to_utf8(char *out, size_t size, const char *in) return NULL; return out; } + diff --git a/lib/dirent.c b/lib/dirent.c index 6d16851385..26f4708b98 100644 --- a/lib/dirent.c +++ b/lib/dirent.c @@ -42,10 +42,10 @@ #include #define WIN32_LEAN_AND_MEAN -#include /* for GetFileAttributes */ +#include /* for GetFileAttributes */ -#define SUFFIX ("*") -#define SLASH ("\\") +#define SUFFIX ("*") +#define SLASH ("\\") /* * opendir @@ -293,3 +293,4 @@ seekdir(DIR * dirp, long lPos) } } #endif /* _SQUID_WINDOWS_ */ + diff --git a/lib/encrypt.c b/lib/encrypt.c index bee1ea63c4..4068c619a3 100644 --- a/lib/encrypt.c +++ b/lib/encrypt.c @@ -302,3 +302,4 @@ crypt(const char *wort, const char *salt) return retkey; } + diff --git a/lib/getfullhostname.c b/lib/getfullhostname.c index 9c575400ab..3e128bf196 100644 --- a/lib/getfullhostname.c +++ b/lib/getfullhostname.c @@ -44,3 +44,4 @@ getfullhostname(void) xstrncpy(buf, hp->h_name, RFC2181_MAXHOSTNAMELEN); return buf; } + diff --git a/lib/getopt.c b/lib/getopt.c index 4cd6bad32c..77cab00f0c 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -44,15 +44,15 @@ static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; #include #include -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt, /* character checked for validity */ - optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ +int opterr = 1, /* if error message should be printed */ + optind = 1, /* index into parent argv vector */ + optopt, /* character checked for validity */ + optreset; /* reset getopt */ +char *optarg; /* argument associated with option */ -#define BADCH (int)'?' -#define BADARG (int)':' -#define EMSG (char*)"" +#define BADCH (int)'?' +#define BADARG (int)':' +#define EMSG (char*)"" /* * getopt -- @@ -64,21 +64,21 @@ int nargc; char *const *nargv; const char *ostr; { - static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ + static char *place = EMSG; /* option letter processing */ + char *oli; /* option letter list index */ - if (optreset || !*place) { /* update scanning pointer */ + if (optreset || !*place) { /* update scanning pointer */ optreset = 0; if (optind >= nargc || *(place = nargv[optind]) != '-') { place = EMSG; return (-1); } - if (place[1] && *++place == '-') { /* found "--" */ + if (place[1] && *++place == '-') { /* found "--" */ ++optind; place = EMSG; return (-1); } - } /* option letter okay? */ + } /* option letter okay? */ if ((optopt = (int) *place++) == (int) ':' || !(oli = strchr(ostr, optopt))) { /* @@ -94,14 +94,14 @@ const char *ostr; "%s: illegal option -- %c\n", __FILE__, optopt); return (BADCH); } - if (*++oli != ':') { /* don't need argument */ + if (*++oli != ':') { /* don't need argument */ optarg = NULL; if (!*place) ++optind; - } else { /* need an argument */ - if (*place) /* no white space */ + } else { /* need an argument */ + if (*place) /* no white space */ optarg = place; - else if (nargc <= ++optind) { /* no arg */ + else if (nargc <= ++optind) { /* no arg */ place = EMSG; if (*ostr == ':') return (BADARG); @@ -110,10 +110,11 @@ const char *ostr; "%s: option requires an argument -- %c\n", __FILE__, optopt); return (BADCH); - } else /* white space */ + } else /* white space */ optarg = nargv[optind]; place = EMSG; ++optind; } - return (optopt); /* dump back option letter */ + return (optopt); /* dump back option letter */ } + diff --git a/lib/hash.cc b/lib/hash.cc index af10dde639..f807ae5daa 100644 --- a/lib/hash.cc +++ b/lib/hash.cc @@ -67,22 +67,22 @@ hash4(const void *data, unsigned int size) break; case 7: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 6: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 5: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 4: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 3: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 2: HASH4; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 1: HASH4; } @@ -375,3 +375,4 @@ main(void) exit(0); } #endif + diff --git a/lib/heap.c b/lib/heap.c index 8e6a21ee11..1f30e6de28 100644 --- a/lib/heap.c +++ b/lib/heap.c @@ -48,7 +48,7 @@ static void _heap_grow(heap * hp); static void _heap_swap_element(heap * hp, heap_node * elm1, heap_node * elm2); static int _heap_node_exist(heap * hp, int id); -#ifdef HEAP_DEBUG +#ifdef HEAP_DEBUG void _heap_print_tree(heap * hp, heap_node * node); #endif /* HEAP_DEBUG */ @@ -158,7 +158,7 @@ heap_delete(heap * hp, heap_node * elm) (void) 0; } else if (hp->last > 0) { if (lastNode->key < hp->nodes[Parent(lastNode->id)]->key) - _heap_ify_up(hp, lastNode); /* COOL! */ + _heap_ify_up(hp, lastNode); /* COOL! */ _heap_ify_down(hp, lastNode); } return data; @@ -169,7 +169,7 @@ heap_delete(heap * hp, heap_node * elm) * heapify operation. */ -#ifndef heap_gen_key +#ifndef heap_gen_key /* * Function to generate keys. See macro definition in heap.h. */ @@ -195,7 +195,7 @@ heap_extractmin(heap * hp) mutex_lock(hp->lock); data = hp->nodes[0]->data; - heap_delete(hp, hp->nodes[0]); /* Delete the root */ + heap_delete(hp, hp->nodes[0]); /* Delete the root */ mutex_unlock(hp->lock); @@ -286,7 +286,7 @@ heap_peep(heap * hp, int n) return data; } -#ifndef heap_nodes +#ifndef heap_nodes /* * Current number of nodes in HP. */ @@ -297,7 +297,7 @@ heap_nodes(heap * hp) } #endif /* heap_nodes */ -#ifndef heap_empty +#ifndef heap_empty /* * Determine if the heap is empty. Returns 1 if HP has no elements and 0 * otherwise. @@ -356,7 +356,7 @@ _heap_ify_up(heap * hp, heap_node * elm) parentNode = hp->nodes[Parent(elm->id)]; if (parentNode->key <= elm->key) break; - _heap_swap_element(hp, parentNode, elm); /* Demote the parent. */ + _heap_swap_element(hp, parentNode, elm); /* Demote the parent. */ } } @@ -374,7 +374,7 @@ _heap_swap_element(heap * hp, heap_node * elm1, heap_node * elm2) hp->nodes[elm2->id] = elm2; } -#ifdef NOTDEF +#ifdef NOTDEF /* * Copy KEY and DATA fields of SRC to DEST. ID field is NOT copied. */ @@ -473,7 +473,7 @@ verify_heap_property(heap * hp) return correct; } -#ifdef MEASURE_HEAP_SKEW +#ifdef MEASURE_HEAP_SKEW /**************************************************************************** * Heap skew computation @@ -506,7 +506,7 @@ calc_heap_skew(heap * heap, int replace) { heap_node **nodes; long id, diff, skew = 0; -#ifdef HEAP_DEBUG_SKEW +#ifdef HEAP_DEBUG_SKEW long skewsq = 0; #endif /* HEAP_DEBUG_SKEW */ float norm = 0; @@ -540,9 +540,9 @@ calc_heap_skew(heap * heap, int replace) diff = id - nodes[id]->id; skew += abs(diff); -#ifdef HEAP_DEBUG_SKEW +#ifdef HEAP_DEBUG_SKEW skewsq += diff * diff; -#ifdef HEAP_DEBUG_ALL +#ifdef HEAP_DEBUG_ALL printf("%d\tKey = %f, diff = %d\n", id, nodes[id]->key, diff); #endif /* HEAP_DEBUG */ #endif /* HEAP_DEBUG_SKEW */ @@ -582,3 +582,4 @@ calc_heap_skew(heap * heap, int replace) } #endif /* MEASURE_HEAP_SKEW */ + diff --git a/lib/html_quote.c b/lib/html_quote.c index cab09acbec..899be58342 100644 --- a/lib/html_quote.c +++ b/lib/html_quote.c @@ -101,3 +101,4 @@ html_quote(const char *string) *dst = '\0'; return (buf); } + diff --git a/lib/iso3307.c b/lib/iso3307.c index d423470618..502b76084f 100644 --- a/lib/iso3307.c +++ b/lib/iso3307.c @@ -48,3 +48,4 @@ parse_iso3307_time(const char *buf) #endif return t; } + diff --git a/lib/libTrie/Trie.cc b/lib/libTrie/Trie.cc index c950648647..c88869949e 100644 --- a/lib/libTrie/Trie.cc +++ b/lib/libTrie/Trie.cc @@ -41,3 +41,4 @@ Trie::add(char const *aString, size_t theLength, void *privatedata) return head->add(aString, theLength, privatedata, transform); } + diff --git a/lib/libTrie/Trie.h b/lib/libTrie/Trie.h index 05ebc0c10d..48b45d3f9f 100644 --- a/lib/libTrie/Trie.h +++ b/lib/libTrie/Trie.h @@ -72,3 +72,4 @@ Trie::findPrefix (char const *aString, size_t theLength) } #endif /* LIBTRIE_SQUID_H */ + diff --git a/lib/libTrie/TrieCharTransform.h b/lib/libTrie/TrieCharTransform.h index 8dbd34ca4d..0318842e49 100644 --- a/lib/libTrie/TrieCharTransform.h +++ b/lib/libTrie/TrieCharTransform.h @@ -46,3 +46,4 @@ class TrieCaseless : public TrieCharTransform #endif /* __cplusplus */ #endif /* LIBTRIE_TRIECHARTRANSFORM_H */ + diff --git a/lib/libTrie/TrieNode.cc b/lib/libTrie/TrieNode.cc index a040dc150f..4c37104fad 100644 --- a/lib/libTrie/TrieNode.cc +++ b/lib/libTrie/TrieNode.cc @@ -49,3 +49,4 @@ TrieNode::add(char const *aString, size_t theLength, void *privatedata, TrieChar return true; } } + diff --git a/lib/libTrie/TrieNode.h b/lib/libTrie/TrieNode.h index 8d3e395ee3..0f93a4468b 100644 --- a/lib/libTrie/TrieNode.h +++ b/lib/libTrie/TrieNode.h @@ -82,3 +82,4 @@ TrieNode::find (char const *aString, size_t theLength, TrieCharTransform *transf } } #endif /* LIBTRIE_TRIENODE_H */ + diff --git a/lib/libTrie/test/trie.cc b/lib/libTrie/test/trie.cc index 7d3e262efd..c5d9d9f779 100644 --- a/lib/libTrie/test/trie.cc +++ b/lib/libTrie/test/trie.cc @@ -122,3 +122,4 @@ int main (int argc, char **argv) return 0; } + diff --git a/lib/md5-test.c b/lib/md5-test.c index 20155170a2..b7aa70ba3d 100644 --- a/lib/md5-test.c +++ b/lib/md5-test.c @@ -48,3 +48,4 @@ main(int argc, char **argv) "1234567890123456789012345678901234567890"); return 0; } + diff --git a/lib/md5.c b/lib/md5.c index 44365a3f1a..0e03db1fde 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -43,10 +43,10 @@ #if !HAVE_NETTLE_MD5_H #if HAVE_STRING_H -#include /* for memcpy() */ +#include /* for memcpy() */ #endif #if HAVE_SYS_TYPES_H -#include /* for stupid systems */ +#include /* for stupid systems */ #endif #ifdef WORDS_BIGENDIAN @@ -95,9 +95,9 @@ SquidMD5Update(struct SquidMD5Context *ctx, const void *_buf, unsigned len) t = ctx->bytes[0]; if ((ctx->bytes[0] = t + len) < t) - ctx->bytes[1]++; /* Carry from low to high */ + ctx->bytes[1]++; /* Carry from low to high */ - t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ + t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ if (t > len) { memcpy((uint8_t *) ctx->in + 64 - t, buf, len); return; @@ -129,7 +129,7 @@ SquidMD5Update(struct SquidMD5Context *ctx, const void *_buf, unsigned len) void SquidMD5Final(unsigned char digest[16], struct SquidMD5Context *ctx) { - int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */ + int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */ uint8_t *p = (uint8_t *) ctx->in + count; /* Set the first char of padding to 0x80. There is always room. */ @@ -138,7 +138,7 @@ SquidMD5Final(unsigned char digest[16], struct SquidMD5Context *ctx) /* Bytes of padding needed to make 56 bytes (-8..55) */ count = 56 - 1 - count; - if (count < 0) { /* Padding forces an extra block */ + if (count < 0) { /* Padding forces an extra block */ memset(p, 0, count + 8); byteSwap(ctx->in, 16); SquidMD5Transform(ctx->buf, ctx->in); @@ -155,7 +155,7 @@ SquidMD5Final(unsigned char digest[16], struct SquidMD5Context *ctx) byteSwap(ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } #ifndef ASM_MD5 @@ -170,7 +170,7 @@ SquidMD5Final(unsigned char digest[16], struct SquidMD5Context *ctx) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f,w,x,y,z,in,s) \ - (w += f(x,y,z) + in, w = (w<>(32-s)) + x) + (w += f(x,y,z) + in, w = (w<>(32-s)) + x) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to @@ -263,3 +263,4 @@ SquidMD5Transform(uint32_t buf[4], uint32_t const in[16]) #endif /* !ASM_MD5 */ #endif /* HAVE_ETTLE_MD5_H */ + diff --git a/lib/ntlmauth/ntlmauth.cc b/lib/ntlmauth/ntlmauth.cc index 2a394015db..280d45cdff 100644 --- a/lib/ntlmauth/ntlmauth.cc +++ b/lib/ntlmauth/ntlmauth.cc @@ -17,7 +17,7 @@ #endif #include "ntlmauth/ntlmauth.h" -#include "util.h" /* for base64-related stuff */ +#include "util.h" /* for base64-related stuff */ /* ************************************************************************* */ /* DEBUG functions */ @@ -206,9 +206,9 @@ ntlm_make_challenge(ntlm_challenge *ch, const uint32_t flags) { int pl = 0; - memset(ch, 0, sizeof(ntlm_challenge)); /* reset */ - memcpy(ch->hdr.signature, "NTLMSSP", 8); /* set the signature */ - ch->hdr.type = htole32(NTLM_CHALLENGE); /* this is a challenge */ + memset(ch, 0, sizeof(ntlm_challenge)); /* reset */ + memcpy(ch->hdr.signature, "NTLMSSP", 8); /* set the signature */ + ch->hdr.type = htole32(NTLM_CHALLENGE); /* this is a challenge */ if (domain != NULL) { // silently truncate the domain if it exceeds 2^16-1 bytes. // NTLM packets normally expect 2^8 bytes of domain. @@ -216,7 +216,7 @@ ntlm_make_challenge(ntlm_challenge *ch, ntlm_add_to_payload(&ch->hdr, ch->payload, &pl, &ch->target, domain, dlen); } ch->flags = htole32(flags); - ch->context_low = 0; /* check this out */ + ch->context_low = 0; /* check this out */ ch->context_high = 0; memcpy(ch->challenge, challenge_nonce, challenge_nonce_len); } @@ -231,10 +231,10 @@ ntlm_make_challenge(ntlm_challenge *ch, * this function will only insert data if the packet contains any. Otherwise * the buffers will be left untouched. * - * \retval NTLM_ERR_NONE username present, maybe also domain. - * \retval NTLM_ERR_PROTOCOL packet type is not an authentication packet. - * \retval NTLM_ERR_LOGON no username. - * \retval NTLM_ERR_BLOB domain field is apparently larger than the packet. + * \retval NTLM_ERR_NONE username present, maybe also domain. + * \retval NTLM_ERR_PROTOCOL packet type is not an authentication packet. + * \retval NTLM_ERR_LOGON no username. + * \retval NTLM_ERR_BLOB domain field is apparently larger than the packet. */ int ntlm_unpack_auth(const ntlm_authenticate *auth, char *user, char *domain, const int32_t size) @@ -275,3 +275,4 @@ ntlm_unpack_auth(const ntlm_authenticate *auth, char *user, char *domain, const return NTLM_ERR_NONE; } + diff --git a/lib/ntlmauth/ntlmauth.h b/lib/ntlmauth/ntlmauth.h index cb743dbf72..e94be20034 100644 --- a/lib/ntlmauth/ntlmauth.h +++ b/lib/ntlmauth/ntlmauth.h @@ -17,93 +17,93 @@ extern "C" { #endif - /* Used internally. Microsoft seems to think this is right, I believe them. - * Right. */ -#define NTLM_MAX_FIELD_LENGTH 300 /* max length of an NTLMSSP field */ +/* Used internally. Microsoft seems to think this is right, I believe them. + * Right. */ +#define NTLM_MAX_FIELD_LENGTH 300 /* max length of an NTLMSSP field */ - /* max length of the BLOB data. (and helper input/output buffer) */ +/* max length of the BLOB data. (and helper input/output buffer) */ #define NTLM_BLOB_BUFFER_SIZE 10240 - /* Here start the NTLMSSP definitions */ +/* Here start the NTLMSSP definitions */ - /* these are marked as "extra" fields */ +/* these are marked as "extra" fields */ #define NTLM_REQUEST_INIT_RESPONSE 0x100000 #define NTLM_REQUEST_ACCEPT_RESPONSE 0x200000 #define NTLM_REQUEST_NON_NT_SESSION_KEY 0x400000 - /* NTLM error codes */ +/* NTLM error codes */ #define NTLM_ERR_INTERNAL -3 #define NTLM_ERR_BLOB -2 #define NTLM_ERR_BAD_PROTOCOL -1 #define NTLM_ERR_NONE 0 /* aka. SMBLM_ERR_NONE */ - /* codes used by smb_lm helper */ +/* codes used by smb_lm helper */ #define NTLM_ERR_SERVER 1 /* aka. SMBLM_ERR_SERVER */ #define NTLM_ERR_PROTOCOL 2 /* aka. SMBLM_ERR_PROTOCOL */ #define NTLM_ERR_LOGON 3 /* aka. SMBLM_ERR_LOGON */ #define NTLM_ERR_UNTRUSTED_DOMAIN 4 #define NTLM_ERR_NOT_CONNECTED 10 - /* codes used by mswin_ntlmsspi helper */ +/* codes used by mswin_ntlmsspi helper */ #define NTLM_SSPI_ERROR 1 #define NTLM_BAD_NTGROUP 2 #define NTLM_BAD_REQUEST 3 - /* TODO: reduce the above codes down to one set non-overlapping. */ - - /** String header. String data resides at the end of the request */ - typedef struct _strhdr { - int16_t len; /**< Length in bytes */ - int16_t maxlen; /**< Allocated space in bytes */ - int32_t offset; /**< Offset from start of request */ - } strhdr; - - /** We use this to keep data/length couples. */ - typedef struct _lstring { - int32_t l; /**< length, -1 if empty */ - char *str; /**< the string. NULL if not initialized */ - } lstring; - - /** Debug dump the given flags field to stderr */ - void ntlm_dump_ntlmssp_flags(const uint32_t flags); - - /* ************************************************************************* */ - /* Packet and Payload structures and handling functions */ - /* ************************************************************************* */ - - /* NTLM request types that we know about */ -#define NTLM_ANY 0 -#define NTLM_NEGOTIATE 1 -#define NTLM_CHALLENGE 2 -#define NTLM_AUTHENTICATE 3 - - /** This is an header common to all packets, it's used to discriminate - * among the different packet signature types. - */ - typedef struct _ntlmhdr { - char signature[8]; /**< "NTLMSSP" */ - int32_t type; /**< One of the NTLM_* types above. */ - } ntlmhdr; - - /** Validate the packet type matches one we want. */ - int ntlm_validate_packet(const ntlmhdr *packet, const int32_t type); - - /** Retrieve a string from the NTLM packet payload. */ - lstring ntlm_fetch_string(const ntlmhdr *packet, - const int32_t packet_length, - const strhdr *str, - const uint32_t flags); - - /** Append a string to the NTLM packet payload. */ - void ntlm_add_to_payload(const ntlmhdr *packet_hdr, - char *payload, - int *payload_length, - strhdr * hdr, - const char *toadd, - const uint16_t toadd_length); - - /* ************************************************************************* */ - /* Negotiate Packet structures and functions */ - /* ************************************************************************* */ - - /* negotiate request flags */ +/* TODO: reduce the above codes down to one set non-overlapping. */ + +/** String header. String data resides at the end of the request */ +typedef struct _strhdr { + int16_t len; /**< Length in bytes */ + int16_t maxlen; /**< Allocated space in bytes */ + int32_t offset; /**< Offset from start of request */ +} strhdr; + +/** We use this to keep data/length couples. */ +typedef struct _lstring { + int32_t l; /**< length, -1 if empty */ + char *str; /**< the string. NULL if not initialized */ +} lstring; + +/** Debug dump the given flags field to stderr */ +void ntlm_dump_ntlmssp_flags(const uint32_t flags); + +/* ************************************************************************* */ +/* Packet and Payload structures and handling functions */ +/* ************************************************************************* */ + +/* NTLM request types that we know about */ +#define NTLM_ANY 0 +#define NTLM_NEGOTIATE 1 +#define NTLM_CHALLENGE 2 +#define NTLM_AUTHENTICATE 3 + +/** This is an header common to all packets, it's used to discriminate + * among the different packet signature types. + */ +typedef struct _ntlmhdr { + char signature[8]; /**< "NTLMSSP" */ + int32_t type; /**< One of the NTLM_* types above. */ +} ntlmhdr; + +/** Validate the packet type matches one we want. */ +int ntlm_validate_packet(const ntlmhdr *packet, const int32_t type); + +/** Retrieve a string from the NTLM packet payload. */ +lstring ntlm_fetch_string(const ntlmhdr *packet, + const int32_t packet_length, + const strhdr *str, + const uint32_t flags); + +/** Append a string to the NTLM packet payload. */ +void ntlm_add_to_payload(const ntlmhdr *packet_hdr, + char *payload, + int *payload_length, + strhdr * hdr, + const char *toadd, + const uint16_t toadd_length); + +/* ************************************************************************* */ +/* Negotiate Packet structures and functions */ +/* ************************************************************************* */ + +/* negotiate request flags */ #define NTLM_NEGOTIATE_UNICODE 0x0001 #define NTLM_NEGOTIATE_ASCII 0x0002 #define NTLM_NEGOTIATE_REQUEST_TARGET 0x0004 @@ -118,78 +118,79 @@ extern "C" { #define NTLM_NEGOTIATE_THIS_IS_LOCAL_CALL 0x4000 #define NTLM_NEGOTIATE_ALWAYS_SIGN 0x8000 - /** Negotiation request sent by client */ - typedef struct _ntlm_negotiate { - ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x1) */ - uint32_t flags; /**< Request flags */ - strhdr domain; /**< Domain we wish to authenticate in */ - strhdr workstation; /**< Client workstation name */ - char payload[256]; /**< String data */ - } ntlm_negotiate; +/** Negotiation request sent by client */ +typedef struct _ntlm_negotiate { + ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x1) */ + uint32_t flags; /**< Request flags */ + strhdr domain; /**< Domain we wish to authenticate in */ + strhdr workstation; /**< Client workstation name */ + char payload[256]; /**< String data */ +} ntlm_negotiate; - /* ************************************************************************* */ - /* Challenge Packet structures and functions */ - /* ************************************************************************* */ +/* ************************************************************************* */ +/* Challenge Packet structures and functions */ +/* ************************************************************************* */ #define NTLM_NONCE_LEN 8 - /* challenge request flags */ +/* challenge request flags */ #define NTLM_CHALLENGE_TARGET_IS_DOMAIN 0x10000 #define NTLM_CHALLENGE_TARGET_IS_SERVER 0x20000 #define NTLM_CHALLENGE_TARGET_IS_SHARE 0x40000 - /** Challenge request sent by server. */ - typedef struct _ntlm_challenge { - ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x2) */ - strhdr target; /**< Authentication target (domain/server ...) */ - uint32_t flags; /**< Request flags */ - u_char challenge[NTLM_NONCE_LEN]; /**< Challenge string */ - uint32_t context_low; /**< LS part of the server context handle */ - uint32_t context_high; /**< MS part of the server context handle */ - char payload[256]; /**< String data */ - } ntlm_challenge; - - /* Size of the ntlm_challenge structures formatted fields (excluding payload) */ -#define NTLM_CHALLENGE_HEADER_OFFSET (sizeof(ntlm_challenge)-256) - - /** Generate a challenge request nonce. */ - void ntlm_make_nonce(char *nonce); - - /** Generate a challenge request Blob to be sent to the client. - * Will silently truncate the domain value at 2^16-1 bytes if larger. - */ - void ntlm_make_challenge(ntlm_challenge *ch, - const char *domain, - const char *domain_controller, - const char *challenge_nonce, - const int challenge_nonce_len, - const uint32_t flags); - - /* ************************************************************************* */ - /* Authenticate Packet structures and functions */ - /* ************************************************************************* */ - - /** Authentication request sent by client in response to challenge */ - typedef struct _ntlm_authenticate { - ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x3) */ - strhdr lmresponse; /**< LANMAN challenge response */ - strhdr ntresponse; /**< NT challenge response */ - strhdr domain; /**< Domain to authenticate against */ - strhdr user; /**< Username */ - strhdr workstation; /**< Workstation name */ - strhdr sessionkey; /**< Session key for server's use */ - uint32_t flags; /**< Request flags */ - char payload[256 * 6]; /**< String data */ - } ntlm_authenticate; - - /** Unpack username and domain out of a packet payload. */ - int ntlm_unpack_auth(const ntlm_authenticate *auth, - char *user, - char *domain, - const int32_t size); +/** Challenge request sent by server. */ +typedef struct _ntlm_challenge { + ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x2) */ + strhdr target; /**< Authentication target (domain/server ...) */ + uint32_t flags; /**< Request flags */ + u_char challenge[NTLM_NONCE_LEN]; /**< Challenge string */ + uint32_t context_low; /**< LS part of the server context handle */ + uint32_t context_high; /**< MS part of the server context handle */ + char payload[256]; /**< String data */ +} ntlm_challenge; + +/* Size of the ntlm_challenge structures formatted fields (excluding payload) */ +#define NTLM_CHALLENGE_HEADER_OFFSET (sizeof(ntlm_challenge)-256) + +/** Generate a challenge request nonce. */ +void ntlm_make_nonce(char *nonce); + +/** Generate a challenge request Blob to be sent to the client. + * Will silently truncate the domain value at 2^16-1 bytes if larger. + */ +void ntlm_make_challenge(ntlm_challenge *ch, + const char *domain, + const char *domain_controller, + const char *challenge_nonce, + const int challenge_nonce_len, + const uint32_t flags); + +/* ************************************************************************* */ +/* Authenticate Packet structures and functions */ +/* ************************************************************************* */ + +/** Authentication request sent by client in response to challenge */ +typedef struct _ntlm_authenticate { + ntlmhdr hdr; /**< "NTLMSSP" , LSWAP(0x3) */ + strhdr lmresponse; /**< LANMAN challenge response */ + strhdr ntresponse; /**< NT challenge response */ + strhdr domain; /**< Domain to authenticate against */ + strhdr user; /**< Username */ + strhdr workstation; /**< Workstation name */ + strhdr sessionkey; /**< Session key for server's use */ + uint32_t flags; /**< Request flags */ + char payload[256 * 6]; /**< String data */ +} ntlm_authenticate; + +/** Unpack username and domain out of a packet payload. */ +int ntlm_unpack_auth(const ntlm_authenticate *auth, + char *user, + char *domain, + const int32_t size); #if __cplusplus } #endif #endif /* SQUID_NTLMAUTH_H */ + diff --git a/lib/ntlmauth/support_bits.cci b/lib/ntlmauth/support_bits.cci index d4fbcc10fb..41195423d3 100644 --- a/lib/ntlmauth/support_bits.cci +++ b/lib/ntlmauth/support_bits.cci @@ -106,3 +106,4 @@ hex_dump(unsigned char *data, int size) } #endif /* SQUID_LIBNTLMAUTH_SUPPORT_BITS_CCI */ + diff --git a/lib/ntlmauth/support_endian.h b/lib/ntlmauth/support_endian.h index 33ce04146d..83a2282afe 100644 --- a/lib/ntlmauth/support_endian.h +++ b/lib/ntlmauth/support_endian.h @@ -93,3 +93,4 @@ #endif #endif /* SQUID_LIB_NTLMAUTH_SUPPORT_ENDIAN_H */ + diff --git a/lib/profiler/Profiler.cc b/lib/profiler/Profiler.cc index 25ea11eb1e..eb57a722d8 100644 --- a/lib/profiler/Profiler.cc +++ b/lib/profiler/Profiler.cc @@ -110,10 +110,10 @@ TimersArray *xprof_Timers = NULL; /* Private stuff */ /* new stuff */ -#define MAXSTACKDEPTH 512 +#define MAXSTACKDEPTH 512 struct _callstack_entry { - int timer; /* index into timers array */ + int timer; /* index into timers array */ const char *name; hrtime_t start, stop, accum; }; @@ -213,3 +213,4 @@ xprof_stop(xprof_type type, const char *timer) } #endif /* USE_XPROF_STATS */ + diff --git a/lib/profiler/Profiler.h b/lib/profiler/Profiler.h index a460506495..de9288dbb5 100644 --- a/lib/profiler/Profiler.h +++ b/lib/profiler/Profiler.h @@ -28,36 +28,36 @@ extern "C" { #define XP_NOBEST (hrtime_t)-1 - typedef struct _xprof_stats_node xprof_stats_node; +typedef struct _xprof_stats_node xprof_stats_node; - typedef struct _xprof_stats_data xprof_stats_data; +typedef struct _xprof_stats_data xprof_stats_data; - struct _xprof_stats_data { - hrtime_t start; - hrtime_t stop; - hrtime_t delta; - hrtime_t best; - hrtime_t worst; - hrtime_t count; - hrtime_t accum; - int64_t summ; - }; +struct _xprof_stats_data { + hrtime_t start; + hrtime_t stop; + hrtime_t delta; + hrtime_t best; + hrtime_t worst; + hrtime_t count; + hrtime_t accum; + int64_t summ; +}; - struct _xprof_stats_node { - const char *name; - xprof_stats_data accu; - xprof_stats_data hist; - }; +struct _xprof_stats_node { + const char *name; + xprof_stats_data accu; + xprof_stats_data hist; +}; - typedef xprof_stats_node TimersArray[1]; +typedef xprof_stats_node TimersArray[1]; - /* public Data */ - extern TimersArray *xprof_Timers; +/* public Data */ +extern TimersArray *xprof_Timers; - /* Exported functions */ - extern void xprof_start(xprof_type type, const char *timer); - extern void xprof_stop(xprof_type type, const char *timer); - extern void xprof_event(void *data); +/* Exported functions */ +extern void xprof_start(xprof_type type, const char *timer); +extern void xprof_stop(xprof_type type, const char *timer); +extern void xprof_event(void *data); #define PROF_start(probename) xprof_start(XPROF_##probename, #probename) #define PROF_stop(probename) xprof_stop(XPROF_##probename, #probename) @@ -68,3 +68,4 @@ extern "C" { } #endif #endif /* _PROFILING_H_ */ + diff --git a/lib/profiler/get_tick.h b/lib/profiler/get_tick.h index 9ccdc23898..7321f1edf9 100644 --- a/lib/profiler/get_tick.h +++ b/lib/profiler/get_tick.h @@ -25,7 +25,7 @@ get_tick(void) { hrtime_t regs; -asm volatile ("rdtsc":"=A" (regs)); + asm volatile ("rdtsc":"=A" (regs)); return regs; /* We need return value, we rely on CC to optimise out needless subf calls */ /* Note that "rdtsc" is relatively slow OP and stalls the CPU pipes, so use it wisely */ @@ -38,7 +38,7 @@ get_tick(void) uint32_t lo, hi; // Based on an example in Wikipedia /* We cannot use "=A", since this would use %rax on x86_64 */ -asm volatile ("rdtsc" : "=a" (lo), "=d" (hi)); + asm volatile ("rdtsc" : "=a" (lo), "=d" (hi)); return (hrtime_t)hi << 32 | lo; } @@ -48,7 +48,7 @@ get_tick(void) { hrtime_t regs; -asm volatile ("rpcc %0" : "=r" (regs)); + asm volatile ("rpcc %0" : "=r" (regs)); return regs; } @@ -75,3 +75,4 @@ get_tick(void) #endif /* USE_XPROF_STATS */ #endif /* _PROFILING_H_ */ + diff --git a/lib/profiler/xprof_type.h b/lib/profiler/xprof_type.h index abada96d53..fae25eeb26 100644 --- a/lib/profiler/xprof_type.h +++ b/lib/profiler/xprof_type.h @@ -10,77 +10,79 @@ /* AUTO-GENERATED FILE */ #if USE_XPROF_STATS typedef enum { - XPROF_PROF_UNACCOUNTED, -XPROF_aclCheckFast, -XPROF_ACL_matches, -XPROF_calloc, -XPROF_clientSocketRecipient, -XPROF_comm_accept, -XPROF_comm_check_incoming, -XPROF_comm_close, -XPROF_comm_connect_addr, -XPROF_comm_handle_ready_fd, -XPROF_commHandleWrite, -XPROF_comm_open, -XPROF_comm_poll_normal, -XPROF_comm_poll_prep_pfds, -XPROF_comm_read_handler, -XPROF_comm_udp_sendto, -XPROF_comm_write_handler, -XPROF_diskHandleRead, -XPROF_diskHandleWrite, -XPROF_esiExpressionEval, -XPROF_esiParsing, -XPROF_esiProcessing, -XPROF_eventRun, -XPROF_file_close, -XPROF_file_open, -XPROF_file_read, -XPROF_file_write, -XPROF_free, -XPROF_free_const, -XPROF_hash_lookup, -XPROF_headersEnd, -XPROF_HttpHeaderClean, -XPROF_HttpHeader_getCc, -XPROF_HttpHeaderParse, -XPROF_HttpMsg_httpMsgParseStep, -XPROF_HttpParserParseReqLine, -XPROF_httpRequestFree, -XPROF_HttpServer_parseOneRequest, -XPROF_httpStart, -XPROF_HttpStateData_processReplyBody, -XPROF_HttpStateData_processReplyHeader, -XPROF_InvokeHandlers, -XPROF_malloc, -XPROF_MemBuf_append, -XPROF_MemBuf_consume, -XPROF_MemBuf_consumeWhitespace, -XPROF_MemBuf_grow, -XPROF_mem_hdr_write, -XPROF_MemObject_write, -XPROF_PROF_OVERHEAD, -XPROF_read, -XPROF_realloc, -XPROF_recv, -XPROF_send, -XPROF_SignalEngine_checkEvents, -XPROF_storeClient_kickReads, -XPROF_storeDirCallback, -XPROF_StoreEntry_write, -XPROF_storeGet, -XPROF_storeGetMemSpace, -XPROF_storeMaintainSwapSpace, -XPROF_storeRelease, -XPROF_StringAllocAndFill, -XPROF_StringAppend, -XPROF_StringClean, -XPROF_StringInitBuf, -XPROF_StringReset, -XPROF_write, -XPROF_xcalloc, -XPROF_xmalloc, -XPROF_xrealloc, - XPROF_LAST } xprof_type; + XPROF_PROF_UNACCOUNTED, + XPROF_aclCheckFast, + XPROF_ACL_matches, + XPROF_calloc, + XPROF_clientSocketRecipient, + XPROF_comm_accept, + XPROF_comm_check_incoming, + XPROF_comm_close, + XPROF_comm_connect_addr, + XPROF_comm_handle_ready_fd, + XPROF_commHandleWrite, + XPROF_comm_open, + XPROF_comm_poll_normal, + XPROF_comm_poll_prep_pfds, + XPROF_comm_read_handler, + XPROF_comm_udp_sendto, + XPROF_comm_write_handler, + XPROF_diskHandleRead, + XPROF_diskHandleWrite, + XPROF_esiExpressionEval, + XPROF_esiParsing, + XPROF_esiProcessing, + XPROF_eventRun, + XPROF_file_close, + XPROF_file_open, + XPROF_file_read, + XPROF_file_write, + XPROF_free, + XPROF_free_const, + XPROF_hash_lookup, + XPROF_headersEnd, + XPROF_HttpHeaderClean, + XPROF_HttpHeader_getCc, + XPROF_HttpHeaderParse, + XPROF_HttpMsg_httpMsgParseStep, + XPROF_HttpParserParseReqLine, + XPROF_httpRequestFree, + XPROF_HttpServer_parseOneRequest, + XPROF_httpStart, + XPROF_HttpStateData_processReplyBody, + XPROF_HttpStateData_processReplyHeader, + XPROF_InvokeHandlers, + XPROF_malloc, + XPROF_MemBuf_append, + XPROF_MemBuf_consume, + XPROF_MemBuf_consumeWhitespace, + XPROF_MemBuf_grow, + XPROF_mem_hdr_write, + XPROF_MemObject_write, + XPROF_PROF_OVERHEAD, + XPROF_read, + XPROF_realloc, + XPROF_recv, + XPROF_send, + XPROF_SignalEngine_checkEvents, + XPROF_storeClient_kickReads, + XPROF_storeDirCallback, + XPROF_StoreEntry_write, + XPROF_storeGet, + XPROF_storeGetMemSpace, + XPROF_storeMaintainSwapSpace, + XPROF_storeRelease, + XPROF_StringAllocAndFill, + XPROF_StringAppend, + XPROF_StringClean, + XPROF_StringInitBuf, + XPROF_StringReset, + XPROF_write, + XPROF_xcalloc, + XPROF_xmalloc, + XPROF_xrealloc, + XPROF_LAST +} xprof_type; #endif #endif + diff --git a/lib/radix.c b/lib/radix.c index df521fd309..6af3680917 100644 --- a/lib/radix.c +++ b/lib/radix.c @@ -95,19 +95,19 @@ static char *rn_zeros, *rn_ones; #define rn_l rn_u.rn_node.rn_L #define rn_r rn_u.rn_node.rn_R #define rm_mask rm_rmu.rmu_mask -#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ +#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ /* Helper macros */ #define squid_Bcmp(a, b, l) (l == 0 ? 0 : memcmp((caddr_t)(a), (caddr_t)(b), (u_long)l)) #define squid_R_Malloc(p, t, n) (p = (t) xmalloc((unsigned int)(n))) #define squid_Free(p) xfree((char *)p) #define squid_MKGet(m) {\ - if (squid_rn_mkfreelist) {\ - m = squid_rn_mkfreelist; \ - squid_rn_mkfreelist = (m)->rm_mklist; \ - } else \ - squid_R_Malloc(m, struct squid_radix_mask *, sizeof (*(m)));\ - } + if (squid_rn_mkfreelist) {\ + m = squid_rn_mkfreelist; \ + squid_rn_mkfreelist = (m)->rm_mklist; \ + } else \ + squid_R_Malloc(m, struct squid_radix_mask *, sizeof (*(m)));\ + } #define squid_MKFree(m) { (m)->rm_mklist = squid_rn_mkfreelist; squid_rn_mkfreelist = (m);} @@ -288,7 +288,7 @@ squid_rn_match(void *v_arg, struct squid_radix_node_head *head) { t = t->rn_dupedkey; return t; on1: - test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */ + test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */ for (b = 7; (test >>= 1) > 0;) b--; matched_off = cp - v; @@ -405,7 +405,7 @@ on1: x = x->rn_r; else x = x->rn_l; - } while (b > (unsigned) x->rn_b); /* x->rn_b < b && x->rn_b >= 0 */ + } while (b > (unsigned) x->rn_b); /* x->rn_b < b && x->rn_b >= 0 */ #ifdef RN_DEBUG if (rn_debug) fprintf(stderr, "squid_rn_insert: Going In:\n"); @@ -418,7 +418,7 @@ on1: else p->rn_r = t; x->rn_p = t; - t->rn_p = p; /* frees x, p as temp vars below */ + t->rn_p = p; /* frees x, p as temp vars below */ if ((cp[t->rn_off] & t->rn_bmask) == 0) { t->rn_r = x; } else { @@ -504,13 +504,13 @@ squid_rn_addmask(void *n_arg, int search, int skip) { return (x); } -static int /* XXX: arbitrary ordering for non-contiguous masks */ +static int /* XXX: arbitrary ordering for non-contiguous masks */ rn_lexobetter(void *m_arg, void *n_arg) { register u_char *mp = m_arg, *np = n_arg, *lim; if (*mp > *np) - return 1; /* not really, but need to check longer one first */ + return 1; /* not really, but need to check longer one first */ if (*mp == *np) for (lim = mp + *mp; mp < lim;) if (*mp++ > *np++) @@ -573,7 +573,7 @@ squid_rn_addroute(void *v_arg, void *n_arg, struct squid_radix_node_head *head, return (0); if (netmask == 0 || (tt->rn_mask && - ((b_leaf < tt->rn_b) || /* index(netmask) > node */ + ((b_leaf < tt->rn_b) || /* index(netmask) > node */ squid_rn_refines(netmask, tt->rn_mask) || rn_lexobetter(netmask, tt->rn_mask)))) break; @@ -654,7 +654,7 @@ squid_rn_addroute(void *v_arg, void *n_arg, struct squid_radix_node_head *head, on2: /* Add new route to highest possible ancestor's list */ if ((netmask == 0) || (b > t->rn_b)) - return tt; /* can't lift at all */ + return tt; /* can't lift at all */ b_leaf = tt->rn_b; do { x = t; @@ -727,7 +727,7 @@ squid_rn_delete(void *v_arg, void *netmask_arg, struct squid_radix_node_head *he if (tt->rn_flags & RNF_NORMAL) { if (m->rm_leaf != tt || m->rm_refs > 0) { fprintf(stderr, "squid_rn_delete: inconsistent annotation\n"); - return 0; /* dangling ref could cause disaster */ + return 0; /* dangling ref could cause disaster */ } } else { if (m->rm_mask != tt->rn_mask) { @@ -740,7 +740,7 @@ squid_rn_delete(void *v_arg, void *netmask_arg, struct squid_radix_node_head *he b = -1 - tt->rn_b; t = saved_tt->rn_p; if (b > t->rn_b) - goto on1; /* Wasn't lifted at all */ + goto on1; /* Wasn't lifted at all */ do { x = t; t = t->rn_p; @@ -754,7 +754,7 @@ squid_rn_delete(void *v_arg, void *netmask_arg, struct squid_radix_node_head *he if (m == 0) { fprintf(stderr, "squid_rn_delete: couldn't find our annotation\n"); if (tt->rn_flags & RNF_NORMAL) - return (0); /* Dangling ref to us */ + return (0); /* Dangling ref to us */ } on1: /* @@ -968,3 +968,4 @@ squid_rn_init(void) exit(-1); } } + diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 21f580df34..2c3fc3d2e3 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -261,7 +261,7 @@ rfc1035NameUnpack(const char *buf, size_t sz, unsigned int *off, unsigned short /* blasted compression */ unsigned short s; unsigned int ptr; - if (rdepth > 64) { /* infinite pointer loop */ + if (rdepth > 64) { /* infinite pointer loop */ RFC1035_UNPACK_DEBUG; return 1; } @@ -291,11 +291,11 @@ rfc1035NameUnpack(const char *buf, size_t sz, unsigned int *off, unsigned short len = (size_t) c; if (len == 0) break; - if (len > (ns - no - 1)) { /* label won't fit */ + if (len > (ns - no - 1)) { /* label won't fit */ RFC1035_UNPACK_DEBUG; return 1; } - if ((*off) + len >= sz) { /* message is too short */ + if ((*off) + len >= sz) { /* message is too short */ RFC1035_UNPACK_DEBUG; return 1; } @@ -420,7 +420,7 @@ rfc1035RRUnpack(const char *buf, size_t sz, unsigned int *off, rfc1035_rr * RR) case RFC1035_TYPE_PTR: RR->rdata = (char*)xmalloc(RFC1035_MAXHOSTNAMESZ); rdata_off = *off; - RR->rdlength = 0; /* Filled in by rfc1035NameUnpack */ + RR->rdlength = 0; /* Filled in by rfc1035NameUnpack */ if (rfc1035NameUnpack(buf, sz, &rdata_off, &RR->rdlength, RR->rdata, RFC1035_MAXHOSTNAMESZ, 0)) { RFC1035_UNPACK_DEBUG; return 1; @@ -630,11 +630,11 @@ rfc1035MessageUnpack(const char *buf, i = (unsigned int) msg->ancount; recs = msg->answer = (rfc1035_rr*)xcalloc(i, sizeof(*recs)); for (j = 0; j < i; j++) { - if (off >= sz) { /* corrupt packet */ + if (off >= sz) { /* corrupt packet */ RFC1035_UNPACK_DEBUG; break; } - if (rfc1035RRUnpack(buf, sz, &off, &recs[j])) { /* corrupt RR */ + if (rfc1035RRUnpack(buf, sz, &off, &recs[j])) { /* corrupt RR */ RFC1035_UNPACK_DEBUG; break; } @@ -671,7 +671,7 @@ rfc1035BuildAQuery(const char *hostname, char *buf, size_t sz, unsigned short qi h.id = qid; h.qr = 0; h.rd = 1; - h.opcode = 0; /* QUERY */ + h.opcode = 0; /* QUERY */ h.qdcount = (unsigned int) 1; h.arcount = (edns_sz > 0 ? 1 : 0); offset += rfc1035HeaderPack(buf + offset, sz - offset, &h); @@ -718,7 +718,7 @@ rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t sz, unsigned s h.id = qid; h.qr = 0; h.rd = 1; - h.opcode = 0; /* QUERY */ + h.opcode = 0; /* QUERY */ h.qdcount = (unsigned int) 1; h.arcount = (edns_sz > 0 ? 1 : 0); offset += rfc1035HeaderPack(buf + offset, sz - offset, &h); @@ -840,3 +840,4 @@ main(int argc, char *argv[]) return 0; } #endif + diff --git a/lib/rfc1123.c b/lib/rfc1123.c index 4e55701001..583ed964b6 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -191,7 +191,7 @@ parse_rfc1123(const char *str) #if defined(_timezone) || _SQUID_WINDOWS_ t -= (_timezone + dst); #else - t -= (timezone + dst); + t -= (timezone + dst); #endif } #endif @@ -226,3 +226,4 @@ main() } #endif + diff --git a/lib/rfc1738.c b/lib/rfc1738.c index 7540d74be8..9a7e5b46ce 100644 --- a/lib/rfc1738.c +++ b/lib/rfc1738.c @@ -18,34 +18,34 @@ * any non-US-ASCII character or anything between 0x00 - 0x1F. */ static char rfc1738_unsafe_chars[] = { - (char) 0x3C, /* < */ - (char) 0x3E, /* > */ - (char) 0x22, /* " */ - (char) 0x23, /* # */ -#if 0 /* done in code */ - (char) 0x20, /* space */ - (char) 0x25, /* % */ + (char) 0x3C, /* < */ + (char) 0x3E, /* > */ + (char) 0x22, /* " */ + (char) 0x23, /* # */ +#if 0 /* done in code */ + (char) 0x20, /* space */ + (char) 0x25, /* % */ #endif - (char) 0x7B, /* { */ - (char) 0x7D, /* } */ - (char) 0x7C, /* | */ - (char) 0x5C, /* \ */ - (char) 0x5E, /* ^ */ - (char) 0x7E, /* ~ */ - (char) 0x5B, /* [ */ - (char) 0x5D, /* ] */ - (char) 0x60, /* ` */ - (char) 0x27 /* ' */ + (char) 0x7B, /* { */ + (char) 0x7D, /* } */ + (char) 0x7C, /* | */ + (char) 0x5C, /* \ */ + (char) 0x5E, /* ^ */ + (char) 0x7E, /* ~ */ + (char) 0x5B, /* [ */ + (char) 0x5D, /* ] */ + (char) 0x60, /* ` */ + (char) 0x27 /* ' */ }; static char rfc1738_reserved_chars[] = { - (char) 0x3b, /* ; */ - (char) 0x2f, /* / */ - (char) 0x3f, /* ? */ - (char) 0x3a, /* : */ - (char) 0x40, /* @ */ - (char) 0x3d, /* = */ - (char) 0x26 /* & */ + (char) 0x3b, /* ; */ + (char) 0x2f, /* / */ + (char) 0x3f, /* ? */ + (char) 0x3a, /* : */ + (char) 0x40, /* @ */ + (char) 0x3d, /* = */ + (char) 0x26 /* & */ }; /* @@ -145,13 +145,13 @@ fromhex(char ch) void rfc1738_unescape(char *s) { - int i, j; /* i is write, j is read */ + int i, j; /* i is write, j is read */ for (i = j = 0; s[j]; i++, j++) { s[i] = s[j]; if (s[j] != '%') { /* normal case, nothing more to do */ - } else if (s[j + 1] == '%') { /* %% case */ - j++; /* Skip % */ + } else if (s[j + 1] == '%') { /* %% case */ + j++; /* Skip % */ } else { /* decode */ int v1, v2, x; @@ -170,3 +170,4 @@ rfc1738_unescape(char *s) } s[i] = '\0'; } + diff --git a/lib/rfc2617.c b/lib/rfc2617.c index 44cdf90286..a05faf981a 100644 --- a/lib/rfc2617.c +++ b/lib/rfc2617.c @@ -103,7 +103,7 @@ DigestCalcHA1( } if (strcasecmp(pszAlg, "md5-sess") == 0) { HASHHEX HA1Hex; - CvtHex(HA1, HA1Hex); /* RFC2617 errata */ + CvtHex(HA1, HA1Hex); /* RFC2617 errata */ SquidMD5Init(&Md5Ctx); SquidMD5Update(&Md5Ctx, HA1Hex, HASHHEXLEN); SquidMD5Update(&Md5Ctx, ":", 1); @@ -118,15 +118,15 @@ DigestCalcHA1( /* calculate request-digest/response-digest as per HTTP Digest spec */ void DigestCalcResponse( - const HASHHEX HA1, /* H(A1) */ - const char *pszNonce, /* nonce from server */ - const char *pszNonceCount, /* 8 hex digits */ - const char *pszCNonce, /* client nonce */ - const char *pszQop, /* qop-value: "", "auth", "auth-int" */ - const char *pszMethod, /* method from the request */ - const char *pszDigestUri, /* requested URL */ - const HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ - HASHHEX Response /* request-digest or response-digest */ + const HASHHEX HA1, /* H(A1) */ + const char *pszNonce, /* nonce from server */ + const char *pszNonceCount, /* 8 hex digits */ + const char *pszCNonce, /* client nonce */ + const char *pszQop, /* qop-value: "", "auth", "auth-int" */ + const char *pszMethod, /* method from the request */ + const char *pszDigestUri, /* requested URL */ + const HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ + HASHHEX Response /* request-digest or response-digest */ ) { SquidMD5_CTX Md5Ctx; @@ -166,3 +166,4 @@ DigestCalcResponse( SquidMD5Final((unsigned char *) RespHash, &Md5Ctx); CvtHex(RespHash, Response); } + diff --git a/lib/rfc2671.c b/lib/rfc2671.c index d9d31208b0..b88b6ee58f 100644 --- a/lib/rfc2671.c +++ b/lib/rfc2671.c @@ -26,3 +26,4 @@ rfc2671RROptPack(char *buf, size_t sz, ssize_t edns_sz) return rfc1035RRPack(buf, sz, &opt); } + diff --git a/lib/rfc3596.c b/lib/rfc3596.c index 8fd6460d87..6cae278680 100644 --- a/lib/rfc3596.c +++ b/lib/rfc3596.c @@ -171,7 +171,7 @@ rfc3596BuildPTRQuery6(const struct in6_addr addr, char *buf, size_t sz, unsigned int main(int argc, char *argv[]) { -#define PACKET_BUFSZ 1024 +#define PACKET_BUFSZ 1024 char input[PACKET_BUFSZ]; char buf[PACKET_BUFSZ]; char rbuf[PACKET_BUFSZ]; @@ -336,3 +336,4 @@ return 0; } #endif + diff --git a/lib/rfcnb/byteorder.h b/lib/rfcnb/byteorder.h index dbf72a6152..5a080e1c83 100644 --- a/lib/rfcnb/byteorder.h +++ b/lib/rfcnb/byteorder.h @@ -86,3 +86,4 @@ #define RIVAL(buf,pos) IREV(IVAL(buf,pos)) #define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val)) #define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val)) + diff --git a/lib/rfcnb/rfcnb-common.h b/lib/rfcnb/rfcnb-common.h index 57634b351b..80d8e96121 100644 --- a/lib/rfcnb/rfcnb-common.h +++ b/lib/rfcnb/rfcnb-common.h @@ -37,17 +37,18 @@ extern "C" { #endif - /* A data structure we need */ +/* A data structure we need */ - typedef struct RFCNB_Pkt { +typedef struct RFCNB_Pkt { - char *data; /* The data in this portion */ - int len; - struct RFCNB_Pkt *next; + char *data; /* The data in this portion */ + int len; + struct RFCNB_Pkt *next; - } RFCNB_Pkt; +} RFCNB_Pkt; #if defined(__cplusplus) } #endif #endif /* _RFCNB_RFCNB_COMMON_H */ + diff --git a/lib/rfcnb/rfcnb-error.h b/lib/rfcnb/rfcnb-error.h index a9c4dd3f43..d8032657a4 100644 --- a/lib/rfcnb/rfcnb-error.h +++ b/lib/rfcnb/rfcnb-error.h @@ -37,12 +37,12 @@ extern "C" { #endif - /* Error responses */ +/* Error responses */ #define RFCNBE_Bad -1 /* Bad response */ #define RFCNBE_OK 0 - /* these should follow the spec ... is there one ? */ +/* these should follow the spec ... is there one ? */ #define RFCNBE_NoSpace 1 /* Could not allocate space for a struct */ #define RFCNBE_BadName 2 /* Could not translate a name */ @@ -61,12 +61,13 @@ extern "C" { #define RFCNBE_BadParam 15 /* Bad parameters passed ... */ #define RFCNBE_Timeout 16 /* IO Timed out */ - /* Text strings for the error responses */ +/* Text strings for the error responses */ - extern const char *RFCNB_Error_Strings[]; +extern const char *RFCNB_Error_Strings[]; #ifdef __cplusplus } #endif #endif /* _RFCNB_ERROR_H_ */ + diff --git a/lib/rfcnb/rfcnb-io.c b/lib/rfcnb/rfcnb-io.c index 16dfc3ce5f..fa51d6afdb 100644 --- a/lib/rfcnb/rfcnb-io.c +++ b/lib/rfcnb/rfcnb-io.c @@ -120,12 +120,12 @@ RFCNB_Set_Timeout(int seconds) if (sigaction(SIGALRM, &inact, &outact) < 0) return (-1); #else /* !HAVE_SIGACTION */ - invec.sv_handler = (void (*)()) rfcnb_alarm; - invec.sv_mask = 0; - invec.sv_flags = SV_INTERRUPT; + invec.sv_handler = (void (*)()) rfcnb_alarm; + invec.sv_mask = 0; + invec.sv_flags = SV_INTERRUPT; - if (sigvec(SIGALRM, &invec, &outvec) < 0) - return (-1); + if (sigvec(SIGALRM, &invec, &outvec) < 0) + return (-1); #endif /* !HAVE_SIGACTION */ } #endif /* !ORIGINAL_SAMBA_CODE ADAPTED SQUID CODE */ @@ -449,3 +449,4 @@ RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len) return (read_len + sizeof(RFCNB_Hdr)); } + diff --git a/lib/rfcnb/rfcnb-io.h b/lib/rfcnb/rfcnb-io.h index c612709d94..7d99beac63 100644 --- a/lib/rfcnb/rfcnb-io.h +++ b/lib/rfcnb/rfcnb-io.h @@ -40,3 +40,4 @@ int RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len); int RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len); #endif + diff --git a/lib/rfcnb/rfcnb-priv.h b/lib/rfcnb/rfcnb-priv.h index 6108aa70ba..0cc727ee32 100644 --- a/lib/rfcnb/rfcnb-priv.h +++ b/lib/rfcnb/rfcnb-priv.h @@ -160,3 +160,4 @@ extern int RFCNB_saved_errno; /* Save this from point of error */ #endif #endif /* _RFCNB_RFCNB_PRIV_H */ + diff --git a/lib/rfcnb/rfcnb-util.c b/lib/rfcnb/rfcnb-util.c index 16dab40ab6..8631bf516d 100644 --- a/lib/rfcnb/rfcnb-util.c +++ b/lib/rfcnb/rfcnb-util.c @@ -532,3 +532,4 @@ RFCNB_Session_Req(struct RFCNB_Con *con, RFCNB_Free_Pkt(pkt); return result; } + diff --git a/lib/rfcnb/rfcnb-util.h b/lib/rfcnb/rfcnb-util.h index 858256499e..c790356a7b 100644 --- a/lib/rfcnb/rfcnb-util.h +++ b/lib/rfcnb/rfcnb-util.h @@ -62,3 +62,4 @@ typedef void RFCNB_Prot_Print_Routine(FILE * fd, int dir, struct RFCNB_Pkt *pkt, extern RFCNB_Prot_Print_Routine *Prot_Print_Routine; #endif /* _RFCNB_RFCNB_UTIL_H */ + diff --git a/lib/rfcnb/rfcnb.h b/lib/rfcnb/rfcnb.h index 28e3241bfc..365119a4ae 100644 --- a/lib/rfcnb/rfcnb.h +++ b/lib/rfcnb/rfcnb.h @@ -42,37 +42,38 @@ extern "C" { #endif - /* Defines we need */ +/* Defines we need */ #define RFCNB_Default_Port 139 - struct RFCNB_Con; +struct RFCNB_Con; - /* Definition of routines we define */ +/* Definition of routines we define */ - void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address, - int port); +void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address, + int port); - int RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length); +int RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length); - int RFCNB_Recv(void *Con_Handle, struct RFCNB_Pkt *Data, int Length); +int RFCNB_Recv(void *Con_Handle, struct RFCNB_Pkt *Data, int Length); - int RFCNB_Hangup(struct RFCNB_Con *con_Handle); +int RFCNB_Hangup(struct RFCNB_Con *con_Handle); - void *RFCNB_Listen(void); +void *RFCNB_Listen(void); - void RFCNB_Get_Error(char *buffer, int buf_len); +void RFCNB_Get_Error(char *buffer, int buf_len); - int RFCNB_Get_Last_Error(void); +int RFCNB_Get_Last_Error(void); - void RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt); +void RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt); - int RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, int yn); +int RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, int yn); - struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n); +struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n); #ifdef __cplusplus } #endif #endif /* _RFCNB_RFCNB_H */ + diff --git a/lib/rfcnb/session.c b/lib/rfcnb/session.c index d76bbf34a5..733f9a16d7 100644 --- a/lib/rfcnb/session.c +++ b/lib/rfcnb/session.c @@ -330,3 +330,4 @@ RFCNB_Get_Last_Error() { return (RFCNB_errno); } + diff --git a/lib/rfcnb/std-includes.h b/lib/rfcnb/std-includes.h index feec137886..215ba34186 100644 --- a/lib/rfcnb/std-includes.h +++ b/lib/rfcnb/std-includes.h @@ -62,3 +62,4 @@ typedef short int16; #endif #endif /* _RFCNB_STD_INCLUDES_H */ + diff --git a/lib/smblib/exper.c b/lib/smblib/exper.c index ee8c9778e0..3e2472194c 100644 --- a/lib/smblib/exper.c +++ b/lib/smblib/exper.c @@ -371,7 +371,7 @@ int SMB_Logon_TCon_Open(SMB_Handle_Type Con_Handle, char *UserName, { struct RFCNB_Pkt *pkt; int param_len, i, pkt_len, tcon_len, tcon_param_len, open_len, - open_param_len, header_len; + open_param_len, header_len; struct SMB_File_Def *file_tmp; SMB_Tree_Handle tree; char *p, *AndXCom; diff --git a/lib/smblib/file.c b/lib/smblib/file.c index 080db5b350..9415fa5c2b 100644 --- a/lib/smblib/file.c +++ b/lib/smblib/file.c @@ -1323,3 +1323,4 @@ int SMB_Search(SMB_Tree_Handle tree, return(ret_count); } + diff --git a/lib/smblib/find_password.c b/lib/smblib/find_password.c index 8e5be8b03a..43881700c2 100644 --- a/lib/smblib/find_password.c +++ b/lib/smblib/find_password.c @@ -288,3 +288,4 @@ main(int argc, char *argv[]) fprintf(stderr, "Passwords exhausted."); } + diff --git a/lib/smblib/md4.c b/lib/smblib/md4.c index 2436a7fabc..cd2dd30926 100644 --- a/lib/smblib/md4.c +++ b/lib/smblib/md4.c @@ -220,3 +220,4 @@ mdfour(unsigned char *out, unsigned char *in, int n) A = B = C = D = 0; } + diff --git a/lib/smblib/md4.h b/lib/smblib/md4.h index 0b44c9216d..444ed11f58 100644 --- a/lib/smblib/md4.h +++ b/lib/smblib/md4.h @@ -12,3 +12,4 @@ extern void mdfour(unsigned char *out, unsigned char *in, int n); #endif /* __SMB_LM_SMBVAL_MD4_H */ + diff --git a/lib/smblib/smb-errors.c b/lib/smblib/smb-errors.c index 08d0790390..b04174bd2e 100644 --- a/lib/smblib/smb-errors.c +++ b/lib/smblib/smb-errors.c @@ -226,3 +226,4 @@ int SMB_Get_SMB_Error_Msg(int err_class, int err_code, char *msg_buf, int len) return(strlen(msg_buf)); } + diff --git a/lib/smblib/smbdes.c b/lib/smblib/smbdes.c index a8a3ff9461..f0d82a203d 100644 --- a/lib/smblib/smbdes.c +++ b/lib/smblib/smbdes.c @@ -125,49 +125,57 @@ static int sbox[8][4][16] = { {14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7}, {0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8}, {4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0}, - {15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13}}, + {15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13} + }, { {15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10}, {3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5}, {0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15}, - {13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9}}, + {13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9} + }, { {10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8}, {13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1}, {13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7}, - {1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12}}, + {1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12} + }, { {7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15}, {13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9}, {10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4}, - {3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14}}, + {3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14} + }, { {2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9}, {14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6}, {4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14}, - {11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3}}, + {11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3} + }, { {12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11}, {10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8}, {9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6}, - {4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13}}, + {4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13} + }, { {4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1}, {13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6}, {1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2}, - {6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12}}, + {6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12} + }, { {13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7}, {1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2}, {7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8}, - {2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11}} + {2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11} + } }; static void @@ -368,3 +376,4 @@ cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key) key2[0] = key[7]; smbhash(out, buf, key2); } + diff --git a/lib/smblib/smbdes.h b/lib/smblib/smbdes.h index ecb23feca5..f4f49b3ea7 100644 --- a/lib/smblib/smbdes.h +++ b/lib/smblib/smbdes.h @@ -11,3 +11,4 @@ void E_P16(unsigned char *p14, unsigned char *p16); void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); void cred_hash1(unsigned char *out, unsigned char *in, unsigned char *key); void cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key); + diff --git a/lib/smblib/smbencrypt.c b/lib/smblib/smbencrypt.c index 66b6805a2f..e04af7d464 100644 --- a/lib/smblib/smbencrypt.c +++ b/lib/smblib/smbencrypt.c @@ -127,7 +127,7 @@ E_md4hash(uchar * passwd, uchar * p16) len = 128; /* Password must be converted to NT unicode */ _my_mbstowcs(wpwd, passwd, len); - wpwd[len] = 0; /* Ensure string is null terminated */ + wpwd[len] = 0; /* Ensure string is null terminated */ /* Calculate length in bytes */ len = _my_wcslen(wpwd) * sizeof(int16_t); @@ -219,3 +219,4 @@ strupper(char *s) } } } + diff --git a/lib/smblib/smbencrypt.h b/lib/smblib/smbencrypt.h index faeafadd86..f1e4541c27 100644 --- a/lib/smblib/smbencrypt.h +++ b/lib/smblib/smbencrypt.h @@ -13,11 +13,12 @@ extern "C" { #endif - void SMBencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24); - void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24); - void nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16); +void SMBencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24); +void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24); +void nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16); #ifdef __cplusplus } #endif #endif /* _SMBLIB_SMBENCRYPT_H */ + diff --git a/lib/smblib/smblib-api.c b/lib/smblib/smblib-api.c index 616ee3a07c..ff00e8886e 100644 --- a/lib/smblib/smblib-api.c +++ b/lib/smblib/smblib-api.c @@ -388,3 +388,4 @@ int SMBapi_NetShareEnum(SMB_Tree_Handle tree, char *enum_buf, int bufsiz, { } + diff --git a/lib/smblib/smblib-common.h b/lib/smblib/smblib-common.h index 9fd789fb6d..5c8884c0a0 100644 --- a/lib/smblib/smblib-common.h +++ b/lib/smblib/smblib-common.h @@ -37,17 +37,17 @@ extern "C" { #endif - /* To get the error class we want the first 8 bits */ - /* Because we just grab 4bytes from the SMB header, we have to re-order */ - /* here, but it makes the NtStatus part easier in future */ +/* To get the error class we want the first 8 bits */ +/* Because we just grab 4bytes from the SMB header, we have to re-order */ +/* here, but it makes the NtStatus part easier in future */ #define SMBlib_Error_Class(p) (p & 0x000000FF) - /* To get the error code, we want the bottom 16 bits */ +/* To get the error code, we want the bottom 16 bits */ #define SMBlib_Error_Code(p) (((unsigned int)p & 0xFFFF0000) >>16) - /* Error CLASS codes and etc ... */ +/* Error CLASS codes and etc ... */ #define SMBC_SUCCESS 0 #define SMBC_ERRDOS 0x01 @@ -55,13 +55,13 @@ extern "C" { #define SMBC_ERRHRD 0x03 #define SMBC_ERRCMD 0xFF - /* Success error codes */ +/* Success error codes */ #define SMBS_BUFFERED 0x54 #define SMBS_LOGGED 0x55 #define SMBS_DISPLAYED 0x56 - /* ERRDOS Error codes */ +/* ERRDOS Error codes */ #define SMBD_badfunc 0x01 #define SMBD_badfile 0x02 @@ -85,7 +85,7 @@ extern "C" { #define SMBD_errlock 0x21 #define SMBD_filexists 0x50 - /* Server errors ... */ +/* Server errors ... */ #define SMBV_error 0x01 /* Generic error */ #define SMBV_badpw 0x02 @@ -104,7 +104,7 @@ extern "C" { #define SMBV_rmuns 0x57 #define SMBV_nosupport 0xFFFF - /* Hardware error codes ... */ +/* Hardware error codes ... */ #define SMBH_nowrite 0x13 #define SMBH_badunit 0x14 @@ -121,7 +121,7 @@ extern "C" { #define SMBH_general 0x1F #define SMBH_badshare 0x20 - /* Access mode defines ... */ +/* Access mode defines ... */ #define SMB_AMODE_WTRU 0x4000 #define SMB_AMODE_NOCACHE 0x1000 @@ -140,7 +140,7 @@ extern "C" { #define SMB_AMODE_LOCMRAN 0x0200 #define SMB_AMODE_LOCRAL 0x0300 - /* File attribute encoding ... */ +/* File attribute encoding ... */ #define SMB_FA_ORD 0x00 #define SMB_FA_ROF 0x01 @@ -150,7 +150,7 @@ extern "C" { #define SMB_FA_DIR 0x10 #define SMB_FA_ARC 0x20 - /* Define the protocol types ... */ +/* Define the protocol types ... */ #define SMB_P_Unknown -1 /* Hmmm, is this smart? */ #define SMB_P_Core 0 @@ -163,13 +163,13 @@ extern "C" { #define SMB_P_LanMan2_1 7 #define SMB_P_NT1 8 - /* SMBlib return codes */ - /* We want something that indicates whether or not the return code was a */ - /* remote error, a local error in SMBlib or returned from lower layer ... */ - /* Wonder if this will work ... */ - /* SMBlibE_Remote = 1 indicates remote error */ - /* SMBlibE_ values < 0 indicate local error with more info available */ - /* SMBlibE_ values >1 indicate local from SMBlib code errors? */ +/* SMBlib return codes */ +/* We want something that indicates whether or not the return code was a */ +/* remote error, a local error in SMBlib or returned from lower layer ... */ +/* Wonder if this will work ... */ +/* SMBlibE_Remote = 1 indicates remote error */ +/* SMBlibE_ values < 0 indicate local error with more info available */ +/* SMBlibE_ values >1 indicate local from SMBlib code errors? */ #define SMBlibE_Success 0 #define SMBlibE_Remote 1 /* Remote error, get more info from con */ @@ -187,74 +187,75 @@ extern "C" { #define SMBlibE_ProtUnknown 12 /* Protocol unknown */ #define SMBlibE_NoSuchMsg 13 /* Keep this up to date */ - /* the default SMB protocols supported by this library. */ - extern const char *SMB_Prots[]; +/* the default SMB protocols supported by this library. */ +extern const char *SMB_Prots[]; - typedef struct { /* A structure for a Dirent */ +typedef struct { /* A structure for a Dirent */ - unsigned char resume_key[21]; /* Don't touch this */ - unsigned char file_attributes; /* Attributes of file */ - unsigned int date_time; /* date and time of last mod */ - unsigned int size; - char filename[13]; /* The name of the file */ + unsigned char resume_key[21]; /* Don't touch this */ + unsigned char file_attributes; /* Attributes of file */ + unsigned int date_time; /* date and time of last mod */ + unsigned int size; + char filename[13]; /* The name of the file */ - } SMB_CP_dirent; +} SMB_CP_dirent; - typedef struct SMB_Connect_Def * SMB_Handle_Type; +typedef struct SMB_Connect_Def * SMB_Handle_Type; - typedef struct SMB_Tree_Structure * SMB_Tree_Handle; +typedef struct SMB_Tree_Structure * SMB_Tree_Handle; - /* A Tree_Structure */ +/* A Tree_Structure */ - struct SMB_Tree_Structure { +struct SMB_Tree_Structure { - SMB_Tree_Handle next, prev; - SMB_Handle_Type con; - char path[129]; - char device_type[20]; - int mbs; /* Local MBS */ - int tid; + SMB_Tree_Handle next, prev; + SMB_Handle_Type con; + char path[129]; + char device_type[20]; + int mbs; /* Local MBS */ + int tid; - }; +}; - struct SMB_Connect_Def { - SMB_Handle_Type Next_Con, Prev_Con; /* Next and previous conn */ - int protocol; /* What is the protocol */ - int prot_IDX; /* And what is the index */ - void *Trans_Connect; /* The connection */ +struct SMB_Connect_Def { + SMB_Handle_Type Next_Con, Prev_Con; /* Next and previous conn */ + int protocol; /* What is the protocol */ + int prot_IDX; /* And what is the index */ + void *Trans_Connect; /* The connection */ - /* All these strings should be malloc'd */ + /* All these strings should be malloc'd */ - char service[80], username[80], password[80], desthost[80], sock_options[80]; - char address[80], myname[80]; + char service[80], username[80], password[80], desthost[80], sock_options[80]; + char address[80], myname[80]; - SMB_Tree_Handle first_tree, last_tree; /* List of trees on this server */ + SMB_Tree_Handle first_tree, last_tree; /* List of trees on this server */ - int gid; /* Group ID, do we need it? */ - int mid; /* Multiplex ID? We might need one per con */ - int pid; /* Process ID */ + int gid; /* Group ID, do we need it? */ + int mid; /* Multiplex ID? We might need one per con */ + int pid; /* Process ID */ - int uid; /* Authenticated user id. */ + int uid; /* Authenticated user id. */ - /* It is pretty clear that we need to bust some of */ - /* these out into a per TCon record, as there may */ - /* be multiple TCon's per server, etc ... later */ + /* It is pretty clear that we need to bust some of */ + /* these out into a per TCon record, as there may */ + /* be multiple TCon's per server, etc ... later */ - int port; /* port to use in case not default, this is a TCPism! */ + int port; /* port to use in case not default, this is a TCPism! */ - int max_xmit; /* Max xmit permitted by server */ - int Security; /* 0 = share, 1 = user */ - int Raw_Support; /* bit 0 = 1 = Read Raw supported, 1 = 1 Write raw */ - int encrypt_passwords; /* 1 = do , 0 = don't */ - int MaxMPX, MaxVC, MaxRaw; - unsigned int SessionKey, Capabilities; - int SvrTZ; /* Server Time Zone */ - int Encrypt_Key_Len; - char Encrypt_Key[80], Domain[80], PDomain[80], OSName[80], LMType[40]; - char Svr_OS[80], Svr_LMType[80], Svr_PDom[80]; - }; + int max_xmit; /* Max xmit permitted by server */ + int Security; /* 0 = share, 1 = user */ + int Raw_Support; /* bit 0 = 1 = Read Raw supported, 1 = 1 Write raw */ + int encrypt_passwords; /* 1 = do , 0 = don't */ + int MaxMPX, MaxVC, MaxRaw; + unsigned int SessionKey, Capabilities; + int SvrTZ; /* Server Time Zone */ + int Encrypt_Key_Len; + char Encrypt_Key[80], Domain[80], PDomain[80], OSName[80], LMType[40]; + char Svr_OS[80], Svr_LMType[80], Svr_PDom[80]; +}; #ifdef __cplusplus } #endif #endif /* _SMBLIB_SMBLIB_COMMON_H */ + diff --git a/lib/smblib/smblib-priv.h b/lib/smblib/smblib-priv.h index 300f297e84..2650199d2d 100644 --- a/lib/smblib/smblib-priv.h +++ b/lib/smblib/smblib-priv.h @@ -552,3 +552,4 @@ extern int SMBlib_SMB_Error; /* last Error */ void SMB_Get_My_Name(char *name, int len); #endif /* _SMBLIB_PRIV_H_ */ + diff --git a/lib/smblib/smblib-util.c b/lib/smblib/smblib-util.c index ae7420aec4..f9c65a2304 100644 --- a/lib/smblib/smblib-util.c +++ b/lib/smblib/smblib-util.c @@ -825,3 +825,4 @@ void SMB_Get_Error_Msg(int msg, char *msgbuf, int len) } } + diff --git a/lib/smblib/smblib.c b/lib/smblib/smblib.c index 7b0b84181f..14a50f4e70 100644 --- a/lib/smblib/smblib.c +++ b/lib/smblib/smblib.c @@ -588,3 +588,4 @@ int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle) return(0); } + diff --git a/lib/smblib/smblib.h b/lib/smblib/smblib.h index ccbd28225e..68e4a559b7 100644 --- a/lib/smblib/smblib.h +++ b/lib/smblib/smblib.h @@ -41,91 +41,92 @@ extern "C" { #endif - /* Just define all the entry points */ +/* Just define all the entry points */ - /* Create a handle to allow us to set/override some parameters ... */ +/* Create a handle to allow us to set/override some parameters ... */ - SMB_Handle_Type SMB_Create_Con_Handle(void); +SMB_Handle_Type SMB_Create_Con_Handle(void); - /* Connect to a server, but do not do a tree con etc ... */ +/* Connect to a server, but do not do a tree con etc ... */ - SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, - char *server, - const char *NTdomain); +SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, + char *server, + const char *NTdomain); - /* Connect to a server and give us back a handle. If Con == NULL, create */ - /* The handle and populate it with defaults */ +/* Connect to a server and give us back a handle. If Con == NULL, create */ +/* The handle and populate it with defaults */ - SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle, - SMB_Tree_Handle *tree, - char *service, - char *username, - char *password); +SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle, + SMB_Tree_Handle *tree, + char *service, + char *username, + char *password); - int SMB_Init(void); +int SMB_Init(void); - int SMB_Logon_Server(SMB_Handle_Type Con_Handle, - char *UserName, - char *PassWord, - const char *NtDomain, - int PreCrypted); +int SMB_Logon_Server(SMB_Handle_Type Con_Handle, + char *UserName, + char *PassWord, + const char *NtDomain, + int PreCrypted); - /* Negotiate a protocol */ +/* Negotiate a protocol */ - int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]); +int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]); - /* Connect to a tree ... */ +/* Connect to a tree ... */ - SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, - SMB_Tree_Handle tree, - const char *path, - const char *password, - const char *dev); +SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, + SMB_Tree_Handle tree, + const char *path, + const char *password, + const char *dev); - /* Disconnect a tree ... */ +/* Disconnect a tree ... */ - int SMB_TreeDisconect(void *tree_handle); +int SMB_TreeDisconect(void *tree_handle); - /* Open a file */ +/* Open a file */ - void *SMB_Open(void *tree_handle, - void *file_handle, - char *file_name, - unsigned short mode, - unsigned short search); +void *SMB_Open(void *tree_handle, + void *file_handle, + char *file_name, + unsigned short mode, + unsigned short search); - /* Close a file */ +/* Close a file */ - int SMB_Close(void *file_handle); +int SMB_Close(void *file_handle); - /* Disconnect from server. Has flag to specify whether or not we keep the */ - /* handle. */ +/* Disconnect from server. Has flag to specify whether or not we keep the */ +/* handle. */ - int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle); +int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle); - void *SMB_Create(void *Tree_Handle, - void *File_Handle, - char *file_name, - short search); +void *SMB_Create(void *Tree_Handle, + void *File_Handle, + char *file_name, + short search); - int SMB_Delete(void *tree, char *file_name, short search); +int SMB_Delete(void *tree, char *file_name, short search); - int SMB_Create_Dir(void *tree, char *dir_name); +int SMB_Create_Dir(void *tree, char *dir_name); - int SMB_Delete_Dir(void *tree, char *dir_name); +int SMB_Delete_Dir(void *tree, char *dir_name); - int SMB_Check_Dir(void *tree, char *dir_name); +int SMB_Check_Dir(void *tree, char *dir_name); - int SMB_Get_Last_Error(void); +int SMB_Get_Last_Error(void); - int SMB_Get_Last_SMB_Err(void); +int SMB_Get_Last_SMB_Err(void); - void SMB_Get_Error_Msg(int msg, char *msgbuf, int len); +void SMB_Get_Error_Msg(int msg, char *msgbuf, int len); - void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass, - char *service, char *st); +void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass, + char *service, char *st); #ifdef __cplusplus } #endif #endif /* _SMBLIB_SMBLIB_H */ + diff --git a/lib/smblib/std-defines.h b/lib/smblib/std-defines.h index 013824dd7c..a0cdfe5317 100644 --- a/lib/smblib/std-defines.h +++ b/lib/smblib/std-defines.h @@ -49,3 +49,4 @@ #define FALSE 0 #endif /* _SMBLIB_STD_DEFINES_H */ + diff --git a/lib/snmplib/asn1.c b/lib/snmplib/asn1.c index 6dd638dffa..362f993cca 100644 --- a/lib/snmplib/asn1.c +++ b/lib/snmplib/asn1.c @@ -90,12 +90,12 @@ #include "snmp_api_error.h" u_char * -asn_build_header(u_char * data, /* IN - ptr to start of object */ - int *datalength, /* IN/OUT - # of valid bytes */ +asn_build_header(u_char * data, /* IN - ptr to start of object */ + int *datalength, /* IN/OUT - # of valid bytes */ /* left in buffer */ - u_char type, /* IN - ASN type of object */ + u_char type, /* IN - ASN type of object */ int length) -{ /* IN - length of object */ +{ /* IN - length of object */ /* Truth is 0 'cause we don't know yet */ return (asn_build_header_with_truth(data, datalength, type, length, 0)); } @@ -154,7 +154,7 @@ asn_parse_int(u_char * data, int *datalength, /* Is the int negative? */ if (*bufp & 0x80) - value = -1; /* integer is negative */ + value = -1; /* integer is negative */ /* Extract the bytes */ while (asn_length--) @@ -220,7 +220,7 @@ asn_parse_unsigned_int(u_char * data, int *datalength, /* Is the int negative? */ if (*bufp & 0x80) - value = -1; /* integer is negative */ + value = -1; /* integer is negative */ /* Extract the bytes */ while (asn_length--) @@ -551,7 +551,7 @@ asn_build_sequence(u_char * data, int *datalength, { *datalength -= 4; if (*datalength < 0) { - *datalength += 4; /* fix up before punting */ + *datalength += 4; /* fix up before punting */ snmp_set_api_error(SNMPERR_ASN_ENCODE); return (NULL); } @@ -579,7 +579,7 @@ asn_parse_length(u_char * data, u_int * length) u_char lengthbyte = *data; if (lengthbyte & ASN_LONG_LEN) { - lengthbyte &= ~ASN_LONG_LEN; /* turn MSb off */ + lengthbyte &= ~ASN_LONG_LEN; /* turn MSb off */ if (lengthbyte == 0) { snmp_set_api_error(SNMPERR_ASN_DECODE); @@ -629,7 +629,7 @@ asn_build_length(u_char * data, int *datalength, } *data++ = (u_char) (0x01 | ASN_LONG_LEN); *data++ = (u_char) length; - } else { /* 0xFF < length <= 0xFFFF */ + } else { /* 0xFF < length <= 0xFFFF */ if (*datalength < 3) { snmp_set_api_error(SNMPERR_ASN_ENCODE); return (NULL); @@ -707,11 +707,11 @@ asn_parse_objid(u_char * data, int *datalength, objid[0] = objid[1] = 0; length = asn_length; - (*objidlength)--; /* account for expansion of first byte */ + (*objidlength)--; /* account for expansion of first byte */ while (length > 0 && (*objidlength)-- > 0) { subidentifier = 0; - do { /* shift and add in low order 7 bits */ + do { /* shift and add in low order 7 bits */ subidentifier = (subidentifier << 7) + (*(u_char *) bufp & ~ASN_BIT8); length--; @@ -788,15 +788,15 @@ asn_build_objid(u_char * data, int *datalength, while (objidlength-- > 0) { subid = *op++; - if (subid < 127) { /* off by one? */ + if (subid < 127) { /* off by one? */ *bp++ = subid; } else { - mask = 0x7F; /* handle subid == 0 case */ + mask = 0x7F; /* handle subid == 0 case */ bits = 0; /* testmask *MUST* !!!! be of an unsigned type */ for (testmask = 0x7F, testbits = 0; testmask != 0; testmask <<= 7, testbits += 7) { - if (subid & testmask) { /* if any bits set */ + if (subid & testmask) { /* if any bits set */ mask = testmask; bits = testbits; } @@ -1012,3 +1012,4 @@ asn_build_exception(u_char * data, int *datalength, u_char type) { return (asn_build_header_with_truth(data, datalength, type, 0, 1)); } + diff --git a/lib/snmplib/coexistance.c b/lib/snmplib/coexistance.c index 914fbdc24a..8284337f56 100644 --- a/lib/snmplib/coexistance.c +++ b/lib/snmplib/coexistance.c @@ -132,3 +132,4 @@ snmp_coexist_V2toV1(struct snmp_pdu *PDU) return (0); } } + diff --git a/lib/snmplib/mib.c b/lib/snmplib/mib.c index 14cd25bf3d..ec8f28b020 100644 --- a/lib/snmplib/mib.c +++ b/lib/snmplib/mib.c @@ -7,7 +7,7 @@ */ /*********************************************************** - Copyright 1988, 1989 by Carnegie Mellon University + Copyright 1988, 1989 by Carnegie Mellon University All Rights Reserved @@ -229,7 +229,7 @@ int read_objid(input, output, out_len) char *input; oid *output; -int *out_len; /* number of subid's in "output" */ +int *out_len; /* number of subid's in "output" */ { struct snmp_mib_tree *root = Mib; oid *op = output; @@ -263,12 +263,12 @@ int *out_len; /* number of subid's in "output" */ void print_objid(objid, objidlen) oid *objid; -int objidlen; /* number of subidentifiers */ +int objidlen; /* number of subidentifiers */ { char buf[256]; struct snmp_mib_tree *subtree = Mib; - *buf = '.'; /* this is a fully qualified name */ + *buf = '.'; /* this is a fully qualified name */ get_symbol(objid, objidlen, subtree, buf + 1); snmplib_debug(7, "%s\n", buf); @@ -278,11 +278,11 @@ void sprint_objid(buf, objid, objidlen) char *buf; oid *objid; -int objidlen; /* number of subidentifiers */ +int objidlen; /* number of subidentifiers */ { struct snmp_mib_tree *subtree = Mib; - *buf = '.'; /* this is a fully qualified name */ + *buf = '.'; /* this is a fully qualified name */ get_symbol(objid, objidlen, subtree, buf + 1); } @@ -303,12 +303,12 @@ char *buf; } /* subtree not found */ - while (objidlen--) { /* output rest of name, uninterpreted */ + while (objidlen--) { /* output rest of name, uninterpreted */ sprintf(buf, "%u.", *objid++); while (*buf) buf++; } - *(buf - 1) = '\0'; /* remove trailing dot */ + *(buf - 1) = '\0'; /* remove trailing dot */ return NULL; found: @@ -333,3 +333,4 @@ print_oid_nums(oid * O, int len) for (x = 0; x < len; x++) printf(".%u", O[x]); } + diff --git a/lib/snmplib/parse.c b/lib/snmplib/parse.c index 5a1aea8b1a..e93cc03bc5 100644 --- a/lib/snmplib/parse.c +++ b/lib/snmplib/parse.c @@ -7,7 +7,7 @@ */ /*********************************************************** - Copyright 1989 by Carnegie Mellon University + Copyright 1989 by Carnegie Mellon University All Rights Reserved @@ -103,40 +103,40 @@ struct subid { */ struct node { struct node *next; - char label[64]; /* This node's (unique) textual name */ - u_int subid; /* This node's integer subidentifier */ - char parent[64]; /* The parent's textual name */ - int type; /* The type of object this represents */ - struct enum_list *enums; /* (optional) list of enumerated integers (otherwise NULL) */ + char label[64]; /* This node's (unique) textual name */ + u_int subid; /* This node's integer subidentifier */ + char parent[64]; /* The parent's textual name */ + int type; /* The type of object this represents */ + struct enum_list *enums; /* (optional) list of enumerated integers (otherwise NULL) */ }; int Line = 1; /* types of tokens */ -#define CONTINUE -1 +#define CONTINUE -1 #define ENDOFFILE 0 -#define LABEL 1 -#define SUBTREE 2 -#define SYNTAX 3 +#define LABEL 1 +#define SUBTREE 2 +#define SYNTAX 3 #undef OBJID -#define OBJID 4 +#define OBJID 4 #define OCTETSTR 5 #undef INTEGER -#define INTEGER 6 -#define NETADDR 7 -#define IPADDR 8 -#define COUNTER 9 -#define GAUGE 10 +#define INTEGER 6 +#define NETADDR 7 +#define IPADDR 8 +#define COUNTER 9 +#define GAUGE 10 #define TIMETICKS 11 -#define SNMP_OPAQUE 12 -#define NUL 13 +#define SNMP_OPAQUE 12 +#define NUL 13 #define SEQUENCE 14 -#define OF 15 /* SEQUENCE OF */ -#define OBJTYPE 16 -#define ACCESS 17 +#define OF 15 /* SEQUENCE OF */ +#define OBJTYPE 16 +#define ACCESS 17 #define READONLY 18 #define READWRITE 19 -#define WRITEONLY 20 +#define WRITEONLY 20 #undef NOACCESS #define NOACCESS 21 #define SNMP_STATUS 22 @@ -144,25 +144,25 @@ int Line = 1; #define SNMP_OPTIONAL 24 #define OBSOLETE 25 #define RECOMMENDED 26 -#define PUNCT 27 -#define EQUALS 28 -#define NUMBER 29 +#define PUNCT 27 +#define EQUALS 28 +#define NUMBER 29 #define LEFTBRACKET 30 #define RIGHTBRACKET 31 -#define LEFTPAREN 32 +#define LEFTPAREN 32 #define RIGHTPAREN 33 -#define COMMA 34 +#define COMMA 34 /* For SNMPv2 SMI pseudo-compliance */ #define DESCRIPTION 35 #define INDEX 36 #define QUOTE 37 struct tok { - const char *name; /* token name */ - int len; /* length not counting nul */ - int token; /* value */ - int hash; /* hash of name */ - struct tok *next; /* pointer to next in hash table */ + const char *name; /* token name */ + int len; /* length not counting nul */ + int token; /* value */ + int hash; /* hash of name */ + struct tok *next; /* pointer to next in hash table */ }; struct tok tokens[] = { @@ -213,8 +213,8 @@ struct tok tokens[] = { {NULL} }; -#define HASHSIZE 32 -#define BUCKET(x) (x & 0x01F) +#define HASHSIZE 32 +#define BUCKET(x) (x & 0x01F) static struct tok *buckets[HASHSIZE]; @@ -233,7 +233,7 @@ hash_init(void) tp->hash = h; b = BUCKET(h); if (buckets[b]) - tp->next = buckets[b]; /* BUG ??? */ + tp->next = buckets[b]; /* BUG ??? */ buckets[b] = tp; } } @@ -378,21 +378,21 @@ do_subtree(struct snmp_mib_tree *root, struct node **nodes) oldnp = np; } else { if (child_list == NULL) { - child_list = childp = np; /* first entry in child list */ + child_list = childp = np; /* first entry in child list */ } else { childp->next = np; childp = np; } /* take this node out of the node list */ if (oldnp == NULL) { - *headp = np->next; /* fix root of node list */ + *headp = np->next; /* fix root of node list */ } else { - oldnp->next = np->next; /* link around this node */ + oldnp->next = np->next; /* link around this node */ } } } if (childp) - childp->next = 0; /* re-terminate list */ + childp->next = 0; /* re-terminate list */ /* * Take each element in the child list and place it into the tree. */ @@ -405,7 +405,7 @@ do_subtree(struct snmp_mib_tree *root, struct node **nodes) tp->subid = np->subid; tp->type = translation_table[np->type]; tp->enums = np->enums; - np->enums = NULL; /* so we don't free them later */ + np->enums = NULL; /* so we don't free them later */ if (root->child_list == NULL) { root->child_list = tp; } else if (peer) { @@ -413,7 +413,7 @@ do_subtree(struct snmp_mib_tree *root, struct node **nodes) } peer = tp; /* if (tp->type == TYPE_OTHER) */ - do_subtree(tp, nodes); /* recurse on this child if it isn't an end node */ + do_subtree(tp, nodes); /* recurse on this child if it isn't an end node */ } /* free all nodes that were copied into tree */ oldnp = NULL; @@ -558,8 +558,8 @@ get_token(register FILE *fp, register char *token) * { iso org(3) dod(6) 1 } * and creates several nodes, one for each parent-child pair. * Returns NULL on error. - * register struct subid *SubOid; an array of subids - * int length; the length of the array + * register struct subid *SubOid; an array of subids + * int length; the length of the array */ static int getoid(register FILE *fp, register struct subid *SubOid, int length) @@ -740,7 +740,7 @@ parse_asntype(FILE *fp) type = get_token(fp, token); if (type != SEQUENCE) { - print_error("Not a sequence", token, type); /* should we handle this */ + print_error("Not a sequence", token, type); /* should we handle this */ return ENDOFFILE; } while ((type = get_token(fp, token)) != ENDOFFILE) { @@ -1115,3 +1115,4 @@ read_mib(char *filename) { tree = build_tree(nodes); return (tree); } + diff --git a/lib/snmplib/snmp_api.c b/lib/snmplib/snmp_api.c index 4813767ae7..3c9a0c4ce4 100644 --- a/lib/snmplib/snmp_api.c +++ b/lib/snmplib/snmp_api.c @@ -158,3 +158,4 @@ snmp_parse(struct snmp_session * session, return (bufp); } + diff --git a/lib/snmplib/snmp_api_error.c b/lib/snmplib/snmp_api_error.c index 06001e2d9f..0d55fa0188 100644 --- a/lib/snmplib/snmp_api_error.c +++ b/lib/snmplib/snmp_api_error.c @@ -51,8 +51,8 @@ static const char *api_errors[17] = { "Unknown session", "Too Long", - "Encoding ASN.1 Information", /* 6 */ - "Decoding ASN.1 Information", /* 7 */ + "Encoding ASN.1 Information", /* 6 */ + "Decoding ASN.1 Information", /* 7 */ "PDU Translation error", "OS Error", "Invalid Textual OID", @@ -94,3 +94,4 @@ api_errstring(int snmp_errnumber) { return (snmp_api_error(snmp_errnumber)); } + diff --git a/lib/snmplib/snmp_error.c b/lib/snmplib/snmp_error.c index 6b61b1c745..1909e83e52 100644 --- a/lib/snmplib/snmp_error.c +++ b/lib/snmplib/snmp_error.c @@ -84,3 +84,4 @@ snmp_errstring(int errstat) return "Unknown Error"; } } + diff --git a/lib/snmplib/snmp_msg.c b/lib/snmplib/snmp_msg.c index e084cfb3ea..a1b6207f3a 100644 --- a/lib/snmplib/snmp_msg.c +++ b/lib/snmplib/snmp_msg.c @@ -194,7 +194,7 @@ snmp_msg_Encode(u_char * Buffer, int *BufLenP, PDUDataStart = bufp; bufp = snmp_pdu_encode(bufp, BufLenP, PDU); if (bufp == NULL) - return (NULL); /* snmp_pdu_encode registered failure */ + return (NULL); /* snmp_pdu_encode registered failure */ VARHeaderPtr = bufp; bufp = asn_build_header(bufp, BufLenP, @@ -207,7 +207,7 @@ snmp_msg_Encode(u_char * Buffer, int *BufLenP, /* And build the variables */ bufp = snmp_var_EncodeVarBind(bufp, BufLenP, PDU->variables, Version); if (bufp == NULL) - return (NULL); /* snmp_var_EncodeVarBind registered failure */ + return (NULL); /* snmp_var_EncodeVarBind registered failure */ /* Cool. Now insert the appropriate lengths. */ @@ -231,14 +231,14 @@ snmp_msg_Encode(u_char * Buffer, int *BufLenP, tmp = asn_build_header(Buffer, &FakeArg, (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), - (bufp - MsgPtr)); /* Length of everything */ + (bufp - MsgPtr)); /* Length of everything */ if (tmp == NULL) return (NULL); tmp = asn_build_header(VARHeaderPtr, &FakeArg, (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), - (bufp - VARDataStart)); /* Length of everything */ + (bufp - VARDataStart)); /* Length of everything */ if (tmp == NULL) return (NULL); @@ -301,3 +301,4 @@ snmp_msg_Decode(u_char * Packet, int *PacketLenP, return (u_char *) bufp; } + diff --git a/lib/snmplib/snmp_pdu.c b/lib/snmplib/snmp_pdu.c index b10ff0a183..831aa10fd0 100644 --- a/lib/snmplib/snmp_pdu.c +++ b/lib/snmplib/snmp_pdu.c @@ -404,7 +404,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen, break; #endif - /**********************************************************************/ + /**********************************************************************/ case SNMP_PDU_GETBULK: @@ -434,7 +434,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen, return (NULL); break; - /**********************************************************************/ + /**********************************************************************/ default: @@ -470,7 +470,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen, if (bufp == NULL) return (NULL); break; - } /* End of encoding */ + } /* End of encoding */ return (bufp); } @@ -483,10 +483,10 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen, * Variable Bindings start. */ u_char * -snmp_pdu_decode(u_char * Packet, /* data */ - int *Length, /* &length */ +snmp_pdu_decode(u_char * Packet, /* data */ + int *Length, /* &length */ struct snmp_pdu * PDU) -{ /* pdu */ +{ /* pdu */ u_char *bufp; u_char PDUType; u_char ASNType; @@ -560,7 +560,7 @@ snmp_pdu_decode(u_char * Packet, /* data */ break; #endif - /**********************************************************************/ + /**********************************************************************/ case SNMP_PDU_GETBULK: @@ -588,7 +588,7 @@ snmp_pdu_decode(u_char * Packet, /* data */ ASN_PARSE_ERROR(NULL); break; - /**********************************************************************/ + /**********************************************************************/ default: @@ -662,3 +662,4 @@ snmp_add_null_var(struct snmp_pdu *pdu, oid * name, int name_length) return; } + diff --git a/lib/snmplib/snmp_vars.c b/lib/snmplib/snmp_vars.c index 5f068087d4..303b369ddd 100644 --- a/lib/snmplib/snmp_vars.c +++ b/lib/snmplib/snmp_vars.c @@ -304,7 +304,7 @@ snmp_var_EncodeVarBind(u_char * Buffer, int *BufLenP, case SMI_COUNTER32: case SMI_GAUGE32: - /* case SMI_UNSIGNED32: */ + /* case SMI_UNSIGNED32: */ case SMI_TIMETICKS: bufp = asn_build_unsigned_int(bufp, BufLenP, Vars->type, @@ -340,7 +340,7 @@ snmp_var_EncodeVarBind(u_char * Buffer, int *BufLenP, case SMI_COUNTER64: snmplib_debug(2, "Unable to encode type SMI_COUNTER64!\n"); - /* Fall through */ + /* Fall through */ default: snmp_set_api_error(SNMPERR_UNSUPPORTED_TYPE); @@ -485,7 +485,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen, case SMI_COUNTER32: case SMI_GAUGE32: - /* case SMI_UNSIGNED32: */ + /* case SMI_UNSIGNED32: */ case SMI_TIMETICKS: Var->val.integer = (int *) xmalloc(sizeof(u_int)); if (Var->val.integer == NULL) { @@ -505,7 +505,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen, case ASN_OCTET_STR: case SMI_IPADDRESS: case SMI_OPAQUE: - Var->val_len = *&ThisVarLen; /* String is this at most */ + Var->val_len = *&ThisVarLen; /* String is this at most */ Var->val.string = (u_char *) xmalloc((unsigned) Var->val_len); if (Var->val.string == NULL) { snmp_set_api_error(SNMPERR_OS_ERR); @@ -555,7 +555,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen, snmplib_debug(2, "bad type returned (%x)\n", Var->type); snmp_set_api_error(SNMPERR_PDU_PARSE); PARSE_ERROR; - } /* End of var type switch */ + } /* End of var type switch */ if (bufp == NULL) PARSE_ERROR; @@ -571,3 +571,4 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen, return (bufp); } + diff --git a/lib/snmplib/snmplib_debug.c b/lib/snmplib/snmplib_debug.c index 7be554af22..9d3194631b 100644 --- a/lib/snmplib/snmplib_debug.c +++ b/lib/snmplib/snmplib_debug.c @@ -32,3 +32,4 @@ snmplib_debug(int lvl, const char *fmt,...) } va_end(args); } + diff --git a/lib/sspwin32.cc b/lib/sspwin32.cc index a41322ac5c..dd437beb08 100644 --- a/lib/sspwin32.cc +++ b/lib/sspwin32.cc @@ -579,3 +579,4 @@ const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID PAutenticateBuf, int encoded = base64_encode_bin((char *) pServerBuf, cbOut); return encoded; } + diff --git a/lib/stub_memaccount.c b/lib/stub_memaccount.c index b3491d2d68..3c649295cf 100644 --- a/lib/stub_memaccount.c +++ b/lib/stub_memaccount.c @@ -15,3 +15,4 @@ statMemoryAccounted(void) { return -1; } + diff --git a/lib/tests/testRFC1035.cc b/lib/tests/testRFC1035.cc index 1fed7a3099..ee3684ef4e 100644 --- a/lib/tests/testRFC1035.cc +++ b/lib/tests/testRFC1035.cc @@ -18,8 +18,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testRFC1035 ); // TODO Test each function in the Library independently -// Just because we can for global functions. -// It's good for the code too. +// Just because we can for global functions. +// It's good for the code too. void testRFC1035::testHeaderUnpack() { @@ -139,3 +139,4 @@ void testRFC1035::testBugPacketHeadersOnly() CPPUNIT_ASSERT(res < 0); CPPUNIT_ASSERT(msg == NULL); } + diff --git a/lib/tests/testRFC1035.h b/lib/tests/testRFC1035.h index d6d895be53..c6eecb1f76 100644 --- a/lib/tests/testRFC1035.h +++ b/lib/tests/testRFC1035.h @@ -37,3 +37,4 @@ protected: }; #endif /* SQUID_SRC_TEST_IPADDRESS_H */ + diff --git a/lib/tests/testRFC1738.cc b/lib/tests/testRFC1738.cc index 0013246207..640d361baf 100644 --- a/lib/tests/testRFC1738.cc +++ b/lib/tests/testRFC1738.cc @@ -151,3 +151,4 @@ void testRFC1738::PercentZeroNullDecoding() CPPUNIT_ASSERT(memcmp(unescaped_str, "w%%00%rd",9)==0); xfree(unescaped_str); } + diff --git a/lib/tests/testRFC1738.h b/lib/tests/testRFC1738.h index 3138167ccd..b7f684f48d 100644 --- a/lib/tests/testRFC1738.h +++ b/lib/tests/testRFC1738.h @@ -34,3 +34,4 @@ protected: }; #endif /* SQUID_LIB_TEST_RFC1738_H */ + diff --git a/lib/util.c b/lib/util.c index 8ee7bd8879..6d8f2b11d9 100644 --- a/lib/util.c +++ b/lib/util.c @@ -78,7 +78,7 @@ xdiv(double nom, double denom) const char * xitoa(int num) { - static char buf[24]; /* 2^64 = 18446744073709551616 */ + static char buf[24]; /* 2^64 = 18446744073709551616 */ snprintf(buf, sizeof(buf), "%d", num); return buf; } @@ -87,7 +87,7 @@ xitoa(int num) const char * xint64toa(int64_t num) { - static char buf[24]; /* 2^64 = 18446744073709551616 */ + static char buf[24]; /* 2^64 = 18446744073709551616 */ snprintf(buf, sizeof(buf), "%" PRId64, num); return buf; } @@ -154,3 +154,4 @@ unsigned int RoundTo(const unsigned int num, const unsigned int what) { return what * ((num + what -1)/what); } + diff --git a/lib/uudecode.c b/lib/uudecode.c index f5c6f4691f..d4005b33bd 100644 --- a/lib/uudecode.c +++ b/lib/uudecode.c @@ -70,3 +70,4 @@ uudecode(const char *bufcoded) bufplain[nbytesdecoded] = '\0'; return bufplain; } + diff --git a/lib/xusleep.c b/lib/xusleep.c index 1cf17a37b7..e31ae674b3 100644 --- a/lib/xusleep.c +++ b/lib/xusleep.c @@ -25,3 +25,4 @@ xusleep(unsigned int usec) sl.tv_usec = usec % 1000000; return select(0, NULL, NULL, NULL, &sl); } + diff --git a/scripts/boilerplate.h b/scripts/boilerplate.h index 3d40fd2d7d..43d099d819 100644 --- a/scripts/boilerplate.h +++ b/scripts/boilerplate.h @@ -5,3 +5,4 @@ * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ + diff --git a/src/AccessLogEntry.cc b/src/AccessLogEntry.cc index de9d454980..d28aae29f2 100644 --- a/src/AccessLogEntry.cc +++ b/src/AccessLogEntry.cc @@ -69,3 +69,4 @@ AccessLogEntry::~AccessLogEntry() HTTPMSGUNLOCK(icap.request); #endif } + diff --git a/src/AccessLogEntry.h b/src/AccessLogEntry.h index cf939a5f1a..24fea169e4 100644 --- a/src/AccessLogEntry.h +++ b/src/AccessLogEntry.h @@ -40,7 +40,7 @@ public: typedef RefCount Pointer; AccessLogEntry() : url(NULL), tcpClient(), reply(NULL), request(NULL), - adapted_request(NULL) {} + adapted_request(NULL) {} ~AccessLogEntry(); /// Fetch the client IP log string into the given buffer. @@ -64,10 +64,10 @@ public: public: HttpDetails() : method(Http::METHOD_NONE), code(0), content_type(NULL), - timedout(false), - aborted(false), - clientRequestSz(), - clientReplySz() {} + timedout(false), + aborted(false), + clientRequestSz(), + clientReplySz() {} HttpRequestMethod method; int code; @@ -138,15 +138,15 @@ public: public: CacheDetails() : caddr(), - highOffset(0), - objectSize(0), - code (LOG_TAG_NONE), - rfc931 (NULL), - extuser(NULL), + highOffset(0), + objectSize(0), + code (LOG_TAG_NONE), + rfc931 (NULL), + extuser(NULL), #if USE_OPENSSL - ssluser(NULL), + ssluser(NULL), #endif - port(NULL) + port(NULL) { caddr.setNoAddr(); memset(&start_time, 0, sizeof(start_time)); @@ -178,8 +178,8 @@ public: public: Headers() : request(NULL), - adapted_request(NULL), - reply(NULL) {} + adapted_request(NULL), + reply(NULL) {} char *request; //< virgin HTTP request headers @@ -230,8 +230,8 @@ public: { public: IcapLogEntry() : reqMethod(Adaptation::methodNone), bytesSent(0), bytesRead(0), - bodyBytesRead(-1), request(NULL), reply(NULL), - outcome(Adaptation::Icap::xoUnknown), resStatus(Http::scNone) + bodyBytesRead(-1), request(NULL), reply(NULL), + outcome(Adaptation::Icap::xoUnknown), resStatus(Http::scNone) { memset(&trTime, 0, sizeof(trTime)); memset(&ioTime, 0, sizeof(ioTime)); @@ -283,3 +283,4 @@ void accessLogInit(void); const char *accessLogTime(time_t); #endif /* SQUID_HTTPACCESSLOGENTRY_H */ + diff --git a/src/AclRegs.cc b/src/AclRegs.cc index 2df234ae4c..1db9185bff 100644 --- a/src/AclRegs.cc +++ b/src/AclRegs.cc @@ -217,3 +217,4 @@ ACLStrategised ACLNote::RegistryEntry_(new ACLNoteData, ACLNoteSt ACL::Prototype ACLAdaptationService::RegistryProtoype(&ACLAdaptationService::RegistryEntry_, "adaptation_service"); ACLStrategised ACLAdaptationService::RegistryEntry_(new ACLAdaptationServiceData, ACLAdaptationServiceStrategy::Instance(), "adaptation_service"); #endif + diff --git a/src/AsyncEngine.cc b/src/AsyncEngine.cc index e952ce1bad..6d6dcba034 100644 --- a/src/AsyncEngine.cc +++ b/src/AsyncEngine.cc @@ -8,3 +8,4 @@ #include "squid.h" #include "AsyncEngine.h" + diff --git a/src/AsyncEngine.h b/src/AsyncEngine.h index 3229d63d15..d6bfdc7581 100644 --- a/src/AsyncEngine.h +++ b/src/AsyncEngine.h @@ -56,3 +56,4 @@ public: }; #endif /* SQUID_ASYNCENGINE_H */ + diff --git a/src/AuthReg.cc b/src/AuthReg.cc index 7732d9b88c..7cee4956b0 100644 --- a/src/AuthReg.cc +++ b/src/AuthReg.cc @@ -54,3 +54,4 @@ Auth::Init() } #endif /* USE_AUTH */ + diff --git a/src/AuthReg.h b/src/AuthReg.h index e14a432f2d..7d84d1cff4 100644 --- a/src/AuthReg.h +++ b/src/AuthReg.h @@ -23,3 +23,4 @@ inline void Init(void) {} /* NOP if not USE_AUTH */ } // namespace Auth #endif /* SQUID_AUTHREG_H_ */ + diff --git a/src/BodyPipe.cc b/src/BodyPipe.cc index f90ef99bac..2807210cee 100644 --- a/src/BodyPipe.cc +++ b/src/BodyPipe.cc @@ -51,7 +51,7 @@ public: BodyProducerDialer(const BodyProducer::Pointer &aProducer, Parent::Method aHandler, BodyPipe::Pointer bp): - Parent(aProducer, aHandler, bp) {} + Parent(aProducer, aHandler, bp) {} virtual bool canDial(AsyncCall &call); }; @@ -66,7 +66,7 @@ public: BodyConsumerDialer(const BodyConsumer::Pointer &aConsumer, Parent::Method aHandler, BodyPipe::Pointer bp): - Parent(aConsumer, aHandler, bp) {} + Parent(aConsumer, aHandler, bp) {} virtual bool canDial(AsyncCall &call); }; @@ -128,9 +128,9 @@ void BodyConsumer::stopConsumingFrom(RefCount &p) /* BodyPipe */ BodyPipe::BodyPipe(Producer *aProducer): theBodySize(-1), - theProducer(aProducer), theConsumer(0), - thePutSize(0), theGetSize(0), - mustAutoConsume(false), abortedConsumption(false), isCheckedOut(false) + theProducer(aProducer), theConsumer(0), + thePutSize(0), theGetSize(0), + mustAutoConsume(false), abortedConsumption(false), isCheckedOut(false) { // TODO: teach MemBuf to start with zero minSize // TODO: limit maxSize by theBodySize, when known? @@ -283,7 +283,7 @@ BodyPipe::expectNoConsumption() AsyncCall::Pointer call= asyncCall(91, 7, "BodyProducer::noteBodyConsumerAborted", BodyProducerDialer(theProducer, - &BodyProducer::noteBodyConsumerAborted, this)); + &BodyProducer::noteBodyConsumerAborted, this)); ScheduleCallHere(call); abortedConsumption = true; @@ -383,7 +383,7 @@ BodyPipe::postConsume(size_t size) AsyncCall::Pointer call= asyncCall(91, 7, "BodyProducer::noteMoreBodySpaceAvailable", BodyProducerDialer(theProducer, - &BodyProducer::noteMoreBodySpaceAvailable, this)); + &BodyProducer::noteMoreBodySpaceAvailable, this)); ScheduleCallHere(call); } } @@ -413,7 +413,7 @@ BodyPipe::scheduleBodyDataNotification() AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteMoreBodyDataAvailable", BodyConsumerDialer(theConsumer, - &BodyConsumer::noteMoreBodyDataAvailable, this)); + &BodyConsumer::noteMoreBodyDataAvailable, this)); ScheduleCallHere(call); } } @@ -426,13 +426,13 @@ BodyPipe::scheduleBodyEndNotification() AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteBodyProductionEnded", BodyConsumerDialer(theConsumer, - &BodyConsumer::noteBodyProductionEnded, this)); + &BodyConsumer::noteBodyProductionEnded, this)); ScheduleCallHere(call); } else { AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteBodyProducerAborted", BodyConsumerDialer(theConsumer, - &BodyConsumer::noteBodyProducerAborted, this)); + &BodyConsumer::noteBodyProducerAborted, this)); ScheduleCallHere(call); } } @@ -477,8 +477,8 @@ const char *BodyPipe::status() const /* BodyPipeCheckout */ BodyPipeCheckout::BodyPipeCheckout(BodyPipe &aPipe): thePipe(aPipe), - buf(aPipe.checkOut()), offset(aPipe.consumedSize()), - checkedOutSize(buf.contentSize()), checkedIn(false) + buf(aPipe.checkOut()), offset(aPipe.consumedSize()), + checkedOutSize(buf.contentSize()), checkedIn(false) { } @@ -502,8 +502,8 @@ BodyPipeCheckout::checkIn() } BodyPipeCheckout::BodyPipeCheckout(const BodyPipeCheckout &c): thePipe(c.thePipe), - buf(c.buf), offset(c.offset), checkedOutSize(c.checkedOutSize), - checkedIn(c.checkedIn) + buf(c.buf), offset(c.offset), checkedOutSize(c.checkedOutSize), + checkedIn(c.checkedIn) { assert(false); // prevent copying } @@ -514,3 +514,4 @@ BodyPipeCheckout::operator =(const BodyPipeCheckout &) assert(false); // prevent assignment return *this; } + diff --git a/src/BodyPipe.h b/src/BodyPipe.h index 83f7bcfc35..98254a7532 100644 --- a/src/BodyPipe.h +++ b/src/BodyPipe.h @@ -169,3 +169,4 @@ private: }; #endif /* SQUID_BODY_PIPE_H */ + diff --git a/src/CacheDigest.cc b/src/CacheDigest.cc index 82f3eeb0d3..a9c1efa2f8 100644 --- a/src/CacheDigest.cc +++ b/src/CacheDigest.cc @@ -22,10 +22,10 @@ /* local types */ typedef struct { - int bit_count; /* total number of bits */ - int bit_on_count; /* #bits turned on */ - int bseq_len_sum; /* sum of all bit seq length */ - int bseq_count; /* number of bit seqs */ + int bit_count; /* total number of bits */ + int bit_on_count; /* #bits turned on */ + int bseq_len_sum; /* sum of all bit seq length */ + int bseq_count; /* number of bit seqs */ } CacheDigestStats; /* local functions */ @@ -53,7 +53,7 @@ CacheDigest * cacheDigestCreate(int capacity, int bpe) { CacheDigest *cd = (CacheDigest *)memAllocate(MEM_CACHE_DIGEST); - assert(SQUID_MD5_DIGEST_LENGTH == 16); /* our hash functions rely on 16 byte keys */ + assert(SQUID_MD5_DIGEST_LENGTH == 16); /* our hash functions rely on 16 byte keys */ cacheDigestInit(cd, capacity, bpe); return cd; } @@ -243,7 +243,7 @@ cacheDigestGuessStatsReport(const CacheDigestGuessStats * stats, StoreEntry * se const int tot_count = true_count + false_count; assert(label); - assert(tot_count == hit_count + miss_count); /* paranoid */ + assert(tot_count == hit_count + miss_count); /* paranoid */ if (!tot_count) { storeAppendPrintf(sentry, "no guess stats for %s available\n", label); @@ -320,3 +320,4 @@ cacheDigestHashKey(const CacheDigest * cd, const cache_key * key) } #endif + diff --git a/src/CacheDigest.h b/src/CacheDigest.h index 46f7478e6c..f5c008ad40 100644 --- a/src/CacheDigest.h +++ b/src/CacheDigest.h @@ -45,3 +45,4 @@ void cacheDigestGuessStatsReport(const CacheDigestGuessStats * stats, StoreEntry void cacheDigestReport(CacheDigest * cd, const char *label, StoreEntry * e); #endif /* SQUID_CACHEDIGEST_H_ */ + diff --git a/src/CacheManager.h b/src/CacheManager.h index 2d0d5aec50..99a7cee1ec 100644 --- a/src/CacheManager.h +++ b/src/CacheManager.h @@ -77,3 +77,4 @@ private: }; #endif /* SQUID_CACHEMANAGER_H */ + diff --git a/src/CachePeer.h b/src/CachePeer.h index 5b7d9105ee..57f4652ac6 100644 --- a/src/CachePeer.h +++ b/src/CachePeer.h @@ -198,3 +198,4 @@ public: }; #endif /* SQUID_CACHEPEER_H_ */ + diff --git a/src/CachePeerDomainList.h b/src/CachePeerDomainList.h index d18cf3eb2c..0f9d9e0b57 100644 --- a/src/CachePeerDomainList.h +++ b/src/CachePeerDomainList.h @@ -19,3 +19,4 @@ public: }; #endif /* SQUID_CACHEPEERDOMAINLIST_H_ */ + diff --git a/src/ChunkedCodingParser.cc b/src/ChunkedCodingParser.cc index d3d0475b72..df153d03d8 100644 --- a/src/ChunkedCodingParser.cc +++ b/src/ChunkedCodingParser.cc @@ -308,3 +308,4 @@ void ChunkedCodingParser::parseLastChunkExtension() theIn->consume(crlfEnd); theStep = theChunkSize ? psChunkBody : psTrailer; } + diff --git a/src/ChunkedCodingParser.h b/src/ChunkedCodingParser.h index 1bc6ab81b2..60829fc78d 100644 --- a/src/ChunkedCodingParser.h +++ b/src/ChunkedCodingParser.h @@ -81,3 +81,4 @@ public: }; #endif /* SQUID_CHUNKEDCODINGPARSER_H */ + diff --git a/src/ClientDelayConfig.cc b/src/ClientDelayConfig.cc index 4f130ecfbd..6c36f99e87 100644 --- a/src/ClientDelayConfig.cc +++ b/src/ClientDelayConfig.cc @@ -100,3 +100,4 @@ void ClientDelayConfig::clean() aclDestroyAccessList(&pools[i].access); } } + diff --git a/src/ClientDelayConfig.h b/src/ClientDelayConfig.h index a331c0d8a5..5d0ae0ba9b 100644 --- a/src/ClientDelayConfig.h +++ b/src/ClientDelayConfig.h @@ -23,7 +23,7 @@ class ClientDelayPool { public: ClientDelayPool() - : access(NULL), rate(0), highwatermark(0) {} + : access(NULL), rate(0), highwatermark(0) {} void dump (StoreEntry * entry, unsigned int poolNumberMinusOne) const; acl_access *access; int rate; @@ -37,7 +37,7 @@ class ClientDelayConfig { public: ClientDelayConfig() - : initial(50) {} + : initial(50) {} void freePoolCount(); void dumpPoolCount(StoreEntry * entry, const char *name) const; /* parsing of client_delay_pools - number of pools */ @@ -57,3 +57,4 @@ private: }; #endif // SQUID_CLIENTDELAYCONFIG_H + diff --git a/src/ClientInfo.h b/src/ClientInfo.h index 4c356e48a3..ef23b9258b 100644 --- a/src/ClientInfo.h +++ b/src/ClientInfo.h @@ -114,3 +114,4 @@ private: #endif /* USE_DELAY_POOLS */ #endif + diff --git a/src/ClientRequestContext.h b/src/ClientRequestContext.h index 985f359d5e..484b3be295 100644 --- a/src/ClientRequestContext.h +++ b/src/ClientRequestContext.h @@ -84,3 +84,4 @@ public: }; #endif /* SQUID_CLIENTREQUESTCONTEXT_H */ + diff --git a/src/CollapsedForwarding.cc b/src/CollapsedForwarding.cc index 17134b3d07..fb6d9d9db0 100644 --- a/src/CollapsedForwarding.cc +++ b/src/CollapsedForwarding.cc @@ -165,3 +165,4 @@ CollapsedForwardingRr::~CollapsedForwardingRr() { delete owner; } + diff --git a/src/CollapsedForwarding.h b/src/CollapsedForwarding.h index c21d430992..61857bc667 100644 --- a/src/CollapsedForwarding.h +++ b/src/CollapsedForwarding.h @@ -44,3 +44,4 @@ private: }; #endif /* SQUID_COLLAPSED_FORWARDING_H */ + diff --git a/src/CommCalls.cc b/src/CommCalls.cc index 70ee905fe3..6aca76d13b 100644 --- a/src/CommCalls.cc +++ b/src/CommCalls.cc @@ -16,12 +16,12 @@ /* CommCommonCbParams */ CommCommonCbParams::CommCommonCbParams(void *aData): - data(cbdataReference(aData)), conn(), flag(Comm::OK), xerrno(0), fd(-1) + data(cbdataReference(aData)), conn(), flag(Comm::OK), xerrno(0), fd(-1) { } CommCommonCbParams::CommCommonCbParams(const CommCommonCbParams &p): - data(cbdataReference(p.data)), conn(p.conn), flag(p.flag), xerrno(p.xerrno), fd(p.fd) + data(cbdataReference(p.data)), conn(p.conn), flag(p.flag), xerrno(p.xerrno), fd(p.fd) { } @@ -49,7 +49,7 @@ CommCommonCbParams::print(std::ostream &os) const /* CommAcceptCbParams */ CommAcceptCbParams::CommAcceptCbParams(void *aData): - CommCommonCbParams(aData), xaction() + CommCommonCbParams(aData), xaction() { } @@ -65,7 +65,7 @@ CommAcceptCbParams::print(std::ostream &os) const /* CommConnectCbParams */ CommConnectCbParams::CommConnectCbParams(void *aData): - CommCommonCbParams(aData) + CommCommonCbParams(aData) { } @@ -84,7 +84,7 @@ CommConnectCbParams::syncWithComm() /* CommIoCbParams */ CommIoCbParams::CommIoCbParams(void *aData): CommCommonCbParams(aData), - buf(NULL), size(0) + buf(NULL), size(0) { } @@ -113,21 +113,21 @@ CommIoCbParams::print(std::ostream &os) const /* CommCloseCbParams */ CommCloseCbParams::CommCloseCbParams(void *aData): - CommCommonCbParams(aData) + CommCommonCbParams(aData) { } /* CommTimeoutCbParams */ CommTimeoutCbParams::CommTimeoutCbParams(void *aData): - CommCommonCbParams(aData) + CommCommonCbParams(aData) { } /* FdeCbParams */ FdeCbParams::FdeCbParams(void *aData): - CommCommonCbParams(aData) + CommCommonCbParams(aData) { } @@ -135,14 +135,14 @@ FdeCbParams::FdeCbParams(void *aData): CommAcceptCbPtrFun::CommAcceptCbPtrFun(IOACB *aHandler, const CommAcceptCbParams &aParams): - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } CommAcceptCbPtrFun::CommAcceptCbPtrFun(const CommAcceptCbPtrFun &o): - CommDialerParamsT(o.params), - handler(o.handler) + CommDialerParamsT(o.params), + handler(o.handler) { } @@ -164,8 +164,8 @@ CommAcceptCbPtrFun::print(std::ostream &os) const CommConnectCbPtrFun::CommConnectCbPtrFun(CNCB *aHandler, const CommConnectCbParams &aParams): - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } @@ -186,8 +186,8 @@ CommConnectCbPtrFun::print(std::ostream &os) const /* CommIoCbPtrFun */ CommIoCbPtrFun::CommIoCbPtrFun(IOCB *aHandler, const CommIoCbParams &aParams): - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } @@ -209,8 +209,8 @@ CommIoCbPtrFun::print(std::ostream &os) const CommCloseCbPtrFun::CommCloseCbPtrFun(CLCB *aHandler, const CommCloseCbParams &aParams): - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } @@ -232,8 +232,8 @@ CommCloseCbPtrFun::print(std::ostream &os) const CommTimeoutCbPtrFun::CommTimeoutCbPtrFun(CTCB *aHandler, const CommTimeoutCbParams &aParams): - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } @@ -254,8 +254,8 @@ CommTimeoutCbPtrFun::print(std::ostream &os) const /* FdeCbPtrFun */ FdeCbPtrFun::FdeCbPtrFun(FDECB *aHandler, const FdeCbParams &aParams) : - CommDialerParamsT(aParams), - handler(aHandler) + CommDialerParamsT(aParams), + handler(aHandler) { } @@ -272,3 +272,4 @@ FdeCbPtrFun::print(std::ostream &os) const params.print(os); os << ')'; } + diff --git a/src/CommCalls.h b/src/CommCalls.h index 7bf47d5356..72eafa3cc4 100644 --- a/src/CommCalls.h +++ b/src/CommCalls.h @@ -184,8 +184,8 @@ public: typedef void (C::*Method)(const Params &io); CommCbMemFunT(const CbcPointer &aJob, Method aMeth): JobDialer(aJob), - CommDialerParamsT(aJob->toCbdata()), - method(aMeth) {} + CommDialerParamsT(aJob->toCbdata()), + method(aMeth) {} virtual bool canDial(AsyncCall &c) { return JobDialer::canDial(c) && @@ -207,7 +207,7 @@ protected: // accept (IOACB) dialer class CommAcceptCbPtrFun: public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef CommAcceptCbParams Params; @@ -226,7 +226,7 @@ public: // connect (CNCB) dialer class CommConnectCbPtrFun: public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef CommConnectCbParams Params; @@ -242,7 +242,7 @@ public: // read/write (IOCB) dialer class CommIoCbPtrFun: public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef CommIoCbParams Params; @@ -258,7 +258,7 @@ public: // close (CLCB) dialer class CommCloseCbPtrFun: public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef CommCloseCbParams Params; @@ -273,7 +273,7 @@ public: }; class CommTimeoutCbPtrFun:public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef CommTimeoutCbParams Params; @@ -289,7 +289,7 @@ public: /// FD event (FDECB) dialer class FdeCbPtrFun: public CallDialer, - public CommDialerParamsT + public CommDialerParamsT { public: typedef FdeCbParams Params; @@ -317,8 +317,8 @@ public: const char *callName, const Dialer &aDialer); inline CommCbFunPtrCallT(const CommCbFunPtrCallT &o) : - AsyncCall(o.debugSection, o.debugLevel, o.name), - dialer(o.dialer) {} + AsyncCall(o.debugSection, o.debugLevel, o.name), + dialer(o.dialer) {} ~CommCbFunPtrCallT() {} @@ -353,8 +353,8 @@ CommCbFunPtrCallT *commCbCall(int debugSection, int debugLevel, template CommCbFunPtrCallT::CommCbFunPtrCallT(int aDebugSection, int aDebugLevel, const char *callName, const Dialer &aDialer): - AsyncCall(aDebugSection, aDebugLevel, callName), - dialer(aDialer) + AsyncCall(aDebugSection, aDebugLevel, callName), + dialer(aDialer) { } @@ -385,3 +385,4 @@ CommCbFunPtrCallT::fire() } #endif /* SQUID_COMMCALLS_H */ + diff --git a/src/CommRead.h b/src/CommRead.h index 1825776671..5eb9826df1 100644 --- a/src/CommRead.h +++ b/src/CommRead.h @@ -62,3 +62,4 @@ private: }; #endif /* COMMREAD_H */ + diff --git a/src/CompletionDispatcher.cc b/src/CompletionDispatcher.cc index e9a9a13143..236d15ca1a 100644 --- a/src/CompletionDispatcher.cc +++ b/src/CompletionDispatcher.cc @@ -8,3 +8,4 @@ #include "squid.h" #include "CompletionDispatcher.h" + diff --git a/src/CompletionDispatcher.h b/src/CompletionDispatcher.h index aea9531b4e..6266199abd 100644 --- a/src/CompletionDispatcher.h +++ b/src/CompletionDispatcher.h @@ -28,3 +28,4 @@ public: }; #endif /* SQUID_COMPLETIONDISPATCHER_H */ + diff --git a/src/CompositePoolNode.h b/src/CompositePoolNode.h index 1ccb34f030..679d9073d1 100644 --- a/src/CompositePoolNode.h +++ b/src/CompositePoolNode.h @@ -61,3 +61,4 @@ protected: #endif /* USE_DELAY_POOLS */ #endif /* COMPOSITEPOOLNODE_H */ + diff --git a/src/ConfigOption.cc b/src/ConfigOption.cc index fd5ae9f4b3..e5f20efcc2 100644 --- a/src/ConfigOption.cc +++ b/src/ConfigOption.cc @@ -41,3 +41,4 @@ ConfigOptionVector::dump(StoreEntry * e) const i != options.end(); ++i) (*i)->dump(e); } + diff --git a/src/ConfigOption.h b/src/ConfigOption.h index 2033cec78c..b97c3b37b3 100644 --- a/src/ConfigOption.h +++ b/src/ConfigOption.h @@ -61,3 +61,4 @@ private: }; #endif /* SQUID_CONFIGOPTION_H */ + diff --git a/src/ConfigParser.cc b/src/ConfigParser.cc index 6d1b4bcc35..413ab7dac1 100644 --- a/src/ConfigParser.cc +++ b/src/ConfigParser.cc @@ -38,18 +38,18 @@ ConfigParser::destruct() std::ostringstream message; CfgFile *f = CfgFiles.top(); message << "Bungled " << f->filePath << " line " << f->lineNo << - ": " << f->currentLine << std::endl; + ": " << f->currentLine << std::endl; CfgFiles.pop(); delete f; while (!CfgFiles.empty()) { f = CfgFiles.top(); message << " included from " << f->filePath << " line " << - f->lineNo << ": " << f->currentLine << std::endl; + f->lineNo << ": " << f->currentLine << std::endl; CfgFiles.pop(); delete f; } message << " included from " << cfg_filename << " line " << - config_lineno << ": " << config_input_line << std::endl; + config_lineno << ": " << config_input_line << std::endl; std::string msg = message.str(); fatalf("%s", msg.c_str()); } else @@ -280,8 +280,8 @@ ConfigParser::TokenParse(const char * &nextToken, ConfigParser::TokenType &type) while (ConfigParser::RecognizeQuotedPair_ && *nextToken == '\\') { // NP: do not permit \0 terminator to be escaped. if (*(nextToken+1) && *(nextToken+1) != '\r' && *(nextToken+1) != '\n') { - nextToken += 2; // skip the quoted-pair (\-escaped) character - nextToken += strcspn(nextToken, sep); + nextToken += 2; // skip the quoted-pair (\-escaped) character + nextToken += strcspn(nextToken, sep); } else { debugs(3, DBG_CRITICAL, "FATAL: Unescaped '\' character in regex pattern: " << tokenStart); self_destruct(); @@ -596,3 +596,4 @@ ConfigParser::CfgFile::~CfgFile() if (wordFile) fclose(wordFile); } + diff --git a/src/ConfigParser.h b/src/ConfigParser.h index 736101be22..2cb06d9f1e 100644 --- a/src/ConfigParser.h +++ b/src/ConfigParser.h @@ -24,7 +24,7 @@ class wordlist; * The config parser read mechanism can cope, but the other systems * receiving the data from its buffers on such lines may not. */ -#define CONFIG_LINE_LIMIT 2048 +#define CONFIG_LINE_LIMIT 2048 /** * A configuration file Parser. Instances of this class track @@ -209,10 +209,11 @@ protected: static bool ParseQuotedOrToEol_; ///< The next tokens will be handled as quoted or to_eol token static bool RecognizeQuotedPair_; ///< The next tokens may contain quoted-pair (\-escaped) characters static bool PreviewMode_; ///< The next token will not poped from cfg files, will just previewd. - static bool ParseKvPair_; ///aio_sigevent.sigev_signo; } #endif /* _SQUID_WINDOWS_ */ + diff --git a/src/DiskIO/AIO/aio_win32.h b/src/DiskIO/AIO/aio_win32.h index ff6036b5f0..5cdd3b8829 100644 --- a/src/DiskIO/AIO/aio_win32.h +++ b/src/DiskIO/AIO/aio_win32.h @@ -12,7 +12,7 @@ #if USE_DISKIO_AIO #ifndef off64_t -typedef int64_t off64_t; +typedef int64_t off64_t; #endif #if _SQUID_WINDOWS_ @@ -80,3 +80,4 @@ void aio_close(int); #endif /* _SQUID_WINDOWS_ */ #endif /* USE_DISKIO_AIO */ #endif /* __WIN32_AIO_H__ */ + diff --git a/src/DiskIO/AIO/async_io.h b/src/DiskIO/AIO/async_io.h index cee79876d6..b871231c00 100644 --- a/src/DiskIO/AIO/async_io.h +++ b/src/DiskIO/AIO/async_io.h @@ -22,11 +22,11 @@ /* for FREE* */ #include "typedefs.h" -#define MAX_ASYNCOP 128 +#define MAX_ASYNCOP 128 typedef enum { - AQ_STATE_NONE, /* Not active/uninitialised */ - AQ_STATE_SETUP /* Initialised */ + AQ_STATE_NONE, /* Not active/uninitialised */ + AQ_STATE_SETUP /* Initialised */ } async_queue_state_t; typedef enum { @@ -69,9 +69,10 @@ struct _async_queue_entry { struct _async_queue { async_queue_state_t aq_state; - async_queue_entry_t aq_queue[MAX_ASYNCOP]; /* queued ops */ - int aq_numpending; /* Num of pending ops */ + async_queue_entry_t aq_queue[MAX_ASYNCOP]; /* queued ops */ + int aq_numpending; /* Num of pending ops */ }; #endif /* USE_DISKIO_AIO */ #endif /* __ASYNC_IO_H_ */ + diff --git a/src/DiskIO/Blocking/BlockingDiskIOModule.cc b/src/DiskIO/Blocking/BlockingDiskIOModule.cc index 4b880bdc2b..ffb717fe51 100644 --- a/src/DiskIO/Blocking/BlockingDiskIOModule.cc +++ b/src/DiskIO/Blocking/BlockingDiskIOModule.cc @@ -42,3 +42,4 @@ BlockingDiskIOModule::type () const { return "Blocking"; } + diff --git a/src/DiskIO/Blocking/BlockingDiskIOModule.h b/src/DiskIO/Blocking/BlockingDiskIOModule.h index b11f19e08b..cee699bb1d 100644 --- a/src/DiskIO/Blocking/BlockingDiskIOModule.h +++ b/src/DiskIO/Blocking/BlockingDiskIOModule.h @@ -27,3 +27,4 @@ private: }; #endif /* SQUID_BLOCKINGDISKIOMODULE_H */ + diff --git a/src/DiskIO/Blocking/BlockingFile.cc b/src/DiskIO/Blocking/BlockingFile.cc index 8a48ffe13f..5ee6162e03 100644 --- a/src/DiskIO/Blocking/BlockingFile.cc +++ b/src/DiskIO/Blocking/BlockingFile.cc @@ -161,7 +161,7 @@ BlockingFile::readDone(int rvfd, const char *buf, int len, int errflag) } if (errflag == DISK_EOF) - errflag = DISK_OK; /* EOF is signalled by len == 0, not errors... */ + errflag = DISK_OK; /* EOF is signalled by len == 0, not errors... */ ReadRequest::Pointer result = readRequest; diff --git a/src/DiskIO/Blocking/BlockingFile.h b/src/DiskIO/Blocking/BlockingFile.h index 75f2fee3b1..937c6f5416 100644 --- a/src/DiskIO/Blocking/BlockingFile.h +++ b/src/DiskIO/Blocking/BlockingFile.h @@ -50,3 +50,4 @@ private: }; #endif /* SQUID_BLOCKINGFILE_H */ + diff --git a/src/DiskIO/Blocking/BlockingIOStrategy.cc b/src/DiskIO/Blocking/BlockingIOStrategy.cc index 9147561abd..245899688b 100644 --- a/src/DiskIO/Blocking/BlockingIOStrategy.cc +++ b/src/DiskIO/Blocking/BlockingIOStrategy.cc @@ -43,3 +43,4 @@ BlockingIOStrategy::unlinkFile(char const *path) { unlinkdUnlink(path); } + diff --git a/src/DiskIO/Blocking/BlockingIOStrategy.h b/src/DiskIO/Blocking/BlockingIOStrategy.h index 5efdfe15af..76284fea0e 100644 --- a/src/DiskIO/Blocking/BlockingIOStrategy.h +++ b/src/DiskIO/Blocking/BlockingIOStrategy.h @@ -24,3 +24,4 @@ public: }; #endif /* SQUID_BLOCKINGIOSTRATEGY_H */ + diff --git a/src/DiskIO/Blocking/DiskIOBlocking.cc b/src/DiskIO/Blocking/DiskIOBlocking.cc index cc60801489..5173caad3a 100644 --- a/src/DiskIO/Blocking/DiskIOBlocking.cc +++ b/src/DiskIO/Blocking/DiskIOBlocking.cc @@ -7,3 +7,4 @@ */ #include "squid.h" + diff --git a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc index 4ffaecd9a0..782f9e3102 100644 --- a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc +++ b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc @@ -74,3 +74,4 @@ DiskDaemonDiskIOModule::type () const { return "DiskDaemon"; } + diff --git a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h index 2e65ac2632..923ca66f2b 100644 --- a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h +++ b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h @@ -29,3 +29,4 @@ private: }; #endif /* SQUID_DISKDAEMONDISKIOMODULE_H */ + diff --git a/src/DiskIO/DiskDaemon/DiskdAction.cc b/src/DiskIO/DiskDaemon/DiskdAction.cc index 72c252c4c0..de389121ff 100644 --- a/src/DiskIO/DiskDaemon/DiskdAction.cc +++ b/src/DiskIO/DiskDaemon/DiskdAction.cc @@ -63,7 +63,7 @@ DiskdAction::Create(const Mgr::CommandPointer &aCmd) } DiskdAction::DiskdAction(const Mgr::CommandPointer &aCmd): - Action(aCmd), data() + Action(aCmd), data() { debugs(79, 5, HERE); } @@ -150,3 +150,4 @@ DiskdAction::unpack(const Ipc::TypedMsgHdr& hdrMsg) hdrMsg.checkType(Ipc::mtCacheMgrResponse); hdrMsg.getPod(data); } + diff --git a/src/DiskIO/DiskDaemon/DiskdAction.h b/src/DiskIO/DiskDaemon/DiskdAction.h index 8fc2f5976e..104b49e6da 100644 --- a/src/DiskIO/DiskDaemon/DiskdAction.h +++ b/src/DiskIO/DiskDaemon/DiskdAction.h @@ -72,3 +72,4 @@ private: }; #endif /* SQUID_DISKD_ACTION_H */ + diff --git a/src/DiskIO/DiskDaemon/DiskdFile.cc b/src/DiskIO/DiskDaemon/DiskdFile.cc index 9b1c0ff374..36d3ecf243 100644 --- a/src/DiskIO/DiskDaemon/DiskdFile.cc +++ b/src/DiskIO/DiskDaemon/DiskdFile.cc @@ -31,10 +31,10 @@ CBDATA_CLASS_INIT(DiskdFile); DiskdFile::DiskdFile(char const *aPath, DiskdIOStrategy *anIO) : - errorOccured(false), - IO(anIO), - mode(0), - inProgressIOs(0) + errorOccured(false), + IO(anIO), + mode(0), + inProgressIOs(0) { assert(aPath); debugs(79, 3, "DiskdFile::DiskdFile: " << aPath); @@ -394,3 +394,4 @@ DiskdFile::ioInProgress()const { return inProgressIOs != 0; } + diff --git a/src/DiskIO/DiskDaemon/DiskdFile.h b/src/DiskIO/DiskDaemon/DiskdFile.h index 6d82f856ae..dbafab53c4 100644 --- a/src/DiskIO/DiskDaemon/DiskdFile.h +++ b/src/DiskIO/DiskDaemon/DiskdFile.h @@ -62,3 +62,4 @@ private: }; #endif + diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index 89410e2681..354e02c085 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -125,7 +125,7 @@ DiskdIOStrategy::unlinkFile(char const *path) if (x < 0) { debugs(79, DBG_IMPORTANT, "storeDiskdSend UNLINK: " << xstrerror()); - ::unlink(buf); /* XXX EWW! */ + ::unlink(buf); /* XXX EWW! */ // shm.put (shm_offset); } @@ -538,7 +538,7 @@ DiskdIOStrategy::callback() } while (1) { -#ifdef ALWAYS_ZERO_BUFFERS +#ifdef ALWAYS_ZERO_BUFFERS memset(&M, '\0', sizeof(M)); #endif @@ -554,7 +554,7 @@ DiskdIOStrategy::callback() ++diskd_stats.recv_count; --away; handle(&M); - retval = 1; /* Return that we've actually done some work */ + retval = 1; /* Return that we've actually done some work */ if (M.shm_offset > -1) shm.put ((off_t) M.shm_offset); @@ -568,3 +568,4 @@ DiskdIOStrategy::statfs(StoreEntry & sentry)const { storeAppendPrintf(&sentry, "Pending operations: %d\n", away); } + diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.h b/src/DiskIO/DiskDaemon/DiskdIOStrategy.h index 191215afc1..0600df3e48 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.h +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.h @@ -124,3 +124,4 @@ struct diskd_stats_t { extern diskd_stats_t diskd_stats; #endif + diff --git a/src/DiskIO/DiskDaemon/diomsg.h b/src/DiskIO/DiskDaemon/diomsg.h index 9f222ecb7c..f779e451d5 100644 --- a/src/DiskIO/DiskDaemon/diomsg.h +++ b/src/DiskIO/DiskDaemon/diomsg.h @@ -42,3 +42,4 @@ struct diomsg { }; #endif /* SQUID_DIOMSG_H__ */ + diff --git a/src/DiskIO/DiskDaemon/diskd.cc b/src/DiskIO/DiskDaemon/diskd.cc index 267e28c3d6..e6dc654170 100644 --- a/src/DiskIO/DiskDaemon/diskd.cc +++ b/src/DiskIO/DiskDaemon/diskd.cc @@ -418,3 +418,4 @@ main(int argc, char *argv[]) return 0; } + diff --git a/src/DiskIO/DiskFile.h b/src/DiskIO/DiskFile.h index d619e4376c..2fdfa73434 100644 --- a/src/DiskIO/DiskFile.h +++ b/src/DiskIO/DiskFile.h @@ -59,3 +59,4 @@ public: }; #endif /* SQUID_DISKFILE_H */ + diff --git a/src/DiskIO/DiskIOModule.cc b/src/DiskIO/DiskIOModule.cc index c192a6bb2f..5341ed1034 100644 --- a/src/DiskIO/DiskIOModule.cc +++ b/src/DiskIO/DiskIOModule.cc @@ -99,3 +99,4 @@ DiskIOModule::FindDefault() result = Find("Blocking"); return result; } + diff --git a/src/DiskIO/DiskIOModule.h b/src/DiskIO/DiskIOModule.h index 1110c53e06..89fd1d67f9 100644 --- a/src/DiskIO/DiskIOModule.h +++ b/src/DiskIO/DiskIOModule.h @@ -60,3 +60,4 @@ private: }; #endif /* SQUID_DISKIOMODULE_H */ + diff --git a/src/DiskIO/DiskIOStrategy.h b/src/DiskIO/DiskIOStrategy.h index 20e1790985..e958b63531 100644 --- a/src/DiskIO/DiskIOStrategy.h +++ b/src/DiskIO/DiskIOStrategy.h @@ -87,3 +87,4 @@ private: }; #endif /* SQUID_DISKIOSTRATEGY_H */ + diff --git a/src/DiskIO/DiskThreads/CommIO.cc b/src/DiskIO/DiskThreads/CommIO.cc index 26140aff5d..34b87832b4 100644 --- a/src/DiskIO/DiskThreads/CommIO.cc +++ b/src/DiskIO/DiskThreads/CommIO.cc @@ -73,3 +73,4 @@ CommIO::ResetNotifications() DoneSignalled = false; } } + diff --git a/src/DiskIO/DiskThreads/CommIO.h b/src/DiskIO/DiskThreads/CommIO.h index e6d416979f..e710aaea79 100644 --- a/src/DiskIO/DiskThreads/CommIO.h +++ b/src/DiskIO/DiskThreads/CommIO.h @@ -46,3 +46,4 @@ CommIO::NotifyIOCompleted() }; #endif /* SQUID_SRC_DISKIO_DISKTHREADS_COMMIO_H */ + diff --git a/src/DiskIO/DiskThreads/DiskThreads.h b/src/DiskIO/DiskThreads/DiskThreads.h index 3bfc61be60..f623085aa6 100644 --- a/src/DiskIO/DiskThreads/DiskThreads.h +++ b/src/DiskIO/DiskThreads/DiskThreads.h @@ -60,8 +60,8 @@ struct squidaio_result_t { int aio_return; int aio_errno; enum _squidaio_request_type result_type; - void *_data; /* Internal housekeeping */ - void *data; /* Available to the caller */ + void *_data; /* Internal housekeeping */ + void *data; /* Available to the caller */ }; struct squidaio_ctrl_t { @@ -134,3 +134,4 @@ extern AIOCounts squidaio_counts; extern dlink_list used_list; #endif + diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 7d80b74013..1f416ea152 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -27,7 +27,7 @@ CBDATA_CLASS_INIT(DiskThreadsDiskFile); DiskThreadsDiskFile::DiskThreadsDiskFile(char const *aPath, DiskThreadsIOStrategy *anIO):fd(-1), errorOccured (false), IO(anIO), - inProgressIOs (0) + inProgressIOs (0) { assert(aPath); debugs(79, 3, "UFSFile::UFSFile: " << aPath); @@ -274,7 +274,7 @@ DiskThreadsDiskFile::readDone(int rvfd, const char *buf, int len, int errflag, R #else if (errflag == DISK_EOF) - errflag = DISK_OK; /* EOF is signalled by len == 0, not errors... */ + errflag = DISK_OK; /* EOF is signalled by len == 0, not errors... */ #endif @@ -329,3 +329,4 @@ DiskThreadsDiskFile::writeDone(int rvfd, int errflag, size_t len, RefCount cbdata_type IoResult::CBDATA_IoResult = CBDATA_UNKNOWN; /** \endcond */ + diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.h b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.h index 7906776e0c..3197c76543 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.h +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.h @@ -82,3 +82,4 @@ IoResult IOResult(RefCount aRequest, RefCount aFile) { return IoResult(aFile, aRequest);} #endif /* SQUID_DISKTHREADSDISKFILE_H */ + diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc index 72cc833db5..ff693d0e43 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc @@ -45,3 +45,4 @@ DiskThreadsDiskIOModule::type () const { return "DiskThreads"; } + diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h index 9c64919237..1eba38bca6 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h @@ -28,3 +28,4 @@ private: }; #endif /* SQUID_DISKTHREADSDISKIOMODULE_H */ + diff --git a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc index 5e882dd180..6be97a9cc2 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc @@ -112,7 +112,7 @@ DiskThreadsIOStrategy::callback() } if (ctrlp == NULL) - continue; /* XXX Should not happen */ + continue; /* XXX Should not happen */ dlinkDelete(&ctrlp->node, &used_list); @@ -122,7 +122,7 @@ DiskThreadsIOStrategy::callback() ctrlp->done_handler = NULL; if (cbdataReferenceValidDone(ctrlp->done_handler_data, &cbdata)) { - retval = 1; /* Return that we've actually done some work */ + retval = 1; /* Return that we've actually done some work */ done_callback(ctrlp->fd, cbdata, ctrlp->bufp, ctrlp->result.aio_return, ctrlp->result.aio_errno); } else { @@ -155,7 +155,7 @@ void DiskThreadsIOStrategy::sync() { if (!initialised) - return; /* nothing to do then */ + return; /* nothing to do then */ /* Flush all pending operations */ debugs(32, 2, "aioSync: flushing pending I/O operations"); @@ -168,8 +168,8 @@ DiskThreadsIOStrategy::sync() } DiskThreadsIOStrategy::DiskThreadsIOStrategy() : - initialised(false), - squidaio_ctrl_pool(NULL) + initialised(false), + squidaio_ctrl_pool(NULL) {} void @@ -247,3 +247,4 @@ DiskThreadsIOStrategy::unlinkFile(char const *path) ++statCounter.syscalls.disk.unlinks; aioUnlink(path, NULL, NULL); } + diff --git a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h index 7c3428753f..6a770fd3cc 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h +++ b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h @@ -11,13 +11,13 @@ #ifndef __STORE_DISKTHREADEDIOSTRATEGY_H__ #define __STORE_DISKTHREADEDIOSTRATEGY_H__ -#define _AIO_OPEN 0 -#define _AIO_READ 1 -#define _AIO_WRITE 2 -#define _AIO_CLOSE 3 -#define _AIO_UNLINK 4 -#define _AIO_OPENDIR 5 -#define _AIO_STAT 6 +#define _AIO_OPEN 0 +#define _AIO_READ 1 +#define _AIO_WRITE 2 +#define _AIO_CLOSE 3 +#define _AIO_UNLINK 4 +#define _AIO_OPENDIR 5 +#define _AIO_STAT 6 #include "DiskIO/DiskIOStrategy.h" class DiskThreadsIOStrategy : public DiskIOStrategy @@ -45,3 +45,4 @@ private: }; #endif + diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index 86c5d4be7b..0310f3e2fa 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -35,7 +35,7 @@ #include #endif -#define RIDICULOUS_LENGTH 4096 +#define RIDICULOUS_LENGTH 4096 enum _squidaio_thread_status { _THREAD_STARTING = 0, @@ -74,7 +74,7 @@ typedef struct squidaio_request_queue_t { squidaio_request_t *volatile head; squidaio_request_t *volatile *volatile tailp; unsigned long requests; - unsigned long blocked; /* main failed to lock the queue */ + unsigned long blocked; /* main failed to lock the queue */ } squidaio_request_queue_t; typedef struct squidaio_thread_t squidaio_thread_t; @@ -107,16 +107,16 @@ static squidaio_thread_t *threads = NULL; static int squidaio_initialised = 0; #define AIO_LARGE_BUFS 16384 -#define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 -#define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 -#define AIO_TINY_BUFS AIO_LARGE_BUFS >> 3 -#define AIO_MICRO_BUFS 128 +#define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 +#define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 +#define AIO_TINY_BUFS AIO_LARGE_BUFS >> 3 +#define AIO_MICRO_BUFS 128 -static MemAllocator *squidaio_large_bufs = NULL; /* 16K */ -static MemAllocator *squidaio_medium_bufs = NULL; /* 8K */ -static MemAllocator *squidaio_small_bufs = NULL; /* 4K */ -static MemAllocator *squidaio_tiny_bufs = NULL; /* 2K */ -static MemAllocator *squidaio_micro_bufs = NULL; /* 128K */ +static MemAllocator *squidaio_large_bufs = NULL; /* 16K */ +static MemAllocator *squidaio_medium_bufs = NULL; /* 8K */ +static MemAllocator *squidaio_small_bufs = NULL; /* 4K */ +static MemAllocator *squidaio_tiny_bufs = NULL; /* 2K */ +static MemAllocator *squidaio_micro_bufs = NULL; /* 128K */ static int request_queue_len = 0; static MemAllocator *squidaio_request_pool = NULL; @@ -430,7 +430,7 @@ squidaio_thread_loop(void *ptr) squidaio_do_unlink(request); break; -#if AIO_OPENDIR /* Opendir not implemented yet */ +#if AIO_OPENDIR /* Opendir not implemented yet */ case _AIO_OP_OPENDIR: squidaio_do_opendir(request); @@ -446,7 +446,7 @@ squidaio_thread_loop(void *ptr) request->err = EINVAL; break; } - } else { /* cancelled */ + } else { /* cancelled */ request->ret = -1; request->err = EINTR; } @@ -459,10 +459,10 @@ squidaio_thread_loop(void *ptr) pthread_mutex_unlock(&done_queue.mutex); CommIO::NotifyIOCompleted(); ++ threadp->requests; - } /* while forever */ + } /* while forever */ return NULL; -} /* squidaio_thread_loop */ +} /* squidaio_thread_loop */ static void squidaio_queue_request(squidaio_request_t * request) @@ -556,7 +556,7 @@ squidaio_queue_request(squidaio_request_t * request) squidaio_sync(); debugs(43, DBG_CRITICAL, "squidaio_queue_request: Synced"); } -} /* squidaio_queue_request */ +} /* squidaio_queue_request */ static void squidaio_cleanup_request(squidaio_request_t * requestp) @@ -619,7 +619,7 @@ squidaio_cleanup_request(squidaio_request_t * requestp) } squidaio_request_pool->freeOne(requestp); -} /* squidaio_cleanup_request */ +} /* squidaio_cleanup_request */ int squidaio_cancel(squidaio_result_t * resultp) @@ -636,7 +636,7 @@ squidaio_cancel(squidaio_result_t * resultp) } return 1; -} /* squidaio_cancel */ +} /* squidaio_cancel */ int squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resultp) @@ -943,7 +943,7 @@ AIO_REPOLL: goto AIO_REPOLL; return resultp; -} /* squidaio_poll_done */ +} /* squidaio_poll_done */ int squidaio_operations_pending(void) @@ -1019,3 +1019,4 @@ squidaio_stats(StoreEntry * sentry) threadp = threadp->next; } } + diff --git a/src/DiskIO/DiskThreads/aiops_win32.cc b/src/DiskIO/DiskThreads/aiops_win32.cc index dc799d12ca..32c6173307 100644 --- a/src/DiskIO/DiskThreads/aiops_win32.cc +++ b/src/DiskIO/DiskThreads/aiops_win32.cc @@ -23,7 +23,7 @@ #include #include -#define RIDICULOUS_LENGTH 4096 +#define RIDICULOUS_LENGTH 4096 enum _squidaio_thread_status { _THREAD_STARTING = 0, @@ -63,7 +63,7 @@ typedef struct squidaio_request_queue_t { squidaio_request_t *volatile head; squidaio_request_t *volatile *volatile tailp; unsigned long requests; - unsigned long blocked; /* main failed to lock the queue */ + unsigned long blocked; /* main failed to lock the queue */ } squidaio_request_queue_t; typedef struct squidaio_thread_t squidaio_thread_t; @@ -98,16 +98,16 @@ static squidaio_thread_t *threads = NULL; static int squidaio_initialised = 0; #define AIO_LARGE_BUFS 16384 -#define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 -#define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 -#define AIO_TINY_BUFS AIO_LARGE_BUFS >> 3 -#define AIO_MICRO_BUFS 128 +#define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 +#define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 +#define AIO_TINY_BUFS AIO_LARGE_BUFS >> 3 +#define AIO_MICRO_BUFS 128 -static MemAllocator *squidaio_large_bufs = NULL; /* 16K */ -static MemAllocator *squidaio_medium_bufs = NULL; /* 8K */ -static MemAllocator *squidaio_small_bufs = NULL; /* 4K */ -static MemAllocator *squidaio_tiny_bufs = NULL; /* 2K */ -static MemAllocator *squidaio_micro_bufs = NULL; /* 128K */ +static MemAllocator *squidaio_large_bufs = NULL; /* 16K */ +static MemAllocator *squidaio_medium_bufs = NULL; /* 8K */ +static MemAllocator *squidaio_small_bufs = NULL; /* 4K */ +static MemAllocator *squidaio_tiny_bufs = NULL; /* 2K */ +static MemAllocator *squidaio_micro_bufs = NULL; /* 128K */ static int request_queue_len = 0; static MemAllocator *squidaio_request_pool = NULL; @@ -486,7 +486,7 @@ squidaio_thread_loop(LPVOID lpParam) squidaio_do_unlink(request); break; -#if AIO_OPENDIR /* Opendir not implemented yet */ +#if AIO_OPENDIR /* Opendir not implemented yet */ case _AIO_OP_OPENDIR: squidaio_do_opendir(request); @@ -502,7 +502,7 @@ squidaio_thread_loop(LPVOID lpParam) request->err = EINVAL; break; } - } else { /* cancelled */ + } else { /* cancelled */ request->ret = -1; request->err = EINTR; } @@ -527,12 +527,12 @@ squidaio_thread_loop(LPVOID lpParam) CommIO::NotifyIOCompleted(); Sleep(0); ++ threadp->requests; - } /* while forever */ + } /* while forever */ CloseHandle(cond); return 0; -} /* squidaio_thread_loop */ +} /* squidaio_thread_loop */ static void squidaio_queue_request(squidaio_request_t * request) @@ -632,7 +632,7 @@ squidaio_queue_request(squidaio_request_t * request) squidaio_sync(); debugs(43, DBG_CRITICAL, "squidaio_queue_request: Synced"); } -} /* squidaio_queue_request */ +} /* squidaio_queue_request */ static void squidaio_cleanup_request(squidaio_request_t * requestp) @@ -695,7 +695,7 @@ squidaio_cleanup_request(squidaio_request_t * requestp) } squidaio_request_pool->freeOne(requestp); -} /* squidaio_cleanup_request */ +} /* squidaio_cleanup_request */ int squidaio_cancel(squidaio_result_t * resultp) @@ -712,7 +712,7 @@ squidaio_cancel(squidaio_result_t * resultp) } return 1; -} /* squidaio_cancel */ +} /* squidaio_cancel */ int squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resultp) @@ -1045,7 +1045,7 @@ AIO_REPOLL: goto AIO_REPOLL; return resultp; -} /* squidaio_poll_done */ +} /* squidaio_poll_done */ int squidaio_operations_pending(void) @@ -1121,3 +1121,4 @@ squidaio_stats(StoreEntry * sentry) threadp = threadp->next; } } + diff --git a/src/DiskIO/DiskThreads/async_io.cc b/src/DiskIO/DiskThreads/async_io.cc index 290e72cbe2..3b25e5e2b2 100644 --- a/src/DiskIO/DiskThreads/async_io.cc +++ b/src/DiskIO/DiskThreads/async_io.cc @@ -135,7 +135,7 @@ aioWrite(int fd, off_t offset, char *bufp, size_t len, AIOCB * callback, void *c ctrlp->result.data = ctrlp; squidaio_write(fd, bufp, len, offset, seekmode, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); -} /* aioWrite */ +} /* aioWrite */ void aioRead(int fd, off_t offset, size_t len, AIOCB * callback, void *callback_data) @@ -164,7 +164,7 @@ aioRead(int fd, off_t offset, size_t len, AIOCB * callback, void *callback_data) squidaio_read(fd, ctrlp->bufp, len, offset, seekmode, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); return; -} /* aioRead */ +} /* aioRead */ void @@ -183,7 +183,7 @@ aioStat(char *path, struct stat *sb, AIOCB * callback, void *callback_data) squidaio_stat(path, sb, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); return; -} /* aioStat */ +} /* aioStat */ void aioUnlink(const char *path, AIOCB * callback, void *callback_data) @@ -199,10 +199,11 @@ aioUnlink(const char *path, AIOCB * callback, void *callback_data) ctrlp->result.data = ctrlp; squidaio_unlink(path, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); -} /* aioUnlink */ +} /* aioUnlink */ int aioQueueSize(void) { return DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->inUseCount(); } + diff --git a/src/DiskIO/IORequestor.h b/src/DiskIO/IORequestor.h index 31fbcda734..113535243b 100644 --- a/src/DiskIO/IORequestor.h +++ b/src/DiskIO/IORequestor.h @@ -27,3 +27,4 @@ public: }; #endif /* SQUID_IOREQUESTOR_H */ + diff --git a/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc b/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc index 6926e61d8e..92027e1ba4 100644 --- a/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc +++ b/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc @@ -42,3 +42,4 @@ IpcIoDiskIOModule::type () const { return "IpcIo"; } + diff --git a/src/DiskIO/IpcIo/IpcIoDiskIOModule.h b/src/DiskIO/IpcIo/IpcIoDiskIOModule.h index 95dd3b8494..be19681052 100644 --- a/src/DiskIO/IpcIo/IpcIoDiskIOModule.h +++ b/src/DiskIO/IpcIo/IpcIoDiskIOModule.h @@ -27,3 +27,4 @@ private: }; #endif /* SQUID_IPC_IODISKIOMODULE_H */ + diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index c07d4a813f..85a983d92e 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -55,7 +55,7 @@ static void DiskerClose(const SBuf &path); /// IpcIo wrapper for debugs() streams; XXX: find a better class name struct SipcIo { SipcIo(int aWorker, const IpcIoMsg &aMsg, int aDisker): - worker(aWorker), msg(aMsg), disker(aDisker) {} + worker(aWorker), msg(aMsg), disker(aDisker) {} int worker; const IpcIoMsg &msg; @@ -70,9 +70,9 @@ operator <<(std::ostream &os, const SipcIo &sio) } IpcIoFile::IpcIoFile(char const *aDb): - dbName(aDb), diskId(-1), error_(false), lastRequestId(0), - olderRequests(&requestMap1), newerRequests(&requestMap2), - timeoutCheckScheduled(false) + dbName(aDb), diskId(-1), error_(false), lastRequestId(0), + olderRequests(&requestMap1), newerRequests(&requestMap2), + timeoutCheckScheduled(false) { } @@ -610,11 +610,11 @@ IpcIoFile::getFD() const /* IpcIoMsg */ IpcIoMsg::IpcIoMsg(): - requestId(0), - offset(0), - len(0), - command(IpcIo::cmdNone), - xerrno(0) + requestId(0), + offset(0), + len(0), + command(IpcIo::cmdNone), + xerrno(0) { start.tv_sec = 0; start.tv_usec = 0; @@ -623,7 +623,7 @@ IpcIoMsg::IpcIoMsg(): /* IpcIoPendingRequest */ IpcIoPendingRequest::IpcIoPendingRequest(const IpcIoFile::Pointer &aFile): - file(aFile), readRequest(NULL), writeRequest(NULL) + file(aFile), readRequest(NULL), writeRequest(NULL) { } @@ -971,3 +971,4 @@ IpcIoRr::~IpcIoRr() { delete owner; } + diff --git a/src/DiskIO/IpcIo/IpcIoFile.h b/src/DiskIO/IpcIo/IpcIoFile.h index 0bddd239e7..3d84f9f289 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.h +++ b/src/DiskIO/IpcIo/IpcIoFile.h @@ -166,3 +166,4 @@ private: }; #endif /* SQUID_IPC_IOFILE_H */ + diff --git a/src/DiskIO/IpcIo/IpcIoIOStrategy.cc b/src/DiskIO/IpcIo/IpcIoIOStrategy.cc index 415bc99d5d..5377cbf95a 100644 --- a/src/DiskIO/IpcIo/IpcIoIOStrategy.cc +++ b/src/DiskIO/IpcIo/IpcIoIOStrategy.cc @@ -43,3 +43,4 @@ IpcIoIOStrategy::unlinkFile(char const *path) { unlinkdUnlink(path); } + diff --git a/src/DiskIO/IpcIo/IpcIoIOStrategy.h b/src/DiskIO/IpcIo/IpcIoIOStrategy.h index acb5a06640..9732191640 100644 --- a/src/DiskIO/IpcIo/IpcIoIOStrategy.h +++ b/src/DiskIO/IpcIo/IpcIoIOStrategy.h @@ -22,3 +22,4 @@ public: }; #endif /* SQUID_IPC_IOIOSTRATEGY_H */ + diff --git a/src/DiskIO/Mmapped/MmappedDiskIOModule.cc b/src/DiskIO/Mmapped/MmappedDiskIOModule.cc index 22f4f56c36..05c8b71a9e 100644 --- a/src/DiskIO/Mmapped/MmappedDiskIOModule.cc +++ b/src/DiskIO/Mmapped/MmappedDiskIOModule.cc @@ -42,3 +42,4 @@ MmappedDiskIOModule::type () const { return "Mmapped"; } + diff --git a/src/DiskIO/Mmapped/MmappedDiskIOModule.h b/src/DiskIO/Mmapped/MmappedDiskIOModule.h index 9eab43de39..f81c9d24a2 100644 --- a/src/DiskIO/Mmapped/MmappedDiskIOModule.h +++ b/src/DiskIO/Mmapped/MmappedDiskIOModule.h @@ -27,3 +27,4 @@ private: }; #endif /* SQUID_MMAPPEDDISKIOMODULE_H */ + diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index 1a5fe5af92..4ed22d4033 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -54,7 +54,7 @@ private: }; MmappedFile::MmappedFile(char const *aPath): fd(-1), - minOffset(0), maxOffset(-1), error_(false) + minOffset(0), maxOffset(-1), error_(false) { assert(aPath); path_ = xstrdup(aPath); @@ -217,8 +217,8 @@ MmappedFile::ioInProgress() const } Mmapping::Mmapping(int aFd, size_t aLength, int aProt, int aFlags, off_t anOffset): - fd(aFd), length(aLength), prot(aProt), flags(aFlags), offset(anOffset), - delta(-1), buf(NULL) + fd(aFd), length(aLength), prot(aProt), flags(aFlags), offset(anOffset), + delta(-1), buf(NULL) { } @@ -269,3 +269,4 @@ Mmapping::unmap() } // TODO: check MAP_NORESERVE, consider MAP_POPULATE and MAP_FIXED + diff --git a/src/DiskIO/Mmapped/MmappedFile.h b/src/DiskIO/Mmapped/MmappedFile.h index b473bf8a86..453e1e0914 100644 --- a/src/DiskIO/Mmapped/MmappedFile.h +++ b/src/DiskIO/Mmapped/MmappedFile.h @@ -49,3 +49,4 @@ private: }; #endif /* SQUID_MMAPPEDFILE_H */ + diff --git a/src/DiskIO/Mmapped/MmappedIOStrategy.cc b/src/DiskIO/Mmapped/MmappedIOStrategy.cc index 1b9a7a7027..054bdc6074 100644 --- a/src/DiskIO/Mmapped/MmappedIOStrategy.cc +++ b/src/DiskIO/Mmapped/MmappedIOStrategy.cc @@ -43,3 +43,4 @@ MmappedIOStrategy::unlinkFile(char const *path) { unlinkdUnlink(path); } + diff --git a/src/DiskIO/Mmapped/MmappedIOStrategy.h b/src/DiskIO/Mmapped/MmappedIOStrategy.h index b2a8b6ab23..c8aadd487c 100644 --- a/src/DiskIO/Mmapped/MmappedIOStrategy.h +++ b/src/DiskIO/Mmapped/MmappedIOStrategy.h @@ -22,3 +22,4 @@ public: }; #endif /* SQUID_MMAPPEDIOSTRATEGY_H */ + diff --git a/src/DiskIO/ReadRequest.cc b/src/DiskIO/ReadRequest.cc index 0638b54872..8022e5d5e4 100644 --- a/src/DiskIO/ReadRequest.cc +++ b/src/DiskIO/ReadRequest.cc @@ -12,3 +12,4 @@ CBDATA_CLASS_INIT(ReadRequest); ReadRequest::ReadRequest(char *aBuf, off_t anOffset, size_t aLen) : buf (aBuf), offset(anOffset), len(aLen) {} + diff --git a/src/DiskIO/ReadRequest.h b/src/DiskIO/ReadRequest.h index bbd8e3d67b..a10af04dbc 100644 --- a/src/DiskIO/ReadRequest.h +++ b/src/DiskIO/ReadRequest.h @@ -27,3 +27,4 @@ public: }; #endif /* SQUID_READREQUEST_H */ + diff --git a/src/DiskIO/WriteRequest.cc b/src/DiskIO/WriteRequest.cc index 30764d7845..1e8adf9052 100644 --- a/src/DiskIO/WriteRequest.cc +++ b/src/DiskIO/WriteRequest.cc @@ -12,3 +12,4 @@ CBDATA_CLASS_INIT(WriteRequest); WriteRequest::WriteRequest(char const *aBuf, off_t anOffset, size_t aLen, FREE *aFree) : buf (aBuf), offset(anOffset), len(aLen), free_func(aFree) {} + diff --git a/src/DiskIO/WriteRequest.h b/src/DiskIO/WriteRequest.h index 3ae9365468..ad7aaaf455 100644 --- a/src/DiskIO/WriteRequest.h +++ b/src/DiskIO/WriteRequest.h @@ -28,3 +28,4 @@ public: }; #endif /* SQUID_WRITEREQUEST_H */ + diff --git a/src/DnsLookupDetails.cc b/src/DnsLookupDetails.cc index ffe068ca52..36ca886ac5 100644 --- a/src/DnsLookupDetails.cc +++ b/src/DnsLookupDetails.cc @@ -16,7 +16,7 @@ DnsLookupDetails::DnsLookupDetails(): wait(-1) } DnsLookupDetails::DnsLookupDetails(const String &e, int w): - error(e), wait(w) + error(e), wait(w) { } @@ -29,3 +29,4 @@ DnsLookupDetails::print(std::ostream &os) const os << " lookup_err=" << error; return os; } + diff --git a/src/DnsLookupDetails.h b/src/DnsLookupDetails.h index b7f4f0b5f8..93b61e8f2b 100644 --- a/src/DnsLookupDetails.h +++ b/src/DnsLookupDetails.h @@ -34,3 +34,4 @@ std::ostream &operator << (std::ostream &os, const DnsLookupDetails &dns) } #endif + diff --git a/src/ETag.cc b/src/ETag.cc index d0dee7c139..ff738a090e 100644 --- a/src/ETag.cc +++ b/src/ETag.cc @@ -56,3 +56,4 @@ etagIsWeakEqual(const ETag &tag1, const ETag &tag2) { return etagStringsMatch(tag1, tag2); } + diff --git a/src/ETag.h b/src/ETag.h index 177df70630..f4842ef074 100644 --- a/src/ETag.h +++ b/src/ETag.h @@ -29,3 +29,4 @@ bool etagIsStrongEqual(const ETag &tag1, const ETag &tag2); bool etagIsWeakEqual(const ETag &tag1, const ETag &tag2); #endif /* _SQUIDETAG_H */ + diff --git a/src/EventLoop.cc b/src/EventLoop.cc index f831bef178..2df7588f1d 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -19,10 +19,10 @@ EventLoop *EventLoop::Running = NULL; EventLoop::EventLoop() : errcount(0), last_loop(false), timeService(NULL), - primaryEngine(NULL), - loop_delay(EVENT_LOOP_TIMEOUT), - error(false), - runOnceResult(false) + primaryEngine(NULL), + loop_delay(EVENT_LOOP_TIMEOUT), + error(false), + runOnceResult(false) {} void @@ -169,3 +169,4 @@ EventLoop::stop() { last_loop = true; } + diff --git a/src/EventLoop.h b/src/EventLoop.h index 4e360ee7a1..8627979ec7 100644 --- a/src/EventLoop.h +++ b/src/EventLoop.h @@ -11,7 +11,7 @@ #include -#define EVENT_LOOP_TIMEOUT 1000 /* 1s timeout */ +#define EVENT_LOOP_TIMEOUT 1000 /* 1s timeout */ class AsyncEngine; class TimeEngine; @@ -92,3 +92,4 @@ private: }; #endif /* SQUID_EVENTLOOP_H */ + diff --git a/src/ExternalACL.h b/src/ExternalACL.h index e34e54844d..fcaa9a7974 100644 --- a/src/ExternalACL.h +++ b/src/ExternalACL.h @@ -78,3 +78,4 @@ void externalAclInit(void); void externalAclShutdown(void); #endif /* SQUID_EXTERNALACL_H */ + diff --git a/src/ExternalACLEntry.cc b/src/ExternalACLEntry.cc index da8e4af9e3..18c39db24a 100644 --- a/src/ExternalACLEntry.cc +++ b/src/ExternalACLEntry.cc @@ -17,7 +17,7 @@ */ ExternalACLEntry::ExternalACLEntry() : - notes() + notes() { lru.next = lru.prev = NULL; result = ACCESS_DENIED; @@ -48,3 +48,4 @@ ExternalACLEntry::update(ExternalACLEntryData const &someData) tag = someData.tag; log = someData.log; } + diff --git a/src/ExternalACLEntry.h b/src/ExternalACLEntry.h index b7ef687aa4..ae45134b86 100644 --- a/src/ExternalACLEntry.h +++ b/src/ExternalACLEntry.h @@ -78,3 +78,4 @@ public: }; #endif + diff --git a/src/FadingCounter.cc b/src/FadingCounter.cc index c861fd0e53..4cd9feb493 100644 --- a/src/FadingCounter.cc +++ b/src/FadingCounter.cc @@ -14,7 +14,7 @@ #include FadingCounter::FadingCounter(): horizon(-1), precision(10), delta(-1), - lastTime(0), total(0) + lastTime(0), total(0) { counters.reserve(precision); while (counters.size() < static_cast(precision)) @@ -73,3 +73,4 @@ int FadingCounter::count(int howMany) return total; } + diff --git a/src/FadingCounter.h b/src/FadingCounter.h index 868cf4cae6..e22bb461af 100644 --- a/src/FadingCounter.h +++ b/src/FadingCounter.h @@ -38,3 +38,4 @@ private: }; #endif /* SQUID_FADING_COUNTER_H */ + diff --git a/src/FileMap.h b/src/FileMap.h index a346ee9f48..7a4027e41c 100644 --- a/src/FileMap.h +++ b/src/FileMap.h @@ -77,3 +77,4 @@ private: }; #endif /* FILEMAP_H_ */ + diff --git a/src/FwdState.cc b/src/FwdState.cc index fbca17f968..d74d626615 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -81,7 +81,7 @@ public: typedef void (FwdState::*Method)(Ssl::PeerConnectorAnswer &); FwdStatePeerAnswerDialer(Method method, FwdState *fwd): - method_(method), fwd_(fwd), answer_() {} + method_(method), fwd_(fwd), answer_() {} /* CallDialer API */ virtual bool canDial(AsyncCall &call) { return fwd_.valid(); } @@ -127,7 +127,7 @@ FwdState::closeServerConnection(const char *reason) /**** PUBLIC INTERFACE ********************************************************/ FwdState::FwdState(const Comm::ConnectionPointer &client, StoreEntry * e, HttpRequest * r, const AccessLogEntryPointer &alp): - al(alp) + al(alp) { debugs(17, 2, HERE << "Forwarding client request " << client << ", url=" << e->url() ); entry = e; @@ -320,7 +320,7 @@ FwdState::Start(const Comm::ConnectionPointer &clientConn, StoreEntry *entry, Ht page_id = ERR_FORWARDING_DENIED; ErrorState *anErr = new ErrorState(page_id, Http::scForbidden, request); - errorAppendEntry(entry, anErr); // frees anErr + errorAppendEntry(entry, anErr); // frees anErr return; } } @@ -340,7 +340,7 @@ FwdState::Start(const Comm::ConnectionPointer &clientConn, StoreEntry *entry, Ht if (shutting_down) { /* more yuck */ ErrorState *anErr = new ErrorState(ERR_SHUTTING_DOWN, Http::scServiceUnavailable, request); - errorAppendEntry(entry, anErr); // frees anErr + errorAppendEntry(entry, anErr); // frees anErr return; } @@ -630,7 +630,7 @@ FwdState::retryOrBail() errorAppendEntry(entry, anErr); } - self = NULL; // refcounted + self = NULL; // refcounted } // If the Server quits before nibbling at the request body, the body sender @@ -996,7 +996,7 @@ FwdState::dispatch() whoisStart(this); break; - case AnyP::PROTO_WAIS: /* Not implemented */ + case AnyP::PROTO_WAIS: /* Not implemented */ default: debugs(17, DBG_IMPORTANT, "WARNING: Cannot retrieve '" << entry->url() << "'."); @@ -1303,3 +1303,4 @@ GetMarkingsToServer(HttpRequest * request, Comm::Connection &conn) conn.nfmark = 0; #endif } + diff --git a/src/FwdState.h b/src/FwdState.h index b7bead3ffd..0c3a8c9090 100644 --- a/src/FwdState.h +++ b/src/FwdState.h @@ -160,3 +160,4 @@ private: void getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn); #endif /* SQUID_FORWARD_H */ + diff --git a/src/Generic.h b/src/Generic.h index eb4df00598..f00aa5125a 100644 --- a/src/Generic.h +++ b/src/Generic.h @@ -94,3 +94,4 @@ struct PointerPrinter { }; #endif /* SQUID_GENERIC_H */ + diff --git a/src/HierarchyLogEntry.h b/src/HierarchyLogEntry.h index 9bcd6d000a..8f05eff9ac 100644 --- a/src/HierarchyLogEntry.h +++ b/src/HierarchyLogEntry.h @@ -43,10 +43,10 @@ public: hier_code code; char host[SQUIDHOSTNAMELEN]; ping_data ping; - char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */ - lookup_t cd_lookup; /* cd prediction: none, miss, hit */ - int n_choices; /* #peers we selected from (cd only) */ - int n_ichoices; /* #peers with known rtt we selected from (cd only) */ + char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */ + lookup_t cd_lookup; /* cd prediction: none, miss, hit */ + int n_choices; /* #peers we selected from (cd only) */ + int n_ichoices; /* #peers with known rtt we selected from (cd only) */ struct timeval peer_select_start; @@ -64,3 +64,4 @@ private: }; #endif /* SQUID_HTTPHIERARCHYLOGENTRY_H */ + diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 0661add43b..ac61026c43 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -35,7 +35,7 @@ HttpBody::setMb(MemBuf * mb_) * as MemBuf doesn't have a copy-constructor. If such a constructor * is ever added, add such protection here. */ - mb = mb_; /* absorb */ + mb = mb_; /* absorb */ } void @@ -46,3 +46,4 @@ HttpBody::packInto(Packer * p) const if (mb->contentSize()) packerAppend(p, mb->content(), mb->contentSize()); } + diff --git a/src/HttpBody.h b/src/HttpBody.h index cfb31db619..b9cb4852c8 100644 --- a/src/HttpBody.h +++ b/src/HttpBody.h @@ -52,3 +52,4 @@ private: }; #endif /* HTTPBODY_H_ */ + diff --git a/src/HttpControlMsg.h b/src/HttpControlMsg.h index 69ae999a0f..2ce2f0b26f 100644 --- a/src/HttpControlMsg.h +++ b/src/HttpControlMsg.h @@ -40,7 +40,7 @@ public: typedef AsyncCall::Pointer Callback; HttpControlMsg(const HttpReply::Pointer &aReply, const Callback &aCallback): - reply(aReply), cbSuccess(aCallback) {} + reply(aReply), cbSuccess(aCallback) {} public: HttpReply::Pointer reply; ///< the 1xx message being forwarded @@ -58,3 +58,4 @@ operator <<(std::ostream &os, const HttpControlMsg &msg) } #endif /* SQUID_HTTP_CONTROL_MSG_H */ + diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 70ed06c4a9..f85909ed32 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -89,7 +89,7 @@ bool HttpHdrCc::parse(const String & str) { const char *item; - const char *p; /* '=' parameter */ + const char *p; /* '=' parameter */ const char *pos = NULL; http_hdr_cc_type type; int ilen; @@ -301,7 +301,7 @@ httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist) void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count) { - extern const HttpHeaderStat *dump_stat; /* argh! */ + extern const HttpHeaderStat *dump_stat; /* argh! */ const int id = (int) val; const int valid_id = id >= 0 && id < CC_ENUM_END; const char *name = valid_id ? CcAttrs[id].name : "INVALID"; @@ -314,3 +314,4 @@ httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int c #if !_USE_INLINE_ #include "HttpHdrCc.cci" #endif + diff --git a/src/HttpHdrCc.cci b/src/HttpHdrCc.cci index b4bdd5b752..77bcda737e 100644 --- a/src/HttpHdrCc.cci +++ b/src/HttpHdrCc.cci @@ -45,3 +45,4 @@ HttpHdrCc::setValue(int32_t &value, int32_t new_value, http_hdr_cc_type hdr, boo value=new_value; setMask(hdr,setting); } + diff --git a/src/HttpHdrCc.h b/src/HttpHdrCc.h index 88262c5f0b..3a743679ba 100644 --- a/src/HttpHdrCc.h +++ b/src/HttpHdrCc.h @@ -34,9 +34,9 @@ public: static const int32_t MIN_FRESH_UNKNOWN=-1; //min_fresh is unset HttpHdrCc() : - mask(0), max_age(MAX_AGE_UNKNOWN), s_maxage(S_MAXAGE_UNKNOWN), - max_stale(MAX_STALE_UNKNOWN), stale_if_error(STALE_IF_ERROR_UNKNOWN), - min_fresh(MIN_FRESH_UNKNOWN) {} + mask(0), max_age(MAX_AGE_UNKNOWN), s_maxage(S_MAXAGE_UNKNOWN), + max_stale(MAX_STALE_UNKNOWN), stale_if_error(STALE_IF_ERROR_UNKNOWN), + min_fresh(MIN_FRESH_UNKNOWN) {} /// reset data-members to default state void clear(); @@ -185,3 +185,4 @@ void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, #endif #endif /* SQUID_HTTPHDRCC_H */ + diff --git a/src/HttpHdrContRange.cc b/src/HttpHdrContRange.cc index d28057c3f6..9114aa08c8 100644 --- a/src/HttpHdrContRange.cc +++ b/src/HttpHdrContRange.cc @@ -220,3 +220,4 @@ httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, int64_t ent_le cr->spec = spec; cr->elength = ent_len; } + diff --git a/src/HttpHdrContRange.h b/src/HttpHdrContRange.h index 9155572d91..51e4f20a9c 100644 --- a/src/HttpHdrContRange.h +++ b/src/HttpHdrContRange.h @@ -20,7 +20,7 @@ class HttpHdrContRange public: HttpHdrRangeSpec spec; - int64_t elength; /**< entity length, not content length */ + int64_t elength; /**< entity length, not content length */ }; /** \todo CLEANUP: Move httpHdrContRange* functions into the class methods */ @@ -37,3 +37,4 @@ void httpHdrContRangeSet(HttpHdrContRange *, HttpHdrRangeSpec, int64_t); void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, int64_t); #endif /* SQUID_HTTPHDRCONTRANGE_H */ + diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index 0df454a286..f3736d569e 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -107,11 +107,11 @@ HttpHdrRangeSpec::parseInit(const char *field, int flen) void HttpHdrRangeSpec::packInto(Packer * packer) const { - if (!known_spec(offset)) /* suffix */ + if (!known_spec(offset)) /* suffix */ packerPrintf(packer, "-%" PRId64, length); - else if (!known_spec(length)) /* trailer */ + else if (!known_spec(length)) /* trailer */ packerPrintf(packer, "%" PRId64 "-", offset); - else /* range */ + else /* range */ packerPrintf(packer, "%" PRId64 "-%" PRId64, offset, offset + length - 1); } @@ -134,10 +134,10 @@ HttpHdrRangeSpec::canonize(int64_t clen) outputInfo ("have"); HttpRange object(0, clen); - if (!known_spec(offset)) { /* suffix */ + if (!known_spec(offset)) { /* suffix */ assert(known_spec(length)); offset = object.intersection(HttpRange (clen - length, clen)).start; - } else if (!known_spec(length)) { /* trailer */ + } else if (!known_spec(length)) { /* trailer */ assert(known_spec(offset)); HttpRange newRange = object.intersection(HttpRange (offset, clen)); length = newRange.size(); @@ -164,8 +164,8 @@ HttpHdrRangeSpec::mergeWith(const HttpHdrRangeSpec * donor) bool merged (false); #if MERGING_BREAKS_NOTHING /* Note: this code works, but some clients may not like its effects */ - int64_t rhs = offset + length; /* no -1 ! */ - const int64_t donor_rhs = donor->offset + donor->length; /* no -1 ! */ + int64_t rhs = offset + length; /* no -1 ! */ + const int64_t donor_rhs = donor->offset + donor->length; /* no -1 ! */ assert(known_spec(offset)); assert(known_spec(donor->offset)); assert(length > 0); @@ -173,13 +173,13 @@ HttpHdrRangeSpec::mergeWith(const HttpHdrRangeSpec * donor) /* do we have a left hand side overlap? */ if (donor->offset < offset && offset <= donor_rhs) { - offset = donor->offset; /* decrease left offset */ + offset = donor->offset; /* decrease left offset */ merged = 1; } /* do we have a right hand side overlap? */ if (donor->offset <= rhs && rhs < donor_rhs) { - rhs = donor_rhs; /* increase right offset */ + rhs = donor_rhs; /* increase right offset */ merged = 1; } @@ -267,8 +267,8 @@ HttpHdrRange::~HttpHdrRange() } HttpHdrRange::HttpHdrRange(HttpHdrRange const &old) : - specs(), - clen(HttpHdrRangeSpec::UnknownPosition) + specs(), + clen(HttpHdrRangeSpec::UnknownPosition) { specs.reserve(old.specs.size()); @@ -332,11 +332,11 @@ HttpHdrRange::merge (std::vector &basis) /* merged with current so get rid of the prev one */ delete specs.back(); specs.pop_back(); - continue; /* re-iterate */ + continue; /* re-iterate */ } specs.push_back (*i); - ++i; /* progress */ + ++i; /* progress */ } debugs(64, 3, "HttpHdrRange::merge: had " << basis.size() << @@ -430,7 +430,7 @@ HttpHdrRange::willBeComplex() const int64_t offset = 0; for (const_iterator pos (begin()); pos != end(); ++pos) { - if (!known_spec((*pos)->offset)) /* ignore unknowns */ + if (!known_spec((*pos)->offset)) /* ignore unknowns */ continue; /* Ensure typecasts is safe */ @@ -441,7 +441,7 @@ HttpHdrRange::willBeComplex() const offset = (*pos)->offset; - if (known_spec((*pos)->length)) /* avoid unknowns */ + if (known_spec((*pos)->length)) /* avoid unknowns */ offset += (*pos)->length; } @@ -486,7 +486,7 @@ HttpHdrRange::lowestOffset(int64_t size) const if (!known_spec(current)) { if ((*pos)->length > size || !known_spec((*pos)->length)) - return 0; /* Unknown. Assume start of file */ + return 0; /* Unknown. Assume start of file */ current = size - (*pos)->length; } @@ -575,3 +575,4 @@ void HttpHdrRangeIter::debt(int64_t newDebt) debugs(64, 3, "HttpHdrRangeIter::debt: was " << debt_size << " now " << newDebt); debt_size = newDebt; } + diff --git a/src/HttpHdrSc.cc b/src/HttpHdrSc.cc index 1343835fd5..0322ebe405 100644 --- a/src/HttpHdrSc.cc +++ b/src/HttpHdrSc.cc @@ -36,7 +36,7 @@ static const HttpHeaderFieldAttrs ScAttrs[SC_ENUM_END] = { {"no-store-remote", (http_hdr_type)SC_NO_STORE_REMOTE}, {"max-age", (http_hdr_type)SC_MAX_AGE}, {"content", (http_hdr_type)SC_CONTENT}, - {"Other,", (http_hdr_type)SC_OTHER} /* ',' will protect from matches */ + {"Other,", (http_hdr_type)SC_OTHER} /* ',' will protect from matches */ }; HttpHeaderFieldInfo *ScFieldsInfo = NULL; @@ -90,7 +90,7 @@ HttpHdrSc::parse(const String * str) { HttpHdrSc * sc=this; const char *item; - const char *p; /* '=' parameter */ + const char *p; /* '=' parameter */ const char *pos = NULL; const char *target = NULL; /* ;foo */ const char *temp = NULL; /* temp buffer */ @@ -318,7 +318,7 @@ httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size, void httpHdrScStatDumper(StoreEntry * sentry, int idx, double val, double size, int count) { - extern const HttpHeaderStat *dump_stat; /* argh! */ + extern const HttpHeaderStat *dump_stat; /* argh! */ const int id = (int) val; const int valid_id = id >= 0 && id < SC_ENUM_END; const char *name = valid_id ? ScFieldsInfo[id].name.termedBuf() : "INVALID"; @@ -368,3 +368,4 @@ HttpHdrSc::getMergedTarget(const char *ourtarget) return NULL; } + diff --git a/src/HttpHdrSc.h b/src/HttpHdrSc.h index e542a94af7..675f3ad292 100644 --- a/src/HttpHdrSc.h +++ b/src/HttpHdrSc.h @@ -50,3 +50,4 @@ HttpHdrSc *httpHdrScParseCreate(String const &); void httpHdrScSetMaxAge(HttpHdrSc *, char const *, int); #endif /* SQUID_HTTPHDRSURROGATECONTROL_H */ + diff --git a/src/HttpHdrScTarget.cc b/src/HttpHdrScTarget.cc index 606f844b94..3b2da9fe53 100644 --- a/src/HttpHdrScTarget.cc +++ b/src/HttpHdrScTarget.cc @@ -47,3 +47,4 @@ HttpHdrScTarget::updateStats(StatHist * hist) const if (isSet(c)) hist->count(c); } + diff --git a/src/HttpHdrScTarget.h b/src/HttpHdrScTarget.h index 234100df19..01b9d573c3 100644 --- a/src/HttpHdrScTarget.h +++ b/src/HttpHdrScTarget.h @@ -34,12 +34,12 @@ public: static const int MAX_STALE_UNSET=0; //max-stale is unset HttpHdrScTarget(const char *target_): - mask(0), max_age(MAX_AGE_UNSET), max_stale(MAX_STALE_UNSET),target(target_) {} + mask(0), max_age(MAX_AGE_UNSET), max_stale(MAX_STALE_UNSET),target(target_) {} HttpHdrScTarget(const String &target_): - mask(0), max_age(MAX_AGE_UNSET), max_stale(MAX_STALE_UNSET),target(target_) {} + mask(0), max_age(MAX_AGE_UNSET), max_stale(MAX_STALE_UNSET),target(target_) {} HttpHdrScTarget(const HttpHdrScTarget &t): - mask(t.mask), max_age(t.max_age), max_stale(t.max_stale), - content_(t.content_), target(t.target) {} + mask(t.mask), max_age(t.max_age), max_stale(t.max_stale), + content_(t.content_), target(t.target) {} bool hasNoStore() const {return isSet(SC_NO_STORE); } void noStore(bool v) { setMask(SC_NO_STORE,v); } @@ -107,3 +107,4 @@ private: void httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size, int count); #endif /* SQUID_HTTPHDRSURROGATECONTROLTARGET_H */ + diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index e029a8add7..4d24035a8c 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -74,7 +74,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"Age", HDR_AGE, ftInt}, {"Allow", HDR_ALLOW, ftStr}, {"Alternate-Protocol", HDR_ALTERNATE_PROTOCOL, ftStr}, - {"Authorization", HDR_AUTHORIZATION, ftStr}, /* for now */ + {"Authorization", HDR_AUTHORIZATION, ftStr}, /* for now */ {"Cache-Control", HDR_CACHE_CONTROL, ftPCc}, {"Connection", HDR_CONNECTION, ftStr}, {"Content-Base", HDR_CONTENT_BASE, ftStr}, @@ -83,7 +83,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"Content-Language", HDR_CONTENT_LANGUAGE, ftStr}, {"Content-Length", HDR_CONTENT_LENGTH, ftInt64}, {"Content-Location", HDR_CONTENT_LOCATION, ftStr}, - {"Content-MD5", HDR_CONTENT_MD5, ftStr}, /* for now */ + {"Content-MD5", HDR_CONTENT_MD5, ftStr}, /* for now */ {"Content-Range", HDR_CONTENT_RANGE, ftPContRange}, {"Content-Type", HDR_CONTENT_TYPE, ftStr}, {"Cookie", HDR_COOKIE, ftStr}, @@ -96,9 +96,9 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"From", HDR_FROM, ftStr}, {"Host", HDR_HOST, ftStr}, {"HTTP2-Settings", HDR_HTTP2_SETTINGS, ftStr}, /* for now */ - {"If-Match", HDR_IF_MATCH, ftStr}, /* for now */ + {"If-Match", HDR_IF_MATCH, ftStr}, /* for now */ {"If-Modified-Since", HDR_IF_MODIFIED_SINCE, ftDate_1123}, - {"If-None-Match", HDR_IF_NONE_MATCH, ftStr}, /* for now */ + {"If-None-Match", HDR_IF_NONE_MATCH, ftStr}, /* for now */ {"If-Range", HDR_IF_RANGE, ftDate_1123_or_ETag}, {"If-Unmodified-Since", HDR_IF_UNMODIFIED_SINCE, ftDate_1123}, {"Keep-Alive", HDR_KEEP_ALIVE, ftStr}, @@ -107,7 +107,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"Link", HDR_LINK, ftStr}, {"Location", HDR_LOCATION, ftStr}, {"Max-Forwards", HDR_MAX_FORWARDS, ftInt64}, - {"Mime-Version", HDR_MIME_VERSION, ftStr}, /* for now */ + {"Mime-Version", HDR_MIME_VERSION, ftStr}, /* for now */ {"Negotiate", HDR_NEGOTIATE, ftStr}, {"Origin", HDR_ORIGIN, ftStr}, {"Pragma", HDR_PRAGMA, ftStr}, @@ -119,8 +119,8 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"Public", HDR_PUBLIC, ftStr}, {"Range", HDR_RANGE, ftPRange}, {"Referer", HDR_REFERER, ftStr}, - {"Request-Range", HDR_REQUEST_RANGE, ftPRange}, /* usually matches HDR_RANGE */ - {"Retry-After", HDR_RETRY_AFTER, ftStr}, /* for now (ftDate_1123 or ftInt!) */ + {"Request-Range", HDR_REQUEST_RANGE, ftPRange}, /* usually matches HDR_RANGE */ + {"Retry-After", HDR_RETRY_AFTER, ftStr}, /* for now (ftDate_1123 or ftInt!) */ {"Server", HDR_SERVER, ftStr}, {"Set-Cookie", HDR_SET_COOKIE, ftStr}, {"Set-Cookie2", HDR_SET_COOKIE2, ftStr}, @@ -128,13 +128,13 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"Title", HDR_TITLE, ftStr}, {"Trailer", HDR_TRAILER, ftStr}, {"Transfer-Encoding", HDR_TRANSFER_ENCODING, ftStr}, - {"Translate", HDR_TRANSLATE, ftStr}, /* for now. may need to crop */ + {"Translate", HDR_TRANSLATE, ftStr}, /* for now. may need to crop */ {"Unless-Modified-Since", HDR_UNLESS_MODIFIED_SINCE, ftStr}, /* for now ignore. may need to crop */ - {"Upgrade", HDR_UPGRADE, ftStr}, /* for now */ + {"Upgrade", HDR_UPGRADE, ftStr}, /* for now */ {"User-Agent", HDR_USER_AGENT, ftStr}, - {"Vary", HDR_VARY, ftStr}, /* for now */ - {"Via", HDR_VIA, ftStr}, /* for now */ - {"Warning", HDR_WARNING, ftStr}, /* for now */ + {"Vary", HDR_VARY, ftStr}, /* for now */ + {"Via", HDR_VIA, ftStr}, /* for now */ + {"Warning", HDR_WARNING, ftStr}, /* for now */ {"WWW-Authenticate", HDR_WWW_AUTHENTICATE, ftStr}, {"Authentication-Info", HDR_AUTHENTICATION_INFO, ftStr}, {"X-Cache", HDR_X_CACHE, ftStr}, @@ -156,7 +156,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = { {"FTP-Pre", HDR_FTP_PRE, ftStr}, {"FTP-Status", HDR_FTP_STATUS, ftInt}, {"FTP-Reason", HDR_FTP_REASON, ftStr}, - {"Other:", HDR_OTHER, ftStr} /* ':' will not allow matches */ + {"Other:", HDR_OTHER, ftStr} /* ':' will not allow matches */ }; static HttpHeaderFieldInfo *Headers = NULL; @@ -172,7 +172,7 @@ http_hdr_type &operator++ (http_hdr_type &aHeader) * headers with field values defined as #(values) in HTTP/1.1 * Headers that are currently not recognized, are commented out. */ -static HttpHeaderMask ListHeadersMask; /* set run-time using ListHeadersArr */ +static HttpHeaderMask ListHeadersMask; /* set run-time using ListHeadersArr */ static http_hdr_type ListHeadersArr[] = { HDR_ACCEPT, HDR_ACCEPT_CHARSET, @@ -248,7 +248,7 @@ static http_hdr_type EntityHeadersArr[] = { }; /* request-only headers */ -static HttpHeaderMask RequestHeadersMask; /* set run-time using RequestHeaders */ +static HttpHeaderMask RequestHeadersMask; /* set run-time using RequestHeaders */ static http_hdr_type RequestHeadersArr[] = { HDR_ACCEPT, HDR_ACCEPT_CHARSET, @@ -276,7 +276,7 @@ static http_hdr_type RequestHeadersArr[] = { }; /* reply-only headers */ -static HttpHeaderMask ReplyHeadersMask; /* set run-time using ReplyHeaders */ +static HttpHeaderMask ReplyHeadersMask; /* set run-time using ReplyHeaders */ static http_hdr_type ReplyHeadersArr[] = { HDR_ACCEPT_ENCODING, HDR_ACCEPT_RANGES, @@ -426,7 +426,7 @@ httpHeaderStatInit(HttpHeaderStat * hs, const char *label) assert(label); memset(hs, 0, sizeof(HttpHeaderStat)); hs->label = label; - hs->hdrUCountDistr.enumInit(32); /* not a real enum */ + hs->hdrUCountDistr.enumInit(32); /* not a real enum */ hs->fieldTypeDistr.enumInit(HDR_ENUM_END); hs->ccTypeDistr.enumInit(CC_ENUM_END); hs->scTypeDistr.enumInit(SC_ENUM_END); @@ -623,10 +623,10 @@ HttpHeader::parse(const char *header_start, size_t hdrLen) field_end = field_ptr; - ++field_ptr; /* Move to next line */ + ++field_ptr; /* Move to next line */ if (field_end > this_line && field_end[-1] == '\r') { - --field_end; /* Ignore CR LF */ + --field_end; /* Ignore CR LF */ if (owner == hoRequest && field_end > this_line) { bool cr_only = true; @@ -650,7 +650,7 @@ HttpHeader::parse(const char *header_start, size_t hdrLen) getStringPrefix(field_start, field_end-field_start) << "}"); if (Config.onoff.relaxed_header_parser) { - char *p = (char *) this_line; /* XXX Warning! This destroys original header content and violates specifications somewhat */ + char *p = (char *) this_line; /* XXX Warning! This destroys original header content and violates specifications somewhat */ while ((p = (char *)memchr(p, '\r', field_end - p)) != NULL) { *p = ' '; @@ -678,7 +678,7 @@ HttpHeader::parse(const char *header_start, size_t hdrLen) return reset(); } - break; /* terminating blank line */ + break; /* terminating blank line */ } if ((e = HttpHeaderEntry::parse(field_start, field_end)) == NULL) { @@ -750,7 +750,7 @@ HttpHeader::parse(const char *header_start, size_t hdrLen) } PROF_stop(HttpHeaderParse); - return 1; /* even if no fields where found, it is a valid header */ + return 1; /* even if no fields where found, it is a valid header */ } /* packs all the entries using supplied packer */ @@ -839,7 +839,7 @@ HttpHeader::findEntry(http_hdr_type id) const /* hm.. we thought it was there, but it was not found */ assert(0); - return NULL; /* not reached */ + return NULL; /* not reached */ } /* @@ -865,7 +865,7 @@ HttpHeader::findLastEntry(http_hdr_type id) const result = e; } - assert(result); /* must be there! */ + assert(result); /* must be there! */ return result; } @@ -878,7 +878,7 @@ HttpHeader::delByName(const char *name) int count = 0; HttpHeaderPos pos = HttpHeaderInitPos; HttpHeaderEntry *e; - httpHeaderMaskInit(&mask, 0); /* temporal inconsistency */ + httpHeaderMaskInit(&mask, 0); /* temporal inconsistency */ debugs(55, 9, "deleting '" << name << "' fields in hdr " << this); while ((e = getEntry(&pos))) { @@ -900,7 +900,7 @@ HttpHeader::delById(http_hdr_type id) HttpHeaderEntry *e; debugs(55, 8, this << " del-by-id " << id); assert_eid(id); - assert(id != HDR_OTHER); /* does not make sense */ + assert(id != HDR_OTHER); /* does not make sense */ if (!CBIT_TEST(mask, id)) return 0; @@ -1199,7 +1199,7 @@ void HttpHeader::putInt(http_hdr_type id, int number) { assert_eid(id); - assert(Headers[id].type == ftInt); /* must be of an appropriate type */ + assert(Headers[id].type == ftInt); /* must be of an appropriate type */ assert(number >= 0); addEntry(new HttpHeaderEntry(id, NULL, xitoa(number))); } @@ -1208,7 +1208,7 @@ void HttpHeader::putInt64(http_hdr_type id, int64_t number) { assert_eid(id); - assert(Headers[id].type == ftInt64); /* must be of an appropriate type */ + assert(Headers[id].type == ftInt64); /* must be of an appropriate type */ assert(number >= 0); addEntry(new HttpHeaderEntry(id, NULL, xint64toa(number))); } @@ -1217,7 +1217,7 @@ void HttpHeader::putTime(http_hdr_type id, time_t htime) { assert_eid(id); - assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ + assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ assert(htime >= 0); addEntry(new HttpHeaderEntry(id, NULL, mkrfc1123(htime))); } @@ -1226,7 +1226,7 @@ void HttpHeader::insertTime(http_hdr_type id, time_t htime) { assert_eid(id); - assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ + assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ assert(htime >= 0); insertEntry(new HttpHeaderEntry(id, NULL, mkrfc1123(htime))); } @@ -1235,7 +1235,7 @@ void HttpHeader::putStr(http_hdr_type id, const char *str) { assert_eid(id); - assert(Headers[id].type == ftStr); /* must be of an appropriate type */ + assert(Headers[id].type == ftStr); /* must be of an appropriate type */ assert(str); addEntry(new HttpHeaderEntry(id, NULL, str)); } @@ -1344,7 +1344,7 @@ int HttpHeader::getInt(http_hdr_type id) const { assert_eid(id); - assert(Headers[id].type == ftInt); /* must be of an appropriate type */ + assert(Headers[id].type == ftInt); /* must be of an appropriate type */ HttpHeaderEntry *e; if ((e = findEntry(id))) @@ -1357,7 +1357,7 @@ int64_t HttpHeader::getInt64(http_hdr_type id) const { assert_eid(id); - assert(Headers[id].type == ftInt64); /* must be of an appropriate type */ + assert(Headers[id].type == ftInt64); /* must be of an appropriate type */ HttpHeaderEntry *e; if ((e = findEntry(id))) @@ -1372,7 +1372,7 @@ HttpHeader::getTime(http_hdr_type id) const HttpHeaderEntry *e; time_t value = -1; assert_eid(id); - assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ + assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ if ((e = findEntry(id))) { value = parse_rfc1123(e->value.termedBuf()); @@ -1388,10 +1388,10 @@ HttpHeader::getStr(http_hdr_type id) const { HttpHeaderEntry *e; assert_eid(id); - assert(Headers[id].type == ftStr); /* must be of an appropriate type */ + assert(Headers[id].type == ftStr); /* must be of an appropriate type */ if ((e = findEntry(id))) { - httpHeaderNoteParsedEntry(e->id, e->value, 0); /* no errors are possible */ + httpHeaderNoteParsedEntry(e->id, e->value, 0); /* no errors are possible */ return e->value.termedBuf(); } @@ -1404,10 +1404,10 @@ HttpHeader::getLastStr(http_hdr_type id) const { HttpHeaderEntry *e; assert_eid(id); - assert(Headers[id].type == ftStr); /* must be of an appropriate type */ + assert(Headers[id].type == ftStr); /* must be of an appropriate type */ if ((e = findLastEntry(id))) { - httpHeaderNoteParsedEntry(e->id, e->value, 0); /* no errors are possible */ + httpHeaderNoteParsedEntry(e->id, e->value, 0); /* no errors are possible */ return e->value.termedBuf(); } @@ -1506,23 +1506,23 @@ HttpHeader::getAuth(http_hdr_type id, const char *auth_scheme) const assert(auth_scheme); field = getStr(id); - if (!field) /* no authorization field */ + if (!field) /* no authorization field */ return NULL; l = strlen(auth_scheme); - if (!l || strncasecmp(field, auth_scheme, l)) /* wrong scheme */ + if (!l || strncasecmp(field, auth_scheme, l)) /* wrong scheme */ return NULL; field += l; - if (!xisspace(*field)) /* wrong scheme */ + if (!xisspace(*field)) /* wrong scheme */ return NULL; /* skip white space */ for (; field && xisspace(*field); ++field); - if (!*field) /* no authorization cookie */ + if (!*field) /* no authorization cookie */ return NULL; static char decodedAuthToken[8192]; @@ -1536,7 +1536,7 @@ HttpHeader::getETag(http_hdr_type id) const { ETag etag = {NULL, -1}; HttpHeaderEntry *e; - assert(Headers[id].type == ftETag); /* must be of an appropriate type */ + assert(Headers[id].type == ftETag); /* must be of an appropriate type */ if ((e = findEntry(id))) etagParseInit(&etag, e->value.termedBuf()); @@ -1549,7 +1549,7 @@ HttpHeader::getTimeOrTag(http_hdr_type id) const { TimeOrTag tot; HttpHeaderEntry *e; - assert(Headers[id].type == ftDate_1123_or_ETag); /* must be of an appropriate type */ + assert(Headers[id].type == ftDate_1123_or_ETag); /* must be of an appropriate type */ memset(&tot, 0, sizeof(tot)); if ((e = findEntry(id))) { @@ -1567,7 +1567,7 @@ HttpHeader::getTimeOrTag(http_hdr_type id) const } } - assert(tot.time < 0 || !tot.tag.str); /* paranoid */ + assert(tot.time < 0 || !tot.tag.str); /* paranoid */ return tot; } @@ -1617,7 +1617,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end) /* note: name_start == field_start */ const char *name_end = (const char *)memchr(field_start, ':', field_end - field_start); int name_len = name_end ? name_end - field_start :0; - const char *value_start = field_start + name_len + 1; /* skip ':' */ + const char *value_start = field_start + name_len + 1; /* skip ':' */ /* note: value_end == field_end */ ++ HeaderEntryParsedCount; @@ -1753,7 +1753,7 @@ httpHeaderNoteParsedEntry(http_hdr_type id, String const &context, int error) */ /* tmp variable used to pass stat info to dumpers */ -extern const HttpHeaderStat *dump_stat; /* argh! */ +extern const HttpHeaderStat *dump_stat; /* argh! */ const HttpHeaderStat *dump_stat = NULL; void @@ -1979,3 +1979,4 @@ HttpHeader::removeConnectionHeaderEntries() refreshMask(); } } + diff --git a/src/HttpHeader.h b/src/HttpHeader.h index 63659fdcb5..9e0e0a1610 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -28,7 +28,7 @@ class SBuf; /** possible types for http header fields */ typedef enum { - ftInvalid = HDR_ENUM_END, /**< to catch nasty errors with hdr_id<->fld_type clashes */ + ftInvalid = HDR_ENUM_END, /**< to catch nasty errors with hdr_id<->fld_type clashes */ ftInt, ftInt64, ftStr, @@ -157,10 +157,10 @@ public: inline bool chunked() const; ///< whether message uses chunked Transfer-Encoding /* protected, do not use these, use interface functions instead */ - std::vector entries; /**< parsed fields in raw format */ - HttpHeaderMask mask; /**< bit set <=> entry present */ - http_hdr_owner_type owner; /**< request or reply */ - int len; /**< length when packed, not counting terminating null-byte */ + std::vector entries; /**< parsed fields in raw format */ + HttpHeaderMask mask; /**< bit set <=> entry present */ + http_hdr_owner_type owner; /**< request or reply */ + int len; /**< length when packed, not counting terminating null-byte */ protected: /** \deprecated Public access replaced by removeHopByHopEntries() */ @@ -190,3 +190,4 @@ void httpHeaderInitModule(void); void httpHeaderCleanModule(void); #endif /* SQUID_HTTPHEADER_H */ + diff --git a/src/HttpHeaderFieldInfo.h b/src/HttpHeaderFieldInfo.h index 58287591df..2191d97d0c 100644 --- a/src/HttpHeaderFieldInfo.h +++ b/src/HttpHeaderFieldInfo.h @@ -25,3 +25,4 @@ public: }; #endif /* SQUID_HTTPHEADERFIELDINFO_H_ */ + diff --git a/src/HttpHeaderFieldStat.h b/src/HttpHeaderFieldStat.h index d304e81044..74931942a7 100644 --- a/src/HttpHeaderFieldStat.h +++ b/src/HttpHeaderFieldStat.h @@ -23,3 +23,4 @@ public: }; #endif /* SQUID_HTTPHEADERFIELDSTAT_H_ */ + diff --git a/src/HttpHeaderMask.h b/src/HttpHeaderMask.h index 608d428ce6..54324b210e 100644 --- a/src/HttpHeaderMask.h +++ b/src/HttpHeaderMask.h @@ -15,3 +15,4 @@ typedef char HttpHeaderMask[12]; void httpHeaderMaskInit(HttpHeaderMask * mask, int value); #endif /* SQUID_HTTPHEADERMASK_H */ + diff --git a/src/HttpHeaderRange.h b/src/HttpHeaderRange.h index 482a21ec41..751d6095e5 100644 --- a/src/HttpHeaderRange.h +++ b/src/HttpHeaderRange.h @@ -99,9 +99,10 @@ public: void updateSpec(); int64_t debt() const; void debt(int64_t); - int64_t debt_size; /* bytes left to send from the current spec */ - String boundary; /* boundary for multipart responses */ + int64_t debt_size; /* bytes left to send from the current spec */ + String boundary; /* boundary for multipart responses */ bool valid; }; #endif /* SQUID_HTTPHEADERRANGE_H */ + diff --git a/src/HttpHeaderStat.h b/src/HttpHeaderStat.h index c8326dd8aa..e441efd498 100644 --- a/src/HttpHeaderStat.h +++ b/src/HttpHeaderStat.h @@ -31,3 +31,4 @@ public: }; #endif /* HTTPHEADERSTAT_H_ */ + diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 4d19e65d53..681a24d69e 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -54,7 +54,7 @@ httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count) /* sanity checks */ assert(id >= 0 && id < count); assert(attrs[i].name); - assert(info->id == HDR_ACCEPT && info->type == ftInvalid); /* was not set before */ + assert(info->id == HDR_ACCEPT && info->type == ftInvalid); /* was not set before */ /* copy and init fields */ info->id = id; info->type = attrs[i].type; @@ -89,10 +89,10 @@ httpHeaderCalcMask(HttpHeaderMask * mask, http_hdr_type http_hdr_type_enums[], s size_t i; const int * enums = (const int *) http_hdr_type_enums; assert(mask && enums); - assert(count < sizeof(*mask) * 8); /* check for overflow */ + assert(count < sizeof(*mask) * 8); /* check for overflow */ for (i = 0; i < count; ++i) { - assert(!CBIT_TEST(*mask, enums[i])); /* check for duplicates */ + assert(!CBIT_TEST(*mask, enums[i])); /* check for duplicates */ CBIT_SET(*mask, enums[i]); } } @@ -192,7 +192,7 @@ httpHeaderParseOffset(const char *start, int64_t * value) { errno = 0; int64_t res = strtoll(start, NULL, 10); - if (!res && EINVAL == errno) /* maybe not portable? */ + if (!res && EINVAL == errno) /* maybe not portable? */ return 0; *value = res; return 1; @@ -545,3 +545,4 @@ httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer } } } + diff --git a/src/HttpHeaderTools.h b/src/HttpHeaderTools.h index e39c4f179c..514f046cc4 100644 --- a/src/HttpHeaderTools.h +++ b/src/HttpHeaderTools.h @@ -129,3 +129,4 @@ const char *getStringPrefix(const char *str, size_t len); void httpHdrMangleList(HttpHeader *, HttpRequest *, int req_or_rep); #endif + diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 7094447e23..8bf77337d2 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -18,12 +18,12 @@ #include "SquidConfig.h" HttpMsg::HttpMsg(http_hdr_owner_type owner): - http_ver(Http::ProtocolVersion()), - header(owner), - cache_control(NULL), - hdr_sz(0), - content_length(0), - pstate(psReadyToParseStartLine) + http_ver(Http::ProtocolVersion()), + header(owner), + cache_control(NULL), + hdr_sz(0), + content_length(0), + pstate(psReadyToParseStartLine) {} HttpMsg::~HttpMsg() @@ -73,7 +73,7 @@ httpMsgIsolateHeaders(const char **parse_start, int l, const char **blk_start, c * NOT point to a CR or NL character, then return failure */ if (**parse_start != '\r' && **parse_start != '\n') - return 0; /* failure */ + return 0; /* failure */ /* * If we didn't find the end of headers, and parse_start does point @@ -340,3 +340,4 @@ void HttpMsg::firstLineBuf(MemBuf& mb) packFirstLineInto(&p, true); packerClean(&p); } + diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 1e222d9978..ba9f87fa1b 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -102,3 +102,4 @@ protected: #define HTTPMSGLOCK(a) (a)->lock() #endif /* SQUID_HTTPMSG_H */ + diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 7552d1f9a0..2301ec8ea6 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -59,8 +59,8 @@ httpReplyInitModule(void) } HttpReply::HttpReply() : HttpMsg(hoReply), date (0), last_modified (0), - expires (0), surrogate_control (NULL), content_range (NULL), keep_alive (0), - protoPrefix("HTTP/"), bodySizeMax(-2) + expires (0), surrogate_control (NULL), content_range (NULL), keep_alive (0), + protoPrefix("HTTP/"), bodySizeMax(-2) { init(); } @@ -198,7 +198,7 @@ HttpReply::setHeaders(Http::StatusCode status, const char *reason, if (expiresTime >= 0) hdr->putTime(HDR_EXPIRES, expiresTime); - if (lmt > 0) /* this used to be lmt != 0 @?@ */ + if (lmt > 0) /* this used to be lmt != 0 @?@ */ hdr->putTime(HDR_LAST_MODIFIED, lmt); date = squid_curtime; @@ -393,7 +393,7 @@ HttpReply::bodySize(const HttpRequestMethod& method) const else if (method.id() == Http::METHOD_HEAD) return 0; else if (sline.status() == Http::scOkay) - (void) 0; /* common case, continue */ + (void) 0; /* common case, continue */ else if (sline.status() == Http::scNoContent) return 0; else if (sline.status() == Http::scNotModified) @@ -657,3 +657,4 @@ String HttpReply::removeStaleWarningValues(const String &value) return newValue; } + diff --git a/src/HttpReply.h b/src/HttpReply.h index 93aca6615a..00a829255a 100644 --- a/src/HttpReply.h +++ b/src/HttpReply.h @@ -59,7 +59,7 @@ public: /** \par public, writable, but use httpReply* interfaces when possible */ Http::StatusLine sline; - HttpBody body; /**< for small constant memory-resident text bodies only */ + HttpBody body; /**< for small constant memory-resident text bodies only */ String protoPrefix; /**< e.g., "HTTP/" */ @@ -145,3 +145,4 @@ protected: }; #endif /* SQUID_HTTPREPLY_H */ + diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index df92ff28de..851b1aee48 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -36,13 +36,13 @@ #endif HttpRequest::HttpRequest() : - HttpMsg(hoRequest) + HttpMsg(hoRequest) { init(); } HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath) : - HttpMsg(hoRequest) + HttpMsg(hoRequest) { static unsigned int id = 1; debugs(93,7, HERE << "constructed, this=" << this << " id=" << ++id); @@ -89,8 +89,8 @@ HttpRequest::init() dnsWait = -1; errType = ERR_NONE; errDetail = ERR_DETAIL_NONE; - peer_login = NULL; // not allocated/deallocated by this class - peer_domain = NULL; // not allocated/deallocated by this class + peer_login = NULL; // not allocated/deallocated by this class + peer_domain = NULL; // not allocated/deallocated by this class peer_host = NULL; vary_headers = NULL; myportname = null_string; @@ -599,7 +599,7 @@ HttpRequest::maybeCacheable() case AnyP::PROTO_CACHE_OBJECT: return false; - //case AnyP::PROTO_FTP: + //case AnyP::PROTO_FTP: default: break; } @@ -699,3 +699,4 @@ HttpRequest::storeId() return urlCanonical(this); } + diff --git a/src/HttpRequest.h b/src/HttpRequest.h index 0df54cf1cc..de12e77907 100644 --- a/src/HttpRequest.h +++ b/src/HttpRequest.h @@ -171,29 +171,29 @@ public: err_type errType; int errDetail; ///< errType-specific detail about the transaction error - char *peer_login; /* Configured peer login:password */ + char *peer_login; /* Configured peer login:password */ char *peer_host; /* Selected peer host*/ - time_t lastmod; /* Used on refreshes */ + time_t lastmod; /* Used on refreshes */ - const char *vary_headers; /* Used when varying entities are detected. Changes how the store key is calculated */ + const char *vary_headers; /* Used when varying entities are detected. Changes how the store key is calculated */ - char *peer_domain; /* Configured peer forceddomain */ + char *peer_domain; /* Configured peer forceddomain */ String myportname; // Internal tag name= value from port this requests arrived in. NotePairs::Pointer notes; ///< annotations added by the note directive and helpers - String tag; /* Internal tag for this request */ + String tag; /* Internal tag for this request */ - String extacl_user; /* User name returned by extacl lookup */ + String extacl_user; /* User name returned by extacl lookup */ - String extacl_passwd; /* Password returned by extacl lookup */ + String extacl_passwd; /* Password returned by extacl lookup */ - String extacl_log; /* String to be used for access.log purposes */ + String extacl_log; /* String to be used for access.log purposes */ - String extacl_message; /* String to be used for error page purposes */ + String extacl_message; /* String to be used for error page purposes */ #if FOLLOW_X_FORWARDED_FOR String x_forwarded_for_iterator; /* XXX a list of IP addresses */ @@ -265,3 +265,4 @@ protected: }; #endif /* SQUID_HTTPREQUEST_H */ + diff --git a/src/HttpStateFlags.h b/src/HttpStateFlags.h index a3e5ce98ec..c8c7be057a 100644 --- a/src/HttpStateFlags.h +++ b/src/HttpStateFlags.h @@ -31,3 +31,4 @@ public: }; #endif /* SQUID_HTTPSTATEFLAGS_H_ */ + diff --git a/src/ICP.h b/src/ICP.h index 85ba4a133a..d2520ae028 100644 --- a/src/ICP.h +++ b/src/ICP.h @@ -44,7 +44,7 @@ struct _icp_common_t { uint32_t shostid; /// \todo I don't believe this header is included in non-c++ code anywhere -/// the struct should become a public POD class and kill these ifdef. +/// the struct should become a public POD class and kill these ifdef. #ifdef __cplusplus _icp_common_t(); @@ -159,3 +159,4 @@ int icpSetCacheKey(const cache_key * key); const cache_key *icpGetCacheKey(const char *url, int reqnum); #endif /* SQUID_ICP_H */ + diff --git a/src/IoStats.h b/src/IoStats.h index 726bf2e251..10cf70c28a 100644 --- a/src/IoStats.h +++ b/src/IoStats.h @@ -26,3 +26,4 @@ public: }; #endif /* SQUID_IOSTATS_H_ */ + diff --git a/src/LeakFinder.cc b/src/LeakFinder.cc index 701d7e565b..0c7aaee3d2 100644 --- a/src/LeakFinder.cc +++ b/src/LeakFinder.cc @@ -23,9 +23,9 @@ /* ========================================================================= */ LeakFinderPtr::LeakFinderPtr(void *p , const char *f, const int l) : - file(f), - line(l), - when(squid_curtime) + file(f), + line(l), + when(squid_curtime) { // XXX: these bits should be done by hash_link() key = p; @@ -35,8 +35,8 @@ LeakFinderPtr::LeakFinderPtr(void *p , const char *f, const int l) : /* ========================================================================= */ LeakFinder::LeakFinder() : - count(0), - last_dump(0) + count(0), + last_dump(0) { debugs(45, 3, "LeakFinder constructed"); table = hash_create(cmp, 1 << 8, hash); @@ -123,3 +123,4 @@ LeakFinder::dump() } #endif /* USE_LEAKFINDER */ + diff --git a/src/LeakFinder.h b/src/LeakFinder.h index 2ea08bdcad..61e7b8a228 100644 --- a/src/LeakFinder.h +++ b/src/LeakFinder.h @@ -65,3 +65,4 @@ class LeakFinder {}; #endif /* USE_LEAKFINDER */ #endif /* SQUID_LEAKFINDER_H */ + diff --git a/src/LoadableModule.cc b/src/LoadableModule.cc index 120cb6c89c..868d5f1480 100644 --- a/src/LoadableModule.cc +++ b/src/LoadableModule.cc @@ -28,21 +28,21 @@ LoadableModule::LoadableModule(const String &aName): theName(aName), theHandle(0) { -# if XSTD_USE_LIBLTDL +# if XSTD_USE_LIBLTDL // Initialise preloaded symbol lookup table. LTDL_SET_PRELOADED_SYMBOLS(); if (lt_dlinit() != 0) throw TexcHere("internal error: cannot initialize libtool module loader"); -# endif +# endif } LoadableModule::~LoadableModule() { if (loaded()) unload(); -# if XSTD_USE_LIBLTDL +# if XSTD_USE_LIBLTDL assert(lt_dlexit() == 0); // XXX: replace with a warning -# endif +# endif } bool LoadableModule::loaded() const @@ -74,29 +74,30 @@ void LoadableModule::unload() void *LoadableModule::openModule(int mode) { -# if XSTD_USE_LIBLTDL +# if XSTD_USE_LIBLTDL return lt_dlopen(theName.termedBuf()); -# else +# else return dlopen(theName.termedBuf(), mode == lmNow ? RTLD_NOW : RTLD_LAZY); -# endif +# endif } bool LoadableModule::closeModule() { -# if XSTD_USE_LIBLTDL +# if XSTD_USE_LIBLTDL // we cast to avoid including ltdl.h in LoadableModule.h return lt_dlclose(static_cast(theHandle)) == 0; -# else +# else return dlclose(theHandle) == 0; -# endif +# endif } const char *LoadableModule::errorMsg() { -# if XSTD_USE_LIBLTDL +# if XSTD_USE_LIBLTDL return lt_dlerror(); -# else +# else return dlerror(); -# endif +# endif } + diff --git a/src/LoadableModule.h b/src/LoadableModule.h index 6ef2d3beef..f5a6c420df 100644 --- a/src/LoadableModule.h +++ b/src/LoadableModule.h @@ -40,3 +40,4 @@ private: }; #endif + diff --git a/src/LoadableModules.cc b/src/LoadableModules.cc index c6d0917ebd..54f14a6940 100644 --- a/src/LoadableModules.cc +++ b/src/LoadableModules.cc @@ -32,3 +32,4 @@ LoadableModulesConfigure(const wordlist *names) LoadModule(i->key); debugs(1, DBG_IMPORTANT, "Squid plugin modules loaded: " << count); } + diff --git a/src/LoadableModules.h b/src/LoadableModules.h index 18238b0165..4ba6bf8b83 100644 --- a/src/LoadableModules.h +++ b/src/LoadableModules.h @@ -16,3 +16,4 @@ class wordlist; void LoadableModulesConfigure(const wordlist *names); #endif /* SQUID_LOADABLE_MODULES_H */ + diff --git a/src/LogTags.h b/src/LogTags.h index c489b35722..66018ba0f4 100644 --- a/src/LogTags.h +++ b/src/LogTags.h @@ -69,3 +69,4 @@ inline LogTags &operator++ (LogTags &aLogType) } #endif + diff --git a/src/MasterXaction.cc b/src/MasterXaction.cc index 047fe384ac..8c730ae16f 100644 --- a/src/MasterXaction.cc +++ b/src/MasterXaction.cc @@ -10,3 +10,4 @@ #include "MasterXaction.h" InstanceIdDefinitions(MasterXaction, "MXID_"); + diff --git a/src/MasterXaction.h b/src/MasterXaction.h index f27715f1b4..a814b9bfd2 100644 --- a/src/MasterXaction.h +++ b/src/MasterXaction.h @@ -51,3 +51,4 @@ public: }; #endif /* SQUID_SRC_MASTERXACTION_H */ + diff --git a/src/MemBlob.cc b/src/MemBlob.cc index 8b34327647..7b5e3d9e07 100644 --- a/src/MemBlob.cc +++ b/src/MemBlob.cc @@ -37,19 +37,19 @@ std::ostream& MemBlobStats::dump(std::ostream &os) const { os << - "MemBlob created: " << alloc << - "\nMemBlob alive: " << live << - "\nMemBlob append calls: " << append << - "\nMemBlob currently allocated size: " << liveBytes << - "\nlive MemBlob mean current allocation size: " << - (static_cast(liveBytes)/(live?live:1)) << std::endl; + "MemBlob created: " << alloc << + "\nMemBlob alive: " << live << + "\nMemBlob append calls: " << append << + "\nMemBlob currently allocated size: " << liveBytes << + "\nlive MemBlob mean current allocation size: " << + (static_cast(liveBytes)/(live?live:1)) << std::endl; return os; } /* MemBlob */ MemBlob::MemBlob(const MemBlob::size_type reserveSize) : - mem(NULL), capacity(0), size(0) // will be set by memAlloc + mem(NULL), capacity(0), size(0) // will be set by memAlloc { debugs(MEMBLOB_DEBUGSECTION,9, HERE << "constructed, this=" << static_cast(this) << " id=" << id @@ -58,7 +58,7 @@ MemBlob::MemBlob(const MemBlob::size_type reserveSize) : } MemBlob::MemBlob(const char *buffer, const MemBlob::size_type bufSize) : - mem(NULL), capacity(0), size(0) // will be set by memAlloc + mem(NULL), capacity(0), size(0) // will be set by memAlloc { debugs(MEMBLOB_DEBUGSECTION,9, HERE << "constructed, this=" << static_cast(this) << " id=" << id @@ -134,9 +134,10 @@ std::ostream& MemBlob::dump(std::ostream &os) const { os << "id @" << (void *)this - << "mem:" << static_cast(mem) - << ",capacity:" << capacity - << ",size:" << size - << ",refs:" << LockCount() << "; "; + << "mem:" << static_cast(mem) + << ",capacity:" << capacity + << ",size:" << size + << ",refs:" << LockCount() << "; "; return os; } + diff --git a/src/MemBlob.h b/src/MemBlob.h index 63b18802bd..f0fb073798 100644 --- a/src/MemBlob.h +++ b/src/MemBlob.h @@ -121,3 +121,4 @@ private: }; #endif /* SQUID_MEMBLOB_H_ */ + diff --git a/src/MemBuf.cc b/src/MemBuf.cc index 051b19e163..bde466313b 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -125,7 +125,7 @@ MemBuf::clean() // nothing to do } else { assert(buf); - assert(!stolen); /* not frozen */ + assert(!stolen); /* not frozen */ memFreeBuf(capacity, buf); buf = NULL; @@ -143,7 +143,7 @@ MemBuf::reset() if (isNull()) { init(); } else { - assert(!stolen); /* not frozen */ + assert(!stolen); /* not frozen */ /* reset */ memset(buf, 0, capacity); size = 0; @@ -157,9 +157,9 @@ int MemBuf::isNull() { if (!buf && !max_capacity && !capacity && !size) - return 1; /* is null (not initialized) */ + return 1; /* is null (not initialized) */ - assert(buf && max_capacity && capacity); /* paranoid */ + assert(buf && max_capacity && capacity); /* paranoid */ return 0; } @@ -285,7 +285,7 @@ MemBuf::vPrintf(const char *fmt, va_list vargs) int sz = 0; assert(fmt); assert(buf); - assert(!stolen); /* not frozen */ + assert(!stolen); /* not frozen */ /* assert in Grow should quit first, but we do not want to have a scary infinite loop */ while (capacity <= max_capacity) { @@ -339,10 +339,10 @@ MemBuf::freeFunc() { FREE *ff; assert(buf); - assert(!stolen); /* not frozen */ + assert(!stolen); /* not frozen */ ff = memFreeBufFunc((size_t) capacity); - stolen = 1; /* freeze */ + stolen = 1; /* freeze */ return ff; } @@ -366,7 +366,7 @@ MemBuf::grow(mb_size_t min_cap) new_cap = 64 * 1024; while (new_cap < (size_t) min_cap) - new_cap += 64 * 1024; /* increase in reasonable steps */ + new_cap += 64 * 1024; /* increase in reasonable steps */ } else { new_cap = (size_t) min_cap; } @@ -375,9 +375,9 @@ MemBuf::grow(mb_size_t min_cap) if (new_cap > (size_t) max_capacity) new_cap = (size_t) max_capacity; - assert(new_cap <= (size_t) max_capacity); /* no overflow */ + assert(new_cap <= (size_t) max_capacity); /* no overflow */ - assert(new_cap > (size_t) capacity); /* progress */ + assert(new_cap > (size_t) capacity); /* progress */ buf_cap = (size_t) capacity; @@ -399,3 +399,4 @@ memBufReport(MemBuf * mb) assert(mb); mb->Printf("memBufReport is not yet implemented @?@\n"); } + diff --git a/src/MemBuf.h b/src/MemBuf.h index 337c53b4a3..b37495a91c 100644 --- a/src/MemBuf.h +++ b/src/MemBuf.h @@ -44,8 +44,8 @@ public: /** * Whether the buffer contains any data. - \retval true if data exists in the buffer - \retval false if data exists in the buffer + \retval true if data exists in the buffer + \retval false if data exists in the buffer */ bool hasContent() const { return size > 0; } @@ -62,8 +62,8 @@ public: /** * Whether the buffer contains any data space available. - \retval true if data can be added to the buffer - \retval false if the buffer is full + \retval true if data can be added to the buffer + \retval false if the buffer is full */ bool hasSpace() const { return size+1 < capacity; } @@ -151,11 +151,11 @@ public: */ mb_size_t capacity; - unsigned stolen:1; /* the buffer has been stolen for use by someone else */ + unsigned stolen:1; /* the buffer has been stolen for use by someone else */ #if 0 - unsigned valid:1; /* to be used for debugging only! */ + unsigned valid:1; /* to be used for debugging only! */ #endif }; @@ -165,3 +165,4 @@ void memBufReport(MemBuf * mb); void packerToMemInit(Packer * p, MemBuf * mb); #endif /* SQUID_MEMBUF_H */ + diff --git a/src/MemObject.cc b/src/MemObject.cc index f4cd481b67..be689b27f0 100644 --- a/src/MemObject.cc +++ b/src/MemObject.cc @@ -403,7 +403,7 @@ MemObject::trimSwappable() new_mem_lo = on_disk - 1; if (new_mem_lo == -1) - new_mem_lo = 0; /* the above might become -1 */ + new_mem_lo = 0; /* the above might become -1 */ data_hdr.freeDataUpto(new_mem_lo); @@ -510,3 +510,4 @@ MemObject::availableForSwapOut() const { return endOffset() - swapout.queue_offset; } + diff --git a/src/MemObject.h b/src/MemObject.h index 44047966f4..a95345b388 100644 --- a/src/MemObject.h +++ b/src/MemObject.h @@ -185,3 +185,4 @@ private: extern RemovalPolicy *mem_policy; #endif /* SQUID_MEMOBJECT_H */ + diff --git a/src/MemStore.cc b/src/MemStore.cc index b6c3394f5d..ae9d55f48f 100644 --- a/src/MemStore.cc +++ b/src/MemStore.cc @@ -235,7 +235,7 @@ MemStore::anchorCollapsed(StoreEntry &collapsed, bool &inSync) sfileno index; const Ipc::StoreMapAnchor *const slot = map->openForReading( - reinterpret_cast(collapsed.key), index); + reinterpret_cast(collapsed.key), index); if (!slot) return false; @@ -853,3 +853,4 @@ MemStoreRr::~MemStoreRr() delete mapOwner; delete spaceOwner; } + diff --git a/src/MemStore.h b/src/MemStore.h index 6683ad9bfe..f1375b1641 100644 --- a/src/MemStore.h +++ b/src/MemStore.h @@ -113,3 +113,4 @@ private: // would hurt because we can support synchronous get/put, unlike the disks. #endif /* SQUID_MEMSTORE_H */ + diff --git a/src/MessageSizes.h b/src/MessageSizes.h index 7646dd8193..0f7b1026db 100644 --- a/src/MessageSizes.h +++ b/src/MessageSizes.h @@ -30,3 +30,4 @@ public: }; #endif /* SQUID_SRC_MESSAGESIZES_H */ + diff --git a/src/NeighborTypeDomainList.h b/src/NeighborTypeDomainList.h index 95ac0c8a86..75fcc2dad6 100644 --- a/src/NeighborTypeDomainList.h +++ b/src/NeighborTypeDomainList.h @@ -19,3 +19,4 @@ public: }; #endif /* SQUID_NEIGHBORTYPEDOMAINLIST_H_ */ + diff --git a/src/Notes.cc b/src/Notes.cc index 1dc77657bf..b1649e24f7 100644 --- a/src/Notes.cc +++ b/src/Notes.cc @@ -274,3 +274,4 @@ UpdateRequestNotes(ConnStateData *csd, HttpRequest &request, NotePairs const &he request.notes = new NotePairs; request.notes->replaceOrAdd(&helperNotes); } + diff --git a/src/Notes.h b/src/Notes.h index 9a292d442c..e9599d605e 100644 --- a/src/Notes.h +++ b/src/Notes.h @@ -200,7 +200,7 @@ public: */ bool empty() const {return entries.empty();} - std::vector entries; ///< The key/value pair entries + std::vector entries; ///< The key/value pair entries private: NotePairs &operator = (NotePairs const &); // Not implemented @@ -219,3 +219,4 @@ class ConnStateData; */ void UpdateRequestNotes(ConnStateData *csd, HttpRequest &request, NotePairs const ¬es); #endif + diff --git a/src/NullDelayId.cc b/src/NullDelayId.cc index 3e66b1ab49..81f0cbbeaa 100644 --- a/src/NullDelayId.cc +++ b/src/NullDelayId.cc @@ -29,3 +29,4 @@ NullDelayId::operator delete (void *address) } #endif /* USE_DELAY_POOLS */ + diff --git a/src/NullDelayId.h b/src/NullDelayId.h index 3b54a561e0..0aafe4265a 100644 --- a/src/NullDelayId.h +++ b/src/NullDelayId.h @@ -27,3 +27,4 @@ public: }; #endif #endif /* NULLDELAYID_H */ + diff --git a/src/OutOfBoundsException.h b/src/OutOfBoundsException.h index 8f1dd99768..651293a163 100644 --- a/src/OutOfBoundsException.h +++ b/src/OutOfBoundsException.h @@ -28,3 +28,4 @@ protected: }; #endif /* _SQUID_SRC_OUTOFBOUNDSEXCEPTION_H */ + diff --git a/src/Packer.cc b/src/Packer.cc index a815fece5d..125a267827 100644 --- a/src/Packer.cc +++ b/src/Packer.cc @@ -138,3 +138,4 @@ packerPrintf(Packer * p, const char *fmt,...) p->packer_vprintf(p->real_handler, fmt, args); va_end(args); } + diff --git a/src/Packer.h b/src/Packer.h index e9ec163710..31c7ac1440 100644 --- a/src/Packer.h +++ b/src/Packer.h @@ -26,7 +26,7 @@ public: /* protected, use interface functions instead */ append_f append; vprintf_f packer_vprintf; - void *real_handler; /* first parameter to real append and vprintf */ + void *real_handler; /* first parameter to real append and vprintf */ }; void packerClean(Packer * p); @@ -34,3 +34,4 @@ void packerAppend(Packer * p, const char *buf, int size); void packerPrintf(Packer * p, const char *fmt,...) PRINTF_FORMAT_ARG2; #endif /* SQUID_PACKER_H */ + diff --git a/src/Parsing.cc b/src/Parsing.cc index 7a71bafb59..bf56cf0036 100644 --- a/src/Parsing.cc +++ b/src/Parsing.cc @@ -290,3 +290,4 @@ GetHostWithPort(char *token, Ip::Address *ipa) return true; } + diff --git a/src/Parsing.h b/src/Parsing.h index f36320d1dd..a1f44858b7 100644 --- a/src/Parsing.h +++ b/src/Parsing.h @@ -56,3 +56,4 @@ bool StringToInt64(const char *str, int64_t &result, const char **p, int base); bool GetHostWithPort(char *token, Ip::Address *ipa); #endif /* SQUID_PARSING_H */ + diff --git a/src/PeerDigest.h b/src/PeerDigest.h index 6e2de11a33..b2e539def7 100644 --- a/src/PeerDigest.h +++ b/src/PeerDigest.h @@ -18,8 +18,8 @@ class Version { public: - short int current; /* current version */ - short int required; /* minimal version that can safely handle current version */ + short int current; /* current version */ + short int required; /* minimal version that can safely handle current version */ }; /* digest control block; used for transmission and storage */ @@ -86,14 +86,14 @@ public: struct { /* all times are absolute unless augmented with _delay */ - time_t initialized; /* creation */ - time_t needed; /* first lookup/use by a peer */ - time_t next_check; /* next scheduled check/refresh event */ - time_t retry_delay; /* delay before re-checking _invalid_ digest */ - time_t requested; /* requested a fresh copy of a digest */ - time_t req_delay; /* last request response time */ - time_t received; /* received the current copy of a digest */ - time_t disabled; /* disabled for good */ + time_t initialized; /* creation */ + time_t needed; /* first lookup/use by a peer */ + time_t next_check; /* next scheduled check/refresh event */ + time_t retry_delay; /* delay before re-checking _invalid_ digest */ + time_t requested; /* requested a fresh copy of a digest */ + time_t req_delay; /* last request response time */ + time_t received; /* received the current copy of a digest */ + time_t disabled; /* disabled for good */ } times; struct { @@ -117,3 +117,4 @@ void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e); #endif /* USE_CACHE_DIGESTS */ #endif /* SQUID_PEERDIGEST_H */ + diff --git a/src/PeerPoolMgr.cc b/src/PeerPoolMgr.cc index e64cd1a7e7..17da4184e5 100644 --- a/src/PeerPoolMgr.cc +++ b/src/PeerPoolMgr.cc @@ -31,11 +31,11 @@ CBDATA_CLASS_INIT(PeerPoolMgr); #if USE_OPENSSL /// Gives Ssl::PeerConnector access to Answer in the PeerPoolMgr callback dialer. class MyAnswerDialer: public UnaryMemFunT, - public Ssl::PeerConnector::CbDialer + public Ssl::PeerConnector::CbDialer { public: MyAnswerDialer(const JobPointer &aJob, Method aMethod): - UnaryMemFunT(aJob, aMethod, Ssl::PeerConnectorAnswer()) {} + UnaryMemFunT(aJob, aMethod, Ssl::PeerConnectorAnswer()) {} /* Ssl::PeerConnector::CbDialer API */ virtual Ssl::PeerConnectorAnswer &answer() { return arg1; } @@ -43,12 +43,12 @@ public: #endif PeerPoolMgr::PeerPoolMgr(CachePeer *aPeer): AsyncJob("PeerPoolMgr"), - peer(cbdataReference(aPeer)), - request(), - opener(), - securer(), - closer(), - addrUsed(0) + peer(cbdataReference(aPeer)), + request(), + opener(), + securer(), + closer(), + addrUsed(0) { } @@ -297,3 +297,4 @@ PeerPoolMgrsRr::syncConfig() } } } + diff --git a/src/PeerPoolMgr.h b/src/PeerPoolMgr.h index 6fa33a7e32..b78141d543 100644 --- a/src/PeerPoolMgr.h +++ b/src/PeerPoolMgr.h @@ -75,3 +75,4 @@ private: }; #endif /* SQUID_PEERPOOLMGR_H */ + diff --git a/src/PeerSelectState.h b/src/PeerSelectState.h index d18b3e83a8..e6bab4d9fb 100644 --- a/src/PeerSelectState.h +++ b/src/PeerSelectState.h @@ -90,3 +90,4 @@ public: }; #endif /* SQUID_PEERSELECTSTATE_H */ + diff --git a/src/PingData.h b/src/PingData.h index 29c4cd1fad..565cabc4f8 100644 --- a/src/PingData.h +++ b/src/PingData.h @@ -21,10 +21,11 @@ public: int n_sent; int n_recv; int n_replies_expected; - int timeout; /* msec */ + int timeout; /* msec */ int timedout; int w_rtt; int p_rtt; }; #endif /* SQUID_PINGDATA_H */ + diff --git a/src/ProfStats.cc b/src/ProfStats.cc index 1a80ca9ccf..cbf0b55181 100644 --- a/src/ProfStats.cc +++ b/src/ProfStats.cc @@ -172,7 +172,7 @@ xprof_average(TimersArray ** list, int secs) for (i = 0; i < XPROF_LAST; ++i) { hist[i]->name = head[i]->name; hist[i]->accu.summ += head[i]->accu.summ; - hist[i]->accu.count += head[i]->accu.count; /* accumulate multisec */ + hist[i]->accu.count += head[i]->accu.count; /* accumulate multisec */ if (!hist[i]->accu.best) hist[i]->accu.best = head[i]->accu.best; @@ -305,3 +305,4 @@ xprof_event(void *data) } #endif /* USE_XPROF_STATS */ + diff --git a/src/RefreshPattern.h b/src/RefreshPattern.h index 48ed6d55fa..7a8e4f679f 100644 --- a/src/RefreshPattern.h +++ b/src/RefreshPattern.h @@ -41,3 +41,4 @@ public: }; #endif /* SQUID_REFRESHPATTERN_H_ */ + diff --git a/src/RegexList.h b/src/RegexList.h index 022e190f90..41c163b2c8 100644 --- a/src/RegexList.h +++ b/src/RegexList.h @@ -20,3 +20,4 @@ public: }; #endif /* SQUID_REGEXLIST_H_ */ + diff --git a/src/RemovalPolicy.cc b/src/RemovalPolicy.cc index 34830f66e3..68c063a400 100644 --- a/src/RemovalPolicy.cc +++ b/src/RemovalPolicy.cc @@ -14,3 +14,4 @@ CBDATA_CLASS_INIT(RemovalPolicy); CBDATA_CLASS_INIT(RemovalPolicyWalker); CBDATA_CLASS_INIT(RemovalPurgeWalker); + diff --git a/src/RemovalPolicy.h b/src/RemovalPolicy.h index d4d35ce076..784620bd82 100644 --- a/src/RemovalPolicy.h +++ b/src/RemovalPolicy.h @@ -78,3 +78,4 @@ RemovalPolicy *createRemovalPolicy(RemovalPolicySettings * settings); typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args); #endif /* SQUID_REMOVALPOLICY_H */ + diff --git a/src/RequestFlags.cc b/src/RequestFlags.cc index 124eaa5751..016f011783 100644 --- a/src/RequestFlags.cc +++ b/src/RequestFlags.cc @@ -22,3 +22,4 @@ RequestFlags::cloneAdaptationImmune() const // are flags that are different, they should be cleared in the clone. return *this; } + diff --git a/src/RequestFlags.h b/src/RequestFlags.h index b3080cc350..0969fd6c5c 100644 --- a/src/RequestFlags.h +++ b/src/RequestFlags.h @@ -131,3 +131,4 @@ public: }; #endif /* SQUID_REQUESTFLAGS_H_ */ + diff --git a/src/SBuf.cc b/src/SBuf.cc index 1184894381..2428299537 100644 --- a/src/SBuf.cc +++ b/src/SBuf.cc @@ -36,11 +36,11 @@ const SBuf::size_type SBuf::npos; const SBuf::size_type SBuf::maxSize; SBufStats::SBufStats() - : alloc(0), allocCopy(0), allocFromString(0), allocFromCString(0), - assignFast(0), clear(0), append(0), toStream(0), setChar(0), - getChar(0), compareSlow(0), compareFast(0), copyOut(0), - rawAccess(0), nulTerminate(0), chop(0), trim(0), find(0), scanf(0), - caseChange(0), cowFast(0), cowSlow(0), live(0) + : alloc(0), allocCopy(0), allocFromString(0), allocFromCString(0), + assignFast(0), clear(0), append(0), toStream(0), setChar(0), + getChar(0), compareSlow(0), compareFast(0), copyOut(0), + rawAccess(0), nulTerminate(0), chop(0), trim(0), find(0), scanf(0), + caseChange(0), cowFast(0), cowSlow(0), live(0) {} SBufStats& @@ -74,7 +74,7 @@ SBufStats::operator +=(const SBufStats& ss) } SBuf::SBuf() - : store_(GetStorePrototype()), off_(0), len_(0) + : store_(GetStorePrototype()), off_(0), len_(0) { debugs(24, 8, id << " created"); ++stats.alloc; @@ -82,7 +82,7 @@ SBuf::SBuf() } SBuf::SBuf(const SBuf &S) - : store_(S.store_), off_(S.off_), len_(S.len_) + : store_(S.store_), off_(S.off_), len_(S.len_) { debugs(24, 8, id << " created from id " << S.id); ++stats.alloc; @@ -91,7 +91,7 @@ SBuf::SBuf(const SBuf &S) } SBuf::SBuf(const String &S) - : store_(GetStorePrototype()), off_(0), len_(0) + : store_(GetStorePrototype()), off_(0), len_(0) { debugs(24, 8, id << " created from string"); assign(S.rawBuf(), S.size()); @@ -101,7 +101,7 @@ SBuf::SBuf(const String &S) } SBuf::SBuf(const std::string &s) - : store_(GetStorePrototype()), off_(0), len_(0) + : store_(GetStorePrototype()), off_(0), len_(0) { debugs(24, 8, id << " created from std::string"); lowAppend(s.data(),s.length()); @@ -111,7 +111,7 @@ SBuf::SBuf(const std::string &s) } SBuf::SBuf(const char *S, size_type n) - : store_(GetStorePrototype()), off_(0), len_(0) + : store_(GetStorePrototype()), off_(0), len_(0) { append(S,n); ++stats.alloc; @@ -317,21 +317,21 @@ std::ostream& SBuf::dump(std::ostream &os) const { os << id - << ": "; + << ": "; store_->dump(os); os << ", offset:" << off_ - << ", len:" << len_ - << ") : '"; + << ", len:" << len_ + << ") : '"; print(os); os << '\'' << std::endl; return os; # if 0 // alternate implementation, based on Raw() API. os << Raw("SBuf", buf(), length()) << - ". id: " << id << - ", offset:" << off_ << - ", len:" << len_ << - ", store: "; + ". id: " << id << + ", offset:" << off_ << + ", len:" << len_ << + ", store: "; store_->dump(os); os << std::endl; return os; @@ -791,32 +791,32 @@ SBufStats::dump(std::ostream& os) const { MemBlobStats ststats = MemBlob::GetStats(); os << - "SBuf stats:\nnumber of allocations: " << alloc << - "\ncopy-allocations: " << allocCopy << - "\ncopy-allocations from SquidString: " << allocFromString << - "\ncopy-allocations from C String: " << allocFromCString << - "\nlive references: " << live << - "\nno-copy assignments: " << assignFast << - "\nclearing operations: " << clear << - "\nappend operations: " << append << - "\ndump-to-ostream: " << toStream << - "\nset-char: " << setChar << - "\nget-char: " << getChar << - "\ncomparisons with data-scan: " << compareSlow << - "\ncomparisons not requiring data-scan: " << compareFast << - "\ncopy-out ops: " << copyOut << - "\nraw access to memory: " << rawAccess << - "\nNULL terminate C string: " << nulTerminate << - "\nchop operations: " << chop << - "\ntrim operations: " << trim << - "\nfind: " << find << - "\nscanf: " << scanf << - "\ncase-change ops: " << caseChange << - "\nCOW not actually requiring a copy: " << cowFast << - "\nCOW: " << cowSlow << - "\naverage store share factor: " << - (ststats.live != 0 ? static_cast(live)/ststats.live : 0) << - std::endl; + "SBuf stats:\nnumber of allocations: " << alloc << + "\ncopy-allocations: " << allocCopy << + "\ncopy-allocations from SquidString: " << allocFromString << + "\ncopy-allocations from C String: " << allocFromCString << + "\nlive references: " << live << + "\nno-copy assignments: " << assignFast << + "\nclearing operations: " << clear << + "\nappend operations: " << append << + "\ndump-to-ostream: " << toStream << + "\nset-char: " << setChar << + "\nget-char: " << getChar << + "\ncomparisons with data-scan: " << compareSlow << + "\ncomparisons not requiring data-scan: " << compareFast << + "\ncopy-out ops: " << copyOut << + "\nraw access to memory: " << rawAccess << + "\nNULL terminate C string: " << nulTerminate << + "\nchop operations: " << chop << + "\ntrim operations: " << trim << + "\nfind: " << find << + "\nscanf: " << scanf << + "\ncase-change ops: " << caseChange << + "\nCOW not actually requiring a copy: " << cowFast << + "\nCOW: " << cowSlow << + "\naverage store share factor: " << + (ststats.live != 0 ? static_cast(live)/ststats.live : 0) << + std::endl; return os; } @@ -918,3 +918,4 @@ SBuf::cow(SBuf::size_type newsize) } reAlloc(newsize); } + diff --git a/src/SBuf.h b/src/SBuf.h index cdec25dd39..286b73a296 100644 --- a/src/SBuf.h +++ b/src/SBuf.h @@ -620,3 +620,4 @@ ToLower(SBuf buf) } #endif /* SQUID_SBUF_H */ + diff --git a/src/SBufAlgos.h b/src/SBufAlgos.h index 3b3a53df60..784a2ddba2 100644 --- a/src/SBufAlgos.h +++ b/src/SBufAlgos.h @@ -19,7 +19,7 @@ class SBufEqual { public: explicit SBufEqual(const SBuf &reference, SBufCaseSensitive sensitivity = caseSensitive) : - reference_(reference), sensitivity_(sensitivity) {} + reference_(reference), sensitivity_(sensitivity) {} bool operator() (const SBuf & checking) { return checking.compare(reference_,sensitivity_) == 0; } private: SBuf reference_; @@ -31,7 +31,7 @@ class SBufStartsWith { public: explicit SBufStartsWith(const SBuf &prefix, SBufCaseSensitive sensitivity = caseSensitive) : - prefix_(prefix), sensitivity_(sensitivity) {} + prefix_(prefix), sensitivity_(sensitivity) {} bool operator() (const SBuf & checking) { return checking.startsWith(prefix_,sensitivity_); } private: SBuf prefix_; @@ -46,7 +46,7 @@ class SBufAddLength { public: explicit SBufAddLength(const SBuf &separator) : - separatorLen_(separator.length()) {} + separatorLen_(separator.length()) {} SBuf::size_type operator()(const SBuf::size_type sz, const SBuf & item) { return sz + item.length() + separatorLen_; } @@ -82,3 +82,4 @@ SBufContainerJoin(const Container &items, const SBuf& separator) } #endif /* SQUID_SBUFALGOS_H_ */ + diff --git a/src/SBufDetailedStats.cc b/src/SBufDetailedStats.cc index 1f2227f2d5..991431a202 100644 --- a/src/SBufDetailedStats.cc +++ b/src/SBufDetailedStats.cc @@ -53,3 +53,4 @@ collectMemBlobDestructTimeStats() { return &memblobDestructTimeStats; } + diff --git a/src/SBufDetailedStats.h b/src/SBufDetailedStats.h index bf19185b63..f56f01fd77 100644 --- a/src/SBufDetailedStats.h +++ b/src/SBufDetailedStats.h @@ -32,3 +32,4 @@ void recordMemBlobSizeAtDestruct(MemBlob::size_type sz); const StatHist * collectMemBlobDestructTimeStats(); #endif /* SQUID_SBUFDETAILEDSTATS_H */ + diff --git a/src/SBufExceptions.cc b/src/SBufExceptions.cc index a17d0f0f5c..cab2743ef1 100644 --- a/src/SBufExceptions.cc +++ b/src/SBufExceptions.cc @@ -14,9 +14,9 @@ OutOfBoundsException::OutOfBoundsException(const SBuf &throwingBuf, SBuf::size_type &pos, const char *aFileName, int aLineNo) - : TextException(NULL, aFileName, aLineNo), - theThrowingBuf(throwingBuf), - accessedPosition(pos) + : TextException(NULL, aFileName, aLineNo), + theThrowingBuf(throwingBuf), + accessedPosition(pos) { SBuf explanatoryText("OutOfBoundsException"); if (aLineNo != -1) @@ -34,9 +34,10 @@ OutOfBoundsException::~OutOfBoundsException() throw() { } InvalidParamException::InvalidParamException(const char *aFilename, int aLineNo) - : TextException("Invalid parameter", aFilename, aLineNo) + : TextException("Invalid parameter", aFilename, aLineNo) { } SBufTooBigException::SBufTooBigException(const char *aFilename, int aLineNo) - : TextException("Trying to create an oversize SBuf", aFilename, aLineNo) + : TextException("Trying to create an oversize SBuf", aFilename, aLineNo) { } + diff --git a/src/SBufExceptions.h b/src/SBufExceptions.h index 681da41157..8a03485000 100644 --- a/src/SBufExceptions.h +++ b/src/SBufExceptions.h @@ -31,3 +31,4 @@ public: }; #endif /* SQUID_SBUFEXCEPTIONS_H */ + diff --git a/src/SBufList.cc b/src/SBufList.cc index eade722f97..80f118162c 100644 --- a/src/SBufList.cc +++ b/src/SBufList.cc @@ -15,3 +15,4 @@ IsMember(const SBufList & sl, const SBuf &S, const SBufCaseSensitive case_sensit { return std::find_if(sl.begin(), sl.end(), SBufEqual(S,case_sensitive)) != sl.end(); } + diff --git a/src/SBufList.h b/src/SBufList.h index 7cc7469ddf..5e655a7daf 100644 --- a/src/SBufList.h +++ b/src/SBufList.h @@ -23,3 +23,4 @@ typedef std::list SBufList; bool IsMember(const SBufList &, const SBuf &, const SBufCaseSensitive isCaseSensitive = caseSensitive); #endif /* SQUID_SBUFLIST_H */ + diff --git a/src/SBufStatsAction.cc b/src/SBufStatsAction.cc index 22bf651270..1e7551fe23 100644 --- a/src/SBufStatsAction.cc +++ b/src/SBufStatsAction.cc @@ -15,7 +15,7 @@ #include "StoreEntryStream.h" SBufStatsAction::SBufStatsAction(const Mgr::CommandPointer &cmd_): - Action(cmd_) + Action(cmd_) { } //default constructor is OK for data member SBufStatsAction::Pointer @@ -55,8 +55,8 @@ SBufStatsAction::dump(StoreEntry* entry) { StoreEntryStream ses(entry); ses << "\n\n\nThese statistics are experimental; their format and contents " - "should not be relied upon, they are bound to change as " - "the SBuf feature is evolved\n"; + "should not be relied upon, they are bound to change as " + "the SBuf feature is evolved\n"; sbdata.dump(ses); mbdata.dump(ses); ses << "\n"; @@ -85,3 +85,4 @@ SBufStatsAction::unpack(const Ipc::TypedMsgHdr& msg) static const bool Registered = (Mgr::RegisterAction("sbuf", "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1), true); + diff --git a/src/SBufStatsAction.h b/src/SBufStatsAction.h index 1bcd63fd3f..8209596e86 100644 --- a/src/SBufStatsAction.h +++ b/src/SBufStatsAction.h @@ -41,3 +41,4 @@ private: }; #endif /* SQUID_SBUFSTATSACTION_H */ + diff --git a/src/SBufStream.h b/src/SBufStream.h index be7731ca29..9e9639c3cb 100644 --- a/src/SBufStream.h +++ b/src/SBufStream.h @@ -119,3 +119,4 @@ private: }; #endif /* SQUID_SBUFSTREAM_H */ + diff --git a/src/SnmpRequest.h b/src/SnmpRequest.h index 8f07003f16..b19b09aae5 100644 --- a/src/SnmpRequest.h +++ b/src/SnmpRequest.h @@ -35,3 +35,4 @@ public: #endif /* SQUID_SNMP */ #endif /* SQUID_SNMPREQUEST_H_ */ + diff --git a/src/SquidConfig.h b/src/SquidConfig.h index 0c73a58a73..eea6d84354 100644 --- a/src/SquidConfig.h +++ b/src/SquidConfig.h @@ -558,3 +558,4 @@ public: extern SquidConfig2 Config2; #endif /* SQUID_SQUIDCONFIG_H_ */ + diff --git a/src/SquidDns.h b/src/SquidDns.h index 81f6459783..8c2ca50d4b 100644 --- a/src/SquidDns.h +++ b/src/SquidDns.h @@ -23,3 +23,4 @@ void idnsALookup(const char *, IDNSCB *, void *); void idnsPTRLookup(const Ip::Address &, IDNSCB *, void *); #endif /* SQUID_DNS_H */ + diff --git a/src/SquidIpc.h b/src/SquidIpc.h index e024ef122e..f501c0d99b 100644 --- a/src/SquidIpc.h +++ b/src/SquidIpc.h @@ -25,3 +25,4 @@ pid_t ipcCreate(int type, void **hIpc); #endif /* SQUID_SQUIDIPC_H_ */ + diff --git a/src/SquidList.h b/src/SquidList.h index 090a21cd37..6c50cce928 100644 --- a/src/SquidList.h +++ b/src/SquidList.h @@ -22,3 +22,4 @@ void linklistPush(link_list **, void *); void *linklistShift(link_list **); #endif /* SQUID_SQUIDLIST_H_ */ + diff --git a/src/SquidMath.cc b/src/SquidMath.cc index 5bcc9c1ace..4df341ac5d 100644 --- a/src/SquidMath.cc +++ b/src/SquidMath.cc @@ -44,3 +44,4 @@ Math::intAverage(const int cur, const int newI, int n, const int max) return (cur * (n - 1) + newI) / n; } + diff --git a/src/SquidMath.h b/src/SquidMath.h index c25f651931..fe10d4b565 100644 --- a/src/SquidMath.h +++ b/src/SquidMath.h @@ -22,3 +22,4 @@ double doubleAverage(const double, const double, int, const int); } // namespace Math #endif /* _SQUID_SRC_SQUIDMATH_H */ + diff --git a/src/SquidNew.cc b/src/SquidNew.cc index 3cf4d930f2..d25f1f3176 100644 --- a/src/SquidNew.cc +++ b/src/SquidNew.cc @@ -33,3 +33,4 @@ void operator delete[] (void *address) throw() } #endif /* __SUNPRO_CC */ + diff --git a/src/SquidString.h b/src/SquidString.h index b1849f25ea..c68848c743 100644 --- a/src/SquidString.h +++ b/src/SquidString.h @@ -38,7 +38,7 @@ public: /** * Retrieve a single character in the string. - \param pos Position of character to retrieve. + \param pos Position of character to retrieve. */ _SQUID_INLINE_ char operator [](unsigned int pos) const; @@ -120,3 +120,4 @@ int stringHasCntl(const char *); char *strwordtok(char *buf, char **t); #endif /* SQUID_STRING_H */ + diff --git a/src/SquidTime.h b/src/SquidTime.h index 585eab84b6..333c5b6e32 100644 --- a/src/SquidTime.h +++ b/src/SquidTime.h @@ -75,3 +75,4 @@ const char *FormatHttpd(time_t t); } // namespace Time #endif /* SQUID_TIME_H */ + diff --git a/src/StatCounters.cc b/src/StatCounters.cc index e76b213ccc..3748437c33 100644 --- a/src/StatCounters.cc +++ b/src/StatCounters.cc @@ -10,3 +10,4 @@ #include "StatCounters.h" StatCounters statCounter; + diff --git a/src/StatCounters.h b/src/StatCounters.h index 889c137730..ffea8834a9 100644 --- a/src/StatCounters.h +++ b/src/StatCounters.h @@ -162,3 +162,4 @@ private: extern StatCounters statCounter; #endif /* STATCOUNTERS_H_ */ + diff --git a/src/StatHist.cc b/src/StatHist.cc index d65aa167f5..d9cbbf73f5 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -39,8 +39,8 @@ StatHist::init(unsigned int newCapacity, hbase_f * val_in_, hbase_f * val_out_, } StatHist::StatHist(const StatHist &src) : - capacity_(src.capacity_), min_(src.min_), max_(src.max_), - scale_(src.scale_), val_in(src.val_in), val_out(src.val_out) + capacity_(src.capacity_), min_(src.min_), max_(src.max_), + scale_(src.scale_), val_in(src.val_in), val_out(src.val_out) { if (src.bins!=NULL) { bins = static_cast(xcalloc(src.capacity_, sizeof(bins_type))); @@ -61,9 +61,9 @@ unsigned int StatHist::findBin(double v) { - v -= min_; /* offset */ + v -= min_; /* offset */ - if (v <= 0.0) /* too small */ + if (v <= 0.0) /* too small */ return 0; unsigned int bin; @@ -73,7 +73,7 @@ StatHist::findBin(double v) return 0; bin = static_cast (tmp_bin); - if (bin >= capacity_) /* too big */ + if (bin >= capacity_) /* too big */ bin = capacity_ - 1; return bin; @@ -249,3 +249,4 @@ statHistIntDumper(StoreEntry * sentry, int idx, double val, double size, int cou if (count) storeAppendPrintf(sentry, "%9d\t%9d\n", (int) val, count); } + diff --git a/src/StatHist.h b/src/StatHist.h index 9f641ff52f..25e3e357ac 100644 --- a/src/StatHist.h +++ b/src/StatHist.h @@ -144,8 +144,8 @@ StatHist::operator =(const StatHist & src) inline StatHist::StatHist() : - bins(NULL), capacity_(0), min_(0), max_(0), - scale_(1.0), val_in(NULL), val_out(NULL) + bins(NULL), capacity_(0), min_(0), max_(0), + scale_(1.0), val_in(NULL), val_out(NULL) {} inline void @@ -157,3 +157,4 @@ StatHist::clear() } #endif /* STATHIST_H_ */ + diff --git a/src/Store.h b/src/Store.h index 445dcfc8cf..3ca03c6168 100644 --- a/src/Store.h +++ b/src/Store.h @@ -99,7 +99,7 @@ public: void expireNow(); void releaseRequest(); void negativeCache(); - void cacheNegatively(); /** \todo argh, why both? */ + void cacheNegatively(); /** \todo argh, why both? */ void invokeHandlers(); void purgeMem(); void cacheInMemory(); ///< start or continue storing in memory cache @@ -230,7 +230,7 @@ private: static MemAllocator *pool; - unsigned short lock_count; /* Assume < 65536! */ + unsigned short lock_count; /* Assume < 65536! */ #if USE_ADAPTATION /// producer callback registered with deferProducer @@ -360,7 +360,7 @@ public: virtual StoreSearch *search(String const url, HttpRequest *) = 0; /* pulled up from SwapDir for migration.... probably do not belong here */ - virtual void reference(StoreEntry &) = 0; /* Reference this object */ + virtual void reference(StoreEntry &) = 0; /* Reference this object */ /// Undo reference(), returning false iff idle e should be destroyed virtual bool dereference(StoreEntry &e, bool wantsLocalMemory) = 0; @@ -512,3 +512,4 @@ void packerToStoreInit(Packer * p, StoreEntry * e); void storeGetMemSpace(int size); #endif /* SQUID_STORE_H */ + diff --git a/src/StoreClient.h b/src/StoreClient.h index 28c37d7d1e..342db9bde0 100644 --- a/src/StoreClient.h +++ b/src/StoreClient.h @@ -13,7 +13,7 @@ #include "StoreIOBuffer.h" #include "StoreIOState.h" -typedef void STCB(void *, StoreIOBuffer); /* store callback */ +typedef void STCB(void *, StoreIOBuffer); /* store callback */ class StoreEntry; @@ -55,7 +55,7 @@ public: void *owner; #endif - StoreEntry *entry; /* ptr to the parent StoreEntry, argh! */ + StoreEntry *entry; /* ptr to the parent StoreEntry, argh! */ StoreIOState::Pointer swapin_sio; struct { @@ -108,3 +108,4 @@ int storePendingNClients(const StoreEntry * e); int storeClientIsThisAClient(store_client * sc, void *someClient); #endif /* SQUID_STORECLIENT_H */ + diff --git a/src/StoreEntryStream.h b/src/StoreEntryStream.h index f7def5d50d..2d557cac21 100644 --- a/src/StoreEntryStream.h +++ b/src/StoreEntryStream.h @@ -99,3 +99,4 @@ private: }; #endif /* SQUID_STORE_ENTRY_STREAM_H */ + diff --git a/src/StoreFileSystem.cc b/src/StoreFileSystem.cc index 1ef8522b24..b3685726fb 100644 --- a/src/StoreFileSystem.cc +++ b/src/StoreFileSystem.cc @@ -74,3 +74,4 @@ StoreFileSystem::FreeAllFs() void StoreFileSystem::registerWithCacheManager(void) {} + diff --git a/src/StoreFileSystem.h b/src/StoreFileSystem.h index 9810f04d5b..f73cf6c0fb 100644 --- a/src/StoreFileSystem.h +++ b/src/StoreFileSystem.h @@ -14,7 +14,7 @@ /* ****** DOCUMENTATION ***** */ /** - \defgroup FileSystems Storage Filesystems + \defgroup FileSystems Storage Filesystems * \section Introduction Introduction \par @@ -123,3 +123,4 @@ private: typedef StoreFileSystem storefs_entry_t; #endif /* SQUID_STOREFILESYSTEM_H */ + diff --git a/src/StoreHashIndex.h b/src/StoreHashIndex.h index 5d0a646afe..2c7722e91d 100644 --- a/src/StoreHashIndex.h +++ b/src/StoreHashIndex.h @@ -66,7 +66,7 @@ private: }; class StoreHashIndexEntry : public StoreEntry - {}; +{}; class StoreSearchHashIndex : public StoreSearch { @@ -99,3 +99,4 @@ private: }; #endif /* SQUID_STOREHASHINDEX_H */ + diff --git a/src/StoreIOBuffer.h b/src/StoreIOBuffer.h index 99f65c2b4e..8abba28cb7 100644 --- a/src/StoreIOBuffer.h +++ b/src/StoreIOBuffer.h @@ -20,23 +20,23 @@ public: StoreIOBuffer():length(0), offset (0), data (NULL) {flags.error = 0;} StoreIOBuffer(size_t aLength, int64_t anOffset, char *someData) : - length (aLength), offset (anOffset), data (someData) { + length (aLength), offset (anOffset), data (someData) { flags.error = 0; } /* Create a StoreIOBuffer from a MemBuf and offset */ /* NOTE that MemBuf still "owns" the pointers, StoreIOBuffer is just borrowing them */ StoreIOBuffer(MemBuf *aMemBuf, int64_t anOffset) : - length(aMemBuf->contentSize()), - offset (anOffset), - data(aMemBuf->content()) { + length(aMemBuf->contentSize()), + offset (anOffset), + data(aMemBuf->content()) { flags.error = 0; } StoreIOBuffer(MemBuf *aMemBuf, int64_t anOffset, size_t anLength) : - length(anLength), - offset (anOffset), - data(aMemBuf->content()) { + length(anLength), + offset (anOffset), + data(aMemBuf->content()) { flags.error = 0; } @@ -66,3 +66,4 @@ operator <<(std::ostream &os, const StoreIOBuffer &b) } #endif /* SQUID_STOREIOBUFFER_H */ + diff --git a/src/StoreIOState.cc b/src/StoreIOState.cc index 469497eebe..979f0202aa 100644 --- a/src/StoreIOState.cc +++ b/src/StoreIOState.cc @@ -24,8 +24,8 @@ void StoreIOState::operator delete (void *address) {assert (0);} StoreIOState::StoreIOState() : - swap_dirn(-1), swap_filen(-1), e(NULL), mode(O_BINARY), - offset_(0), file_callback(NULL), callback(NULL), callback_data(NULL) + swap_dirn(-1), swap_filen(-1), e(NULL), mode(O_BINARY), + offset_(0), file_callback(NULL), callback(NULL), callback_data(NULL) { read.callback = NULL; read.callback_data = NULL; @@ -48,3 +48,4 @@ StoreIOState::~StoreIOState() if (callback_data) cbdataReferenceDone(callback_data); } + diff --git a/src/StoreIOState.h b/src/StoreIOState.h index 09e7bc50f0..32cb184b7b 100644 --- a/src/StoreIOState.h +++ b/src/StoreIOState.h @@ -73,10 +73,10 @@ public: sdirno swap_dirn; sfileno swap_filen; - StoreEntry *e; /* Need this so the FS layers can play god */ + StoreEntry *e; /* Need this so the FS layers can play god */ mode_t mode; off_t offset_; ///< number of bytes written or read for this entry so far - STFNCB *file_callback; /* called on delayed sfileno assignments */ + STFNCB *file_callback; /* called on delayed sfileno assignments */ STIOCB *callback; void *callback_data; @@ -86,7 +86,7 @@ public: } read; struct { - bool closing; /* debugging aid */ + bool closing; /* debugging aid */ } flags; }; @@ -97,3 +97,4 @@ void storeRead(StoreIOState::Pointer, char *, size_t, off_t, StoreIOState::STRCB void storeIOWrite(StoreIOState::Pointer, char const *, size_t, off_t, FREE *); #endif /* SQUID_STOREIOSTATE_H */ + diff --git a/src/StoreMeta.cc b/src/StoreMeta.cc index 30bf0d57b9..ac5a39a868 100644 --- a/src/StoreMeta.cc +++ b/src/StoreMeta.cc @@ -153,7 +153,7 @@ StoreMeta::Add(StoreMeta **tail, StoreMeta *aNode) { assert (*tail == NULL); *tail = aNode; - return &aNode->next; /* return new tail pointer */ + return &aNode->next; /* return new tail pointer */ } bool @@ -185,3 +185,4 @@ StoreMeta::checkConsistency(StoreEntry *e) const return true; } + diff --git a/src/StoreMeta.h b/src/StoreMeta.h index 1c0df77f15..69bd7cb46f 100644 --- a/src/StoreMeta.h +++ b/src/StoreMeta.h @@ -103,8 +103,8 @@ enum { STORE_META_OBJSIZE, - STORE_META_STOREURL, /* the store url, if different to the normal URL */ - STORE_META_VARY_ID, /* Unique ID linking variants */ + STORE_META_STOREURL, /* the store url, if different to the normal URL */ + STORE_META_VARY_ID, /* Unique ID linking variants */ STORE_META_END }; @@ -137,3 +137,4 @@ tlv *storeSwapMetaBuild(StoreEntry * e); void storeSwapTLVFree(tlv * n); #endif /* SQUID_TYPELENGTHVALUE_H */ + diff --git a/src/StoreMetaMD5.cc b/src/StoreMetaMD5.cc index 6eeb266a38..52ba5fe45f 100644 --- a/src/StoreMetaMD5.cc +++ b/src/StoreMetaMD5.cc @@ -43,3 +43,4 @@ StoreMetaMD5::checkConsistency(StoreEntry *e) const return true; } + diff --git a/src/StoreMetaMD5.h b/src/StoreMetaMD5.h index b5b76231b2..aaa3fb3400 100644 --- a/src/StoreMetaMD5.h +++ b/src/StoreMetaMD5.h @@ -28,3 +28,4 @@ private: }; #endif /* SQUID_STOREMETAMD5_H */ + diff --git a/src/StoreMetaObjSize.h b/src/StoreMetaObjSize.h index fab1f25eb2..1ce6d278cc 100644 --- a/src/StoreMetaObjSize.h +++ b/src/StoreMetaObjSize.h @@ -20,3 +20,4 @@ public: }; #endif /* SQUID_STOREMETAOBJSIZE_H */ + diff --git a/src/StoreMetaSTD.cc b/src/StoreMetaSTD.cc index 54dcb7794d..f5d9ad4d0d 100644 --- a/src/StoreMetaSTD.cc +++ b/src/StoreMetaSTD.cc @@ -18,3 +18,4 @@ StoreMetaSTD::validLength(int len) const { return len == STORE_HDR_METASIZE_OLD; } + diff --git a/src/StoreMetaSTD.h b/src/StoreMetaSTD.h index 327fb0a606..9e2285e713 100644 --- a/src/StoreMetaSTD.h +++ b/src/StoreMetaSTD.h @@ -23,3 +23,4 @@ public: }; #endif /* SQUID_STOREMETASTD_H */ + diff --git a/src/StoreMetaSTDLFS.cc b/src/StoreMetaSTDLFS.cc index 695f83d7f5..dbd1a23354 100644 --- a/src/StoreMetaSTDLFS.cc +++ b/src/StoreMetaSTDLFS.cc @@ -18,3 +18,4 @@ StoreMetaSTDLFS::validLength(int len) const { return len == STORE_HDR_METASIZE; } + diff --git a/src/StoreMetaSTDLFS.h b/src/StoreMetaSTDLFS.h index 593e94e66b..7700ebaa2c 100644 --- a/src/StoreMetaSTDLFS.h +++ b/src/StoreMetaSTDLFS.h @@ -23,3 +23,4 @@ public: }; #endif /* SQUID_STOREMETASTDLFS_H */ + diff --git a/src/StoreMetaURL.cc b/src/StoreMetaURL.cc index b17eaebc1b..4c18cb7971 100644 --- a/src/StoreMetaURL.cc +++ b/src/StoreMetaURL.cc @@ -29,3 +29,4 @@ StoreMetaURL::checkConsistency(StoreEntry *e) const return true; } + diff --git a/src/StoreMetaURL.h b/src/StoreMetaURL.h index 6be7fcdee5..3af12b0ea2 100644 --- a/src/StoreMetaURL.h +++ b/src/StoreMetaURL.h @@ -22,3 +22,4 @@ public: }; #endif /* SQUID_STOREMETAURL_H */ + diff --git a/src/StoreMetaUnpacker.cc b/src/StoreMetaUnpacker.cc index 8576086d03..72d7201c8f 100644 --- a/src/StoreMetaUnpacker.cc +++ b/src/StoreMetaUnpacker.cc @@ -62,13 +62,13 @@ StoreMetaUnpacker::getBufferLength() } StoreMetaUnpacker::StoreMetaUnpacker(char const *aBuffer, ssize_t aLen, int *anInt) : - buf(aBuffer), - buflen(aLen), - hdr_len(anInt), - position(1 + sizeof(int)), - type('\0'), - length(0), - tail(NULL) + buf(aBuffer), + buflen(aLen), + hdr_len(anInt), + position(1 + sizeof(int)), + type('\0'), + length(0), + tail(NULL) { assert(aBuffer != NULL); } @@ -136,3 +136,4 @@ StoreMetaUnpacker::createStoreMeta () return TLV; } + diff --git a/src/StoreMetaUnpacker.h b/src/StoreMetaUnpacker.h index 3804f812f1..848a513706 100644 --- a/src/StoreMetaUnpacker.h +++ b/src/StoreMetaUnpacker.h @@ -50,3 +50,4 @@ void storeSwapTLVFree(StoreMeta * n); StoreMeta ** storeSwapTLVAdd(int type, const void *ptr, size_t len, StoreMeta ** tail); #endif /* SQUID_TYPELENGTHVALUEUNPACKER_H */ + diff --git a/src/StoreMetaVary.cc b/src/StoreMetaVary.cc index e8f87f042e..cbf74c8251 100644 --- a/src/StoreMetaVary.cc +++ b/src/StoreMetaVary.cc @@ -30,3 +30,4 @@ StoreMetaVary::checkConsistency(StoreEntry *e) const return true; } + diff --git a/src/StoreMetaVary.h b/src/StoreMetaVary.h index f6a57c9f14..52aae757da 100644 --- a/src/StoreMetaVary.h +++ b/src/StoreMetaVary.h @@ -22,3 +22,4 @@ public: }; #endif /* SQUID_STOREMETAVARY_H */ + diff --git a/src/StoreSearch.h b/src/StoreSearch.h index 4ca427b572..8a283e233d 100644 --- a/src/StoreSearch.h +++ b/src/StoreSearch.h @@ -43,3 +43,4 @@ public: typedef RefCount StoreSearchPointer; #endif /* SQUID_STORESEARCH_H */ + diff --git a/src/StoreStats.h b/src/StoreStats.h index cd01a09dac..98b7011ca7 100644 --- a/src/StoreStats.h +++ b/src/StoreStats.h @@ -69,3 +69,4 @@ public: }; #endif /* SQUID_STORE_STATS_H */ + diff --git a/src/StoreSwapLogData.cc b/src/StoreSwapLogData.cc index 6c94e0da08..b4f4a2d063 100644 --- a/src/StoreSwapLogData.cc +++ b/src/StoreSwapLogData.cc @@ -79,7 +79,7 @@ StoreSwapLogData::finalize() } StoreSwapLogHeader::StoreSwapLogHeader(): op(SWAP_LOG_VERSION), version(2), - record_size(sizeof(StoreSwapLogData)) + record_size(sizeof(StoreSwapLogData)) { checksum.set(version, record_size, 0); } @@ -102,3 +102,4 @@ StoreSwapLogHeader::gapSize() const assert(static_cast(record_size) > sizeof(*this)); return static_cast(record_size) - sizeof(*this); } + diff --git a/src/StoreSwapLogData.h b/src/StoreSwapLogData.h index 2b15f6b87d..b0d7c82679 100644 --- a/src/StoreSwapLogData.h +++ b/src/StoreSwapLogData.h @@ -197,3 +197,4 @@ public: }; #endif /* SQUID_STORESWAPLOGDATA_H */ + diff --git a/src/StrList.h b/src/StrList.h index 0a40ab955d..27d24e49f5 100644 --- a/src/StrList.h +++ b/src/StrList.h @@ -19,3 +19,4 @@ int strListIsSubstr(const String * list, const char *s, char del); int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos); #endif /* SQUID_STRLIST_H_ */ + diff --git a/src/String.cc b/src/String.cc index 91bab6b434..2ca7df09ee 100644 --- a/src/String.cc +++ b/src/String.cc @@ -469,3 +469,4 @@ String::rfind(char const ch) const #if !_USE_INLINE_ #include "String.cci" #endif + diff --git a/src/String.cci b/src/String.cci index 1a3b405878..459072beaa 100644 --- a/src/String.cci +++ b/src/String.cci @@ -168,3 +168,4 @@ operator<(const String &a, const String &b) { return a.cmp(b) < 0; } + diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 01492d9309..51b5bc73a5 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -21,10 +21,10 @@ #include "tools.h" SwapDir::SwapDir(char const *aType): theType(aType), - max_size(0), min_objsize(0), max_objsize (-1), - path(NULL), index(-1), disker(-1), - repl(NULL), removals(0), scanned(0), - cleanLog(NULL) + max_size(0), min_objsize(0), max_objsize (-1), + path(NULL), index(-1), disker(-1), + repl(NULL), removals(0), scanned(0), + cleanLog(NULL) { fs.blksize = 1024; } @@ -259,7 +259,7 @@ SwapDir::parseOptions(int isaReconfig) value = strchr(name, '='); if (value) { - *value = '\0'; /* cut on = */ + *value = '\0'; /* cut on = */ ++value; } @@ -380,3 +380,4 @@ SwapDir::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData) { fatal("not implemented"); } + diff --git a/src/SwapDir.h b/src/SwapDir.h index 135430f14e..177086c990 100644 --- a/src/SwapDir.h +++ b/src/SwapDir.h @@ -69,13 +69,13 @@ public: virtual void getStats(StoreInfoStats &stats) const; virtual void stat(StoreEntry &) const; - virtual void sync(); /* Sync the store prior to shutdown */ + virtual void sync(); /* Sync the store prior to shutdown */ virtual StoreSearch *search(String const url, HttpRequest *); - virtual void reference(StoreEntry &); /* Reference this object */ + virtual void reference(StoreEntry &); /* Reference this object */ - virtual bool dereference(StoreEntry &, bool); /* Unreference this object */ + virtual bool dereference(StoreEntry &, bool); /* Unreference this object */ /* the number of store dirs being rebuilt. */ static int store_dirs_rebuilding; @@ -190,7 +190,7 @@ protected: public: char *path; - int index; /* This entry's index into the swapDirs array */ + int index; /* This entry's index into the swapDirs array */ int disker; ///< disker kid id dedicated to this SwapDir or -1 RemovalPolicy *repl; int removals; @@ -201,19 +201,19 @@ public: bool selected; bool read_only; } flags; - virtual void init() = 0; /* Initialise the fs */ - virtual void create(); /* Create a new fs */ - virtual void dump(StoreEntry &)const; /* Dump fs config snippet */ - virtual bool doubleCheck(StoreEntry &); /* Double check the obj integrity */ - virtual void statfs(StoreEntry &) const; /* Dump fs statistics */ - virtual void maintain(); /* Replacement maintainence */ + virtual void init() = 0; /* Initialise the fs */ + virtual void create(); /* Create a new fs */ + virtual void dump(StoreEntry &)const; /* Dump fs config snippet */ + virtual bool doubleCheck(StoreEntry &); /* Double check the obj integrity */ + virtual void statfs(StoreEntry &) const; /* Dump fs statistics */ + virtual void maintain(); /* Replacement maintainence */ /// check whether we can store the entry; if we can, report current load virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const = 0; /* These two are notifications */ - virtual void reference(StoreEntry &); /* Reference this object */ - virtual bool dereference(StoreEntry &, bool); /* Unreference this object */ - virtual int callback(); /* Handle pending callbacks */ - virtual void sync(); /* Sync the store prior to shutdown */ + virtual void reference(StoreEntry &); /* Reference this object */ + virtual bool dereference(StoreEntry &, bool); /* Unreference this object */ + virtual int callback(); /* Handle pending callbacks */ + virtual void sync(); /* Sync the store prior to shutdown */ virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) = 0; virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) = 0; virtual void unlink (StoreEntry &); @@ -243,3 +243,4 @@ public: }; #endif /* SQUID_SWAPDIR_H */ + diff --git a/src/TimeOrTag.h b/src/TimeOrTag.h index 378eba8e5a..c47205269a 100644 --- a/src/TimeOrTag.h +++ b/src/TimeOrTag.h @@ -23,3 +23,4 @@ public: }; #endif /* _SQUID_TIMEORTAG_H */ + diff --git a/src/Transients.cc b/src/Transients.cc index a16bd42e63..740de65d13 100644 --- a/src/Transients.cc +++ b/src/Transients.cc @@ -434,3 +434,4 @@ TransientsRr::~TransientsRr() delete extrasOwner; delete mapOwner; } + diff --git a/src/Transients.h b/src/Transients.h index b119e354b9..f0090aec66 100644 --- a/src/Transients.h +++ b/src/Transients.h @@ -100,3 +100,4 @@ private: // TODO: Why use Store as a base? We are not really a cache. #endif /* SQUID_TRANSIENTS_H */ + diff --git a/src/URL.h b/src/URL.h index c17d59ab78..b8700262d2 100644 --- a/src/URL.h +++ b/src/URL.h @@ -84,3 +84,4 @@ char *urlHostname(const char *url); void urlExtMethodConfigure(void); #endif /* SQUID_SRC_URL_H_H */ + diff --git a/src/WinSvc.cc b/src/WinSvc.cc index 7495078c89..a1a418f124 100644 --- a/src/WinSvc.cc +++ b/src/WinSvc.cc @@ -82,11 +82,11 @@ static SERVICE_DESCRIPTION Squid_ServiceDescription = { Squid_ServiceDescription static SERVICE_FAILURE_ACTIONS Squid_ServiceFailureActions = { INFINITE, NULL, NULL, 1, Squid_SCAction }; static char REGKEY[256] = SOFTWARE "\\" VENDOR "\\" SOFTWARENAME "\\"; static char *keys[] = { - SOFTWAREString, /* key[0] */ - VENDORString, /* key[1] */ + SOFTWAREString, /* key[0] */ + VENDORString, /* key[1] */ SOFTWARENAMEString, /* key[2] */ - NULL, /* key[3] */ - NULL /* key[4] */ + NULL, /* key[3] */ + NULL /* key[4] */ }; static int Squid_Aborting = 0; @@ -114,9 +114,9 @@ WIN32_create_key(void) while (keys[index]) { unsigned long result; - rv = RegCreateKeyEx(hKey, keys[index], /* subkey */ - 0, /* reserved */ - NULL, /* class */ + rv = RegCreateKeyEx(hKey, keys[index], /* subkey */ + 0, /* reserved */ + NULL, /* class */ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKeyNext, &result); if (rv != ERROR_SUCCESS) { @@ -199,13 +199,13 @@ WIN32_StoreKey(const char *key, DWORD type, unsigned char *value, } /* Now set the value and data */ - rv = RegSetValueEx(hKey, key, /* value key name */ - 0, /* reserved */ - type, /* type */ - value, /* value data */ - (DWORD) value_size); /* for size of "value" */ + rv = RegSetValueEx(hKey, key, /* value key name */ + 0, /* reserved */ + type, /* type */ + value, /* value data */ + (DWORD) value_size); /* for size of "value" */ - retval = 0; /* Return value */ + retval = 0; /* Return value */ if (rv != ERROR_SUCCESS) { fprintf(stderr, "RegQueryValueEx(key %s),%d\n", key, (int) rv); @@ -257,14 +257,14 @@ static void WIN32_build_argv(char *cmd) word = cmd; while (*cmd) { - ++cmd; /* Skip over this character */ + ++cmd; /* Skip over this character */ - if (xisspace(*cmd)) /* End of argument if space */ + if (xisspace(*cmd)) /* End of argument if space */ break; } if (*cmd) - *cmd++ = '\0'; /* Terminate `word' */ + *cmd++ = '\0'; /* Terminate `word' */ /* See if we need to allocate more space for argv */ if (WIN32_argc >= argvlen) { @@ -658,9 +658,9 @@ WIN32_RemoveService() keys[4] = const_cast(service); - schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ - NULL, /* database (NULL == default) */ - SC_MANAGER_ALL_ACCESS /* access required */ + schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ + NULL, /* database (NULL == default) */ + SC_MANAGER_ALL_ACCESS /* access required */ ); if (!schSCManager) @@ -738,9 +738,9 @@ WIN32_InstallService() } snprintf(szPath, sizeof(szPath), "%s %s:" SQUIDSBUFPH, ServicePath, _WIN_SQUID_SERVICE_OPTION, SQUIDSBUFPRINT(service_name)); - schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ - NULL, /* database (NULL == default) */ - SC_MANAGER_ALL_ACCESS /* access required */ + schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ + NULL, /* database (NULL == default) */ + SC_MANAGER_ALL_ACCESS /* access required */ ); if (!schSCManager) { @@ -748,18 +748,18 @@ WIN32_InstallService() exit(1); } else { schService = CreateService(schSCManager, /* SCManager database */ - service, /* name of service */ - service, /* name to display */ - SERVICE_ALL_ACCESS, /* desired access */ - SERVICE_WIN32_OWN_PROCESS, /* service type */ - SERVICE_AUTO_START, /* start type */ - SERVICE_ERROR_NORMAL, /* error control type */ - (const char *) szPath, /* service's binary */ - NULL, /* no load ordering group */ - NULL, /* no tag identifier */ - "Tcpip\0AFD\0", /* dependencies */ - NULL, /* LocalSystem account */ - NULL); /* no password */ + service, /* name of service */ + service, /* name to display */ + SERVICE_ALL_ACCESS, /* desired access */ + SERVICE_WIN32_OWN_PROCESS, /* service type */ + SERVICE_AUTO_START, /* start type */ + SERVICE_ERROR_NORMAL, /* error control type */ + (const char *) szPath, /* service's binary */ + NULL, /* no load ordering group */ + NULL, /* no tag identifier */ + "Tcpip\0AFD\0", /* dependencies */ + NULL, /* LocalSystem account */ + NULL); /* no password */ if (schService) { if (WIN32_OS_version > _WIN_OS_WINNT) { @@ -806,9 +806,9 @@ WIN32_sendSignal(int WIN32_signal) if (service_name.isEmpty()) service_name = SBuf(APP_SHORTNAME); - schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ - NULL, /* database (NULL == default) */ - SC_MANAGER_ALL_ACCESS /* access required */ + schSCManager = OpenSCManager(NULL, /* machine (NULL == local) */ + NULL, /* database (NULL == default) */ + SC_MANAGER_ALL_ACCESS /* access required */ ); if (!schSCManager) { @@ -819,7 +819,7 @@ WIN32_sendSignal(int WIN32_signal) /* The required service object access depends on the control. */ switch (WIN32_signal) { - case 0: /* SIGNULL */ + case 0: /* SIGNULL */ fdwAccess = SERVICE_INTERROGATE; fdwControl = _WIN_SQUID_SERVICE_CONTROL_INTERROGATE; break; @@ -856,9 +856,9 @@ WIN32_sendSignal(int WIN32_signal) } /* Open a handle to the service. */ - schService = OpenService(schSCManager, /* SCManager database */ - service_name.c_str(), /* name of service */ - fdwAccess); /* specify access */ + schService = OpenService(schSCManager, /* SCManager database */ + service_name.c_str(), /* name of service */ + fdwAccess); /* specify access */ if (schService == NULL) { fprintf(stderr, "%s: ERROR: Could not open Service " SQUIDSBUFPH "\n", APP_SHORTNAME, SQUIDSBUFPRINT(service_name)); @@ -866,9 +866,9 @@ WIN32_sendSignal(int WIN32_signal) } else { /* Send a control value to the service. */ - if (!ControlService(schService, /* handle of service */ - fdwControl, /* control value to send */ - &ssStatus)) { /* address of status info */ + if (!ControlService(schService, /* handle of service */ + fdwControl, /* control value to send */ + &ssStatus)) { /* address of status info */ fprintf(stderr, "%s: ERROR: Could not Control Service " SQUIDSBUFPH "\n", APP_SHORTNAME, SQUIDSBUFPRINT(service_name)); exit(1); @@ -990,3 +990,4 @@ void Squid_Win32InvalidParameterHandler(const wchar_t* expression, const wchar_t { return; } + diff --git a/src/WinSvc.h b/src/WinSvc.h index abfee52e19..340deda987 100644 --- a/src/WinSvc.h +++ b/src/WinSvc.h @@ -25,3 +25,4 @@ inline void WIN32_RemoveService(void) {} /* NOP */ #endif /* _SQUID_WINDOWS_ */ #endif /* WINSVC_H_ */ + diff --git a/src/YesNoNone.cc b/src/YesNoNone.cc index 775b6c744b..447c3d67b2 100644 --- a/src/YesNoNone.cc +++ b/src/YesNoNone.cc @@ -20,3 +20,4 @@ YesNoNone::configure(bool beSet) { option = beSet ? +1 : -1; } + diff --git a/src/YesNoNone.h b/src/YesNoNone.h index eccb6a1671..f4a23d3b2b 100644 --- a/src/YesNoNone.h +++ b/src/YesNoNone.h @@ -33,3 +33,4 @@ private: }; #endif /* SQUID_YESNONONE_H_ */ + diff --git a/src/acl/Acl.cc b/src/acl/Acl.cc index 83df0c8ff8..be538c67cc 100644 --- a/src/acl/Acl.cc +++ b/src/acl/Acl.cc @@ -118,9 +118,9 @@ ACL::Factory (char const *type) } ACL::ACL() : - cfgline(NULL), - next(NULL), - registered(false) + cfgline(NULL), + next(NULL), + registered(false) { *name = 0; } @@ -255,7 +255,7 @@ ACL::ParseAclLine(ConfigParser &parser, ACL ** head) * Here we set AclMatchedName in case we need to use it in a * warning message in aclDomainCompare(). */ - AclMatchedName = A->name; /* ugly */ + AclMatchedName = A->name; /* ugly */ A->flags.parseFlags(); @@ -265,7 +265,7 @@ ACL::ParseAclLine(ConfigParser &parser, ACL ** head) /* * Clear AclMatchedName from our temporary hack */ - AclMatchedName = NULL; /* ugly */ + AclMatchedName = NULL; /* ugly */ if (!new_acl) return; @@ -302,7 +302,7 @@ ACL::matchForCache(ACLChecklist *checklist) /* This is a fatal to ensure that cacheMatchAcl calls are _only_ * made for supported acl types */ fatal("aclCacheMatchAcl: unknown or unexpected ACL type"); - return 0; /* NOTREACHED */ + return 0; /* NOTREACHED */ } /* @@ -455,3 +455,4 @@ ACL::Initialize() a = a->next; } } + diff --git a/src/acl/Acl.h b/src/acl/Acl.h index 3cdc4fbb1c..f2dac250f0 100644 --- a/src/acl/Acl.h +++ b/src/acl/Acl.h @@ -218,6 +218,7 @@ public: /// \ingroup ACLAPI /// XXX: find a way to remove or at least use a refcounted ACL pointer -extern const char *AclMatchedName; /* NULL */ +extern const char *AclMatchedName; /* NULL */ #endif /* SQUID_ACL_H */ + diff --git a/src/acl/AclAddress.cc b/src/acl/AclAddress.cc index 27a622733f..79f9f16b62 100644 --- a/src/acl/AclAddress.cc +++ b/src/acl/AclAddress.cc @@ -10,3 +10,4 @@ #include "AclAddress.h" //TODO: fill in + diff --git a/src/acl/AclAddress.h b/src/acl/AclAddress.h index fea37ec442..976a475454 100644 --- a/src/acl/AclAddress.h +++ b/src/acl/AclAddress.h @@ -23,3 +23,4 @@ public: }; #endif /* ACLADDRESS_H_ */ + diff --git a/src/acl/AclDenyInfoList.h b/src/acl/AclDenyInfoList.h index 9e2eaa173e..e5b49ab443 100644 --- a/src/acl/AclDenyInfoList.h +++ b/src/acl/AclDenyInfoList.h @@ -24,3 +24,4 @@ public: }; #endif /* SQUID_ACLDENYINFOLIST_H_ */ + diff --git a/src/acl/AclNameList.h b/src/acl/AclNameList.h index c8b4fbcf6a..c7dec43294 100644 --- a/src/acl/AclNameList.h +++ b/src/acl/AclNameList.h @@ -21,3 +21,4 @@ public: // TODO: convert to a std::list #endif /* SQUID_ACLNAMELIST_H_ */ + diff --git a/src/acl/AclSizeLimit.h b/src/acl/AclSizeLimit.h index fe2a45199f..d5eac0ea28 100644 --- a/src/acl/AclSizeLimit.h +++ b/src/acl/AclSizeLimit.h @@ -22,3 +22,4 @@ public: }; #endif /* SQUID_ACLSIZELIMIT_H_ */ + diff --git a/src/acl/AdaptationService.cc b/src/acl/AdaptationService.cc index 8ddecb34f5..2e07b36705 100644 --- a/src/acl/AdaptationService.cc +++ b/src/acl/AdaptationService.cc @@ -40,3 +40,4 @@ ACLAdaptationServiceStrategy::Instance() } ACLAdaptationServiceStrategy ACLAdaptationServiceStrategy::Instance_; + diff --git a/src/acl/AdaptationService.h b/src/acl/AdaptationService.h index cd812bdc6c..fe9ce43412 100644 --- a/src/acl/AdaptationService.h +++ b/src/acl/AdaptationService.h @@ -41,3 +41,4 @@ private: }; #endif /* SQUID_ACLADAPTATIONSERVICE_H */ + diff --git a/src/acl/AdaptationServiceData.h b/src/acl/AdaptationServiceData.h index 99a94e08f3..3633edcf70 100644 --- a/src/acl/AdaptationServiceData.h +++ b/src/acl/AdaptationServiceData.h @@ -26,3 +26,4 @@ public: }; #endif /* SQUID_ADAPTATIONSERVICEDATA_H */ + diff --git a/src/acl/AllOf.cc b/src/acl/AllOf.cc index 87a03db335..15700e8cbb 100644 --- a/src/acl/AllOf.cc +++ b/src/acl/AllOf.cc @@ -88,3 +88,4 @@ Acl::AllOf::parse() whole->add(line); } + diff --git a/src/acl/AllOf.h b/src/acl/AllOf.h index aa3118f95b..b653991e0f 100644 --- a/src/acl/AllOf.h +++ b/src/acl/AllOf.h @@ -39,3 +39,4 @@ private: } // namespace Acl #endif /* SQUID_ACL_ALL_OF_H */ + diff --git a/src/acl/AnyOf.cc b/src/acl/AnyOf.cc index fdc7e74039..a07182d7fb 100644 --- a/src/acl/AnyOf.cc +++ b/src/acl/AnyOf.cc @@ -29,3 +29,4 @@ Acl::AnyOf::parse() { lineParse(); } + diff --git a/src/acl/AnyOf.h b/src/acl/AnyOf.h index c7a7184fb1..75f514e64c 100644 --- a/src/acl/AnyOf.h +++ b/src/acl/AnyOf.h @@ -33,3 +33,4 @@ private: } // namespace Acl #endif /* SQUID_ACL_ANY_OF_H */ + diff --git a/src/acl/Arp.cc b/src/acl/Arp.cc index 1aa682d9de..27bd7b89f7 100644 --- a/src/acl/Arp.cc +++ b/src/acl/Arp.cc @@ -193,3 +193,4 @@ ACLARP::dump() const /* ==== END ARP ACL SUPPORT =============================================== */ #endif /* USE_SQUID_EUI */ + diff --git a/src/acl/Arp.h b/src/acl/Arp.h index c6f61847bd..84cab84261 100644 --- a/src/acl/Arp.h +++ b/src/acl/Arp.h @@ -44,3 +44,4 @@ protected: }; #endif /* SQUID_ACLARP_H */ + diff --git a/src/acl/Asn.cc b/src/acl/Asn.cc index 10cc067cee..74c9687ef2 100644 --- a/src/acl/Asn.cc +++ b/src/acl/Asn.cc @@ -29,7 +29,7 @@ #include "StoreClient.h" #define WHOIS_PORT 43 -#define AS_REQBUF_SZ 4096 +#define AS_REQBUF_SZ 4096 /* BEGIN of definitions for radix tree entries */ @@ -62,7 +62,7 @@ template cbdata_type CbDataList::CBDATA_CbDataList; */ struct as_info { CbDataList *as_number; - time_t expires; /* NOTUSED */ + time_t expires; /* NOTUSED */ }; class ASState @@ -86,13 +86,13 @@ public: CBDATA_CLASS_INIT(ASState); ASState::ASState() : - entry(NULL), - sc(NULL), - request(NULL), - as_number(0), - offset(0), - reqofs(0), - dataRead(false) + entry(NULL), + sc(NULL), + request(NULL), + as_number(0), + offset(0), + reqofs(0), + dataRead(false) { memset(reqbuf, 0, AS_REQBUF_SZ); } @@ -122,8 +122,8 @@ static STCB asHandleReply; extern "C" { #endif - static int destroyRadixNode(struct squid_radix_node *rn, void *w); - static int printRadixNode(struct squid_radix_node *rn, void *sentry); +static int destroyRadixNode(struct squid_radix_node *rn, void *w); +static int printRadixNode(struct squid_radix_node *rn, void *sentry); #if defined(__cplusplus) } @@ -197,7 +197,7 @@ asnRegisterWithCacheManager(void) /* initialize the radix tree structure */ -SQUIDCEXTERN int squid_max_keylen; /* yuck.. this is in lib/radix.c */ +SQUIDCEXTERN int squid_max_keylen; /* yuck.. this is in lib/radix.c */ void asnInit(void) @@ -439,7 +439,7 @@ asnAddNet(char *as_string, int as_number) e->e_info = asinfo; } - if (rn == 0) { /* assert might expand to nothing */ + if (rn == 0) { /* assert might expand to nothing */ xfree(asinfo); delete q; xfree(e); @@ -633,3 +633,4 @@ ACLDestinationASNStrategy::Instance() } ACLDestinationASNStrategy ACLDestinationASNStrategy::Instance_; + diff --git a/src/acl/Asn.h b/src/acl/Asn.h index b058888c6a..1c72871b51 100644 --- a/src/acl/Asn.h +++ b/src/acl/Asn.h @@ -47,3 +47,4 @@ private: }; #endif /* SQUID_ACLASN_H */ + diff --git a/src/acl/AtStep.cc b/src/acl/AtStep.cc index 6df7b37e73..fdbd805c12 100644 --- a/src/acl/AtStep.cc +++ b/src/acl/AtStep.cc @@ -36,3 +36,4 @@ ACLAtStepStrategy::Instance() ACLAtStepStrategy ACLAtStepStrategy::Instance_; #endif /* USE_OPENSSL */ + diff --git a/src/acl/AtStep.h b/src/acl/AtStep.h index 31af801458..739393eae2 100644 --- a/src/acl/AtStep.h +++ b/src/acl/AtStep.h @@ -44,3 +44,4 @@ private: #endif /* USE_OPENSSL */ #endif /* SQUID_ACLATSTEP_H */ + diff --git a/src/acl/AtStepData.cc b/src/acl/AtStepData.cc index 2b6a2f6312..e2ff673e91 100644 --- a/src/acl/AtStepData.cc +++ b/src/acl/AtStepData.cc @@ -80,3 +80,4 @@ ACLAtStepData::clone() const } #endif /* USE_OPENSSL */ + diff --git a/src/acl/AtStepData.h b/src/acl/AtStepData.h index bd735061f1..23fa9287da 100644 --- a/src/acl/AtStepData.h +++ b/src/acl/AtStepData.h @@ -38,3 +38,4 @@ public: #endif /* USE_OPENSSL */ #endif /* SQUID_ACLSSL_ERRORDATA_H */ + diff --git a/src/acl/BoolOps.cc b/src/acl/BoolOps.cc index 68628ec19e..81ceb8877f 100644 --- a/src/acl/BoolOps.cc +++ b/src/acl/BoolOps.cc @@ -141,3 +141,4 @@ Acl::OrNode::parse() // Not implemented: OrNode cannot be configured directly. See Acl::AnyOf. assert(false); } + diff --git a/src/acl/BoolOps.h b/src/acl/BoolOps.h index a6193047d1..466be2fd08 100644 --- a/src/acl/BoolOps.h +++ b/src/acl/BoolOps.h @@ -77,3 +77,4 @@ private: } // namespace Acl #endif /* SQUID_ACL_LOGIC_H */ + diff --git a/src/acl/Browser.h b/src/acl/Browser.h index 57cc35e372..6ad5759cfa 100644 --- a/src/acl/Browser.h +++ b/src/acl/Browser.h @@ -24,3 +24,4 @@ private: }; #endif /* SQUID_ACLBROWSER_H */ + diff --git a/src/acl/Certificate.cc b/src/acl/Certificate.cc index 2402536bf4..07d7de212b 100644 --- a/src/acl/Certificate.cc +++ b/src/acl/Certificate.cc @@ -44,3 +44,4 @@ ACLCertificateStrategy::Instance() ACLCertificateStrategy ACLCertificateStrategy::Instance_; #endif /* USE_OPENSSL */ + diff --git a/src/acl/Certificate.h b/src/acl/Certificate.h index 25e50510bb..d97f728d09 100644 --- a/src/acl/Certificate.h +++ b/src/acl/Certificate.h @@ -46,3 +46,4 @@ private: }; #endif /* SQUID_ACLCERTIFICATE_H */ + diff --git a/src/acl/CertificateData.cc b/src/acl/CertificateData.cc index ff79c24cf2..377f9d71ce 100644 --- a/src/acl/CertificateData.cc +++ b/src/acl/CertificateData.cc @@ -151,3 +151,4 @@ ACLCertificateData::clone() const /* Splay trees don't clone yet. */ return new ACLCertificateData(*this); } + diff --git a/src/acl/CertificateData.h b/src/acl/CertificateData.h index 00562afbb2..14491ec47d 100644 --- a/src/acl/CertificateData.h +++ b/src/acl/CertificateData.h @@ -51,3 +51,4 @@ private: }; #endif /* SQUID_ACLCERTIFICATEDATA_H */ + diff --git a/src/acl/Checklist.cc b/src/acl/Checklist.cc index 7460a1b0d5..a6b8af2be6 100644 --- a/src/acl/Checklist.cc +++ b/src/acl/Checklist.cc @@ -173,16 +173,16 @@ ACLChecklist::checkCallback(allow_t answer) } ACLChecklist::ACLChecklist() : - accessList (NULL), - callback (NULL), - callback_data (NULL), - asyncCaller_(false), - occupied_(false), - finished_(false), - allow_(ACCESS_DENIED), - asyncStage_(asyncNone), - state_(NullState::Instance()), - asyncLoopDepth_(0) + accessList (NULL), + callback (NULL), + callback_data (NULL), + asyncCaller_(false), + occupied_(false), + finished_(false), + allow_(ACCESS_DENIED), + asyncStage_(asyncNone), + state_(NullState::Instance()), + asyncLoopDepth_(0) { } @@ -390,3 +390,4 @@ ACLChecklist::callerGone() { return !cbdataReferenceValid(callback_data); } + diff --git a/src/acl/Checklist.h b/src/acl/Checklist.h index ed8049104c..9fa7114965 100644 --- a/src/acl/Checklist.h +++ b/src/acl/Checklist.h @@ -17,8 +17,8 @@ typedef void ACLCB(allow_t, void *); /** \ingroup ACLAPI Base class for maintaining Squid and transaction state for access checks. - Provides basic ACL checking methods. Its only child, ACLFilledChecklist, - keeps the actual state data. The split is necessary to avoid exposing + Provides basic ACL checking methods. Its only child, ACLFilledChecklist, + keeps the actual state data. The split is necessary to avoid exposing all ACL-related code to virtually Squid data types. */ class ACLChecklist { @@ -220,3 +220,4 @@ private: /* internal methods */ }; #endif /* SQUID_ACLCHECKLIST_H */ + diff --git a/src/acl/Data.h b/src/acl/Data.h index efb84eece1..dc71078420 100644 --- a/src/acl/Data.h +++ b/src/acl/Data.h @@ -30,3 +30,4 @@ public: }; #endif /* SQUID_ACLDATA_H */ + diff --git a/src/acl/DestinationAsn.h b/src/acl/DestinationAsn.h index b371293b80..3139b88b0b 100644 --- a/src/acl/DestinationAsn.h +++ b/src/acl/DestinationAsn.h @@ -39,3 +39,4 @@ private: }; #endif /* SQUID_ACLDESTINATIONASN_H */ + diff --git a/src/acl/DestinationDomain.cc b/src/acl/DestinationDomain.cc index 16d76c0f27..1216fd84df 100644 --- a/src/acl/DestinationDomain.cc +++ b/src/acl/DestinationDomain.cc @@ -98,3 +98,4 @@ ACLDestinationDomainStrategy::Instance() } ACLDestinationDomainStrategy ACLDestinationDomainStrategy::Instance_; + diff --git a/src/acl/DestinationDomain.h b/src/acl/DestinationDomain.h index 0c186ed600..02c4d4d289 100644 --- a/src/acl/DestinationDomain.h +++ b/src/acl/DestinationDomain.h @@ -63,3 +63,4 @@ private: }; #endif /* SQUID_ACLDESTINATIONDOMAIN_H */ + diff --git a/src/acl/DestinationIp.cc b/src/acl/DestinationIp.cc index c7cbe0ef8b..dc0410c536 100644 --- a/src/acl/DestinationIp.cc +++ b/src/acl/DestinationIp.cc @@ -100,3 +100,4 @@ ACLDestinationIP::clone() const { return new ACLDestinationIP(*this); } + diff --git a/src/acl/DestinationIp.h b/src/acl/DestinationIp.h index c1e630e9f4..11385c0592 100644 --- a/src/acl/DestinationIp.h +++ b/src/acl/DestinationIp.h @@ -44,3 +44,4 @@ private: }; #endif /* SQUID_ACLDESTINATIONIP_H */ + diff --git a/src/acl/DomainData.cc b/src/acl/DomainData.cc index 1924d66114..6f37d80f0f 100644 --- a/src/acl/DomainData.cc +++ b/src/acl/DomainData.cc @@ -156,3 +156,4 @@ ACLDomainData::clone() const assert (!domains); return new ACLDomainData; } + diff --git a/src/acl/DomainData.h b/src/acl/DomainData.h index 3ab9866f9a..7792e7eef2 100644 --- a/src/acl/DomainData.h +++ b/src/acl/DomainData.h @@ -29,3 +29,4 @@ public: }; #endif /* SQUID_ACLDOMAINDATA_H */ + diff --git a/src/acl/Eui64.cc b/src/acl/Eui64.cc index 9ecedeaf70..0eedd6978f 100644 --- a/src/acl/Eui64.cc +++ b/src/acl/Eui64.cc @@ -165,3 +165,4 @@ ACLEui64::dump() const } #endif /* USE_SQUID_EUI */ + diff --git a/src/acl/Eui64.h b/src/acl/Eui64.h index d910e6574d..4b9e049548 100644 --- a/src/acl/Eui64.h +++ b/src/acl/Eui64.h @@ -43,3 +43,4 @@ protected: }; #endif /* SQUID_ACLEUI64_H */ + diff --git a/src/acl/ExtUser.cc b/src/acl/ExtUser.cc index e8e36b6c43..aaea5c6b27 100644 --- a/src/acl/ExtUser.cc +++ b/src/acl/ExtUser.cc @@ -80,3 +80,4 @@ ACLExtUser::clone() const } #endif /* USE_AUTH */ + diff --git a/src/acl/ExtUser.h b/src/acl/ExtUser.h index bb393b9237..7a4223d48b 100644 --- a/src/acl/ExtUser.h +++ b/src/acl/ExtUser.h @@ -44,3 +44,4 @@ private: #endif /* USE_AUTH */ #endif /* SQUID_EXTUSER_H */ + diff --git a/src/acl/FilledChecklist.cc b/src/acl/FilledChecklist.cc index b90577d165..11d9d06d70 100644 --- a/src/acl/FilledChecklist.cc +++ b/src/acl/FilledChecklist.cc @@ -23,23 +23,23 @@ CBDATA_CLASS_INIT(ACLFilledChecklist); ACLFilledChecklist::ACLFilledChecklist() : - dst_peer(NULL), - dst_rdns(NULL), - request (NULL), - reply (NULL), + dst_peer(NULL), + dst_rdns(NULL), + request (NULL), + reply (NULL), #if USE_AUTH - auth_user_request (NULL), + auth_user_request (NULL), #endif #if SQUID_SNMP - snmp_community(NULL), + snmp_community(NULL), #endif #if USE_OPENSSL - sslErrors(NULL), + sslErrors(NULL), #endif - conn_(NULL), - fd_(-1), - destinationDomainChecked_(false), - sourceDomainChecked_(false) + conn_(NULL), + fd_(-1), + destinationDomainChecked_(false), + sourceDomainChecked_(false) { my_addr.setEmpty(); src_addr.setEmpty(); @@ -135,23 +135,23 @@ ACLFilledChecklist::markSourceDomainChecked() * checkCallback() will delete the list (i.e., self). */ ACLFilledChecklist::ACLFilledChecklist(const acl_access *A, HttpRequest *http_request, const char *ident): - dst_peer(NULL), - dst_rdns(NULL), - request(NULL), - reply(NULL), + dst_peer(NULL), + dst_rdns(NULL), + request(NULL), + reply(NULL), #if USE_AUTh - auth_user_request(NULL), + auth_user_request(NULL), #endif #if SQUID_SNMP - snmp_community(NULL), + snmp_community(NULL), #endif #if USE_OPENSSL - sslErrors(NULL), + sslErrors(NULL), #endif - conn_(NULL), - fd_(-1), - destinationDomainChecked_(false), - sourceDomainChecked_(false) + conn_(NULL), + fd_(-1), + destinationDomainChecked_(false), + sourceDomainChecked_(false) { my_addr.setEmpty(); src_addr.setEmpty(); @@ -182,3 +182,4 @@ ACLFilledChecklist::ACLFilledChecklist(const acl_access *A, HttpRequest *http_re xstrncpy(rfc931, ident, USER_IDENT_SZ); #endif } + diff --git a/src/acl/FilledChecklist.h b/src/acl/FilledChecklist.h index fe5be22711..33695b00e8 100644 --- a/src/acl/FilledChecklist.h +++ b/src/acl/FilledChecklist.h @@ -112,3 +112,4 @@ ACLFilledChecklist *Filled(ACLChecklist *checklist) } #endif /* SQUID_ACLFILLED_CHECKLIST_H */ + diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index b42b20dc00..36c782e1f6 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -142,7 +142,7 @@ aclParseDenyInfoLine(AclDenyInfoList ** head) for (B = *head, T = head; B; T = &B->next, B = B->next) - ; /* find the tail */ + ; /* find the tail */ *T = A; } @@ -321,3 +321,4 @@ aclDestroyDenyInfoList(AclDenyInfoList ** list) *list = NULL; } + diff --git a/src/acl/Gadgets.h b/src/acl/Gadgets.h index 83896bd662..8ffc2f4015 100644 --- a/src/acl/Gadgets.h +++ b/src/acl/Gadgets.h @@ -63,3 +63,4 @@ void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head); void dump_acl_list(StoreEntry * entry, ACLList * head); #endif /* SQUID_ACL_GADGETS_H */ + diff --git a/src/acl/HierCode.cc b/src/acl/HierCode.cc index b1e2a17091..8fa163c905 100644 --- a/src/acl/HierCode.cc +++ b/src/acl/HierCode.cc @@ -29,3 +29,4 @@ ACLHierCodeStrategy::Instance() } ACLHierCodeStrategy ACLHierCodeStrategy::Instance_; + diff --git a/src/acl/HierCode.h b/src/acl/HierCode.h index 1222602c33..4cb7399509 100644 --- a/src/acl/HierCode.h +++ b/src/acl/HierCode.h @@ -48,3 +48,4 @@ private: }; #endif /* SQUID_ACLHIERCODE_H */ + diff --git a/src/acl/HierCodeData.cc b/src/acl/HierCodeData.cc index 8a6d1621ad..fc0955f3ec 100644 --- a/src/acl/HierCodeData.cc +++ b/src/acl/HierCodeData.cc @@ -79,3 +79,4 @@ ACLHierCodeData::clone() const { return new ACLHierCodeData(*this); } + diff --git a/src/acl/HierCodeData.h b/src/acl/HierCodeData.h index 00d8d358d3..6957ebde72 100644 --- a/src/acl/HierCodeData.h +++ b/src/acl/HierCodeData.h @@ -33,3 +33,4 @@ public: }; #endif /* SQUID_ACLHIERCODEDATA_H */ + diff --git a/src/acl/HttpHeaderData.cc b/src/acl/HttpHeaderData.cc index 60f6de90c2..64a1f507ee 100644 --- a/src/acl/HttpHeaderData.cc +++ b/src/acl/HttpHeaderData.cc @@ -92,3 +92,4 @@ ACLHTTPHeaderData::clone() const result->hdrName = hdrName; return result; } + diff --git a/src/acl/HttpHeaderData.h b/src/acl/HttpHeaderData.h index 33aaed0e8b..d5e4c154f7 100644 --- a/src/acl/HttpHeaderData.h +++ b/src/acl/HttpHeaderData.h @@ -33,3 +33,4 @@ private: }; #endif /* SQUID_ACLHTTPHEADERDATA_H */ + diff --git a/src/acl/HttpRepHeader.h b/src/acl/HttpRepHeader.h index 5d36003022..dc6d31bd24 100644 --- a/src/acl/HttpRepHeader.h +++ b/src/acl/HttpRepHeader.h @@ -47,3 +47,4 @@ private: }; #endif /* SQUID_ACLHTTPREPHEADER_H */ + diff --git a/src/acl/HttpReqHeader.h b/src/acl/HttpReqHeader.h index 002c1f86ca..ea0c934acd 100644 --- a/src/acl/HttpReqHeader.h +++ b/src/acl/HttpReqHeader.h @@ -44,3 +44,4 @@ private: }; #endif /* SQUID_ACLHTTPREQHEADER_H */ + diff --git a/src/acl/HttpStatus.h b/src/acl/HttpStatus.h index 8d7b76c4be..8be1302480 100644 --- a/src/acl/HttpStatus.h +++ b/src/acl/HttpStatus.h @@ -50,3 +50,4 @@ protected: }; #endif /* SQUID_ACLHTTPSTATUS_H */ + diff --git a/src/acl/InnerNode.cc b/src/acl/InnerNode.cc index 01b7ed9735..d4c196f26f 100644 --- a/src/acl/InnerNode.cc +++ b/src/acl/InnerNode.cc @@ -99,3 +99,4 @@ Acl::InnerNode::resumeMatchingAt(ACLChecklist *checklist, Acl::Nodes::const_iter // merges async and failures (-1) into "not matched" return result == 1; } + diff --git a/src/acl/InnerNode.h b/src/acl/InnerNode.h index b2631741f2..a0bc27eafe 100644 --- a/src/acl/InnerNode.h +++ b/src/acl/InnerNode.h @@ -55,3 +55,4 @@ protected: } // namespace Acl #endif /* SQUID_ACL_INNER_NODE_H */ + diff --git a/src/acl/IntRange.cc b/src/acl/IntRange.cc index 9c4566dc25..8291a92a38 100644 --- a/src/acl/IntRange.cc +++ b/src/acl/IntRange.cc @@ -97,3 +97,4 @@ ACLIntRange::dump() const return sl; } + diff --git a/src/acl/IntRange.h b/src/acl/IntRange.h index bca4acffac..c8fe290a54 100644 --- a/src/acl/IntRange.h +++ b/src/acl/IntRange.h @@ -33,3 +33,4 @@ private: }; #endif /* SQUID_ACLINTRANGE_H */ + diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index b799c7f9b3..aded60f1e4 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -33,8 +33,8 @@ ACLIP::operator delete (void *address) /** * Writes an IP ACL data into a buffer, then copies the buffer into the wordlist given * - \param ip ACL data structure to display - \param state wordlist structure which is being generated + \param ip ACL data structure to display + \param state wordlist structure which is being generated */ void ACLIP::DumpIpListWalkee(acl_ip_data * const & ip, void *state) @@ -45,8 +45,8 @@ ACLIP::DumpIpListWalkee(acl_ip_data * const & ip, void *state) /** * print/format an acl_ip_data structure for debugging output. * - \param buf string buffer to write to - \param len size of the buffer available + \param buf string buffer to write to + \param len size of the buffer available */ void acl_ip_data::toStr(char *buf, int len) const @@ -542,3 +542,4 @@ ACLIP::match(Ip::Address &clientip) acl_ip_data::acl_ip_data() :addr1(), addr2(), mask(), next (NULL) {} acl_ip_data::acl_ip_data(Ip::Address const &anAddress1, Ip::Address const &anAddress2, Ip::Address const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext) {} + diff --git a/src/acl/Ip.h b/src/acl/Ip.h index 36137ecf98..3995c20d73 100644 --- a/src/acl/Ip.h +++ b/src/acl/Ip.h @@ -34,7 +34,7 @@ public: Ip::Address mask; /**< \todo This should perhapse be stored as a CIDR range now instead of a full IP mask. */ - acl_ip_data *next; /**< used for parsing, not for storing */ + acl_ip_data *next; /**< used for parsing, not for storing */ private: @@ -71,3 +71,4 @@ private: }; #endif /* SQUID_ACLIP_H */ + diff --git a/src/acl/LocalIp.cc b/src/acl/LocalIp.cc index 09fb0e3f4e..a335aa03a3 100644 --- a/src/acl/LocalIp.cc +++ b/src/acl/LocalIp.cc @@ -29,3 +29,4 @@ ACLLocalIP::clone() const { return new ACLLocalIP(*this); } + diff --git a/src/acl/LocalIp.h b/src/acl/LocalIp.h index cf1587ac5f..92216375c5 100644 --- a/src/acl/LocalIp.h +++ b/src/acl/LocalIp.h @@ -29,3 +29,4 @@ private: }; #endif /* SQUID_ACLLOCALIP_H */ + diff --git a/src/acl/LocalPort.cc b/src/acl/LocalPort.cc index f38cbdba5b..803a68b8a6 100644 --- a/src/acl/LocalPort.cc +++ b/src/acl/LocalPort.cc @@ -24,3 +24,4 @@ ACLLocalPortStrategy::Instance() } ACLLocalPortStrategy ACLLocalPortStrategy::Instance_; + diff --git a/src/acl/LocalPort.h b/src/acl/LocalPort.h index da5756b4d0..b936c496c8 100644 --- a/src/acl/LocalPort.h +++ b/src/acl/LocalPort.h @@ -44,3 +44,4 @@ private: }; #endif /* SQUID_ACLLOCALPORT_H */ + diff --git a/src/acl/MaxConnection.cc b/src/acl/MaxConnection.cc index 79cf3d60ee..d4a768ed5d 100644 --- a/src/acl/MaxConnection.cc +++ b/src/acl/MaxConnection.cc @@ -100,3 +100,4 @@ ACLMaxConnection::prepareForUse() debugs(22, DBG_CRITICAL, "WARNING: 'maxconn' ACL (" << name << ") won't work with client_db disabled"); } + diff --git a/src/acl/MaxConnection.h b/src/acl/MaxConnection.h index 3e06b0b213..b3b723bdae 100644 --- a/src/acl/MaxConnection.h +++ b/src/acl/MaxConnection.h @@ -40,3 +40,4 @@ protected: }; #endif /* SQUID_ACLMAXCONNECTION_H */ + diff --git a/src/acl/Method.cc b/src/acl/Method.cc index eb41060234..97c12afde2 100644 --- a/src/acl/Method.cc +++ b/src/acl/Method.cc @@ -29,3 +29,4 @@ ACLMethodStrategy::Instance() } ACLMethodStrategy ACLMethodStrategy::Instance_; + diff --git a/src/acl/Method.h b/src/acl/Method.h index a77fece5c8..b86f5a1c23 100644 --- a/src/acl/Method.h +++ b/src/acl/Method.h @@ -48,3 +48,4 @@ private: }; #endif /* SQUID_ACLMETHOD_H */ + diff --git a/src/acl/MethodData.cc b/src/acl/MethodData.cc index 552315cccb..05944962e3 100644 --- a/src/acl/MethodData.cc +++ b/src/acl/MethodData.cc @@ -69,3 +69,4 @@ ACLMethodData::clone() const assert(values.empty()); return new ACLMethodData(*this); } + diff --git a/src/acl/MethodData.h b/src/acl/MethodData.h index bca112e918..a84ab15663 100644 --- a/src/acl/MethodData.h +++ b/src/acl/MethodData.h @@ -36,3 +36,4 @@ public: }; #endif /* SQUID_ACLMETHODDATA_H */ + diff --git a/src/acl/MyPortName.cc b/src/acl/MyPortName.cc index d16998f881..d7db1e8f89 100644 --- a/src/acl/MyPortName.cc +++ b/src/acl/MyPortName.cc @@ -33,3 +33,4 @@ ACLMyPortNameStrategy::Instance() } ACLMyPortNameStrategy ACLMyPortNameStrategy::Instance_; + diff --git a/src/acl/MyPortName.h b/src/acl/MyPortName.h index 3a1adf68c4..b78c0811a8 100644 --- a/src/acl/MyPortName.h +++ b/src/acl/MyPortName.h @@ -38,3 +38,4 @@ private: }; #endif /* SQUID_ACLMYPORTNAME_H */ + diff --git a/src/acl/Note.h b/src/acl/Note.h index a08d673e04..209363b0c0 100644 --- a/src/acl/Note.h +++ b/src/acl/Note.h @@ -45,3 +45,4 @@ private: }; #endif /* SQUID_ACLNOTE_H */ + diff --git a/src/acl/NoteData.cc b/src/acl/NoteData.cc index b2ecf48740..4ecedfc261 100644 --- a/src/acl/NoteData.cc +++ b/src/acl/NoteData.cc @@ -93,3 +93,4 @@ ACLNoteData::clone() const result->name = name; return result; } + diff --git a/src/acl/NoteData.h b/src/acl/NoteData.h index cc362993e8..a84b2bbe4f 100644 --- a/src/acl/NoteData.h +++ b/src/acl/NoteData.h @@ -36,3 +36,4 @@ private: }; #endif /* SQUID_ACLNOTEDATA_H */ + diff --git a/src/acl/PeerName.cc b/src/acl/PeerName.cc index c8f7204c94..da2650e0db 100644 --- a/src/acl/PeerName.cc +++ b/src/acl/PeerName.cc @@ -28,3 +28,4 @@ ACLPeerNameStrategy::Instance() } ACLPeerNameStrategy ACLPeerNameStrategy::Instance_; + diff --git a/src/acl/PeerName.h b/src/acl/PeerName.h index eb1b05f946..31168d22da 100644 --- a/src/acl/PeerName.h +++ b/src/acl/PeerName.h @@ -41,3 +41,4 @@ private: }; #endif /* SQUID_ACLPEERNAME_H */ + diff --git a/src/acl/Protocol.cc b/src/acl/Protocol.cc index 466a4e7db6..4adfc53abb 100644 --- a/src/acl/Protocol.cc +++ b/src/acl/Protocol.cc @@ -29,3 +29,4 @@ ACLProtocolStrategy::Instance() } ACLProtocolStrategy ACLProtocolStrategy::Instance_; + diff --git a/src/acl/Protocol.h b/src/acl/Protocol.h index 5197b846cc..2e73e77307 100644 --- a/src/acl/Protocol.h +++ b/src/acl/Protocol.h @@ -42,3 +42,4 @@ private: }; #endif /* SQUID_ACLPROTOCOL_H */ + diff --git a/src/acl/ProtocolData.cc b/src/acl/ProtocolData.cc index d0d96d362d..de45bb5d57 100644 --- a/src/acl/ProtocolData.cc +++ b/src/acl/ProtocolData.cc @@ -75,3 +75,4 @@ ACLProtocolData::clone() const assert(values.empty()); return new ACLProtocolData(*this); } + diff --git a/src/acl/ProtocolData.h b/src/acl/ProtocolData.h index 90f2639403..f6ca23587d 100644 --- a/src/acl/ProtocolData.h +++ b/src/acl/ProtocolData.h @@ -34,3 +34,4 @@ public: }; #endif /* SQUID_ACLPROTOCOLDATA_H */ + diff --git a/src/acl/Random.cc b/src/acl/Random.cc index 4c784d31c8..1cdc09d9d8 100644 --- a/src/acl/Random.cc +++ b/src/acl/Random.cc @@ -118,3 +118,4 @@ ACLRandom::dump() const sl.push_back(SBuf(pattern)); return sl; } + diff --git a/src/acl/Random.h b/src/acl/Random.h index da0bb54fdf..435bd2d548 100644 --- a/src/acl/Random.h +++ b/src/acl/Random.h @@ -39,3 +39,4 @@ protected: }; #endif /* SQUID_ACL_RANDOM_H */ + diff --git a/src/acl/Referer.h b/src/acl/Referer.h index 61c36ef987..02e39de241 100644 --- a/src/acl/Referer.h +++ b/src/acl/Referer.h @@ -22,3 +22,4 @@ private: }; #endif /* SQUID_ACLREFERER_H */ + diff --git a/src/acl/RegexData.cc b/src/acl/RegexData.cc index 3256d2d8ed..5d38baeadf 100644 --- a/src/acl/RegexData.cc +++ b/src/acl/RegexData.cc @@ -339,3 +339,4 @@ ACLRegexData::clone() const assert (!data); return new ACLRegexData; } + diff --git a/src/acl/RegexData.h b/src/acl/RegexData.h index 95f84fecb8..99c9b53d6a 100644 --- a/src/acl/RegexData.h +++ b/src/acl/RegexData.h @@ -30,3 +30,4 @@ private: }; #endif /* SQUID_ACLREGEXDATA_H */ + diff --git a/src/acl/ReplyHeaderStrategy.h b/src/acl/ReplyHeaderStrategy.h index b78b3bb4d1..c5be4cb90a 100644 --- a/src/acl/ReplyHeaderStrategy.h +++ b/src/acl/ReplyHeaderStrategy.h @@ -64,3 +64,4 @@ template ACLReplyHeaderStrategy
* ACLReplyHeaderStrategy
::Instance_ = NULL; #endif /* SQUID_REPLYHEADERSTRATEGY_H */ + diff --git a/src/acl/ReplyMimeType.h b/src/acl/ReplyMimeType.h index 1bde4d52ad..e2bbc6a250 100644 --- a/src/acl/ReplyMimeType.h +++ b/src/acl/ReplyMimeType.h @@ -39,3 +39,4 @@ ACLReplyHeaderStrategy::match(ACLData * &data, A } #endif /* SQUID_ACLREPLYMIMETYPE_H */ + diff --git a/src/acl/RequestHeaderStrategy.h b/src/acl/RequestHeaderStrategy.h index bdc08373c9..df9cb00ecb 100644 --- a/src/acl/RequestHeaderStrategy.h +++ b/src/acl/RequestHeaderStrategy.h @@ -62,3 +62,4 @@ template ACLRequestHeaderStrategy
* ACLRequestHeaderStrategy
::Instance_ = NULL; #endif /* SQUID_REQUESTHEADERSTRATEGY_H */ + diff --git a/src/acl/RequestMimeType.h b/src/acl/RequestMimeType.h index 0ea8f04534..8f1b9132fc 100644 --- a/src/acl/RequestMimeType.h +++ b/src/acl/RequestMimeType.h @@ -39,3 +39,4 @@ ACLRequestHeaderStrategy::match (ACLData * &data } #endif /* SQUID_ACLREQUESTMIMETYPE_H */ + diff --git a/src/acl/ServerCertificate.cc b/src/acl/ServerCertificate.cc index 5f814a364e..dc29711f01 100644 --- a/src/acl/ServerCertificate.cc +++ b/src/acl/ServerCertificate.cc @@ -41,3 +41,4 @@ ACLServerCertificateStrategy::Instance() ACLServerCertificateStrategy ACLServerCertificateStrategy::Instance_; #endif /* USE_OPENSSL */ + diff --git a/src/acl/ServerCertificate.h b/src/acl/ServerCertificate.h index 5b5e1bd25f..c720eea193 100644 --- a/src/acl/ServerCertificate.h +++ b/src/acl/ServerCertificate.h @@ -42,3 +42,4 @@ private: }; #endif /* SQUID_ACLSERVERCERTIFICATE_H */ + diff --git a/src/acl/SourceAsn.h b/src/acl/SourceAsn.h index de2c3d3108..1ab9c2e961 100644 --- a/src/acl/SourceAsn.h +++ b/src/acl/SourceAsn.h @@ -33,3 +33,4 @@ private: }; #endif /* SQUID_ACL_SOURCEASN_H */ + diff --git a/src/acl/SourceDomain.cc b/src/acl/SourceDomain.cc index b999c5f19b..9354a2ed5d 100644 --- a/src/acl/SourceDomain.cc +++ b/src/acl/SourceDomain.cc @@ -65,3 +65,4 @@ ACLSourceDomainStrategy::Instance() } ACLSourceDomainStrategy ACLSourceDomainStrategy::Instance_; + diff --git a/src/acl/SourceDomain.h b/src/acl/SourceDomain.h index 73ebdf7864..71054f8cba 100644 --- a/src/acl/SourceDomain.h +++ b/src/acl/SourceDomain.h @@ -54,3 +54,4 @@ private: }; #endif /* SQUID_ACLSOURCEDOMAIN_H */ + diff --git a/src/acl/SourceIp.cc b/src/acl/SourceIp.cc index 08c7f58f0f..464acc2806 100644 --- a/src/acl/SourceIp.cc +++ b/src/acl/SourceIp.cc @@ -29,3 +29,4 @@ ACLSourceIP::clone() const { return new ACLSourceIP(*this); } + diff --git a/src/acl/SourceIp.h b/src/acl/SourceIp.h index f4fb77b8df..b0452dd7c5 100644 --- a/src/acl/SourceIp.h +++ b/src/acl/SourceIp.h @@ -26,3 +26,4 @@ private: }; #endif /* SQUID_ACLSOURCEIP_H */ + diff --git a/src/acl/SslError.cc b/src/acl/SslError.cc index e161020d8d..4381d7144e 100644 --- a/src/acl/SslError.cc +++ b/src/acl/SslError.cc @@ -24,3 +24,4 @@ ACLSslErrorStrategy::Instance() } ACLSslErrorStrategy ACLSslErrorStrategy::Instance_; + diff --git a/src/acl/SslError.h b/src/acl/SslError.h index 4b4eead7f7..4ecd18dd4b 100644 --- a/src/acl/SslError.h +++ b/src/acl/SslError.h @@ -39,3 +39,4 @@ private: }; #endif /* SQUID_ACLSSL_ERROR_H */ + diff --git a/src/acl/SslErrorData.cc b/src/acl/SslErrorData.cc index 0c166ed7a6..8ca619589d 100644 --- a/src/acl/SslErrorData.cc +++ b/src/acl/SslErrorData.cc @@ -81,3 +81,4 @@ ACLSslErrorData::clone() const assert (!values); return new ACLSslErrorData(*this); } + diff --git a/src/acl/SslErrorData.h b/src/acl/SslErrorData.h index 5148864d55..f918b13f74 100644 --- a/src/acl/SslErrorData.h +++ b/src/acl/SslErrorData.h @@ -35,3 +35,4 @@ public: }; #endif /* SQUID_ACLSSL_ERRORDATA_H */ + diff --git a/src/acl/Strategised.cc b/src/acl/Strategised.cc index 1a6958f277..fdcd777f19 100644 --- a/src/acl/Strategised.cc +++ b/src/acl/Strategised.cc @@ -28,3 +28,4 @@ template class ACLStrategised; /* ACLLocalPort + ACLSslError */ template class ACLStrategised; + diff --git a/src/acl/Strategised.h b/src/acl/Strategised.h index 810cb31525..508363836d 100644 --- a/src/acl/Strategised.h +++ b/src/acl/Strategised.h @@ -132,3 +132,4 @@ ACLStrategised::clone() const } #endif /* SQUID_ACLSTRATEGISED_H */ + diff --git a/src/acl/Strategy.h b/src/acl/Strategy.h index 6fde525bb8..16c2bc1f4a 100644 --- a/src/acl/Strategy.h +++ b/src/acl/Strategy.h @@ -32,3 +32,4 @@ public: }; #endif /* SQUID_ACLSTRATEGY_H */ + diff --git a/src/acl/StringData.cc b/src/acl/StringData.cc index 733e6b7011..f6a43117de 100644 --- a/src/acl/StringData.cc +++ b/src/acl/StringData.cc @@ -103,3 +103,4 @@ ACLStringData::clone() const assert (!values); return new ACLStringData(*this); } + diff --git a/src/acl/StringData.h b/src/acl/StringData.h index da0ad3b5bb..e0dcedceeb 100644 --- a/src/acl/StringData.h +++ b/src/acl/StringData.h @@ -34,3 +34,4 @@ public: }; #endif /* SQUID_ACLSTRINGDATA_H */ + diff --git a/src/acl/Tag.cc b/src/acl/Tag.cc index a6afe0a1b1..c798de5c54 100644 --- a/src/acl/Tag.cc +++ b/src/acl/Tag.cc @@ -27,3 +27,4 @@ ACLTagStrategy::Instance() } ACLTagStrategy ACLTagStrategy::Instance_; + diff --git a/src/acl/Tag.h b/src/acl/Tag.h index 2898178ec3..df2477be0e 100644 --- a/src/acl/Tag.h +++ b/src/acl/Tag.h @@ -39,3 +39,4 @@ private: }; #endif /* SQUID_ACLMYPORTNAME_H */ + diff --git a/src/acl/Time.cc b/src/acl/Time.cc index a5bdb142a2..bc2911dbfd 100644 --- a/src/acl/Time.cc +++ b/src/acl/Time.cc @@ -26,3 +26,4 @@ ACLTimeStrategy::Instance() } ACLTimeStrategy ACLTimeStrategy::Instance_; + diff --git a/src/acl/Time.h b/src/acl/Time.h index 2e48944add..3fd87bedba 100644 --- a/src/acl/Time.h +++ b/src/acl/Time.h @@ -41,3 +41,4 @@ public: }; #endif /* SQUID_ACLTIME_H */ + diff --git a/src/acl/TimeData.cc b/src/acl/TimeData.cc index fdbddbb521..b7ed19df6f 100644 --- a/src/acl/TimeData.cc +++ b/src/acl/TimeData.cc @@ -232,3 +232,4 @@ ACLTimeData::clone() const { return new ACLTimeData(*this); } + diff --git a/src/acl/TimeData.h b/src/acl/TimeData.h index 1a6f8598a5..c0e971b95d 100644 --- a/src/acl/TimeData.h +++ b/src/acl/TimeData.h @@ -36,3 +36,4 @@ private: }; #endif /* SQUID_ACLTIMEDATA_H */ + diff --git a/src/acl/Tree.cc b/src/acl/Tree.cc index 33aa45bd8f..845cf79a81 100644 --- a/src/acl/Tree.cc +++ b/src/acl/Tree.cc @@ -80,3 +80,4 @@ Acl::Tree::treeDump(const char *prefix, const ActionToString &convert) const } return text; } + diff --git a/src/acl/Tree.h b/src/acl/Tree.h index 339b1acc18..9c9faf3435 100644 --- a/src/acl/Tree.h +++ b/src/acl/Tree.h @@ -50,3 +50,4 @@ protected: } // namespace Acl #endif /* SQUID_ACL_TREE_H */ + diff --git a/src/acl/Url.cc b/src/acl/Url.cc index 9954a93d88..0aaff63573 100644 --- a/src/acl/Url.cc +++ b/src/acl/Url.cc @@ -32,3 +32,4 @@ ACLUrlStrategy::Instance() } ACLUrlStrategy ACLUrlStrategy::Instance_; + diff --git a/src/acl/Url.h b/src/acl/Url.h index 9f5f32c3d1..c8fc09fdc6 100644 --- a/src/acl/Url.h +++ b/src/acl/Url.h @@ -42,3 +42,4 @@ public: }; #endif /* SQUID_ACLURL_H */ + diff --git a/src/acl/UrlLogin.cc b/src/acl/UrlLogin.cc index 5ba3c5a510..51dd6ead9b 100644 --- a/src/acl/UrlLogin.cc +++ b/src/acl/UrlLogin.cc @@ -38,3 +38,4 @@ ACLUrlLoginStrategy::Instance() } ACLUrlLoginStrategy ACLUrlLoginStrategy::Instance_; + diff --git a/src/acl/UrlLogin.h b/src/acl/UrlLogin.h index 04c15b7cff..f54918c836 100644 --- a/src/acl/UrlLogin.h +++ b/src/acl/UrlLogin.h @@ -44,3 +44,4 @@ public: }; #endif /* SQUID_ACLURLLOGIN_H */ + diff --git a/src/acl/UrlPath.cc b/src/acl/UrlPath.cc index 8a863516d9..debf1804ad 100644 --- a/src/acl/UrlPath.cc +++ b/src/acl/UrlPath.cc @@ -35,3 +35,4 @@ ACLUrlPathStrategy::Instance() } ACLUrlPathStrategy ACLUrlPathStrategy::Instance_; + diff --git a/src/acl/UrlPath.h b/src/acl/UrlPath.h index f6eba0fd89..99d0786fde 100644 --- a/src/acl/UrlPath.h +++ b/src/acl/UrlPath.h @@ -43,3 +43,4 @@ public: }; #endif /* SQUID_ACLURLPATH_H */ + diff --git a/src/acl/UrlPort.cc b/src/acl/UrlPort.cc index 61db2f794d..abc3b6295a 100644 --- a/src/acl/UrlPort.cc +++ b/src/acl/UrlPort.cc @@ -25,3 +25,4 @@ ACLUrlPortStrategy::Instance() } ACLUrlPortStrategy ACLUrlPortStrategy::Instance_; + diff --git a/src/acl/UrlPort.h b/src/acl/UrlPort.h index 85f1835d62..022fafa08d 100644 --- a/src/acl/UrlPort.h +++ b/src/acl/UrlPort.h @@ -40,3 +40,4 @@ private: }; #endif /* SQUID_ACLURLPORT_H */ + diff --git a/src/acl/UserData.cc b/src/acl/UserData.cc index 1ad700f481..ce53f75f7f 100644 --- a/src/acl/UserData.cc +++ b/src/acl/UserData.cc @@ -148,3 +148,4 @@ ACLUserData::clone() const assert (!names); return new ACLUserData; } + diff --git a/src/acl/UserData.h b/src/acl/UserData.h index 6fe94686ab..e51ce40f5f 100644 --- a/src/acl/UserData.h +++ b/src/acl/UserData.h @@ -34,3 +34,4 @@ public: }; #endif /* SQUID_ACLUSERDATA_H */ + diff --git a/src/acl/forward.h b/src/acl/forward.h index 67d304cdd1..673fd71c79 100644 --- a/src/acl/forward.h +++ b/src/acl/forward.h @@ -45,3 +45,4 @@ class ExternalACLEntry; typedef RefCount ExternalACLEntryPointer; #endif /* SQUID_ACL_FORWARD_H */ + diff --git a/src/adaptation/AccessCheck.cc b/src/adaptation/AccessCheck.cc index 83709fa5d8..82ec90ee2d 100644 --- a/src/adaptation/AccessCheck.cc +++ b/src/adaptation/AccessCheck.cc @@ -45,9 +45,9 @@ Adaptation::AccessCheck::Start(Method method, VectPoint vp, Adaptation::AccessCheck::AccessCheck(const ServiceFilter &aFilter, Adaptation::Initiator *initiator): - AsyncJob("AccessCheck"), filter(aFilter), - theInitiator(initiator), - acl_checklist(NULL) + AsyncJob("AccessCheck"), filter(aFilter), + theInitiator(initiator), + acl_checklist(NULL) { #if ICAP_CLIENT Adaptation::Icap::History::Pointer h = filter.request->icapHistory(); @@ -236,3 +236,4 @@ Adaptation::AccessCheck::isCandidate(AccessRule &r) debugs(93,7,HERE << r.groupId << (wants ? " wants" : " ignores")); return wants; } + diff --git a/src/adaptation/AccessCheck.h b/src/adaptation/AccessCheck.h index 15735b2eb5..5f9a241c8c 100644 --- a/src/adaptation/AccessCheck.h +++ b/src/adaptation/AccessCheck.h @@ -74,3 +74,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ADAPTATION__ACCESS_CHECK_H */ + diff --git a/src/adaptation/AccessRule.cc b/src/adaptation/AccessRule.cc index 36fc768d6e..87b24f217c 100644 --- a/src/adaptation/AccessRule.cc +++ b/src/adaptation/AccessRule.cc @@ -88,3 +88,4 @@ Adaptation::FindRuleByGroupId(const String &groupId) return NULL; } + diff --git a/src/adaptation/AccessRule.h b/src/adaptation/AccessRule.h index 82185d648f..2aa82a4e34 100644 --- a/src/adaptation/AccessRule.h +++ b/src/adaptation/AccessRule.h @@ -52,3 +52,4 @@ AccessRule *FindRuleByGroupId(const String &groupId); } // namespace Adaptation #endif /* SQUID_ADAPTATION__ACCESS_RULE_H */ + diff --git a/src/adaptation/Answer.cc b/src/adaptation/Answer.cc index 42d5c3b831..8d0aa25ea2 100644 --- a/src/adaptation/Answer.cc +++ b/src/adaptation/Answer.cc @@ -48,3 +48,4 @@ Adaptation::Answer::print(std::ostream &os) const Adaptation::Answer::Answer(Kind aKind): final(true), kind(aKind) { } + diff --git a/src/adaptation/Answer.h b/src/adaptation/Answer.h index 535a98e938..666e7c9ae7 100644 --- a/src/adaptation/Answer.h +++ b/src/adaptation/Answer.h @@ -53,3 +53,4 @@ std::ostream &operator <<(std::ostream &os, const Answer &answer) } // namespace Adaptation #endif /* SQUID_ADAPTATION__ANSWER_H */ + diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index a80cfd6a70..39689073c9 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -293,8 +293,8 @@ Adaptation::Config::DumpAccess(StoreEntry *entry, const char *name) } Adaptation::Config::Config() : - onoff(0), service_failure_limit(0), oldest_service_failure(0), - service_revival_delay(0) + onoff(0), service_failure_limit(0), oldest_service_failure(0), + service_revival_delay(0) {} // XXX: this is called for ICAP and eCAP configs, but deals mostly @@ -303,3 +303,4 @@ Adaptation::Config::~Config() { freeService(); } + diff --git a/src/adaptation/Config.h b/src/adaptation/Config.h index 6025cb2c24..5e286ecdab 100644 --- a/src/adaptation/Config.h +++ b/src/adaptation/Config.h @@ -105,3 +105,4 @@ private: } // namespace Adaptation #endif /* SQUID_ADAPTATION__CONFIG_H */ + diff --git a/src/adaptation/DynamicGroupCfg.cc b/src/adaptation/DynamicGroupCfg.cc index 3ca7ce269b..2aecea3902 100644 --- a/src/adaptation/DynamicGroupCfg.cc +++ b/src/adaptation/DynamicGroupCfg.cc @@ -28,3 +28,4 @@ Adaptation::DynamicGroupCfg::clear() id.clean(); services.clear(); } + diff --git a/src/adaptation/Elements.h b/src/adaptation/Elements.h index 423175ff8c..bcd4bb468a 100644 --- a/src/adaptation/Elements.h +++ b/src/adaptation/Elements.h @@ -25,3 +25,4 @@ const char *vectPointStr(VectPoint); // TODO: make into a stream op? } // namespace Adaptation #endif /* SQUID_ADAPTATION_ELEMENTS_H */ + diff --git a/src/adaptation/History.cc b/src/adaptation/History.cc index 0622a42f95..31f2be5101 100644 --- a/src/adaptation/History.cc +++ b/src/adaptation/History.cc @@ -18,12 +18,12 @@ const static char *TheNullServices = ",null,"; Adaptation::History::Entry::Entry(const String &serviceId, const timeval &when): - service(serviceId), start(when), theRptm(-1), retried(false) + service(serviceId), start(when), theRptm(-1), retried(false) { } Adaptation::History::Entry::Entry(): - start(current_time), theRptm(-1), retried(false) + start(current_time), theRptm(-1), retried(false) { } @@ -41,9 +41,9 @@ int Adaptation::History::Entry::rptm() } Adaptation::History::History(): - lastMeta(hoReply), - allMeta(hoReply), - theNextServices(TheNullServices) + lastMeta(hoReply), + allMeta(hoReply), + theNextServices(TheNullServices) { } @@ -180,3 +180,4 @@ bool Adaptation::History::extractFutureServices(DynamicGroupCfg &value) theFutureServices.clear(); return true; } + diff --git a/src/adaptation/History.h b/src/adaptation/History.h index be35d1f11b..82e41c36fd 100644 --- a/src/adaptation/History.h +++ b/src/adaptation/History.h @@ -108,3 +108,4 @@ private: } // namespace Adaptation #endif + diff --git a/src/adaptation/Initiate.cc b/src/adaptation/Initiate.cc index ffb72cdedb..f52478f154 100644 --- a/src/adaptation/Initiate.cc +++ b/src/adaptation/Initiate.cc @@ -24,7 +24,7 @@ class AnswerCall: public AsyncCallT { public: AnswerCall(const char *aName, const AnswerDialer &aDialer) : - AsyncCallT(93, 5, aName, aDialer), fired(false) {} + AsyncCallT(93, 5, aName, aDialer), fired(false) {} virtual void fire() { fired = true; AsyncCallT::fire(); @@ -93,3 +93,4 @@ const char *Adaptation::Initiate::status() const { return AsyncJob::status(); // for now } + diff --git a/src/adaptation/Initiate.h b/src/adaptation/Initiate.h index 2f1c9df7af..bdb979dc2b 100644 --- a/src/adaptation/Initiate.h +++ b/src/adaptation/Initiate.h @@ -58,3 +58,4 @@ private: } // namespace Adaptation #endif /* SQUID_ADAPTATION__INITIATE_H */ + diff --git a/src/adaptation/Initiator.cc b/src/adaptation/Initiator.cc index 75821770a5..30579a80f8 100644 --- a/src/adaptation/Initiator.cc +++ b/src/adaptation/Initiator.cc @@ -40,3 +40,4 @@ Adaptation::Initiator::announceInitiatorAbort(CbcPointer &x) CallJobHere(93, 5, x, Initiate, noteInitiatorAborted); clearAdaptation(x); } + diff --git a/src/adaptation/Initiator.h b/src/adaptation/Initiator.h index 222452b177..c017df504a 100644 --- a/src/adaptation/Initiator.h +++ b/src/adaptation/Initiator.h @@ -55,3 +55,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ADAPTATION__INITIATOR_H */ + diff --git a/src/adaptation/Iterator.cc b/src/adaptation/Iterator.cc index bec14a857f..98e1a1ad00 100644 --- a/src/adaptation/Iterator.cc +++ b/src/adaptation/Iterator.cc @@ -24,15 +24,15 @@ Adaptation::Iterator::Iterator( HttpMsg *aMsg, HttpRequest *aCause, AccessLogEntry::Pointer &alp, const ServiceGroupPointer &aGroup): - AsyncJob("Iterator"), - Adaptation::Initiate("Iterator"), - theGroup(aGroup), - theMsg(aMsg), - theCause(aCause), - al(alp), - theLauncher(0), - iterations(0), - adapted(false) + AsyncJob("Iterator"), + Adaptation::Initiate("Iterator"), + theGroup(aGroup), + theMsg(aMsg), + theCause(aCause), + al(alp), + theLauncher(0), + iterations(0), + adapted(false) { if (theCause != NULL) HTTPMSGLOCK(theCause); @@ -288,3 +288,4 @@ Adaptation::ServiceFilter Adaptation::Iterator::filter() const } CBDATA_NAMESPACED_CLASS_INIT(Adaptation, Iterator); + diff --git a/src/adaptation/Iterator.h b/src/adaptation/Iterator.h index 11c49e8607..6dacc85287 100644 --- a/src/adaptation/Iterator.h +++ b/src/adaptation/Iterator.h @@ -78,3 +78,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ADAPTATION__ITERATOR_H */ + diff --git a/src/adaptation/Message.cc b/src/adaptation/Message.cc index bdf8f8d647..9129643970 100644 --- a/src/adaptation/Message.cc +++ b/src/adaptation/Message.cc @@ -62,3 +62,4 @@ Adaptation::Message::ShortCircuit(Message &src, Message &dest) } dest.set(src.header->clone()); } + diff --git a/src/adaptation/Message.h b/src/adaptation/Message.h index ddfd7c3781..60a16ff2f9 100644 --- a/src/adaptation/Message.h +++ b/src/adaptation/Message.h @@ -55,3 +55,4 @@ private: // TODO: replace ICAPInOut with Adaptation::Message (adding one for "cause") #endif /* SQUID__ADAPTATION__MESSAGE_H */ + diff --git a/src/adaptation/Service.cc b/src/adaptation/Service.cc index 58b0f91d2c..b137053401 100644 --- a/src/adaptation/Service.cc +++ b/src/adaptation/Service.cc @@ -82,3 +82,4 @@ void Adaptation::DetachServices() AllServices().pop_back(); } } + diff --git a/src/adaptation/Service.h b/src/adaptation/Service.h index 78ef53b527..179b99f0d6 100644 --- a/src/adaptation/Service.h +++ b/src/adaptation/Service.h @@ -79,3 +79,4 @@ void DetachServices(); } // namespace Adaptation #endif /* SQUID_ADAPTATION__SERVICE_H */ + diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc index 08a50ddea1..a785b0d672 100644 --- a/src/adaptation/ServiceConfig.cc +++ b/src/adaptation/ServiceConfig.cc @@ -17,9 +17,9 @@ #include Adaptation::ServiceConfig::ServiceConfig(): - port(-1), method(methodNone), point(pointNone), - bypass(false), maxConn(-1), onOverload(srvWait), - routing(false), ipv6(false) + port(-1), method(methodNone), point(pointNone), + bypass(false), maxConn(-1), onOverload(srvWait), + routing(false), ipv6(false) {} const char * @@ -315,3 +315,4 @@ Adaptation::ServiceConfig::grokExtension(const char *name, const char *value) name << '=' << value); return false; } + diff --git a/src/adaptation/ServiceConfig.h b/src/adaptation/ServiceConfig.h index ca8f50b07c..956f1ae05f 100644 --- a/src/adaptation/ServiceConfig.h +++ b/src/adaptation/ServiceConfig.h @@ -64,3 +64,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ADAPTATION__SERVICE_CONFIG_H */ + diff --git a/src/adaptation/ServiceFilter.cc b/src/adaptation/ServiceFilter.cc index 8a7b02dfbf..c853b49857 100644 --- a/src/adaptation/ServiceFilter.cc +++ b/src/adaptation/ServiceFilter.cc @@ -13,11 +13,11 @@ #include "HttpRequest.h" Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, HttpRequest *aReq, HttpReply *aRep, AccessLogEntry::Pointer const &alp): - method(aMethod), - point(aPoint), - request(aReq), - reply(aRep), - al(alp) + method(aMethod), + point(aPoint), + request(aReq), + reply(aRep), + al(alp) { if (reply) HTTPMSGLOCK(reply); @@ -28,11 +28,11 @@ Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, HttpR } Adaptation::ServiceFilter::ServiceFilter(const ServiceFilter &f): - method(f.method), - point(f.point), - request(f.request), - reply(f.reply), - al(f.al) + method(f.method), + point(f.point), + request(f.request), + reply(f.reply), + al(f.al) { if (request) HTTPMSGLOCK(request); @@ -62,3 +62,4 @@ Adaptation::ServiceFilter &Adaptation::ServiceFilter::operator =(const ServiceFi } return *this; } + diff --git a/src/adaptation/ServiceFilter.h b/src/adaptation/ServiceFilter.h index 857ef716cd..19693f3409 100644 --- a/src/adaptation/ServiceFilter.h +++ b/src/adaptation/ServiceFilter.h @@ -39,3 +39,4 @@ public: } // namespace Adaptation #endif /* SQUID_ADAPTATION__SERVICE_FILTER_H */ + diff --git a/src/adaptation/ServiceGroups.cc b/src/adaptation/ServiceGroups.cc index aa0482170a..fa730ce36b 100644 --- a/src/adaptation/ServiceGroups.cc +++ b/src/adaptation/ServiceGroups.cc @@ -19,8 +19,8 @@ #include "wordlist.h" Adaptation::ServiceGroup::ServiceGroup(const String &aKind, bool allSame): - kind(aKind), method(methodNone), point(pointNone), - allServicesSame(allSame) + kind(aKind), method(methodNone), point(pointNone), + allServicesSame(allSame) { } @@ -211,7 +211,7 @@ Adaptation::ServiceSet::ServiceSet(): ServiceGroup("adaptation set", true) /* SingleService */ Adaptation::SingleService::SingleService(const String &aServiceId): - ServiceGroup("single-service group", false) + ServiceGroup("single-service group", false) { id = aServiceId; services.push_back(aServiceId); @@ -278,7 +278,7 @@ Adaptation::ServicePlan::ServicePlan(): pos(0), atEof(true) Adaptation::ServicePlan::ServicePlan(const ServiceGroupPointer &g, const ServiceFilter &filter): - group(g), pos(0), atEof(!g || !g->has(pos)) + group(g), pos(0), atEof(!g || !g->has(pos)) { // this will find the first service because starting pos is zero if (!atEof && !group->findService(filter, pos)) @@ -338,3 +338,4 @@ Adaptation::FindGroup(const ServiceGroup::Id &id) return NULL; } + diff --git a/src/adaptation/ecap/Config.h b/src/adaptation/ecap/Config.h index 6d5a84d338..07a1bbb885 100644 --- a/src/adaptation/ecap/Config.h +++ b/src/adaptation/ecap/Config.h @@ -60,3 +60,4 @@ extern Config TheConfig; } // namespace Adaptation #endif /* SQUID_ECAP_CONFIG_H */ + diff --git a/src/adaptation/ecap/Host.cc b/src/adaptation/ecap/Host.cc index 9a37ca2fa1..c3085fe3a6 100644 --- a/src/adaptation/ecap/Host.cc +++ b/src/adaptation/ecap/Host.cc @@ -182,3 +182,4 @@ Adaptation::Ecap::Host::Register() libecap::RegisterHost(TheHost); } } + diff --git a/src/adaptation/ecap/Host.h b/src/adaptation/ecap/Host.h index 74dbed34e9..f6b506e44e 100644 --- a/src/adaptation/ecap/Host.h +++ b/src/adaptation/ecap/Host.h @@ -54,3 +54,4 @@ extern const libecap::Name metaBypassable; ///< an ecap_service parameter } // namespace Adaptation #endif /* SQUID_ECAP_HOST_H */ + diff --git a/src/adaptation/ecap/MessageRep.cc b/src/adaptation/ecap/MessageRep.cc index 8bbfeb1ae9..7bd27d2f6a 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -25,7 +25,7 @@ /* HeaderRep */ Adaptation::Ecap::HeaderRep::HeaderRep(HttpMsg &aMessage): theHeader(aMessage.header), - theMessage(aMessage) + theMessage(aMessage) { } @@ -200,7 +200,7 @@ Adaptation::Ecap::FirstLineRep::TranslateProtocolId(const Name &name) /* RequestHeaderRep */ Adaptation::Ecap::RequestLineRep::RequestLineRep(HttpRequest &aMessage): - FirstLineRep(aMessage), theMessage(aMessage) + FirstLineRep(aMessage), theMessage(aMessage) { } @@ -289,7 +289,7 @@ Adaptation::Ecap::RequestLineRep::protocol(const Name &p) /* ReplyHeaderRep */ Adaptation::Ecap::StatusLineRep::StatusLineRep(HttpReply &aMessage): - FirstLineRep(aMessage), theMessage(aMessage) + FirstLineRep(aMessage), theMessage(aMessage) { } @@ -365,8 +365,8 @@ Adaptation::Ecap::BodyRep::bodySize() const /* MessageRep */ Adaptation::Ecap::MessageRep::MessageRep(HttpMsg *rawHeader): - theMessage(rawHeader), theFirstLineRep(NULL), - theHeaderRep(NULL), theBodyRep(NULL) + theMessage(rawHeader), theFirstLineRep(NULL), + theHeaderRep(NULL), theBodyRep(NULL) { Must(theMessage.header); // we do not want to represent a missing message @@ -457,3 +457,4 @@ const libecap::Body *Adaptation::Ecap::MessageRep::body() const { return theBodyRep; } + diff --git a/src/adaptation/ecap/MessageRep.h b/src/adaptation/ecap/MessageRep.h index 48d86c666f..a19e9b997d 100644 --- a/src/adaptation/ecap/MessageRep.h +++ b/src/adaptation/ecap/MessageRep.h @@ -178,3 +178,4 @@ private: } // namespace Adaptation #endif /* SQUID__E_CAP__MESSAGE_REP_H */ + diff --git a/src/adaptation/ecap/MinimalAdapter.cc b/src/adaptation/ecap/MinimalAdapter.cc index d559fadc3b..515b10eec6 100644 --- a/src/adaptation/ecap/MinimalAdapter.cc +++ b/src/adaptation/ecap/MinimalAdapter.cc @@ -8,3 +8,4 @@ #include "squid.h" // TBD + diff --git a/src/adaptation/ecap/Registry.h b/src/adaptation/ecap/Registry.h index fb13435b2c..b5be717464 100644 --- a/src/adaptation/ecap/Registry.h +++ b/src/adaptation/ecap/Registry.h @@ -6,4 +6,5 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -// TBD +// TBD + diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index fa609934e6..cc042ea5b0 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -152,8 +152,8 @@ Adaptation::Ecap::Engine::kickAsyncServices(timeval &timeout) /* Adaptation::Ecap::ServiceRep */ Adaptation::Ecap::ServiceRep::ServiceRep(const ServiceConfigPointer &cfg): - /*AsyncJob("Adaptation::Ecap::ServiceRep"),*/ Adaptation::Service(cfg), - isDetached(false) +/*AsyncJob("Adaptation::Ecap::ServiceRep"),*/ Adaptation::Service(cfg), + isDetached(false) { } @@ -343,3 +343,4 @@ Adaptation::Ecap::CheckUnusedAdapterServices(const Adaptation::Services& cfgs) "ecap_service config option: " << loaded->second->uri()); } } + diff --git a/src/adaptation/ecap/ServiceRep.h b/src/adaptation/ecap/ServiceRep.h index 7aa207dd88..ca5638d27f 100644 --- a/src/adaptation/ecap/ServiceRep.h +++ b/src/adaptation/ecap/ServiceRep.h @@ -67,3 +67,4 @@ void CheckUnusedAdapterServices(const Services& services); } // namespace Adaptation #endif /* SQUID_ECAP_SERVICE_REP_H */ + diff --git a/src/adaptation/ecap/XactionRep.cc b/src/adaptation/ecap/XactionRep.cc index c5c7a6f786..ad55389c83 100644 --- a/src/adaptation/ecap/XactionRep.cc +++ b/src/adaptation/ecap/XactionRep.cc @@ -47,15 +47,15 @@ public: Adaptation::Ecap::XactionRep::XactionRep( HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, const Adaptation::ServicePointer &aService): - AsyncJob("Adaptation::Ecap::XactionRep"), - Adaptation::Initiate("Adaptation::Ecap::XactionRep"), - theService(aService), - theVirginRep(virginHeader), theCauseRep(NULL), - makingVb(opUndecided), proxyingAb(opUndecided), - adaptHistoryId(-1), - vbProductionFinished(false), - abProductionFinished(false), abProductionAtEnd(false), - al(alp) + AsyncJob("Adaptation::Ecap::XactionRep"), + Adaptation::Initiate("Adaptation::Ecap::XactionRep"), + theService(aService), + theVirginRep(virginHeader), theCauseRep(NULL), + makingVb(opUndecided), proxyingAb(opUndecided), + adaptHistoryId(-1), + vbProductionFinished(false), + abProductionFinished(false), abProductionAtEnd(false), + al(alp) { if (virginCause) theCauseRep = new MessageRep(virginCause); @@ -732,3 +732,4 @@ Adaptation::Ecap::XactionRep::status() const return buf.content(); } + diff --git a/src/adaptation/ecap/XactionRep.h b/src/adaptation/ecap/XactionRep.h index 5601636f17..dae329ad4a 100644 --- a/src/adaptation/ecap/XactionRep.h +++ b/src/adaptation/ecap/XactionRep.h @@ -30,7 +30,7 @@ namespace Ecap xaction that Squid communicates with. One eCAP module may register many eCAP xactions. */ class XactionRep : public Adaptation::Initiate, public libecap::host::Xaction, - public BodyConsumer, public BodyProducer + public BodyConsumer, public BodyProducer { CBDATA_CLASS(XactionRep); @@ -129,3 +129,4 @@ private: } // namespace Adaptation #endif /* SQUID_ECAP_XACTION_REP_H */ + diff --git a/src/adaptation/forward.h b/src/adaptation/forward.h index de0b39fde9..d8136ca8d5 100644 --- a/src/adaptation/forward.h +++ b/src/adaptation/forward.h @@ -43,3 +43,4 @@ typedef RefCount ServiceGroupPointer; } // namespace Adaptation #endif /* SQUID_ADAPTATION__FORWARD_H */ + diff --git a/src/adaptation/icap/Client.cc b/src/adaptation/icap/Client.cc index 958c67711c..0357e0544d 100644 --- a/src/adaptation/icap/Client.cc +++ b/src/adaptation/icap/Client.cc @@ -18,3 +18,4 @@ void Adaptation::Icap::InitModule() void Adaptation::Icap::CleanModule() { } + diff --git a/src/adaptation/icap/Client.h b/src/adaptation/icap/Client.h index 4ef70d011d..939ce010b2 100644 --- a/src/adaptation/icap/Client.h +++ b/src/adaptation/icap/Client.h @@ -23,3 +23,4 @@ void CleanModule(); } // namespace Adaptation #endif /* SQUID_ICAPCLIENT_H */ + diff --git a/src/adaptation/icap/Config.cc b/src/adaptation/icap/Config.cc index 3ce95261da..a93eb2c685 100644 --- a/src/adaptation/icap/Config.cc +++ b/src/adaptation/icap/Config.cc @@ -19,11 +19,11 @@ Adaptation::Icap::Config Adaptation::Icap::TheConfig; Adaptation::Icap::Config::Config() : - default_options_ttl(0), - preview_enable(0), preview_size(0), allow206_enable(0), - connect_timeout_raw(0), io_timeout_raw(0), reuse_connections(0), - client_username_header(NULL), client_username_encode(0), repeat(NULL), - repeat_limit(0) + default_options_ttl(0), + preview_enable(0), preview_size(0), allow206_enable(0), + connect_timeout_raw(0), io_timeout_raw(0), reuse_connections(0), + client_username_header(NULL), client_username_encode(0), repeat(NULL), + repeat_limit(0) { } @@ -54,3 +54,4 @@ time_t Adaptation::Icap::Config::io_timeout(bool) const // can still be bypassed return ::Config.Timeout.read; } + diff --git a/src/adaptation/icap/Config.h b/src/adaptation/icap/Config.h index b6378c4bcf..9ad4ec7444 100644 --- a/src/adaptation/icap/Config.h +++ b/src/adaptation/icap/Config.h @@ -57,3 +57,4 @@ extern Config TheConfig; } // namespace Adaptation #endif /* SQUID_ICAPCONFIG_H */ + diff --git a/src/adaptation/icap/Elements.cc b/src/adaptation/icap/Elements.cc index 5a158f2bde..76037dca43 100644 --- a/src/adaptation/icap/Elements.cc +++ b/src/adaptation/icap/Elements.cc @@ -27,3 +27,4 @@ const XactOutcome xoSatisfied = "ICAP_SAT"; } // namespace Icap } // namespace Adaptation + diff --git a/src/adaptation/icap/Elements.h b/src/adaptation/icap/Elements.h index 2656e8ea29..f6924ad462 100644 --- a/src/adaptation/icap/Elements.h +++ b/src/adaptation/icap/Elements.h @@ -51,3 +51,4 @@ extern const XactOutcome xoSatisfied; ///< request satisfaction } // namespace Adaptation #endif /* SQUID_ICAPCLIENT_H */ + diff --git a/src/adaptation/icap/History.cc b/src/adaptation/icap/History.cc index 62e9537585..b5b3799e8e 100644 --- a/src/adaptation/icap/History.cc +++ b/src/adaptation/icap/History.cc @@ -13,9 +13,9 @@ #include "SquidTime.h" Adaptation::Icap::History::History(): - logType(LOG_TAG_NONE), - req_sz(0), - concurrencyLevel(0) + logType(LOG_TAG_NONE), + req_sz(0), + concurrencyLevel(0) { memset(¤tStart, 0, sizeof(currentStart)); memset(&pastTime, 0, sizeof(pastTime)); @@ -64,3 +64,4 @@ Adaptation::Icap::History::currentTime(timeval ¤t) const current.tv_usec = 0; } } + diff --git a/src/adaptation/icap/History.h b/src/adaptation/icap/History.h index db087cdc98..d263876f3e 100644 --- a/src/adaptation/icap/History.h +++ b/src/adaptation/icap/History.h @@ -57,3 +57,4 @@ private: } // namespace Adaptation #endif /*SQUID_HISTORY_H*/ + diff --git a/src/adaptation/icap/InOut.h b/src/adaptation/icap/InOut.h index 2452d733bd..68575542b9 100644 --- a/src/adaptation/icap/InOut.h +++ b/src/adaptation/icap/InOut.h @@ -70,3 +70,4 @@ public: } // namespace Adaptation #endif /* SQUID_ICAPINOUT_H */ + diff --git a/src/adaptation/icap/Launcher.cc b/src/adaptation/icap/Launcher.cc index 6e95c4f019..8eef79f25d 100644 --- a/src/adaptation/icap/Launcher.cc +++ b/src/adaptation/icap/Launcher.cc @@ -23,9 +23,9 @@ Adaptation::Icap::Launcher::Launcher(const char *aTypeName, Adaptation::ServicePointer &aService): - AsyncJob(aTypeName), - Adaptation::Initiate(aTypeName), - theService(aService), theXaction(0), theLaunches(0) + AsyncJob(aTypeName), + Adaptation::Initiate(aTypeName), + theService(aService), theXaction(0), theLaunches(0) { } @@ -156,10 +156,10 @@ bool Adaptation::Icap::Launcher::canRepeat(Adaptation::Icap::XactAbortInfo &info Adaptation::Icap::XactAbortInfo::XactAbortInfo(HttpRequest *anIcapRequest, HttpReply *anIcapReply, bool beRetriable, bool beRepeatable): - icapRequest(anIcapRequest), - icapReply(anIcapReply), - isRetriable(beRetriable), - isRepeatable(beRepeatable) + icapRequest(anIcapRequest), + icapReply(anIcapReply), + isRetriable(beRetriable), + isRepeatable(beRepeatable) { if (icapRequest) HTTPMSGLOCK(icapRequest); @@ -168,10 +168,10 @@ Adaptation::Icap::XactAbortInfo::XactAbortInfo(HttpRequest *anIcapRequest, } Adaptation::Icap::XactAbortInfo::XactAbortInfo(const Adaptation::Icap::XactAbortInfo &i): - icapRequest(i.icapRequest), - icapReply(i.icapReply), - isRetriable(i.isRetriable), - isRepeatable(i.isRepeatable) + icapRequest(i.icapRequest), + icapReply(i.icapReply), + isRetriable(i.isRetriable), + isRepeatable(i.isRepeatable) { if (icapRequest) HTTPMSGLOCK(icapRequest); @@ -184,3 +184,4 @@ Adaptation::Icap::XactAbortInfo::~XactAbortInfo() HTTPMSGUNLOCK(icapRequest); HTTPMSGUNLOCK(icapReply); } + diff --git a/src/adaptation/icap/Launcher.h b/src/adaptation/icap/Launcher.h index dcdd987e60..5fcb108b43 100644 --- a/src/adaptation/icap/Launcher.h +++ b/src/adaptation/icap/Launcher.h @@ -111,3 +111,4 @@ operator <<(std::ostream &os, const XactAbortInfo &xai) } // namespace Adaptation #endif /* SQUID_ICAPLAUNCHER_H */ + diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 0dad114314..51c108a8a1 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -51,16 +51,16 @@ Adaptation::Icap::ModXact::State::State() Adaptation::Icap::ModXact::ModXact(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::Icap::ServiceRep::Pointer &aService): - AsyncJob("Adaptation::Icap::ModXact"), - Adaptation::Icap::Xaction("Adaptation::Icap::ModXact", aService), - virginConsumed(0), - bodyParser(NULL), - canStartBypass(false), // too early - protectGroupBypass(true), - replyHttpHeaderSize(-1), - replyHttpBodySize(-1), - adaptHistoryId(-1), - alMaster(alp) + AsyncJob("Adaptation::Icap::ModXact"), + Adaptation::Icap::Xaction("Adaptation::Icap::ModXact", aService), + virginConsumed(0), + bodyParser(NULL), + canStartBypass(false), // too early + protectGroupBypass(true), + replyHttpHeaderSize(-1), + replyHttpBodySize(-1), + adaptHistoryId(-1), + alMaster(alp) { assert(virginHeader); @@ -1809,7 +1809,7 @@ void Adaptation::Icap::ModXact::makeAdaptedBodyPipe(const char *what) // TODO: Move SizedEstimate and Preview elsewhere Adaptation::Icap::SizedEstimate::SizedEstimate() - : theData(dtUnexpected) + : theData(dtUnexpected) {} void Adaptation::Icap::SizedEstimate::expect(int64_t aSize) @@ -1955,9 +1955,9 @@ void Adaptation::Icap::ModXact::clearError() /* Adaptation::Icap::ModXactLauncher */ Adaptation::Icap::ModXactLauncher::ModXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer aService): - AsyncJob("Adaptation::Icap::ModXactLauncher"), - Adaptation::Icap::Launcher("Adaptation::Icap::ModXactLauncher", aService), - al(alp) + AsyncJob("Adaptation::Icap::ModXactLauncher"), + Adaptation::Icap::Launcher("Adaptation::Icap::ModXactLauncher", aService), + al(alp) { virgin.setHeader(virginHeader); virgin.setCause(virginCause); @@ -1995,3 +1995,4 @@ void Adaptation::Icap::ModXactLauncher::updateHistory(bool doStart) } } } + diff --git a/src/adaptation/icap/ModXact.h b/src/adaptation/icap/ModXact.h index 78d18db621..69f4915336 100644 --- a/src/adaptation/icap/ModXact.h +++ b/src/adaptation/icap/ModXact.h @@ -345,3 +345,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ICAPMOD_XACT_H */ + diff --git a/src/adaptation/icap/OptXact.cc b/src/adaptation/icap/OptXact.cc index aa0d42b1be..f40c4eb69e 100644 --- a/src/adaptation/icap/OptXact.cc +++ b/src/adaptation/icap/OptXact.cc @@ -24,9 +24,9 @@ CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, OptXact); CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, OptXactLauncher); Adaptation::Icap::OptXact::OptXact(Adaptation::Icap::ServiceRep::Pointer &aService): - AsyncJob("Adaptation::Icap::OptXact"), - Adaptation::Icap::Xaction("Adaptation::Icap::OptXact", aService), - readAll(false) + AsyncJob("Adaptation::Icap::OptXact"), + Adaptation::Icap::Xaction("Adaptation::Icap::OptXact", aService), + readAll(false) { } @@ -135,8 +135,8 @@ void Adaptation::Icap::OptXact::finalizeLogInfo() /* Adaptation::Icap::OptXactLauncher */ Adaptation::Icap::OptXactLauncher::OptXactLauncher(Adaptation::ServicePointer aService): - AsyncJob("Adaptation::Icap::OptXactLauncher"), - Adaptation::Icap::Launcher("Adaptation::Icap::OptXactLauncher", aService) + AsyncJob("Adaptation::Icap::OptXactLauncher"), + Adaptation::Icap::Launcher("Adaptation::Icap::OptXactLauncher", aService) { } @@ -147,3 +147,4 @@ Adaptation::Icap::Xaction *Adaptation::Icap::OptXactLauncher::createXaction() Must(s != NULL); return new Adaptation::Icap::OptXact(s); } + diff --git a/src/adaptation/icap/OptXact.h b/src/adaptation/icap/OptXact.h index e6b0f3b5a9..2c91717ce7 100644 --- a/src/adaptation/icap/OptXact.h +++ b/src/adaptation/icap/OptXact.h @@ -66,3 +66,4 @@ protected: } // namespace Adaptation #endif /* SQUID_ICAPOPTXACT_H */ + diff --git a/src/adaptation/icap/Options.cc b/src/adaptation/icap/Options.cc index 15e33e2343..1b33b001e5 100644 --- a/src/adaptation/icap/Options.cc +++ b/src/adaptation/icap/Options.cc @@ -16,13 +16,13 @@ #include "wordlist.h" Adaptation::Icap::Options::Options() : - error("unconfigured"), - max_connections(-1), - allow204(false), - allow206(false), - preview(-1), - theTTL(-1), - theTimestamp(0) + error("unconfigured"), + max_connections(-1), + allow204(false), + allow206(false), + preview(-1), + theTTL(-1), + theTimestamp(0) { theTransfers.preview.name = "Transfer-Preview"; theTransfers.preview.kind = xferPreview; @@ -170,7 +170,7 @@ void Adaptation::Icap::Options::cfgTransferList(const HttpHeader *h, TransferLis /* Adaptation::Icap::Options::TransferList */ Adaptation::Icap::Options::TransferList::TransferList(): extensions(NULL), name(NULL), - kind(xferNone) + kind(xferNone) { }; @@ -234,3 +234,4 @@ void Adaptation::Icap::Options::TransferList::report(int level, const char *pref debugs(93,level, prefix << "no " << name << " extensions"); } } + diff --git a/src/adaptation/icap/Options.h b/src/adaptation/icap/Options.h index 5198c4bb37..f57ccab984 100644 --- a/src/adaptation/icap/Options.h +++ b/src/adaptation/icap/Options.h @@ -101,3 +101,4 @@ private: } // namespace Adaptation #endif /* SQUID_ICAPOPTIONS_H */ + diff --git a/src/adaptation/icap/ServiceRep.cc b/src/adaptation/icap/ServiceRep.cc index 5167a33cbf..b4803adc56 100644 --- a/src/adaptation/icap/ServiceRep.cc +++ b/src/adaptation/icap/ServiceRep.cc @@ -29,16 +29,16 @@ CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, ServiceRep); Adaptation::Icap::ServiceRep::ServiceRep(const ServiceConfigPointer &svcCfg): - AsyncJob("Adaptation::Icap::ServiceRep"), Adaptation::Service(svcCfg), - theOptions(NULL), theOptionsFetcher(0), theLastUpdate(0), - theBusyConns(0), - theAllWaiters(0), - connOverloadReported(false), - theIdleConns(NULL), - isSuspended(0), notifying(false), - updateScheduled(false), - wasAnnouncedUp(true), // do not announce an "up" service at startup - isDetached(false) + AsyncJob("Adaptation::Icap::ServiceRep"), Adaptation::Service(svcCfg), + theOptions(NULL), theOptionsFetcher(0), theLastUpdate(0), + theBusyConns(0), + theAllWaiters(0), + connOverloadReported(false), + theIdleConns(NULL), + isSuspended(0), notifying(false), + updateScheduled(false), + wasAnnouncedUp(true), // do not announce an "up" service at startup + isDetached(false) { setMaxConnections(); theIdleConns = new IdleConnList("ICAP Service", NULL); @@ -720,7 +720,7 @@ bool Adaptation::Icap::ServiceRep::detached() const Adaptation::Icap::ConnWaiterDialer::ConnWaiterDialer(const CbcPointer &xact, Adaptation::Icap::ConnWaiterDialer::Parent::Method aHandler): - Parent(xact, aHandler) + Parent(xact, aHandler) { theService = &xact->service(); theService->noteNewWaiter(); @@ -736,3 +736,4 @@ Adaptation::Icap::ConnWaiterDialer::~ConnWaiterDialer() { theService->noteGoneWaiter(); } + diff --git a/src/adaptation/icap/ServiceRep.h b/src/adaptation/icap/ServiceRep.h index 27c4824da8..c923a6308c 100644 --- a/src/adaptation/icap/ServiceRep.h +++ b/src/adaptation/icap/ServiceRep.h @@ -57,7 +57,7 @@ class OptXact; */ class ServiceRep : public RefCountable, public Adaptation::Service, - public Adaptation::Initiator + public Adaptation::Initiator { CBDATA_CLASS(ServiceRep); @@ -202,3 +202,4 @@ public: } // namespace Adaptation #endif /* SQUID_ICAPSERVICEREP_H */ + diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index e482dfca86..cb37fbc5c5 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -32,28 +32,28 @@ #include "SquidTime.h" Adaptation::Icap::Xaction::Xaction(const char *aTypeName, Adaptation::Icap::ServiceRep::Pointer &aService): - AsyncJob(aTypeName), - Adaptation::Initiate(aTypeName), - icapRequest(NULL), - icapReply(NULL), - attempts(0), - connection(NULL), - theService(aService), - commBuf(NULL), - commBufSize(0), - commEof(false), - reuseConnection(true), - isRetriable(true), - isRepeatable(true), - ignoreLastWrite(false), - stopReason(NULL), - connector(NULL), - reader(NULL), - writer(NULL), - closer(NULL), - alep(new AccessLogEntry), - al(*alep), - cs(NULL) + AsyncJob(aTypeName), + Adaptation::Initiate(aTypeName), + icapRequest(NULL), + icapReply(NULL), + attempts(0), + connection(NULL), + theService(aService), + commBuf(NULL), + commBufSize(0), + commEof(false), + reuseConnection(true), + isRetriable(true), + isRepeatable(true), + ignoreLastWrite(false), + stopReason(NULL), + connector(NULL), + reader(NULL), + writer(NULL), + closer(NULL), + alep(new AccessLogEntry), + al(*alep), + cs(NULL) { debugs(93,3, typeName << " constructed, this=" << this << " [icapx" << id << ']'); // we should not call virtual status() here @@ -452,7 +452,7 @@ bool Adaptation::Icap::Xaction::parseHttpMsg(HttpMsg *msg) const bool parsed = msg->parse(&readBuf, commEof, &error); Must(parsed || !error); // success or need more data - if (!parsed) { // need more data + if (!parsed) { // need more data Must(mayReadMore()); msg->reset(); return false; @@ -633,3 +633,4 @@ bool Adaptation::Icap::Xaction::fillVirginHttpHeader(MemBuf &buf) const { return false; } + diff --git a/src/adaptation/icap/Xaction.h b/src/adaptation/icap/Xaction.h index f9c051358e..6c607c2f43 100644 --- a/src/adaptation/icap/Xaction.h +++ b/src/adaptation/icap/Xaction.h @@ -170,3 +170,4 @@ private: } // namespace Adaptation #endif /* SQUID_ICAPXACTION_H */ + diff --git a/src/adaptation/icap/icap_log.cc b/src/adaptation/icap/icap_log.cc index 11f0bafb05..86d2c7b6f3 100644 --- a/src/adaptation/icap/icap_log.cc +++ b/src/adaptation/icap/icap_log.cc @@ -68,3 +68,4 @@ void icapLogLog(AccessLogEntry::Pointer &al) accessLogLogTo(Config.Log.icaplogs, al, &checklist); } } + diff --git a/src/adaptation/icap/icap_log.h b/src/adaptation/icap/icap_log.h index 391236e44c..77fa060c83 100644 --- a/src/adaptation/icap/icap_log.h +++ b/src/adaptation/icap/icap_log.h @@ -24,3 +24,4 @@ void icapLogLog(AccessLogEntryPointer &al); extern int IcapLogfileStatus; #endif /*ICAP_LOG_H_*/ + diff --git a/src/anyp/PortCfg.cc b/src/anyp/PortCfg.cc index d2dae99133..694b3d9b91 100644 --- a/src/anyp/PortCfg.cc +++ b/src/anyp/PortCfg.cc @@ -27,48 +27,48 @@ int NHttpSockets = 0; int HttpSockets[MAXTCPLISTENPORTS]; AnyP::PortCfg::PortCfg() : - next(), - s(), - transport(AnyP::PROTO_HTTP,1,1), // "Squid is an HTTP proxy", etc. - name(NULL), - defaultsite(NULL), - flags(), - allow_direct(false), - vhost(false), - actAsOrigin(false), - ignore_cc(false), - connection_auth_disabled(false), - ftp_track_dirs(false), - vport(0), - disable_pmtu_discovery(0), - listenConn() + next(), + s(), + transport(AnyP::PROTO_HTTP,1,1), // "Squid is an HTTP proxy", etc. + name(NULL), + defaultsite(NULL), + flags(), + allow_direct(false), + vhost(false), + actAsOrigin(false), + ignore_cc(false), + connection_auth_disabled(false), + ftp_track_dirs(false), + vport(0), + disable_pmtu_discovery(0), + listenConn() #if USE_OPENSSL - ,cert(NULL), - key(NULL), - version(0), - cipher(NULL), - options(NULL), - clientca(NULL), - cafile(NULL), - capath(NULL), - crlfile(NULL), - dhfile(NULL), - sslflags(NULL), - sslContextSessionId(NULL), - generateHostCertificates(false), - dynamicCertMemCacheSize(std::numeric_limits::max()), - staticSslContext(), - signingCert(), - signPkey(), - certsToChain(), - untrustedSigningCert(), - untrustedSignPkey(), - clientVerifyCrls(), - clientCA(), - dhParams(), - contextMethod(), - sslContextFlags(0), - sslOptions(0) + ,cert(NULL), + key(NULL), + version(0), + cipher(NULL), + options(NULL), + clientca(NULL), + cafile(NULL), + capath(NULL), + crlfile(NULL), + dhfile(NULL), + sslflags(NULL), + sslContextSessionId(NULL), + generateHostCertificates(false), + dynamicCertMemCacheSize(std::numeric_limits::max()), + staticSslContext(), + signingCert(), + signPkey(), + certsToChain(), + untrustedSigningCert(), + untrustedSignPkey(), + clientVerifyCrls(), + clientCA(), + dhParams(), + contextMethod(), + sslContextFlags(0), + sslOptions(0) #endif { memset(&tcp_keepalive, 0, sizeof(tcp_keepalive)); @@ -196,3 +196,4 @@ AnyP::PortCfg::configureSslServerContext() } } #endif + diff --git a/src/anyp/PortCfg.h b/src/anyp/PortCfg.h index 3096d2fd76..a8fe42c329 100644 --- a/src/anyp/PortCfg.h +++ b/src/anyp/PortCfg.h @@ -122,3 +122,4 @@ extern int NHttpSockets; extern int HttpSockets[MAXTCPLISTENPORTS]; #endif /* SQUID_ANYP_PORTCFG_H */ + diff --git a/src/anyp/ProtocolType.h b/src/anyp/ProtocolType.h index d8d6302f02..87f0335056 100644 --- a/src/anyp/ProtocolType.h +++ b/src/anyp/ProtocolType.h @@ -59,3 +59,4 @@ operator <<(std::ostream &os, ProtocolType const &p) } // namespace AnyP #endif /* _SQUID_SRC_ANYP_PROTOCOLTYPE_H */ + diff --git a/src/anyp/ProtocolVersion.h b/src/anyp/ProtocolVersion.h index 61f2c6a17b..a57aed3d12 100644 --- a/src/anyp/ProtocolVersion.h +++ b/src/anyp/ProtocolVersion.h @@ -97,3 +97,4 @@ operator << (std::ostream &os, const AnyP::ProtocolVersion &v) } // namespace AnyP #endif /* SQUID_ANYP_PROTOCOLVERSION_H */ + diff --git a/src/anyp/TrafficMode.h b/src/anyp/TrafficMode.h index f5c4e56c00..40e9865b8f 100644 --- a/src/anyp/TrafficMode.h +++ b/src/anyp/TrafficMode.h @@ -86,3 +86,4 @@ public: } // namespace AnyP #endif + diff --git a/src/anyp/UriScheme.cc b/src/anyp/UriScheme.cc index 6ce1d34ca3..499a1d617e 100644 --- a/src/anyp/UriScheme.cc +++ b/src/anyp/UriScheme.cc @@ -28,3 +28,4 @@ AnyP::UriScheme::c_str() const out[p] = '\0'; return out; } + diff --git a/src/anyp/UriScheme.h b/src/anyp/UriScheme.h index 1ec0f51255..9ed3e27176 100644 --- a/src/anyp/UriScheme.h +++ b/src/anyp/UriScheme.h @@ -54,3 +54,4 @@ operator << (std::ostream &os, AnyP::UriScheme const &scheme) } #endif /* SQUID_ANYP_URISCHEME_H */ + diff --git a/src/auth/Acl.cc b/src/auth/Acl.cc index 9c4fef36f6..e59f7559e1 100644 --- a/src/auth/Acl.cc +++ b/src/auth/Acl.cc @@ -86,3 +86,4 @@ AuthenticateAcl(ACLChecklist *ch) return ACCESS_DENIED; } } + diff --git a/src/auth/Acl.h b/src/auth/Acl.h index c8b073a154..66f5483f2b 100644 --- a/src/auth/Acl.h +++ b/src/auth/Acl.h @@ -23,3 +23,4 @@ allow_t AuthenticateAcl(ACLChecklist *ch); #endif /* USE_AUTH */ #endif /* SQUID_AUTH_ACL_H */ + diff --git a/src/auth/AclMaxUserIp.cc b/src/auth/AclMaxUserIp.cc index 0051c3076d..40c92af563 100644 --- a/src/auth/AclMaxUserIp.cc +++ b/src/auth/AclMaxUserIp.cc @@ -21,14 +21,14 @@ ACLFlag ACLMaxUserIP::SupportedFlags[] = {ACL_F_STRICT, ACL_F_END}; ACLMaxUserIP::ACLMaxUserIP(char const *theClass) : - ACL(SupportedFlags), - class_(theClass), - maximum(0) + ACL(SupportedFlags), + class_(theClass), + maximum(0) {} ACLMaxUserIP::ACLMaxUserIP(ACLMaxUserIP const &old) : - class_(old.class_), - maximum(old.maximum) + class_(old.class_), + maximum(old.maximum) { flags = old.flags; } @@ -162,3 +162,4 @@ ACLMaxUserIP::dump() const sl.push_back(s); return sl; } + diff --git a/src/auth/AclMaxUserIp.h b/src/auth/AclMaxUserIp.h index 63026c959d..69e18ee285 100644 --- a/src/auth/AclMaxUserIp.h +++ b/src/auth/AclMaxUserIp.h @@ -50,3 +50,4 @@ private: #endif /* USE_AUTH */ #endif /* SQUID_ACLMAXUSERIP_H */ + diff --git a/src/auth/AclProxyAuth.cc b/src/auth/AclProxyAuth.cc index da4d16f13d..90ed933c90 100644 --- a/src/auth/AclProxyAuth.cc +++ b/src/auth/AclProxyAuth.cc @@ -175,3 +175,4 @@ ACLProxyAuth::matchProxyAuth(ACLChecklist *cl) checklist->auth_user_request = NULL; return result; } + diff --git a/src/auth/AclProxyAuth.h b/src/auth/AclProxyAuth.h index b95b1e49bc..bf7fa73a44 100644 --- a/src/auth/AclProxyAuth.h +++ b/src/auth/AclProxyAuth.h @@ -62,3 +62,4 @@ private: #endif /* USE_AUTH */ #endif /* SQUID_ACLPROXYAUTH_H */ + diff --git a/src/auth/AuthAclState.h b/src/auth/AuthAclState.h index cba5852ef3..5299192a25 100644 --- a/src/auth/AuthAclState.h +++ b/src/auth/AuthAclState.h @@ -20,3 +20,4 @@ typedef enum { #endif /* USE_AUTH */ #endif /* _SQUID__SRC_AUTH_AUTHACLSTATE_H */ + diff --git a/src/auth/Config.cc b/src/auth/Config.cc index 8798180907..7270e368c6 100644 --- a/src/auth/Config.cc +++ b/src/auth/Config.cc @@ -175,3 +175,4 @@ Auth::Config::findUserInCache(const char *nameKey, Auth::Type authType) return NULL; } + diff --git a/src/auth/Config.h b/src/auth/Config.h index 28795d1afd..ebf6a74c57 100644 --- a/src/auth/Config.h +++ b/src/auth/Config.h @@ -56,8 +56,8 @@ public: /** * Used by squid to determine whether the auth module has successfully initialised itself with the current configuration. * - \retval true Authentication Module loaded and running. - \retval false No Authentication Module loaded. + \retval true Authentication Module loaded and running. + \retval false No Authentication Module loaded. */ virtual bool active() const = 0; @@ -68,8 +68,8 @@ public: * linking to a AuthUser object and for storing any needed details to complete * authentication in Auth::UserRequest::authenticate(). * - \param proxy_auth Login Pattern to parse. - \retval * Details needed to authenticate. + \param proxy_auth Login Pattern to parse. + \retval * Details needed to authenticate. */ virtual UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm) = 0; @@ -86,9 +86,9 @@ public: * The configured function is used to see if the auth module has been given valid * parameters and is able to handle authentication requests. * - \retval true Authentication Module configured ready for use. - \retval false Not configured or Configuration Error. - * No other module functions except Shutdown/Dump/Parse/FreeConfig will be called by Squid. + \retval true Authentication Module configured ready for use. + \retval false Not configured or Configuration Error. + * No other module functions except Shutdown/Dump/Parse/FreeConfig will be called by Squid. */ virtual bool configured() const = 0; @@ -142,3 +142,4 @@ extern ConfigVector TheConfig; #endif /* USE_AUTH */ #endif /* SQUID_AUTHCONFIG_H */ + diff --git a/src/auth/CredentialState.h b/src/auth/CredentialState.h index fd6f86037a..490b749e69 100644 --- a/src/auth/CredentialState.h +++ b/src/auth/CredentialState.h @@ -25,3 +25,4 @@ extern const char *CredentialState_str[]; } // namespace Auth #endif /* _SQUID_AUTH_CREDENTIALSTATE_H */ + diff --git a/src/auth/Gadgets.cc b/src/auth/Gadgets.cc index f6254a99ce..c6c9b69e18 100644 --- a/src/auth/Gadgets.cc +++ b/src/auth/Gadgets.cc @@ -115,7 +115,7 @@ authenticateReset(void) } AuthUserHashPointer::AuthUserHashPointer(Auth::User::Pointer anAuth_user): - auth_user(anAuth_user) + auth_user(anAuth_user) { key = (void *)anAuth_user->userKey(); next = NULL; @@ -127,3 +127,4 @@ AuthUserHashPointer::user() const { return auth_user; } + diff --git a/src/auth/Gadgets.h b/src/auth/Gadgets.h index 2f3b8a0b3b..b33b8bdda5 100644 --- a/src/auth/Gadgets.h +++ b/src/auth/Gadgets.h @@ -83,3 +83,4 @@ void authenticateOnCloseConnection(ConnStateData * conn); #endif /* USE_AUTH */ #endif /* SQUID_AUTH_GADGETS_H */ + diff --git a/src/auth/QueueNode.h b/src/auth/QueueNode.h index 1f52e0545d..76b9415da6 100644 --- a/src/auth/QueueNode.h +++ b/src/auth/QueueNode.h @@ -35,10 +35,10 @@ private: public: QueueNode(Auth::UserRequest *aRequest, AUTHCB *aHandler, void *aData) : - next(NULL), - auth_user_request(aRequest), - handler(aHandler), - data(cbdataReference(aData)) {} + next(NULL), + auth_user_request(aRequest), + handler(aHandler), + data(cbdataReference(aData)) {} ~QueueNode() { cbdataReferenceDone(data); while (next) { @@ -58,3 +58,4 @@ public: } // namespace Auth #endif /* SQUID_SRC_AUTH_QUEUENODE_H */ + diff --git a/src/auth/Scheme.cc b/src/auth/Scheme.cc index 04075355a8..48685bbd31 100644 --- a/src/auth/Scheme.cc +++ b/src/auth/Scheme.cc @@ -67,3 +67,4 @@ Auth::Scheme::FreeAll() scheme->shutdownCleanup(); } } + diff --git a/src/auth/Scheme.h b/src/auth/Scheme.h index c45c3430b7..1bfb021cdf 100644 --- a/src/auth/Scheme.h +++ b/src/auth/Scheme.h @@ -16,7 +16,7 @@ #include /** - \defgroup AuthSchemeAPI Authentication Scheme API + \defgroup AuthSchemeAPI Authentication Scheme API \ingroup AuthAPI */ @@ -85,3 +85,4 @@ private: #endif /* USE_AUTH */ #endif /* SQUID_AUTH_SCHEME_H */ + diff --git a/src/auth/State.cc b/src/auth/State.cc index 6dce8a9c5c..01cce2936e 100644 --- a/src/auth/State.cc +++ b/src/auth/State.cc @@ -13,3 +13,4 @@ CBDATA_NAMESPACED_CLASS_INIT(Auth, StateData); #endif /* USE_AUTH */ + diff --git a/src/auth/State.h b/src/auth/State.h index 6be0965ef4..4252b69c59 100644 --- a/src/auth/State.h +++ b/src/auth/State.h @@ -26,9 +26,9 @@ class StateData public: StateData(const UserRequest::Pointer &r, AUTHCB *h, void *d) : - data(cbdataReference(d)), - auth_user_request(r), - handler(h) {} + data(cbdataReference(d)), + auth_user_request(r), + handler(h) {} ~StateData() { auth_user_request = NULL; @@ -44,3 +44,4 @@ public: #endif /* USE_AUTH */ #endif /* __AUTH_AUTHENTICATE_STATE_T__ */ + diff --git a/src/auth/Type.h b/src/auth/Type.h index 45fa0a2f46..b6385e3f6d 100644 --- a/src/auth/Type.h +++ b/src/auth/Type.h @@ -29,3 +29,4 @@ extern const char *Type_str[]; #endif /* USE_AUTH */ #endif + diff --git a/src/auth/User.cc b/src/auth/User.cc index f07dbe57a8..6f56caa91f 100644 --- a/src/auth/User.cc +++ b/src/auth/User.cc @@ -24,14 +24,14 @@ time_t Auth::User::last_discard = 0; Auth::User::User(Auth::Config *aConfig, const char *aRequestRealm) : - auth_type(Auth::AUTH_UNKNOWN), - config(aConfig), - ipcount(0), - expiretime(0), - notes(), - credentials_state(Auth::Unchecked), - username_(NULL), - requestRealm_(aRequestRealm) + auth_type(Auth::AUTH_UNKNOWN), + config(aConfig), + ipcount(0), + expiretime(0), + notes(), + credentials_state(Auth::Unchecked), + username_(NULL), + requestRealm_(aRequestRealm) { proxy_match_cache.head = proxy_match_cache.tail = NULL; ip_list.head = ip_list.tail = NULL; @@ -371,3 +371,4 @@ Auth::User::username(char const *aString) safe_free(username_); } } + diff --git a/src/auth/User.h b/src/auth/User.h index 7b117c6380..76c12f750b 100644 --- a/src/auth/User.h +++ b/src/auth/User.h @@ -131,3 +131,4 @@ private: #endif /* USE_AUTH */ #endif /* SQUID_AUTH_USER_H */ + diff --git a/src/auth/UserRequest.cc b/src/auth/UserRequest.cc index 8f0cafe86a..732511f74c 100644 --- a/src/auth/UserRequest.cc +++ b/src/auth/UserRequest.cc @@ -89,9 +89,9 @@ Auth::UserRequest::operator delete (void *address) } Auth::UserRequest::UserRequest(): - _auth_user(NULL), - message(NULL), - lastReply(AUTH_ACL_CANNOT_AUTHENTICATE) + _auth_user(NULL), + message(NULL), + lastReply(AUTH_ACL_CANNOT_AUTHENTICATE) { debugs(29, 5, HERE << "initialised request " << this); } @@ -392,7 +392,7 @@ Auth::UserRequest::authenticate(Auth::UserRequest::Pointer * auth_user_request, request->auth_user_request = *auth_user_request; } - /* fallthrough to ERROR case and do the challenge */ + /* fallthrough to ERROR case and do the challenge */ case Auth::CRED_ERROR: /* this ACL check is finished. */ @@ -562,3 +562,4 @@ Auth::UserRequest::helperRequestKeyExtras(HttpRequest *request, AccessLogEntry:: } return NULL; } + diff --git a/src/auth/UserRequest.h b/src/auth/UserRequest.h index 91b2d04a4b..156636c655 100644 --- a/src/auth/UserRequest.h +++ b/src/auth/UserRequest.h @@ -95,22 +95,22 @@ public: /** * Used by squid to determine what the next step in performing authentication for a given scheme is. * - * \retval CRED_ERROR ERROR in the auth module. Cannot determine request direction. - * \retval CRED_LOOKUP The auth module needs to send data to an external helper. - * Squid will prepare for a callback on the request and call the AUTHSSTART function. - * \retval CRED_VALID The auth module has all the information it needs to perform the authentication - * and provide a succeed/fail result. - * \retval CRED_CHALLENGE The auth module needs to send a new challenge to the request originator. - * Squid will return the appropriate status code (401 or 407) and call the registered - * FixError function to allow the auth module to insert it's challenge. + * \retval CRED_ERROR ERROR in the auth module. Cannot determine request direction. + * \retval CRED_LOOKUP The auth module needs to send data to an external helper. + * Squid will prepare for a callback on the request and call the AUTHSSTART function. + * \retval CRED_VALID The auth module has all the information it needs to perform the authentication + * and provide a succeed/fail result. + * \retval CRED_CHALLENGE The auth module needs to send a new challenge to the request originator. + * Squid will return the appropriate status code (401 or 407) and call the registered + * FixError function to allow the auth module to insert it's challenge. */ Direction direction(); /** * Used by squid to determine whether the auth scheme has successfully authenticated the user request. * - \retval true User has successfully been authenticated. - \retval false Timeouts on cached credentials have occurred or for any reason the credentials are not valid. + \retval true User has successfully been authenticated. + \retval false Timeouts on cached credentials have occurred or for any reason the credentials are not valid. */ virtual int authenticated() const = 0; @@ -122,7 +122,7 @@ public: * \retval false User credentials use an unknown scheme type. * \retval false User credentials are broken for their scheme. * - * \retval true User credentials exist and may be able to authenticate. + * \retval true User credentials exist and may be able to authenticate. */ bool valid() const; @@ -174,8 +174,8 @@ public: * The given callback will be called when the auth module has performed * it's external activities. * - * \param handler Handler to process the callback when its run - * \param data CBDATA for handler + * \param handler Handler to process the callback when its run + * \param data CBDATA for handler */ void start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *handler, void *data); @@ -192,8 +192,8 @@ public: * This function must return a pointer to a NULL terminated string to be used in logging the request. * The string should NOT be allocated each time this function is called. * - \retval NULL No username/usercode is known. - \retval * Null-terminated username string. + \retval NULL No username/usercode is known. + \retval * Null-terminated username string. */ char const *username() const; @@ -253,3 +253,4 @@ int authenticateUserAuthenticated(Auth::UserRequest::Pointer); #endif /* USE_AUTH */ #endif /* SQUID_AUTHUSERREQUEST_H */ + diff --git a/src/auth/basic/Config.cc b/src/auth/basic/Config.cc index b93e4d4b57..a0514e1b6c 100644 --- a/src/auth/basic/Config.cc +++ b/src/auth/basic/Config.cc @@ -123,9 +123,9 @@ Auth::Basic::Config::dump(StoreEntry * entry, const char *name, Auth::Config * s } Auth::Basic::Config::Config() : - credentialsTTL( 2*60*60 ), - casesensitive(0), - utf8(0) + credentialsTTL( 2*60*60 ), + casesensitive(0), + utf8(0) { static const SBuf defaultRealm("Squid proxy-caching web server"); realm = defaultRealm; @@ -302,3 +302,4 @@ Auth::Basic::Config::registerWithCacheManager(void) "Basic User Authenticator Stats", authenticateBasicStats, 0, 1); } + diff --git a/src/auth/basic/Config.h b/src/auth/basic/Config.h index 62920adefc..d32fc018c5 100644 --- a/src/auth/basic/Config.h +++ b/src/auth/basic/Config.h @@ -52,3 +52,4 @@ private: extern helper *basicauthenticators; #endif /* __AUTH_BASIC_H__ */ + diff --git a/src/auth/basic/Scheme.cc b/src/auth/basic/Scheme.cc index 75ff461e9a..180885deee 100644 --- a/src/auth/basic/Scheme.cc +++ b/src/auth/basic/Scheme.cc @@ -46,3 +46,4 @@ Auth::Basic::Scheme::createConfig() Auth::Basic::Config *newCfg = new Auth::Basic::Config; return dynamic_cast(newCfg); } + diff --git a/src/auth/basic/Scheme.h b/src/auth/basic/Scheme.h index 102cc91a36..cf67c0c27f 100644 --- a/src/auth/basic/Scheme.h +++ b/src/auth/basic/Scheme.h @@ -42,3 +42,4 @@ private: } // namespace Auth #endif /* SQUID_AUTH_BASIC_SCHEME_H */ + diff --git a/src/auth/basic/User.cc b/src/auth/basic/User.cc index d80ec93f3e..23b47b9d34 100644 --- a/src/auth/basic/User.cc +++ b/src/auth/basic/User.cc @@ -14,10 +14,10 @@ #include "SquidTime.h" Auth::Basic::User::User(Auth::Config *aConfig, const char *aRequestRealm) : - Auth::User(aConfig, aRequestRealm), - passwd(NULL), - queue(NULL), - currentRequest(NULL) + Auth::User(aConfig, aRequestRealm), + passwd(NULL), + queue(NULL), + currentRequest(NULL) {} Auth::Basic::User::~User() diff --git a/src/auth/basic/User.h b/src/auth/basic/User.h index f128937cb2..9e424fc06c 100644 --- a/src/auth/basic/User.h +++ b/src/auth/basic/User.h @@ -48,3 +48,4 @@ private: } // namespace Auth #endif /* _SQUID_AUTH_BASIC_USER_H */ + diff --git a/src/auth/basic/UserRequest.cc b/src/auth/basic/UserRequest.cc index daf9767403..8f48da2995 100644 --- a/src/auth/basic/UserRequest.cc +++ b/src/auth/basic/UserRequest.cc @@ -208,3 +208,4 @@ Auth::Basic::UserRequest::HandleReply(void *data, const Helper::Reply &reply) delete r; } + diff --git a/src/auth/basic/UserRequest.h b/src/auth/basic/UserRequest.h index e200440c81..faf6da7d7e 100644 --- a/src/auth/basic/UserRequest.h +++ b/src/auth/basic/UserRequest.h @@ -44,3 +44,4 @@ private: } // namespace Auth #endif /* _SQUID_SRC_AUTH_BASIC_USERREQUEST_H */ + diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc index 586a32016c..5e08a3847d 100644 --- a/src/auth/digest/Config.cc +++ b/src/auth/digest/Config.cc @@ -593,13 +593,13 @@ Auth::Digest::Config::done() } Auth::Digest::Config::Config() : - nonceGCInterval(5*60), - noncemaxduration(30*60), - noncemaxuses(50), - NonceStrictness(0), - CheckNonceCount(1), - PostWorkaround(0), - utf8(0) + nonceGCInterval(5*60), + noncemaxduration(30*60), + noncemaxuses(50), + NonceStrictness(0), + CheckNonceCount(1), + PostWorkaround(0), + utf8(0) {} void @@ -1087,3 +1087,4 @@ Auth::Digest::Config::decode(char const *proxy_auth, const char *aRequestRealm) return digest_request; } + diff --git a/src/auth/digest/Config.h b/src/auth/digest/Config.h index 2e8e29f1e1..7f4023e4d4 100644 --- a/src/auth/digest/Config.h +++ b/src/auth/digest/Config.h @@ -104,3 +104,4 @@ public: extern helper *digestauthenticators; #endif + diff --git a/src/auth/digest/Scheme.cc b/src/auth/digest/Scheme.cc index cfbc3ec46f..4867182f37 100644 --- a/src/auth/digest/Scheme.cc +++ b/src/auth/digest/Scheme.cc @@ -68,3 +68,4 @@ Auth::Digest::Scheme::PurgeCredentialsCache(void) } } } + diff --git a/src/auth/digest/Scheme.h b/src/auth/digest/Scheme.h index 2efabf6354..5e823a1bf8 100644 --- a/src/auth/digest/Scheme.h +++ b/src/auth/digest/Scheme.h @@ -50,3 +50,4 @@ private: } // namespace Auth #endif /* SQUID_AUTH_DIGEST_SCHEME_H */ + diff --git a/src/auth/digest/User.cc b/src/auth/digest/User.cc index 5ce9f12e87..485d05a406 100644 --- a/src/auth/digest/User.cc +++ b/src/auth/digest/User.cc @@ -15,8 +15,8 @@ #include "SquidTime.h" Auth::Digest::User::User(Auth::Config *aConfig, const char *aRequestRealm) : - Auth::User(aConfig, aRequestRealm), - HA1created(0) + Auth::User(aConfig, aRequestRealm), + HA1created(0) { memset(HA1, 0, sizeof(HA1)); } @@ -71,3 +71,4 @@ Auth::Digest::User::currentNonce() } return nonce; } + diff --git a/src/auth/digest/User.h b/src/auth/digest/User.h index 8f8d4748f0..822b2d771b 100644 --- a/src/auth/digest/User.h +++ b/src/auth/digest/User.h @@ -41,3 +41,4 @@ public: } // namespace Auth #endif /* _SQUID_AUTH_DIGEST_USER_H */ + diff --git a/src/auth/digest/UserRequest.cc b/src/auth/digest/UserRequest.cc index 03abb1d6a8..ad11b2cf0d 100644 --- a/src/auth/digest/UserRequest.cc +++ b/src/auth/digest/UserRequest.cc @@ -23,16 +23,16 @@ #include "SquidTime.h" Auth::Digest::UserRequest::UserRequest() : - nonceb64(NULL), - cnonce(NULL), - realm(NULL), - pszPass(NULL), - algorithm(NULL), - pszMethod(NULL), - qop(NULL), - uri(NULL), - response(NULL), - nonce(NULL) + nonceb64(NULL), + cnonce(NULL), + realm(NULL), + pszPass(NULL), + algorithm(NULL), + pszMethod(NULL), + qop(NULL), + uri(NULL), + response(NULL), + nonce(NULL) { memset(nc, 0, sizeof(nc)); memset(&flags, 0, sizeof(flags)); @@ -366,12 +366,12 @@ Auth::Digest::UserRequest::HandleReply(void *data, const Helper::Reply &reply) case Helper::TT: debugs(29, DBG_IMPORTANT, "ERROR: Digest auth does not support the result code received. Using the wrong helper program? received: " << reply); - // fall through to next case. Handle this as an ERR response. + // fall through to next case. Handle this as an ERR response. case Helper::TimedOut: case Helper::BrokenHelper: - // TODO retry the broken lookup on another helper? - // fall through to next case for now. Handle this as an ERR response silently. + // TODO retry the broken lookup on another helper? + // fall through to next case for now. Handle this as an ERR response silently. case Helper::Error: { /* allow this because the digest_request pointer is purely local */ Auth::Digest::UserRequest *digest_request = dynamic_cast(auth_user_request.getRaw()); @@ -401,3 +401,4 @@ Auth::Digest::UserRequest::HandleReply(void *data, const Helper::Reply &reply) delete replyData; } + diff --git a/src/auth/digest/UserRequest.h b/src/auth/digest/UserRequest.h index 3cb2b2e21f..3c4c0f65e8 100644 --- a/src/auth/digest/UserRequest.h +++ b/src/auth/digest/UserRequest.h @@ -68,3 +68,4 @@ private: } // namespace Auth #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */ + diff --git a/src/auth/negotiate/Config.cc b/src/auth/negotiate/Config.cc index 9da649ab21..e84b7fa2c6 100644 --- a/src/auth/negotiate/Config.cc +++ b/src/auth/negotiate/Config.cc @@ -204,7 +204,7 @@ Auth::Negotiate::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, * tied to it, even if MAYBE the client could handle it - Kinkie */ rep->header.delByName("keep-alive"); request->flags.proxyKeepalive = false; - /* fall through */ + /* fall through */ case Auth::Ok: /* Special case: authentication finished OK but disallowed by ACL. @@ -265,3 +265,4 @@ Auth::Negotiate::Config::decode(char const *proxy_auth, const char *aRequestReal debugs(29, 9, HERE << "decode Negotiate authentication"); return auth_user_request; } + diff --git a/src/auth/negotiate/Config.h b/src/auth/negotiate/Config.h index 47d53ae512..7de4607c42 100644 --- a/src/auth/negotiate/Config.h +++ b/src/auth/negotiate/Config.h @@ -46,3 +46,4 @@ public: extern statefulhelper *negotiateauthenticators; #endif + diff --git a/src/auth/negotiate/Scheme.cc b/src/auth/negotiate/Scheme.cc index 1c548a7ad6..324129bad4 100644 --- a/src/auth/negotiate/Scheme.cc +++ b/src/auth/negotiate/Scheme.cc @@ -46,3 +46,4 @@ Auth::Negotiate::Scheme::createConfig() Auth::Negotiate::Config *negotiateCfg = new Auth::Negotiate::Config; return dynamic_cast(negotiateCfg); } + diff --git a/src/auth/negotiate/Scheme.h b/src/auth/negotiate/Scheme.h index add566557d..de2e40443e 100644 --- a/src/auth/negotiate/Scheme.h +++ b/src/auth/negotiate/Scheme.h @@ -43,3 +43,4 @@ private: } // namespace Auth #endif /* SQUID_AUTH_NEGOTIATE_SCHEME_H */ + diff --git a/src/auth/negotiate/User.cc b/src/auth/negotiate/User.cc index 751cc3d2bb..f317c57055 100644 --- a/src/auth/negotiate/User.cc +++ b/src/auth/negotiate/User.cc @@ -12,7 +12,7 @@ #include "Debug.h" Auth::Negotiate::User::User(Auth::Config *aConfig, const char *aRequestRealm) : - Auth::User(aConfig, aRequestRealm) + Auth::User(aConfig, aRequestRealm) { } @@ -26,3 +26,4 @@ Auth::Negotiate::User::ttl() const { return -1; // Negotiate cannot be cached. } + diff --git a/src/auth/negotiate/User.h b/src/auth/negotiate/User.h index ed2f45f39f..c7ab1b2e48 100644 --- a/src/auth/negotiate/User.h +++ b/src/auth/negotiate/User.h @@ -36,3 +36,4 @@ public: } // namespace Auth #endif /* _SQUID_AUTH_NEGOTIATE_USER_H */ + diff --git a/src/auth/negotiate/UserRequest.cc b/src/auth/negotiate/UserRequest.cc index 86a9f3ed1e..b456172561 100644 --- a/src/auth/negotiate/UserRequest.cc +++ b/src/auth/negotiate/UserRequest.cc @@ -359,7 +359,7 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const Helper::Reply &reply case Helper::Unknown: debugs(29, DBG_IMPORTANT, "ERROR: Negotiate Authentication Helper '" << reply.whichServer << "' crashed!."); - /* continue to the next case */ + /* continue to the next case */ case Helper::TimedOut: case Helper::BrokenHelper: { @@ -408,3 +408,4 @@ Auth::Negotiate::UserRequest::addAuthenticationInfoHeader(HttpReply * rep, int a safe_free(server_blob); } + diff --git a/src/auth/negotiate/UserRequest.h b/src/auth/negotiate/UserRequest.h index 7f586b1472..19427ab1b8 100644 --- a/src/auth/negotiate/UserRequest.h +++ b/src/auth/negotiate/UserRequest.h @@ -65,3 +65,4 @@ private: } // namespace Auth #endif /* _SQUID_SRC_AUTH_NEGOTIATE_USERREQUEST_H */ + diff --git a/src/auth/ntlm/Config.cc b/src/auth/ntlm/Config.cc index 73ef0b7192..cd500c9116 100644 --- a/src/auth/ntlm/Config.cc +++ b/src/auth/ntlm/Config.cc @@ -192,13 +192,13 @@ Auth::Ntlm::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, Http /* here it makes sense to drop the connection, as auth is * tied to it, even if MAYBE the client could handle it - Kinkie */ request->flags.proxyKeepalive = false; - /* fall through */ + /* fall through */ case Auth::Ok: - /* Special case: authentication finished OK but disallowed by ACL. - * Need to start over to give the client another chance. - */ - /* fall through */ + /* Special case: authentication finished OK but disallowed by ACL. + * Need to start over to give the client another chance. + */ + /* fall through */ case Auth::Unchecked: /* semantic change: do not drop the connection. @@ -245,3 +245,4 @@ Auth::Ntlm::Config::decode(char const *proxy_auth, const char *aRequestRealm) debugs(29, 9, HERE << "decode: NTLM authentication"); return auth_user_request; } + diff --git a/src/auth/ntlm/Config.h b/src/auth/ntlm/Config.h index 9499384304..9b66c2aeed 100644 --- a/src/auth/ntlm/Config.h +++ b/src/auth/ntlm/Config.h @@ -49,3 +49,4 @@ public: extern statefulhelper *ntlmauthenticators; #endif + diff --git a/src/auth/ntlm/Scheme.cc b/src/auth/ntlm/Scheme.cc index d3c46007e2..72680133fc 100644 --- a/src/auth/ntlm/Scheme.cc +++ b/src/auth/ntlm/Scheme.cc @@ -46,3 +46,4 @@ Auth::Ntlm::Scheme::createConfig() Auth::Ntlm::Config *ntlmCfg = new Auth::Ntlm::Config; return dynamic_cast(ntlmCfg); } + diff --git a/src/auth/ntlm/Scheme.h b/src/auth/ntlm/Scheme.h index d270aca707..f5ca98e488 100644 --- a/src/auth/ntlm/Scheme.h +++ b/src/auth/ntlm/Scheme.h @@ -47,3 +47,4 @@ private: } // namespace Auth #endif /* SQUID_AUTH_NTLM_SCHEME_H */ + diff --git a/src/auth/ntlm/User.cc b/src/auth/ntlm/User.cc index 89b43f84f4..09627095e4 100644 --- a/src/auth/ntlm/User.cc +++ b/src/auth/ntlm/User.cc @@ -12,7 +12,7 @@ #include "Debug.h" Auth::Ntlm::User::User(Auth::Config *aConfig, const char *aRequestRealm) : - Auth::User(aConfig, aRequestRealm) + Auth::User(aConfig, aRequestRealm) { } @@ -26,3 +26,4 @@ Auth::Ntlm::User::ttl() const { return -1; // NTLM credentials cannot be cached. } + diff --git a/src/auth/ntlm/User.h b/src/auth/ntlm/User.h index e4302c200d..f160d116a5 100644 --- a/src/auth/ntlm/User.h +++ b/src/auth/ntlm/User.h @@ -37,3 +37,4 @@ public: } // namespace Auth #endif /* _SQUID_AUTH_NTLM_USER_H */ + diff --git a/src/auth/ntlm/UserRequest.cc b/src/auth/ntlm/UserRequest.cc index 434754d2f9..c44251e183 100644 --- a/src/auth/ntlm/UserRequest.cc +++ b/src/auth/ntlm/UserRequest.cc @@ -349,7 +349,7 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const Helper::Reply &reply) case Helper::Unknown: debugs(29, DBG_IMPORTANT, "ERROR: NTLM Authentication Helper '" << reply.whichServer << "' crashed!."); - /* continue to the next case */ + /* continue to the next case */ case Helper::TimedOut: case Helper::BrokenHelper: { @@ -380,3 +380,4 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const Helper::Reply &reply) r->handler(r->data); delete r; } + diff --git a/src/auth/ntlm/UserRequest.h b/src/auth/ntlm/UserRequest.h index ea327c5575..dceea64627 100644 --- a/src/auth/ntlm/UserRequest.h +++ b/src/auth/ntlm/UserRequest.h @@ -60,3 +60,4 @@ private: } // namespace Auth #endif /* _SQUID_SRC_AUTH_NTLM_USERREQUEST_H */ + diff --git a/src/base/AsyncCall.cc b/src/base/AsyncCall.cc index a5c946e8a6..79a2327641 100644 --- a/src/base/AsyncCall.cc +++ b/src/base/AsyncCall.cc @@ -20,7 +20,7 @@ InstanceIdDefinitions(AsyncCall, "call"); AsyncCall::AsyncCall(int aDebugSection, int aDebugLevel, const char *aName): name(aName), debugSection(aDebugSection), - debugLevel(aDebugLevel), theNext(0), isCanceled(NULL) + debugLevel(aDebugLevel), theNext(0), isCanceled(NULL) { debugs(debugSection, debugLevel, "The AsyncCall " << name << " constructed, this=" << this << " [" << id << ']'); diff --git a/src/base/AsyncCall.h b/src/base/AsyncCall.h index 062109da6f..3194b151c1 100644 --- a/src/base/AsyncCall.h +++ b/src/base/AsyncCall.h @@ -127,11 +127,11 @@ class AsyncCallT: public AsyncCall public: AsyncCallT(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer): AsyncCall(aDebugSection, aDebugLevel, aName), - dialer(aDialer) {} + dialer(aDialer) {} AsyncCallT(const AsyncCallT &o): - AsyncCall(o.debugSection, o.debugLevel, o.name), - dialer(o.dialer) {} + AsyncCall(o.debugSection, o.debugLevel, o.name), + dialer(o.dialer) {} ~AsyncCallT() {} @@ -166,3 +166,4 @@ bool ScheduleCall(const char *fileName, int fileLine, AsyncCall::Pointer &call); #define ScheduleCallHere(call) ScheduleCall(__FILE__, __LINE__, (call)) #endif /* SQUID_ASYNCCALL_H */ + diff --git a/src/base/AsyncCallQueue.h b/src/base/AsyncCallQueue.h index 411b7c91b8..04b88ae0ba 100644 --- a/src/base/AsyncCallQueue.h +++ b/src/base/AsyncCallQueue.h @@ -39,3 +39,4 @@ private: }; #endif /* SQUID_ASYNCCALLQUEUE_H */ + diff --git a/src/base/AsyncCbdataCalls.h b/src/base/AsyncCbdataCalls.h index 5ebfc1cdad..e9aa1e6de7 100644 --- a/src/base/AsyncCbdataCalls.h +++ b/src/base/AsyncCbdataCalls.h @@ -21,8 +21,8 @@ public: typedef void Handler(Argument1 *); UnaryCbdataDialer(Handler *aHandler, Argument1 *aArg) : - arg1(aArg), - handler(aHandler) {} + arg1(aArg), + handler(aHandler) {} virtual bool canDial(AsyncCall &call) { return arg1.valid(); } void dial(AsyncCall &call) { handler(arg1.get()); } @@ -42,3 +42,4 @@ cbdataDialer(typename UnaryCbdataDialer::Handler *handler, Argument1 } #endif + diff --git a/src/base/AsyncJob.cc b/src/base/AsyncJob.cc index 29286a91b5..71577929a7 100644 --- a/src/base/AsyncJob.cc +++ b/src/base/AsyncJob.cc @@ -28,7 +28,7 @@ AsyncJob::Pointer AsyncJob::Start(AsyncJob *j) } AsyncJob::AsyncJob(const char *aTypeName) : - stopReason(NULL), typeName(aTypeName), inCall(NULL) + stopReason(NULL), typeName(aTypeName), inCall(NULL) { debugs(93,5, "AsyncJob constructed, this=" << this << " type=" << typeName << " [" << id << ']'); diff --git a/src/base/AsyncJob.h b/src/base/AsyncJob.h index 918127b6ee..0777442658 100644 --- a/src/base/AsyncJob.h +++ b/src/base/AsyncJob.h @@ -72,3 +72,4 @@ protected: }; #endif /* SQUID_ASYNC_JOB_H */ + diff --git a/src/base/AsyncJobCalls.h b/src/base/AsyncJobCalls.h index 0c0fa96100..ece2810ac3 100644 --- a/src/base/AsyncJobCalls.h +++ b/src/base/AsyncJobCalls.h @@ -91,7 +91,7 @@ class NullaryMemFunT: public JobDialer public: typedef void (Job::*Method)(); explicit NullaryMemFunT(const CbcPointer &aJob, Method aMethod): - JobDialer(aJob), method(aMethod) {} + JobDialer(aJob), method(aMethod) {} virtual void print(std::ostream &os) const { os << "()"; } @@ -109,7 +109,7 @@ public: typedef void (Job::*Method)(Argument1); explicit UnaryMemFunT(const CbcPointer &aJob, Method aMethod, const Data &anArg1): JobDialer(aJob), - method(aMethod), arg1(anArg1) {} + method(aMethod), arg1(anArg1) {} virtual void print(std::ostream &os) const { os << '(' << arg1 << ')'; } @@ -182,3 +182,4 @@ JobDialer::dial(AsyncCall &call) } #endif /* SQUID_ASYNCJOBCALLS_H */ + diff --git a/src/base/CbDataList.h b/src/base/CbDataList.h index dfb197aadc..2a0742041d 100644 --- a/src/base/CbDataList.h +++ b/src/base/CbDataList.h @@ -196,3 +196,4 @@ CbDataListContainer::empty() const } #endif /* SQUID_CBDATALIST_H */ + diff --git a/src/base/CbcPointer.h b/src/base/CbcPointer.h index 925fa86378..381f35060f 100644 --- a/src/base/CbcPointer.h +++ b/src/base/CbcPointer.h @@ -167,3 +167,4 @@ std::ostream &CbcPointer::print(std::ostream &os) const } #endif /* SQUID_CBC_POINTER_H */ + diff --git a/src/base/CharacterSet.cc b/src/base/CharacterSet.cc index 8c0c6c518d..f6cbfe9ed3 100644 --- a/src/base/CharacterSet.cc +++ b/src/base/CharacterSet.cc @@ -66,8 +66,8 @@ CharacterSet::complement(const char *label) const } CharacterSet::CharacterSet(const char *label, const char * const c) : - name(label == NULL ? "anonymous" : label), - chars_(Storage(256,0)) + name(label == NULL ? "anonymous" : label), + chars_(Storage(256,0)) { const size_t clen = strlen(c); for (size_t i = 0; i < clen; ++i) @@ -75,8 +75,8 @@ CharacterSet::CharacterSet(const char *label, const char * const c) : } CharacterSet::CharacterSet(const char *label, unsigned char low, unsigned char high) : - name(label == NULL ? "anonymous" : label), - chars_(Storage(256,0)) + name(label == NULL ? "anonymous" : label), + chars_(Storage(256,0)) { addRange(low,high); } @@ -84,33 +84,34 @@ CharacterSet::CharacterSet(const char *label, unsigned char low, unsigned char h const CharacterSet // RFC 5234 CharacterSet::ALPHA("ALPHA", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), -CharacterSet::BIT("BIT","01"), -CharacterSet::CR("CR","\r"), + CharacterSet::BIT("BIT","01"), + CharacterSet::CR("CR","\r"), #if __cplusplus == 201103L //CharacterSet::CTL("CTL",{{0x01,0x1f},{0x7f,0x7f}}), #endif -CharacterSet::DIGIT("DIGIT","0123456789"), -CharacterSet::DQUOTE("DQUOTE","\""), -CharacterSet::HEXDIG("HEXDIG","0123456789aAbBcCdDeEfF"), -CharacterSet::HTAB("HTAB","\t"), -CharacterSet::LF("LF","\n"), -CharacterSet::SP("SP"," "), -CharacterSet::VCHAR("VCHAR", 0x21, 0x7e), + CharacterSet::DIGIT("DIGIT","0123456789"), + CharacterSet::DQUOTE("DQUOTE","\""), + CharacterSet::HEXDIG("HEXDIG","0123456789aAbBcCdDeEfF"), + CharacterSet::HTAB("HTAB","\t"), + CharacterSet::LF("LF","\n"), + CharacterSet::SP("SP"," "), + CharacterSet::VCHAR("VCHAR", 0x21, 0x7e), // RFC 7230 -CharacterSet::WSP("WSP"," \t"), + CharacterSet::WSP("WSP"," \t"), #if __cplusplus == 201103L //CharacterSet::CTEXT("ctext",{{0x09,0x09},{0x20,0x20},{0x2a,0x5b},{0x5d,0x7e},{0x80,0xff}}), #endif -CharacterSet::TCHAR("TCHAR","!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), -CharacterSet::SPECIAL("SPECIAL","()<>@,;:\\\"/[]?={}"), + CharacterSet::TCHAR("TCHAR","!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), + CharacterSet::SPECIAL("SPECIAL","()<>@,;:\\\"/[]?={}"), #if __cplusplus == 201103L //CharacterSet::QDTEXT("QDTEXT",{{0x09,0x09},{0x20,0x21},{0x23,0x5b},{0x5d,0x7e},{0x80,0xff}}), #endif -CharacterSet::OBSTEXT("OBSTEXT",0x80,0xff), + CharacterSet::OBSTEXT("OBSTEXT",0x80,0xff), // RFC 7232 #if __cplusplus == 201103L //CharacterSet::ETAGC("ETAGC",{{0x21,0x21},{0x23,0x7e},{0x80,0xff}}), #endif // RFC 7235 -CharacterSet::TOKEN68C("TOKEN68C","-._~+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") -; + CharacterSet::TOKEN68C("TOKEN68C","-._~+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + ; + diff --git a/src/base/CharacterSet.h b/src/base/CharacterSet.h index f4959a3947..3f7d7b38f1 100644 --- a/src/base/CharacterSet.h +++ b/src/base/CharacterSet.h @@ -120,3 +120,4 @@ private: }; #endif /* _SQUID_SRC_PARSER_CHARACTERSET_H */ + diff --git a/src/base/InstanceId.h b/src/base/InstanceId.h index 89cfd7325a..e4d3501d72 100644 --- a/src/base/InstanceId.h +++ b/src/base/InstanceId.h @@ -65,3 +65,4 @@ std::ostream &operator <<(std::ostream &os, const InstanceId &id) } #endif /* SQUID_BASE_INSTANCE_ID_H */ + diff --git a/src/base/Lock.h b/src/base/Lock.h index 2c70c4eb29..50022687e0 100644 --- a/src/base/Lock.h +++ b/src/base/Lock.h @@ -65,3 +65,4 @@ private: #define RefCountable virtual Lock #endif /* SQUID_SRC_BASE_LOCK_H */ + diff --git a/src/base/LruMap.h b/src/base/LruMap.h index e12cf8f48b..f68a049771 100644 --- a/src/base/LruMap.h +++ b/src/base/LruMap.h @@ -216,3 +216,4 @@ LruMap::touch(LruMap::MapIterator const &i) } #endif + diff --git a/src/base/RefCount.h b/src/base/RefCount.h index 5a35d6cf54..ac571793f7 100644 --- a/src/base/RefCount.h +++ b/src/base/RefCount.h @@ -98,3 +98,4 @@ inline std::ostream &operator <<(std::ostream &os, const RefCount &p) } #endif /* SQUID_REFCOUNT_H_ */ + diff --git a/src/base/RunnersRegistry.cc b/src/base/RunnersRegistry.cc index 6a4ce96daf..127fc4c154 100644 --- a/src/base/RunnersRegistry.cc +++ b/src/base/RunnersRegistry.cc @@ -51,3 +51,4 @@ UseThisStatic(const void *) { return true; } + diff --git a/src/base/RunnersRegistry.h b/src/base/RunnersRegistry.h index c78edc115f..07ac21ade1 100644 --- a/src/base/RunnersRegistry.h +++ b/src/base/RunnersRegistry.h @@ -101,3 +101,4 @@ bool UseThisStatic(const void *); UseThisStatic(& Who ## _Registered_); #endif /* SQUID_BASE_RUNNERSREGISTRY_H */ + diff --git a/src/base/Subscription.h b/src/base/Subscription.h index 9c437b5b9d..83040da5da 100644 --- a/src/base/Subscription.h +++ b/src/base/Subscription.h @@ -57,3 +57,4 @@ private: }; #endif /* _SQUID_BASE_SUBSCRIPTION_H */ + diff --git a/src/base/TextException.cc b/src/base/TextException.cc index 64e97743ad..0fbd319949 100644 --- a/src/base/TextException.cc +++ b/src/base/TextException.cc @@ -20,12 +20,12 @@ TextException::TextException() } TextException::TextException(const TextException& right) : - message((right.message?xstrdup(right.message):NULL)), theFileName(right.theFileName), theLineNo(right.theLineNo), theId(right.theId) + message((right.message?xstrdup(right.message):NULL)), theFileName(right.theFileName), theLineNo(right.theLineNo), theId(right.theId) { } TextException::TextException(const char *aMsg, const char *aFileName, int aLineNo, unsigned int anId): - message(aMsg?xstrdup(aMsg):NULL), theFileName(aFileName), theLineNo(aLineNo), theId(anId) + message(aMsg?xstrdup(aMsg):NULL), theFileName(aFileName), theLineNo(aLineNo), theId(anId) {} TextException::~TextException() throw() @@ -92,3 +92,4 @@ void Throw(const char *message, const char *fileName, int lineNo, unsigned int i throw TextException(message, fileName, lineNo, id); } + diff --git a/src/base/TextException.h b/src/base/TextException.h index dc1f4509b8..83c47f5666 100644 --- a/src/base/TextException.h +++ b/src/base/TextException.h @@ -90,3 +90,4 @@ void Throw(const char *message, const char *fileName, int lineNo, unsigned int i #endif #endif /* SQUID__TEXTEXCEPTION_H */ + diff --git a/src/base/TidyPointer.h b/src/base/TidyPointer.h index 1159b964fa..b6e919f278 100644 --- a/src/base/TidyPointer.h +++ b/src/base/TidyPointer.h @@ -21,7 +21,7 @@ public: /// Delete callback. typedef void DCB (T *t); TidyPointer(T *t = NULL) - : raw(t) {} + : raw(t) {} public: bool operator !() const { return !raw; } /// Returns raw and possibly NULL pointer @@ -66,3 +66,4 @@ template void tidyFree(T *p) } #endif // SQUID_BASE_TIDYPOINTER_H + diff --git a/src/base/testCharacterSet.cc b/src/base/testCharacterSet.cc index 2bdab95790..41abf3a4f7 100644 --- a/src/base/testCharacterSet.cc +++ b/src/base/testCharacterSet.cc @@ -86,3 +86,4 @@ testCharacterSet::CharacterSetUnion() CPPUNIT_ASSERT_EQUAL(CharacterSet::HEXDIG[j],hex[j]); } } + diff --git a/src/base/testCharacterSet.h b/src/base/testCharacterSet.h index 11e7fee651..e282139f9a 100644 --- a/src/base/testCharacterSet.h +++ b/src/base/testCharacterSet.h @@ -30,3 +30,4 @@ protected: }; #endif /* SQUID_BASE_TESTCHARACTERSET_H */ + diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 996756b5dd..934f7f3c82 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -475,14 +475,14 @@ parseOneConfigFile(const char *file_name, unsigned int depth) new_lineno = strtol(token, &file, 0) - 1; if (file == token) - continue; /* Not a valid #line directive, may be a comment */ + continue; /* Not a valid #line directive, may be a comment */ while (*file && xisspace((unsigned char) *file)) ++file; if (*file) { if (*file != '"') - continue; /* Not a valid #line directive, may be a comment */ + continue; /* Not a valid #line directive, may be a comment */ xstrncpy(new_file_name, file + 1, sizeof(new_file_name)); @@ -643,7 +643,7 @@ configDoConfigure(void) if (Config.Announce.period > 0) { Config.onoff.announce = 1; } else { - Config.Announce.period = 86400 * 365; /* one year */ + Config.Announce.period = 86400 * 365; /* one year */ Config.onoff.announce = 0; } @@ -996,7 +996,7 @@ parseTimeLine(time_msec_t * tptr, const char *units, bool allowMsec, bool expe d = xatof(token); - m = u; /* default to 'units' if none specified */ + m = u; /* default to 'units' if none specified */ bool hasUnits = false; if (0 == d) @@ -1087,7 +1087,7 @@ parseBytesLine64(int64_t * bptr, const char *units) d = xatof(token); - m = u; /* default to 'units' if none specified */ + m = u; /* default to 'units' if none specified */ if (0.0 == d) (void) 0; @@ -1134,7 +1134,7 @@ parseBytesLine(size_t * bptr, const char *units) d = xatof(token); - m = u; /* default to 'units' if none specified */ + m = u; /* default to 'units' if none specified */ if (0.0 == d) (void) 0; @@ -1181,7 +1181,7 @@ parseBytesLineSigned(ssize_t * bptr, const char *units) d = xatof(token); - m = u; /* default to 'units' if none specified */ + m = u; /* default to 'units' if none specified */ if (0.0 == d) (void) 0; @@ -1388,7 +1388,7 @@ static void parse_acl_address(AclAddress ** head) { AclAddress *l; - AclAddress **tail = head; /* sane name below */ + AclAddress **tail = head; /* sane name below */ CBDATA_INIT_TYPE_FREECB(AclAddress, freed_acl_address); l = cbdataAlloc(AclAddress); parse_address(&l->addr); @@ -1440,7 +1440,7 @@ static void parse_acl_tos(acl_tos ** head) { acl_tos *l; - acl_tos **tail = head; /* sane name below */ + acl_tos **tail = head; /* sane name below */ unsigned int tos; /* Initially uint for strtoui. Casted to tos_t before return */ char *token = ConfigParser::NextToken(); @@ -1517,7 +1517,7 @@ static void parse_acl_nfmark(acl_nfmark ** head) { acl_nfmark *l; - acl_nfmark **tail = head; /* sane name below */ + acl_nfmark **tail = head; /* sane name below */ nfmark_t mark; char *token = ConfigParser::NextToken(); @@ -1587,7 +1587,7 @@ static void parse_acl_b_size_t(AclSizeLimit ** head) { AclSizeLimit *l; - AclSizeLimit **tail = head; /* sane name below */ + AclSizeLimit **tail = head; /* sane name below */ CBDATA_INIT_TYPE_FREECB(AclSizeLimit, freed_acl_b_size_t); @@ -2018,7 +2018,7 @@ isUnsignedNumeric(const char *str, size_t len) } /** - \param proto 'tcp' or 'udp' for protocol + \param proto 'tcp' or 'udp' for protocol \returns Port the named service is supposed to be listening on. */ static unsigned short @@ -2526,7 +2526,7 @@ parse_hostdomain(void) l = static_cast(xcalloc(1, sizeof(CachePeerDomainList))); l->do_ping = true; - if (*domain == '!') { /* check for !.edu */ + if (*domain == '!') { /* check for !.edu */ l->do_ping = false; ++domain; } @@ -2795,7 +2795,7 @@ parse_refreshpattern(RefreshPattern ** head) pattern = xstrdup(token); - i = GetInteger(); /* token: min */ + i = GetInteger(); /* token: min */ /* catch negative and insanely huge values close to 32-bit wrap */ if (i < 0) { @@ -2807,13 +2807,13 @@ parse_refreshpattern(RefreshPattern ** head) i = 60*24*365; } - min = (time_t) (i * 60); /* convert minutes to seconds */ + min = (time_t) (i * 60); /* convert minutes to seconds */ - i = GetPercentage(); /* token: pct */ + i = GetPercentage(); /* token: pct */ pct = (double) i / 100.0; - i = GetInteger(); /* token: max */ + i = GetInteger(); /* token: max */ /* catch negative and insanely huge values close to 32-bit wrap */ if (i < 0) { @@ -2825,7 +2825,7 @@ parse_refreshpattern(RefreshPattern ** head) i = 60*24*365; } - max = (time_t) (i * 60); /* convert minutes to seconds */ + max = (time_t) (i * 60); /* convert minutes to seconds */ /* Options */ while ((token = ConfigParser::NextToken()) != NULL) { @@ -5007,3 +5007,4 @@ free_configuration_includes_quoted_values(bool *recognizeQuotedValues) ConfigParser::RecognizeQuotedValues = false; ConfigParser::StrictMode = false; } + diff --git a/src/cache_cf.h b/src/cache_cf.h index 34faa6e32d..961c7ce7af 100644 --- a/src/cache_cf.h +++ b/src/cache_cf.h @@ -27,3 +27,4 @@ void parse_time_t(time_t * var); char *strtokFile(void); #endif /* SQUID_CACHE_CF_H_ */ + diff --git a/src/cache_diff.cc b/src/cache_diff.cc index 3c44eb441f..0e9fafe547 100644 --- a/src/cache_diff.cc +++ b/src/cache_diff.cc @@ -18,10 +18,10 @@ typedef struct { const char *name; hash_table *hash; - int count; /* #currently cached entries */ - int scanned_count; /* #scanned entries */ - int bad_add_count; /* #duplicate adds */ - int bad_del_count; /* #dels with no prior add */ + int count; /* #currently cached entries */ + int scanned_count; /* #scanned entries */ + int bad_add_count; /* #duplicate adds */ + int bad_del_count; /* #dels with no prior add */ } CacheIndex; typedef struct _CacheEntry { @@ -277,3 +277,4 @@ main(int argc, char *argv[]) return 1; } + diff --git a/src/cache_manager.cc b/src/cache_manager.cc index ec47320948..35598cc74c 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -267,9 +267,9 @@ CacheManager::ParseHeaders(const HttpRequest * request, Mgr::ActionParams ¶m /** \ingroup CacheManagerInternal * - \retval 0 if mgr->password is good or "none" - \retval 1 if mgr->password is "disable" - \retval !0 if mgr->password does not match configured password + \retval 0 if mgr->password is good or "none" + \retval 1 if mgr->password is "disable" + \retval !0 if mgr->password does not match configured password */ int CacheManager::CheckPassword(const Mgr::Command &cmd) @@ -478,3 +478,4 @@ CacheManager::GetInstance() } return instance; } + diff --git a/src/carp.cc b/src/carp.cc index a16a3d1859..9bee8504e2 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -124,11 +124,11 @@ carpInit(void) */ K = n_carp_peers; - P_last = 0.0; /* Empty P_0 */ + P_last = 0.0; /* Empty P_0 */ - Xn = 1.0; /* Empty starting point of X_1 * X_2 * ... * X_{x-1} */ + Xn = 1.0; /* Empty starting point of X_1 * X_2 * ... * X_{x-1} */ - X_last = 0.0; /* Empty X_0, nullifies the first pow statement */ + X_last = 0.0; /* Empty X_0, nullifies the first pow statement */ for (k = 1; k <= K; ++k) { double Kk1 = (double) (K - k + 1); @@ -243,3 +243,4 @@ carpCachemgr(StoreEntry * sentry) sumfetches ? (double) p->stats.fetches / sumfetches : -1.0); } } + diff --git a/src/carp.h b/src/carp.h index ab4cd4a12f..6ed6a0ca74 100644 --- a/src/carp.h +++ b/src/carp.h @@ -18,3 +18,4 @@ void carpInit(void); CachePeer *carpSelectParent(HttpRequest *); #endif /* SQUID_CARP_H_ */ + diff --git a/src/cbdata.cc b/src/cbdata.cc index ac1a72163d..bc0c64aec4 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -76,7 +76,7 @@ public: * safe access to data - RBC 20030902 */ public: #if HASHED_CBDATA - hash_link hash; // Must be first + hash_link hash; // Must be first #endif #if USE_CBDATA_DEBUG @@ -479,7 +479,7 @@ cbdataReferenceValid(const void *p) cbdata *c; if (p == NULL) - return 1; /* A NULL pointer cannot become invalid */ + return 1; /* A NULL pointer cannot become invalid */ debugs(45, 9, p); @@ -620,3 +620,4 @@ cbdataDumpHistory(StoreEntry *sentry) } #endif + diff --git a/src/cbdata.h b/src/cbdata.h index c4fa4f2dbb..09f440fda7 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -29,139 +29,139 @@ * \section Examples Examples \par - * Here you can find some examples on how to use cbdata, and why. + * Here you can find some examples on how to use cbdata, and why. * \subsection AsyncOpWithoutCBDATA Asynchronous operation without cbdata, showing why cbdata is needed \par - * For a asyncronous operation with callback functions, the normal - * sequence of events in programs NOT using cbdata is as follows: + * For a asyncronous operation with callback functions, the normal + * sequence of events in programs NOT using cbdata is as follows: * \code - // initialization - type_of_data our_data; - ... - our_data = malloc(...); - ... - // Initiate a asyncronous operation, with our_data as callback_data - fooOperationStart(bar, callback_func, our_data); - ... - // The asyncronous operation completes and makes the callback - callback_func(callback_data, ....); - // Some time later we clean up our data - free(our_data); + // initialization + type_of_data our_data; + ... + our_data = malloc(...); + ... + // Initiate a asyncronous operation, with our_data as callback_data + fooOperationStart(bar, callback_func, our_data); + ... + // The asyncronous operation completes and makes the callback + callback_func(callback_data, ....); + // Some time later we clean up our data + free(our_data); \endcode * \par - * However, things become more interesting if we want or need - * to free the callback_data, or otherwise cancel the callback, - * before the operation completes. In constructs like this you - * can quite easily end up with having the memory referenced - * pointed to by callback_data freed before the callback is invoked - * causing a program failure or memory corruption: + * However, things become more interesting if we want or need + * to free the callback_data, or otherwise cancel the callback, + * before the operation completes. In constructs like this you + * can quite easily end up with having the memory referenced + * pointed to by callback_data freed before the callback is invoked + * causing a program failure or memory corruption: * \code - // initialization - type_of_data our_data; - ... - our_data = malloc(...); - ... - // Initiate a asyncronous operation, with our_data as callback_data - fooOperationStart(bar, callback_func, our_data); - ... - // ouch, something bad happened elsewhere.. try to cleanup - // but the programmer forgot there is a callback pending from - // fooOperationsStart() (an easy thing to forget when writing code - // to deal with errors, especially if there may be many different - // pending operation) - free(our_data); - ... - // The asyncronous operation completes and makes the callback - callback_func(callback_data, ....); - // CRASH, the memory pointer to by callback_data is no longer valid - // at the time of the callback + // initialization + type_of_data our_data; + ... + our_data = malloc(...); + ... + // Initiate a asyncronous operation, with our_data as callback_data + fooOperationStart(bar, callback_func, our_data); + ... + // ouch, something bad happened elsewhere.. try to cleanup + // but the programmer forgot there is a callback pending from + // fooOperationsStart() (an easy thing to forget when writing code + // to deal with errors, especially if there may be many different + // pending operation) + free(our_data); + ... + // The asyncronous operation completes and makes the callback + callback_func(callback_data, ....); + // CRASH, the memory pointer to by callback_data is no longer valid + // at the time of the callback \endcode * \subsection AsyncOpWithCBDATA Asyncronous operation with cbdata * \par - * The callback data allocator lets us do this in a uniform and - * safe manner. The callback data allocator is used to allocate, - * track and free memory pool objects used during callback - * operations. Allocated memory is locked while the asyncronous - * operation executes elsewhere, and is freed when the operation - * completes. The normal sequence of events is: + * The callback data allocator lets us do this in a uniform and + * safe manner. The callback data allocator is used to allocate, + * track and free memory pool objects used during callback + * operations. Allocated memory is locked while the asyncronous + * operation executes elsewhere, and is freed when the operation + * completes. The normal sequence of events is: * \code - // initialization - type_of_data our_data; - ... - our_data = cbdataAlloc(type_of_data); - ... - // Initiate a asyncronous operation, with our_data as callback_data - fooOperationStart(..., callback_func, our_data); - ... - // foo - void *local_pointer = cbdataReference(callback_data); - .... - // The asyncronous operation completes and makes the callback - void *cbdata; - if (cbdataReferenceValidDone(local_pointer, &cbdata)) - callback_func(...., cbdata); - ... - cbdataFree(our_data); + // initialization + type_of_data our_data; + ... + our_data = cbdataAlloc(type_of_data); + ... + // Initiate a asyncronous operation, with our_data as callback_data + fooOperationStart(..., callback_func, our_data); + ... + // foo + void *local_pointer = cbdataReference(callback_data); + .... + // The asyncronous operation completes and makes the callback + void *cbdata; + if (cbdataReferenceValidDone(local_pointer, &cbdata)) + callback_func(...., cbdata); + ... + cbdataFree(our_data); \endcode * \subsection AsynchronousOpCancelledByCBDATA Asynchronous operation cancelled by cbdata * \par - * With this scheme, nothing bad happens if cbdataFree() gets called - * before fooOperantionComplete(...). + * With this scheme, nothing bad happens if cbdataFree() gets called + * before fooOperantionComplete(...). * - \par Initalization + \par Initalization \code - type_of_data our_data; - ... - our_data = cbdataAlloc(type_of_data); + type_of_data our_data; + ... + our_data = cbdataAlloc(type_of_data); \endcode - * Initiate a asyncronous operation, with our_data as callback_data + * Initiate a asyncronous operation, with our_data as callback_data \code - fooOperationStart(..., callback_func, our_data); + fooOperationStart(..., callback_func, our_data); \endcode - * do some stuff with it + * do some stuff with it \code - void *local_pointer = cbdataReference(callback_data); + void *local_pointer = cbdataReference(callback_data); \endcode - * something bad happened elsewhere.. cleanup + * something bad happened elsewhere.. cleanup \code - cbdataFree(our_data); + cbdataFree(our_data); \endcode - * The asyncronous operation completes and tries to make the callback + * The asyncronous operation completes and tries to make the callback \code - void *cbdata; - if (cbdataReferenceValidDone(local_pointer, &cbdata)) + void *cbdata; + if (cbdataReferenceValidDone(local_pointer, &cbdata)) { \endcode - * won't be called, as the data is no longer valid + * won't be called, as the data is no longer valid \code - callback_func(...., cbdata); - } + callback_func(...., cbdata); + } \endcode * \par - * In this case, when cbdataFree() is called before - * cbdataReferenceValidDone(), the callback_data gets marked as invalid. - * When the callback_data is invalid before executing the callback - * function, cbdataReferenceValidDone() will return 0 and - * callback_func is never executed. + * In this case, when cbdataFree() is called before + * cbdataReferenceValidDone(), the callback_data gets marked as invalid. + * When the callback_data is invalid before executing the callback + * function, cbdataReferenceValidDone() will return 0 and + * callback_func is never executed. * \subsection AddingCBDATAType Adding a new cbdata registered type * \par - * To add new module specific data types to the allocator one uses the - * macro CBDATA_CLASS() in the class private section, and CBDATA_CLASS_INIT() + * To add new module specific data types to the allocator one uses the + * macro CBDATA_CLASS() in the class private section, and CBDATA_CLASS_INIT() * or CBDATA_NAMESPACED_CLASS_INIT() in the .cc file. * This creates new(), delete() and toCbdata() methods - * definition in class scope. Any allocate calls must be made with + * definition in class scope. Any allocate calls must be made with * new() and destruction with delete(), they may be called from anywhere. */ @@ -195,14 +195,14 @@ void *cbdataInternalAlloc(cbdata_type type, const char *, int); */ void *cbdataInternalFree(void *p, const char *, int); /// \deprecated use CBDATA_CLASS() instead -#define cbdataFree(var) do {if (var) {cbdataInternalFree(var,__FILE__,__LINE__); var = NULL;}} while(0) +#define cbdataFree(var) do {if (var) {cbdataInternalFree(var,__FILE__,__LINE__); var = NULL;}} while(0) #if USE_CBDATA_DEBUG void cbdataInternalLockDbg(const void *p, const char *, int); -#define cbdataInternalLock(a) cbdataInternalLockDbg(a,__FILE__,__LINE__) +#define cbdataInternalLock(a) cbdataInternalLockDbg(a,__FILE__,__LINE__) void cbdataInternalUnlockDbg(const void *p, const char *, int); -#define cbdataInternalUnlock(a) cbdataInternalUnlockDbg(a,__FILE__,__LINE__) +#define cbdataInternalUnlock(a) cbdataInternalUnlockDbg(a,__FILE__,__LINE__) int cbdataInternalReferenceDoneValidDbg(void **p, void **tp, const char *, int); #define cbdataReferenceValidDone(var, ptr) cbdataInternalReferenceDoneValidDbg((void **)&(var), (ptr), __FILE__,__LINE__) @@ -223,8 +223,8 @@ void cbdataInternalUnlock(const void *p); callback(..., cbdata); \endcode * - \param var The reference variable. Will be automatically cleared to NULL. - \param ptr A temporary pointer to the referenced data (if valid). + \param var The reference variable. Will be automatically cleared to NULL. + \param ptr A temporary pointer to the referenced data (if valid). */ int cbdataInternalReferenceDoneValid(void **p, void **tp); #define cbdataReferenceValidDone(var, ptr) cbdataInternalReferenceDoneValid((void **)&(var), (ptr)) @@ -232,10 +232,10 @@ int cbdataInternalReferenceDoneValid(void **p, void **tp); #endif /* !CBDATA_DEBUG */ /** - * \param p A cbdata entry reference pointer. + * \param p A cbdata entry reference pointer. * - * \retval 0 A reference is stale. The pointer refers to a entry freed by cbdataFree(). - * \retval true The reference is valid and active. + * \retval 0 A reference is stale. The pointer refers to a entry freed by cbdataFree(). + * \retval true The reference is valid and active. */ int cbdataReferenceValid(const void *p); @@ -246,20 +246,20 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, * This needs to be defined FIRST in the class definition. * It plays with private/public states in C++. */ -#define CBDATA_CLASS(type) \ - public: \ - void *operator new(size_t size) { \ - assert(size == sizeof(type)); \ - if (!CBDATA_##type) \ +#define CBDATA_CLASS(type) \ + public: \ + void *operator new(size_t size) { \ + assert(size == sizeof(type)); \ + if (!CBDATA_##type) \ CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), NULL); \ - return (type *)cbdataInternalAlloc(CBDATA_##type,__FILE__,__LINE__); \ - } \ - void operator delete (void *address) { \ - if (address) cbdataInternalFree(address,__FILE__,__LINE__);\ - } \ + return (type *)cbdataInternalAlloc(CBDATA_##type,__FILE__,__LINE__); \ + } \ + void operator delete (void *address) { \ + if (address) cbdataInternalFree(address,__FILE__,__LINE__);\ + } \ void *toCbdata() { return this; } \ - private: \ - static cbdata_type CBDATA_##type; + private: \ + static cbdata_type CBDATA_##type; /** \par @@ -273,13 +273,13 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, * is quite different. It is best if the reference is thought of * and handled as a "void *". */ -#define cbdataReference(var) (cbdataInternalLock(var), var) +#define cbdataReference(var) (cbdataInternalLock(var), var) /** \ingroup CBDATAAPI * Removes a reference created by cbdataReference(). * - \param var The reference variable. Will be automatically cleared to NULL. + \param var The reference variable. Will be automatically cleared to NULL. */ #define cbdataReferenceDone(var) do {if (var) {cbdataInternalUnlock(var); var = NULL;}} while(0) @@ -296,7 +296,7 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, * restrictions on scope. * \deprecated Use CBDATA_CLASS() instead */ -#define CBDATA_TYPE(type) static cbdata_type CBDATA_##type = CBDATA_UNKNOWN +#define CBDATA_TYPE(type) static cbdata_type CBDATA_##type = CBDATA_UNKNOWN /** \ingroup CBDATAAPI @@ -306,8 +306,8 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, \par * Alternative to CBDATA_INIT_TYPE() * - \param type Type being initialized - \param free_func The freehandler called when the last known reference to an allocated entry goes away. + \param type Type being initialized + \param free_func The freehandler called when the last known reference to an allocated entry goes away. */ #define CBDATA_INIT_TYPE_FREECB(type, free_func) do { if (!CBDATA_##type) CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), free_func); } while (false) @@ -317,11 +317,11 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, \par * Alternative to CBDATA_INIT_TYPE_FREECB() * - \param type Type being initialized + \param type Type being initialized * * \deprecated Use CBDATA_CLASS() instead */ -#define CBDATA_INIT_TYPE(type) CBDATA_INIT_TYPE_FREECB(type, NULL) +#define CBDATA_INIT_TYPE(type) CBDATA_INIT_TYPE_FREECB(type, NULL) /** \ingroup CBDATA @@ -354,3 +354,4 @@ public: }; #endif /* SQUID_CBDATA_H */ + diff --git a/src/cf_gen.cc b/src/cf_gen.cc index f014d77494..fa629653df 100644 --- a/src/cf_gen.cc +++ b/src/cf_gen.cc @@ -9,18 +9,18 @@ /* DEBUG: none Generate squid.conf.default and cf_parser.cci */ /***************************************************************************** - * Abstract: This program parses the input file and generates code and - * files used to configure the variables in squid. - * (ie it creates the squid.conf.default file from the cf.data file) + * Abstract: This program parses the input file and generates code and + * files used to configure the variables in squid. + * (ie it creates the squid.conf.default file from the cf.data file) * - * The output files are as follows: - * cf_parser.cci - this file contains, default_all() which - * initializes variables with the default - * values, parse_line() that parses line from - * squid.conf.default, dump_config that dumps the - * current the values of the variables. - * squid.conf.default - default configuration file given to the server - * administrator. + * The output files are as follows: + * cf_parser.cci - this file contains, default_all() which + * initializes variables with the default + * values, parse_line() that parses line from + * squid.conf.default, dump_config that dumps the + * current the values of the variables. + * squid.conf.default - default configuration file given to the server + * administrator. *****************************************************************************/ /* @@ -44,11 +44,11 @@ _FILE_OFFSET_BITS==64 #include "cf_gen_defines.cci" -#define MAX_LINE 1024 /* longest configuration line */ -#define _PATH_PARSER "cf_parser.cci" -#define _PATH_SQUID_CONF "squid.conf.documented" -#define _PATH_SQUID_CONF_SHORT "squid.conf.default" -#define _PATH_CF_DEPEND "cf.data.depend" +#define MAX_LINE 1024 /* longest configuration line */ +#define _PATH_PARSER "cf_parser.cci" +#define _PATH_SQUID_CONF "squid.conf.documented" +#define _PATH_SQUID_CONF_SHORT "squid.conf.default" +#define _PATH_CF_DEPEND "cf.data.depend" enum State { sSTART, @@ -88,9 +88,9 @@ class Entry { public: Entry(const char *str) : - name(str), alias(),type(), loc(), - defaults(), comment(), ifdef(), doc(), nocomment(), - array_flag(0) {} + name(str), alias(),type(), loc(), + defaults(), comment(), ifdef(), doc(), nocomment(), + array_flag(0) {} ~Entry() {} std::string name; @@ -393,7 +393,7 @@ main(int argc, char *argv[]) break; case sEXIT: - assert(0); /* should never get here */ + assert(0); /* should never get here */ break; } @@ -424,13 +424,13 @@ main(int argc, char *argv[]) } fout << "/*\n" << - " * Generated automatically from " << input_filename << " by " << - argv[0] << "\n" - " *\n" - " * Abstract: This file contains routines used to configure the\n" - " * variables in the squid server.\n" - " */\n" - "\n"; + " * Generated automatically from " << input_filename << " by " << + argv[0] << "\n" + " *\n" + " * Abstract: This file contains routines used to configure the\n" + " * variables in the squid server.\n" + " */\n" + "\n"; rc = gen_default(entries, fout); @@ -475,19 +475,19 @@ gen_default(const EntryList &head, std::ostream &fout) { int rc = 0; fout << "static void" << std::endl << - "default_line(const char *s)" << std::endl << - "{" << std::endl << - " LOCAL_ARRAY(char, tmp_line, BUFSIZ);" << std::endl << - " xstrncpy(tmp_line, s, BUFSIZ);" << std::endl << - " xstrncpy(config_input_line, s, BUFSIZ);" << std::endl << - " config_lineno++;" << std::endl << - " parse_line(tmp_line);" << std::endl << - "}" << std::endl << std::endl; + "default_line(const char *s)" << std::endl << + "{" << std::endl << + " LOCAL_ARRAY(char, tmp_line, BUFSIZ);" << std::endl << + " xstrncpy(tmp_line, s, BUFSIZ);" << std::endl << + " xstrncpy(config_input_line, s, BUFSIZ);" << std::endl << + " config_lineno++;" << std::endl << + " parse_line(tmp_line);" << std::endl << + "}" << std::endl << std::endl; fout << "static void" << std::endl << - "default_all(void)" << std::endl << - "{" << std::endl << - " cfg_filename = \"Default Configuration\";" << std::endl << - " config_lineno = 0;" << std::endl; + "default_all(void)" << std::endl << + "{" << std::endl << + " cfg_filename = \"Default Configuration\";" << std::endl << + " config_lineno = 0;" << std::endl; for (EntryList::const_iterator entry = head.begin(); entry != head.end(); ++entry) { assert(entry->name.size()); @@ -526,7 +526,7 @@ gen_default(const EntryList &head, std::ostream &fout) } fout << " cfg_filename = NULL;" << std::endl << - "}" << std::endl << std::endl; + "}" << std::endl << std::endl; return rc; } @@ -534,10 +534,10 @@ static void gen_default_if_none(const EntryList &head, std::ostream &fout) { fout << "static void" << std::endl << - "defaults_if_none(void)" << std::endl << - "{" << std::endl << - " cfg_filename = \"Default Configuration (if absent)\";" << std::endl << - " config_lineno = 0;" << std::endl; + "defaults_if_none(void)" << std::endl << + "{" << std::endl << + " cfg_filename = \"Default Configuration (if absent)\";" << std::endl << + " config_lineno = 0;" << std::endl; for (EntryList::const_iterator entry = head.begin(); entry != head.end(); ++entry) { assert(entry->name.size()); @@ -566,7 +566,7 @@ gen_default_if_none(const EntryList &head, std::ostream &fout) } fout << " cfg_filename = NULL;" << std::endl << - "}" << std::endl << std::endl; + "}" << std::endl << std::endl; } /// append configuration options specified by POSTSCRIPTUM lines @@ -574,10 +574,10 @@ static void gen_default_postscriptum(const EntryList &head, std::ostream &fout) { fout << "static void" << std::endl << - "defaults_postscriptum(void)" << std::endl << - "{" << std::endl << - " cfg_filename = \"Default Configuration (postscriptum)\";" << std::endl << - " config_lineno = 0;" << std::endl; + "defaults_postscriptum(void)" << std::endl << + "{" << std::endl << + " cfg_filename = \"Default Configuration (postscriptum)\";" << std::endl << + " config_lineno = 0;" << std::endl; for (EntryList::const_iterator entry = head.begin(); entry != head.end(); ++entry) { assert(entry->name.size()); @@ -599,7 +599,7 @@ gen_default_postscriptum(const EntryList &head, std::ostream &fout) } fout << " cfg_filename = NULL;" << std::endl << - "}" << std::endl << std::endl; + "}" << std::endl << std::endl; } void @@ -626,9 +626,9 @@ Entry::genParseAlias(const std::string &aName, std::ostream &fout) const fout << " cfg_directive = NULL;" << std::endl; if (ifdef.size()) { fout << - "#else" << std::endl << - " debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), \"ERROR: '" << name << "' requires " << available_if(ifdef) << "\");" << std::endl << - "#endif" << std::endl; + "#else" << std::endl << + " debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), \"ERROR: '" << name << "' requires " << available_if(ifdef) << "\");" << std::endl << + "#endif" << std::endl; } fout << " return 1;" << std::endl; fout << " };" << std::endl; @@ -653,19 +653,19 @@ static void gen_parse(const EntryList &head, std::ostream &fout) { fout << - "static int\n" - "parse_line(char *buff)\n" - "{\n" - "\tchar\t*token;\n" - "\tif ((token = strtok(buff, w_space)) == NULL) \n" - "\t\treturn 1;\t/* ignore empty lines */\n" - "\tConfigParser::SetCfgLine(strtok(NULL, \"\"));\n"; + "static int\n" + "parse_line(char *buff)\n" + "{\n" + "\tchar\t*token;\n" + "\tif ((token = strtok(buff, w_space)) == NULL) \n" + "\t\treturn 1;\t/* ignore empty lines */\n" + "\tConfigParser::SetCfgLine(strtok(NULL, \"\"));\n"; for (EntryList::const_iterator e = head.begin(); e != head.end(); ++e) e->genParse(fout); fout << "\treturn 0; /* failure */\n" - "}\n\n"; + "}\n\n"; } @@ -673,10 +673,10 @@ static void gen_dump(const EntryList &head, std::ostream &fout) { fout << - "static void" << std::endl << - "dump_config(StoreEntry *entry)" << std::endl << - "{" << std::endl << - " debugs(5, 4, HERE);" << std::endl; + "static void" << std::endl << + "dump_config(StoreEntry *entry)" << std::endl << + "{" << std::endl << + " debugs(5, 4, HERE);" << std::endl; for (EntryList::const_iterator e = head.begin(); e != head.end(); ++e) { @@ -702,10 +702,10 @@ static void gen_free(const EntryList &head, std::ostream &fout) { fout << - "static void" << std::endl << - "free_all(void)" << std::endl << - "{" << std::endl << - " debugs(5, 4, HERE);" << std::endl; + "static void" << std::endl << + "free_all(void)" << std::endl << + "{" << std::endl << + " debugs(5, 4, HERE);" << std::endl; for (EntryList::const_iterator e = head.begin(); e != head.end(); ++e) { if (!e->loc.size() || e->loc.compare("none") == 0) @@ -779,8 +779,8 @@ gen_conf(const EntryList &head, std::ostream &fout, bool verbose_output) if (!isDefined(entry->ifdef)) { if (verbose_output) { fout << "# Note: This option is only available if Squid is rebuilt with the" << std::endl << - "# " << available_if(entry->ifdef) << std::endl << - "#" << std::endl; + "# " << available_if(entry->ifdef) << std::endl << + "#" << std::endl; } enabled = 0; } @@ -860,3 +860,4 @@ gen_quote_escape(const std::string &var) return esc.c_str(); } + diff --git a/src/clientStream.cc b/src/clientStream.cc index 1b28317d45..c933b86ace 100644 --- a/src/clientStream.cc +++ b/src/clientStream.cc @@ -167,9 +167,9 @@ clientStreamCallback(clientStreamNode * thisObject, ClientHttpRequest * http, \ingroup ClientStreamInternal * Call the previous node in the chain to read some data * - \param thisObject ?? - \param http ?? - \param readBuffer ?? + \param thisObject ?? + \param http ?? + \param readBuffer ?? */ void clientStreamRead(clientStreamNode * thisObject, ClientHttpRequest * http, @@ -190,8 +190,8 @@ clientStreamRead(clientStreamNode * thisObject, ClientHttpRequest * http, \ingroup ClientStreamInternal * Detach from the stream - only allowed for terminal members * - \param thisObject ?? - \param http ?? + \param thisObject ?? + \param http ?? */ void clientStreamDetach(clientStreamNode * thisObject, ClientHttpRequest * http) @@ -233,8 +233,8 @@ clientStreamDetach(clientStreamNode * thisObject, ClientHttpRequest * http) \ingroup ClientStreamInternal * Abort the stream - detach every node in the pipeline. * - \param thisObject ?? - \param http ?? + \param thisObject ?? + \param http ?? */ void clientStreamAbort(clientStreamNode * thisObject, ClientHttpRequest * http) @@ -255,8 +255,8 @@ clientStreamAbort(clientStreamNode * thisObject, ClientHttpRequest * http) \ingroup ClientStreamInternal * Call the upstream node to find it's status * - \param thisObject ?? - \param http ?? + \param thisObject ?? + \param http ?? */ clientStream_status_t clientStreamStatus(clientStreamNode * thisObject, ClientHttpRequest * http) @@ -307,3 +307,4 @@ clientStreamNode::next() const else return NULL; } + diff --git a/src/clientStream.h b/src/clientStream.h index 66c926da6d..b20deef9a2 100644 --- a/src/clientStream.h +++ b/src/clientStream.h @@ -60,17 +60,17 @@ * \todo ClientStreams: These details should really be codified as a class which all ClientStream nodes inherit from. * - \par Each node must have: - \li read method - to allow loose coupling in the pipeline. (The reader may + \par Each node must have: + \li read method - to allow loose coupling in the pipeline. (The reader may therefore change if the pipeline is altered, even mid-flow). - \li callback method - likewise. - \li status method - likewise. - \li detach method - used to ensure all resources are cleaned up properly. - \li dlink head pointer - to allow list inserts and deletes from within a node. - \li context data - to allow the called back nodes to maintain their private information. - \li read request parameters - For two reasons: - \li To allow a node to determine the requested data offset, length and target buffer dynamically. Again, this is to promote loose coupling. - \li Because of the callback nature of squid, every node would have to keep these parameters in their context anyway, so this reduces programmer overhead. + \li callback method - likewise. + \li status method - likewise. + \li detach method - used to ensure all resources are cleaned up properly. + \li dlink head pointer - to allow list inserts and deletes from within a node. + \li context data - to allow the called back nodes to maintain their private information. + \li read request parameters - For two reasons: + \li To allow a node to determine the requested data offset, length and target buffer dynamically. Again, this is to promote loose coupling. + \li Because of the callback nature of squid, every node would have to keep these parameters in their context anyway, so this reduces programmer overhead. */ /// \ingroup ClientStreamAPI @@ -82,13 +82,13 @@ public: clientStreamNode *next() const; void removeFromStream(); dlink_node node; - dlink_list *head; /* sucks I know, but hey, the interface is limited */ + dlink_list *head; /* sucks I know, but hey, the interface is limited */ CSR *readfunc; CSCB *callback; - CSD *detach; /* tell this node the next one downstream wants no more data */ + CSD *detach; /* tell this node the next one downstream wants no more data */ CSS *status; - ClientStreamData data; /* Context for the node */ - StoreIOBuffer readBuffer; /* what, where and how much this node wants */ + ClientStreamData data; /* Context for the node */ + StoreIOBuffer readBuffer; /* what, where and how much this node wants */ }; /// \ingroup ClientStreamAPI @@ -107,11 +107,11 @@ clientStreamNode *clientStreamNew(CSR *, CSCB *, CSD *, CSS *, ClientStreamData) * Return data to the next node in the stream. * The data may be returned immediately, or may be delayed for a later scheduling cycle. * - \param thisObject 'this' reference for the client stream - \param http Superset of request data, being winnowed down over time. MUST NOT be NULL. - \param rep Not NULL on the first call back only. Ownership is passed down the pipeline. - Each node may alter the reply if appropriate. - \param replyBuffer - buffer, length - where and how much. + \param thisObject 'this' reference for the client stream + \param http Superset of request data, being winnowed down over time. MUST NOT be NULL. + \param rep Not NULL on the first call back only. Ownership is passed down the pipeline. + Each node may alter the reply if appropriate. + \param replyBuffer - buffer, length - where and how much. */ void clientStreamCallback(clientStreamNode *thisObject, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer replyBuffer); @@ -122,9 +122,9 @@ void clientStreamCallback(clientStreamNode *thisObject, ClientHttpRequest *http, * metainformation and (if appropriate) the offset,length and buffer * parameters. * - \param thisObject 'this' reference for the client stream - \param http Superset of request data, being winnowed down over time. MUST NOT be NULL. - \param readBuffer - offset, length, buffer - what, how much and where. + \param thisObject 'this' reference for the client stream + \param http Superset of request data, being winnowed down over time. MUST NOT be NULL. + \param readBuffer - offset, length, buffer - what, how much and where. */ void clientStreamRead(clientStreamNode *thisObject, ClientHttpRequest *http, StoreIOBuffer readBuffer); @@ -135,8 +135,8 @@ void clientStreamRead(clientStreamNode *thisObject, ClientHttpRequest *http, Sto * This node MUST have cleaned up all context data, UNLESS scheduled callbacks will take care of that. * Informs the prev node in the list of this nodes detachment. * - \param thisObject 'this' reference for the client stream - \param http MUST NOT be NULL. + \param thisObject 'this' reference for the client stream + \param http MUST NOT be NULL. */ void clientStreamDetach(clientStreamNode *thisObject, ClientHttpRequest *http); @@ -146,8 +146,8 @@ void clientStreamDetach(clientStreamNode *thisObject, ClientHttpRequest *http); * Detachs the tail of the stream. CURRENTLY DOES NOT clean up the tail node data - * this must be done separately. Thus Abort may ONLY be called by the tail node. * - \param thisObject 'this' reference for the client stream - \param http MUST NOT be NULL. + \param thisObject 'this' reference for the client stream + \param http MUST NOT be NULL. */ void clientStreamAbort(clientStreamNode *thisObject, ClientHttpRequest *http); @@ -155,14 +155,15 @@ void clientStreamAbort(clientStreamNode *thisObject, ClientHttpRequest *http); \ingroup ClientStreamAPI * * Allows nodes to query the upstream nodes for : - \li stream ABORTS - request cancelled for some reason. upstream will not accept further reads(). - \li stream COMPLETION - upstream has completed and will not accept further reads(). - \li stream UNPLANNED COMPLETION - upstream has completed, but not at a pre-planned location (used for keepalive checking), and will not accept further reads(). - \li stream NONE - no special status, further reads permitted. + \li stream ABORTS - request cancelled for some reason. upstream will not accept further reads(). + \li stream COMPLETION - upstream has completed and will not accept further reads(). + \li stream UNPLANNED COMPLETION - upstream has completed, but not at a pre-planned location (used for keepalive checking), and will not accept further reads(). + \li stream NONE - no special status, further reads permitted. * - \param thisObject 'this' reference for the client stream - \param http MUST NOT be NULL. + \param thisObject 'this' reference for the client stream + \param http MUST NOT be NULL. */ clientStream_status_t clientStreamStatus(clientStreamNode *thisObject, ClientHttpRequest *http); #endif /* SQUID_CLIENTSTREAM_H */ + diff --git a/src/clientStreamForward.h b/src/clientStreamForward.h index f449fab8ca..59c14fd85d 100644 --- a/src/clientStreamForward.h +++ b/src/clientStreamForward.h @@ -35,3 +35,4 @@ typedef void CSD(clientStreamNode *, ClientHttpRequest *); typedef clientStream_status_t CSS(clientStreamNode *, ClientHttpRequest *); #endif /* SQUID_CLIENTSTREAM_FORWARD_H */ + diff --git a/src/client_db.cc b/src/client_db.cc index a5aa55daf0..61bbc16415 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -572,3 +572,4 @@ snmp_meshCtblFn(variable_list * Var, snint * ErrP) } #endif /*SQUID_SNMP */ + diff --git a/src/client_db.h b/src/client_db.h index 4bb5a607d6..52e6a50514 100644 --- a/src/client_db.h +++ b/src/client_db.h @@ -40,3 +40,4 @@ Ip::Address *client_entry(Ip::Address *current); #endif #endif /* SQUID_CLIENT_DB_H_ */ + diff --git a/src/client_side.cc b/src/client_side.cc index 298828d42a..03139fc366 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -150,11 +150,11 @@ class ListeningStartedDialer: public CallDialer, public Ipc::StartListeningCb public: typedef void (*Handler)(AnyP::PortCfgPointer &portCfg, const Ipc::FdNoteId note, const Subscription::Pointer &sub); ListeningStartedDialer(Handler aHandler, AnyP::PortCfgPointer &aPortCfg, const Ipc::FdNoteId note, const Subscription::Pointer &aSub): - handler(aHandler), portCfg(aPortCfg), portTypeNote(note), sub(aSub) {} + handler(aHandler), portCfg(aPortCfg), portTypeNote(note), sub(aSub) {} virtual void print(std::ostream &os) const { startPrint(os) << - ", " << FdNote(portTypeNote) << " port=" << (void*)&portCfg << ')'; + ", " << FdNote(portTypeNote) << " port=" << (void*)&portCfg << ')'; } virtual bool canDial(AsyncCall &) const { return true; } @@ -316,13 +316,13 @@ ClientSocketContext::connIsFinished() } ClientSocketContext::ClientSocketContext(const Comm::ConnectionPointer &aConn, ClientHttpRequest *aReq) : - clientConnection(aConn), - http(aReq), - reply(NULL), - next(NULL), - writtenToSocket(0), - mayUseConnection_ (false), - connRegistered_ (false) + clientConnection(aConn), + http(aReq), + reply(NULL), + next(NULL), + writtenToSocket(0), + mayUseConnection_ (false), + connRegistered_ (false) { assert(http != NULL); memset (reqbuf, '\0', sizeof (reqbuf)); @@ -817,7 +817,7 @@ ConnStateData::swanSong() { debugs(33, 2, HERE << clientConnection); flags.readMore = false; - clientdbEstablished(clientConnection->remote, -1); /* decrement */ + clientdbEstablished(clientConnection->remote, -1); /* decrement */ assert(areAllContextsForThisConnection()); freeAllContexts(); @@ -903,7 +903,7 @@ clientIsRequestBodyTooLargeForPolicy(int64_t bodyLength) { if (Config.maxRequestBodySize && bodyLength > Config.maxRequestBodySize) - return 1; /* too large */ + return 1; /* too large */ return 0; } @@ -1113,9 +1113,9 @@ ClientSocketContext::packRange(StoreIOBuffer const &source, MemBuf * mb) if (http->multipartRangeRequest() && i->debt() == i->currentSpec()->length) { assert(http->memObject()); clientPackRangeHdr( - http->memObject()->getReply(), /* original reply */ - i->currentSpec(), /* current range */ - i->boundary, /* boundary, the same for all */ + http->memObject()->getReply(), /* original reply */ + i->currentSpec(), /* current range */ + i->boundary, /* boundary, the same for all */ mb); } @@ -1229,11 +1229,11 @@ clientIfRangeMatch(ClientHttpRequest * http, HttpReply * rep) (rep_tag.str ? rep_tag.str : "")); if (!rep_tag.str) - return 0; /* entity has no etag to compare with! */ + return 0; /* entity has no etag to compare with! */ if (spec.tag.weak || rep_tag.weak) { debugs(33, DBG_IMPORTANT, "clientIfRangeMatch: Weak ETags are not allowed in If-Range: " << spec.tag.str << " ? " << rep_tag.str); - return 0; /* must use strong validator for sub-range requests */ + return 0; /* must use strong validator for sub-range requests */ } return etagIsStrongEqual(rep_tag, spec.tag); @@ -1244,7 +1244,7 @@ clientIfRangeMatch(ClientHttpRequest * http, HttpReply * rep) return http->storeEntry()->lastmod <= spec.time; } - assert(0); /* should not happen */ + assert(0); /* should not happen */ return 0; } @@ -1283,7 +1283,7 @@ ClientSocketContext::buildRangeHeader(HttpReply * rep) else if (rep->content_length < 0) range_err = "unknown length"; else if (rep->content_length != http->memObject()->getReply()->content_length) - range_err = "INCONSISTENT length"; /* a bug? */ + range_err = "INCONSISTENT length"; /* a bug? */ /* hits only - upstream CachePeer determines correct behaviour on misses, and client_side_reply determines * hits candidates @@ -1678,7 +1678,7 @@ ClientSocketContext::getNextRangeOffset() const /* filter out data according to range specs */ assert (canPackMoreRanges()); { - int64_t start; /* offset of still missing data */ + int64_t start; /* offset of still missing data */ assert(http->range_iter.currentSpec()); start = http->range_iter.currentSpec()->offset + http->range_iter.currentSpec()->length - http->range_iter.debt(); debugs(33, 3, "clientPackMoreRanges: in: offset: " << http->out.offset); @@ -1690,7 +1690,7 @@ ClientSocketContext::getNextRangeOffset() const " len: " << http->range_iter.currentSpec()->length << " debt: " << http->range_iter.debt()); if (http->range_iter.currentSpec()->length != -1) - assert(http->out.offset <= start); /* we did not miss it */ + assert(http->out.offset <= start); /* we did not miss it */ return start; } @@ -2027,7 +2027,7 @@ prepareAcceleratedURL(ConnStateData * conn, ClientHttpRequest *http, const Http1 // skip the authority segment // RFC 3986 complex nested ABNF for "authority" boils down to this: static const CharacterSet authority = CharacterSet("authority","-._~%:@[]!$&'()*+,;=") + - CharacterSet::HEXDIG + CharacterSet::ALPHA + CharacterSet::DIGIT; + CharacterSet::HEXDIG + CharacterSet::ALPHA + CharacterSet::DIGIT; if (!tok.skipAll(authority)) break; @@ -2080,7 +2080,7 @@ prepareAcceleratedURL(ConnStateData * conn, ClientHttpRequest *http, const Http1 } else if (conn->port->defaultsite /* && !vhost */) { debugs(33, 5, "ACCEL DEFAULTSITE REWRITE: defaultsite=" << conn->port->defaultsite << " + vport=" << vport); const int url_sz = hp->requestUri().length() + 32 + Config.appendDomainLen + - strlen(conn->port->defaultsite); + strlen(conn->port->defaultsite); http->uri = (char *)xcalloc(url_sz, 1); char vportStr[32]; vportStr[0] = '\0'; @@ -2114,10 +2114,10 @@ prepareTransparentURL(ConnStateData * conn, ClientHttpRequest *http, const Http1 if (const char *host = hp->getHeaderField("Host")) { const int url_sz = hp->requestUri().length() + 32 + Config.appendDomainLen + - strlen(host); + strlen(host); http->uri = (char *)xcalloc(url_sz, 1); snprintf(http->uri, url_sz, "%s://%s" SQUIDSBUFPH, - AnyP::UriScheme(conn->transferProtocol.protocol).c_str(), host, SQUIDSBUFPRINT(hp->requestUri())); + AnyP::UriScheme(conn->transferProtocol.protocol).c_str(), host, SQUIDSBUFPRINT(hp->requestUri())); debugs(33, 5, "TRANSPARENT HOST REWRITE: " << http->uri); } else { /* Put the local socket IP address as the hostname. */ @@ -3095,7 +3095,7 @@ ConnStateData::clientReadRequest(const CommIoCbParams &io) /* Continue to process previously read data */ break; - // case Comm::COMM_ERROR: + // case Comm::COMM_ERROR: default: // no other flags should ever occur debugs(33, 2, io.conn << ": got flag " << rd.flag << "; " << xstrerr(rd.xerrno)); notifyAllContexts(rd.xerrno); @@ -3312,19 +3312,19 @@ clientLifetimeTimeout(const CommTimeoutCbParams &io) } ConnStateData::ConnStateData(const MasterXaction::Pointer &xact) : - AsyncJob("ConnStateData"), // kids overwrite - nrequests(0), + AsyncJob("ConnStateData"), // kids overwrite + nrequests(0), #if USE_OPENSSL - sslBumpMode(Ssl::bumpEnd), + sslBumpMode(Ssl::bumpEnd), #endif - needProxyProtocolHeader_(false), + needProxyProtocolHeader_(false), #if USE_OPENSSL - switchedToHttps_(false), - sslServerBump(NULL), - signAlgorithm(Ssl::algSignTrusted), + switchedToHttps_(false), + sslServerBump(NULL), + signAlgorithm(Ssl::algSignTrusted), #endif - stoppedSending_(NULL), - stoppedReceiving_(NULL) + stoppedSending_(NULL), + stoppedReceiving_(NULL) { flags.readMore = true; // kids may overwrite flags.swanSang = false; @@ -4376,7 +4376,7 @@ clientHttpsConnectionsOpen(void) AsyncCall::Pointer listenCall = asyncCall(33, 2, "clientListenerConnectionOpened", ListeningStartedDialer(&clientListenerConnectionOpened, - s, Ipc::fdnHttpsSocket, sub)); + s, Ipc::fdnHttpsSocket, sub)); Ipc::StartListening(SOCK_STREAM, IPPROTO_TCP, s->listenConn, Ipc::fdnHttpsSocket, listenCall); HttpSockets[NHttpSockets] = -1; ++NHttpSockets; @@ -4669,8 +4669,8 @@ ConnStateData::finishDechunkingRequest(bool withSuccess) } ConnStateData::In::In() : - bodyParser(NULL), - buf() + bodyParser(NULL), + buf() {} ConnStateData::In::~In() @@ -4880,3 +4880,4 @@ ConnStateData::unpinConnection(const bool andClose) /* NOTE: pinning.pinned should be kept. This combined with fd == -1 at the end of a request indicates that the host * connection has gone away */ } + diff --git a/src/client_side.h b/src/client_side.h index 590d8dec18..8cff942c5c 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -78,7 +78,7 @@ public: void keepaliveNextRequest(); Comm::ConnectionPointer clientConnection; /// details about the client connection socket. - ClientHttpRequest *http; /* we pretend to own that job */ + ClientHttpRequest *http; /* we pretend to own that job */ HttpReply *reply; char reqbuf[HTTP_REQBUF_SZ]; Pointer next; @@ -504,3 +504,4 @@ void clientProcessRequest(ConnStateData *, const Http1::RequestParserPointer &, void clientPostHttpsAccept(ConnStateData *); #endif /* SQUID_CLIENTSIDE_H */ + diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index c81b4d5bde..c18e01399c 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1194,7 +1194,7 @@ clientReplyContext::replyStatus() if (http->storeEntry() == NULL) { debugs(88, 5, "clientReplyStatus: no storeEntry"); - return STREAM_FAILED; /* yuck, but what can we do? */ + return STREAM_FAILED; /* yuck, but what can we do? */ } if (EBIT_TEST(http->storeEntry()->flags, ENTRY_ABORTED)) { @@ -2252,3 +2252,4 @@ clientBuildError(err_type page_id, Http::StatusCode status, char const *url, return err; } + diff --git a/src/client_side_reply.h b/src/client_side_reply.h index b1c7d80720..ccec85d6df 100644 --- a/src/client_side_reply.h +++ b/src/client_side_reply.h @@ -78,25 +78,25 @@ public: ClientHttpRequest *http; int headers_sz; - store_client *sc; /* The store_client we're using */ - StoreIOBuffer tempBuffer; /* For use in validating requests via IMS */ - int old_reqsize; /* ... again, for the buffer */ + store_client *sc; /* The store_client we're using */ + StoreIOBuffer tempBuffer; /* For use in validating requests via IMS */ + int old_reqsize; /* ... again, for the buffer */ size_t reqsize; size_t reqofs; - char tempbuf[HTTP_REQBUF_SZ]; /* a temporary buffer if we need working storage */ + char tempbuf[HTTP_REQBUF_SZ]; /* a temporary buffer if we need working storage */ #if USE_CACHE_DIGESTS - const char *lookup_type; /* temporary hack: storeGet() result: HIT/MISS/NONE */ + const char *lookup_type; /* temporary hack: storeGet() result: HIT/MISS/NONE */ #endif struct { unsigned storelogiccomplete:1; - unsigned complete:1; /* we have read all we can from upstream */ + unsigned complete:1; /* we have read all we can from upstream */ bool headersSent; } flags; - clientStreamNode *ourNode; /* This will go away if/when this file gets refactored some more */ + clientStreamNode *ourNode; /* This will go away if/when this file gets refactored some more */ private: clientStreamNode *getNextNode() const; @@ -131,8 +131,9 @@ private: void sendNotModifiedOrPreconditionFailedError(); StoreEntry *old_entry; - store_client *old_sc; /* ... for entry to be validated */ + store_client *old_sc; /* ... for entry to be validated */ bool deleting; }; #endif /* SQUID_CLIENTSIDEREPLY_H */ + diff --git a/src/client_side_request.cc b/src/client_side_request.cc index ff136c0ce9..999e2db20f 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -133,9 +133,9 @@ CBDATA_CLASS_INIT(ClientHttpRequest); ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) : #if USE_ADAPTATION - AsyncJob("ClientHttpRequest"), + AsyncJob("ClientHttpRequest"), #endif - loggingEntry_(NULL) + loggingEntry_(NULL) { setConn(aConn); al = new AccessLogEntry; @@ -237,7 +237,7 @@ checkFailureRatio(err_type etype, hier_code hcode) hit_only_mode_until = squid_curtime + FAILURE_MODE_TIME; - request_failure_ratio = 0.8; /* reset to something less than 1.0 */ + request_failure_ratio = 0.8; /* reset to something less than 1.0 */ } ClientHttpRequest::~ClientHttpRequest() @@ -363,7 +363,7 @@ clientBeginRequest(const HttpRequestMethod& method, char const *url, CSCB * stre request->indirect_client_addr.setNoAddr(); #endif /* FOLLOW_X_FORWARDED_FOR */ - request->my_addr.setNoAddr(); /* undefined for internal requests */ + request->my_addr.setNoAddr(); /* undefined for internal requests */ request->my_addr.port(0); @@ -1345,7 +1345,7 @@ ClientRequestContext::clientStoreIdDone(const Helper::Reply &reply) break; case Helper::TimedOut: - // Timeouts for storeID are not implemented + // Timeouts for storeID are not implemented case Helper::BrokenHelper: debugs(85, DBG_IMPORTANT, "ERROR: storeID helper: " << reply); break; @@ -1571,7 +1571,7 @@ ClientHttpRequest::sslBumpStart() getConn()->sslBumpMode = sslBumpNeed_; AsyncCall::Pointer bumpCall = commCbCall(85, 5, "ClientSocketContext::sslBumpEstablish", - CommIoCbPtrFun(&SslBumpEstablish, this)); + CommIoCbPtrFun(&SslBumpEstablish, this)); if (request->flags.interceptTproxy || request->flags.intercepted) { CommIoCbParams ¶ms = GetCommParams(bumpCall); @@ -1856,7 +1856,7 @@ ClientHttpRequest::startAdaptation(const Adaptation::ServiceGroupPointer &g) void ClientHttpRequest::noteAdaptationAnswer(const Adaptation::Answer &answer) { - assert(cbdataReferenceValid(this)); // indicates bug + assert(cbdataReferenceValid(this)); // indicates bug clearAdaptation(virginHeadSource); assert(!adaptedBodySource); diff --git a/src/client_side_request.cci b/src/client_side_request.cci index 70c5c9fdfa..468766ca47 100644 --- a/src/client_side_request.cci +++ b/src/client_side_request.cci @@ -50,3 +50,4 @@ ClientHttpRequest::loggingEntry() const { return loggingEntry_; } + diff --git a/src/client_side_request.h b/src/client_side_request.h index 0b621fd28c..80a8523961 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -31,8 +31,8 @@ int clientBeginRequest(const HttpRequestMethod&, char const *, CSCB *, CSD *, Cl class ClientHttpRequest #if USE_ADAPTATION - : public Adaptation::Initiator, // to start adaptation transactions - public BodyConsumer // to receive reply bodies in request satisf. mode + : public Adaptation::Initiator, // to start adaptation transactions + public BodyConsumer // to receive reply bodies in request satisf. mode #endif { CBDATA_CLASS(ClientHttpRequest); @@ -67,7 +67,7 @@ public: */ Comm::ConnectionPointer clientConnection; - HttpRequest *request; /* Parsed URL ... */ + HttpRequest *request; /* Parsed URL ... */ char *uri; char *log_uri; String store_id; /* StoreID for transactions where the request member is nil */ @@ -78,8 +78,8 @@ public: size_t headers_sz; } out; - HttpHdrRangeIter range_iter; /* data for iterating thru range specs */ - size_t req_sz; /* raw request size on input, not current request size */ + HttpHdrRangeIter range_iter; /* data for iterating thru range specs */ + size_t req_sz; /* raw request size on input, not current request size */ /// the processing tags associated with this request transaction. // NP: still an enum so each stage altering it must take care when replacing it. @@ -146,7 +146,7 @@ public: void startAdaptation(const Adaptation::ServiceGroupPointer &g); private: - /// Handles an adaptation client request failure. + /// Handles an adaptation client request failure. /// Bypasses the error if possible, or build an error reply. void handleAdaptationFailure(int errDetail, bool bypassable = false); @@ -190,3 +190,4 @@ void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntry::Po #endif #endif /* SQUID_CLIENTSIDEREQUEST_H */ + diff --git a/src/clients/Client.cc b/src/clients/Client.cc index d09833ca28..85faaef5bc 100644 --- a/src/clients/Client.cc +++ b/src/clients/Client.cc @@ -38,19 +38,19 @@ void purgeEntriesByUrl(HttpRequest * req, const char *url); Client::Client(FwdState *theFwdState): AsyncJob("Client"), - completed(false), - currentOffset(0), - responseBodyBuffer(NULL), - fwd(theFwdState), - requestSender(NULL), + completed(false), + currentOffset(0), + responseBodyBuffer(NULL), + fwd(theFwdState), + requestSender(NULL), #if USE_ADAPTATION - adaptedHeadSource(NULL), - adaptationAccessCheckPending(false), - startedAdaptation(false), + adaptedHeadSource(NULL), + adaptationAccessCheckPending(false), + startedAdaptation(false), #endif - receivedWholeRequestBody(false), - theVirginReply(NULL), - theFinalReply(NULL) + receivedWholeRequestBody(false), + theVirginReply(NULL), + theFinalReply(NULL) { entry = fwd->entry; entry->lock("Client"); @@ -974,7 +974,7 @@ Client::storeReplyBody(const char *data, ssize_t len) } size_t Client::replyBodySpace(const MemBuf &readBuf, - const size_t minSpace) const + const size_t minSpace) const { size_t space = readBuf.spaceSize(); // available space w/o heroic measures if (space < minSpace) { @@ -984,7 +984,7 @@ size_t Client::replyBodySpace(const MemBuf &readBuf, #if USE_ADAPTATION if (responseBodyBuffer) { - return 0; // Stop reading if already overflowed waiting for ICAP to catch up + return 0; // Stop reading if already overflowed waiting for ICAP to catch up } if (virginBodyDestination != NULL) { @@ -1013,3 +1013,4 @@ size_t Client::replyBodySpace(const MemBuf &readBuf, return space; } + diff --git a/src/clients/Client.h b/src/clients/Client.h index 40c508e9b7..edf52143e0 100644 --- a/src/clients/Client.h +++ b/src/clients/Client.h @@ -30,10 +30,10 @@ class HttpReply; */ class Client: #if USE_ADAPTATION - public Adaptation::Initiator, - public BodyProducer, + public Adaptation::Initiator, + public BodyProducer, #endif - public BodyConsumer + public BodyConsumer { public: @@ -148,8 +148,8 @@ protected: void adjustBodyBytesRead(const int64_t delta); // These should be private - int64_t currentOffset; /**< Our current offset in the StoreEntry */ - MemBuf *responseBodyBuffer; /**< Data temporarily buffered for ICAP */ + int64_t currentOffset; /**< Our current offset in the StoreEntry */ + MemBuf *responseBodyBuffer; /**< Data temporarily buffered for ICAP */ public: // should not be StoreEntry *entry; @@ -179,3 +179,4 @@ private: }; #endif /* SQUID_SRC_CLIENTS_CLIENT_H */ + diff --git a/src/clients/FtpClient.cc b/src/clients/FtpClient.cc index 75e8372f73..4d812541b3 100644 --- a/src/clients/FtpClient.cc +++ b/src/clients/FtpClient.cc @@ -113,13 +113,13 @@ Ftp::Channel::clear() /* Ftp::CtrlChannel */ Ftp::CtrlChannel::CtrlChannel(): - buf(NULL), - size(0), - offset(0), - message(NULL), - last_command(NULL), - last_reply(NULL), - replycode(0) + buf(NULL), + size(0), + offset(0), + message(NULL), + last_command(NULL), + last_reply(NULL), + replycode(0) { buf = static_cast(memAllocBuf(4096, &size)); } @@ -136,10 +136,10 @@ Ftp::CtrlChannel::~CtrlChannel() /* Ftp::DataChannel */ Ftp::DataChannel::DataChannel(): - readBuf(NULL), - host(NULL), - port(0), - read_pending(false) + readBuf(NULL), + host(NULL), + port(0), + read_pending(false) { } @@ -161,14 +161,14 @@ Ftp::DataChannel::addr(const Ip::Address &import) /* Ftp::Client */ Ftp::Client::Client(FwdState *fwdState): - AsyncJob("Ftp::Client"), - ::Client(fwdState), - ctrl(), - data(), - state(BEGIN), - old_request(NULL), - old_reply(NULL), - shortenReadTimeout(false) + AsyncJob("Ftp::Client"), + ::Client(fwdState), + ctrl(), + data(), + state(BEGIN), + old_request(NULL), + old_reply(NULL), + shortenReadTimeout(false) { ++statCounter.server.all.requests; ++statCounter.server.ftp.requests; @@ -651,7 +651,7 @@ Ftp::Client::sendPassive() state = SENT_EPSV_2; break; } - // else fall through to skip EPSV 2 + // else fall through to skip EPSV 2 case SENT_EPSV_2: /* EPSV IPv6 failed. Try EPSV IPv4 */ if (ctrl.conn->local.isIPv4()) { @@ -664,7 +664,7 @@ Ftp::Client::sendPassive() failed(ERR_FTP_FAILURE, 0); return false; } - // else fall through to skip EPSV 1 + // else fall through to skip EPSV 1 case SENT_EPSV_1: /* EPSV options exhausted. Try PASV now. */ debugs(9, 5, "FTP Channel (" << ctrl.conn->remote << ") rejects EPSV connection attempts. Trying PASV instead."); @@ -1128,3 +1128,4 @@ Ftp::Client::parseControlReply(size_t &bytesUsed) } }; // namespace Ftp + diff --git a/src/clients/FtpClient.h b/src/clients/FtpClient.h index 453cc5d07f..944e1461e4 100644 --- a/src/clients/FtpClient.h +++ b/src/clients/FtpClient.h @@ -196,3 +196,4 @@ private: } // namespace Ftp #endif /* SQUID_FTP_CLIENT_H */ + diff --git a/src/clients/FtpGateway.cc b/src/clients/FtpGateway.cc index c91ae56e0a..266c69143a 100644 --- a/src/clients/FtpGateway.cc +++ b/src/clients/FtpGateway.cc @@ -118,7 +118,7 @@ public: String cwd_message; char *old_filepath; char typecode; - MemBuf listing; ///< FTP directory listing in HTML format. + MemBuf listing; ///< FTP directory listing in HTML format. GatewayFlags flags; @@ -243,73 +243,73 @@ static FTPSM ftpReadQuit; /************************************************ ** Debugs Levels used here ** ************************************************* -0 CRITICAL Events -1 IMPORTANT Events - Protocol and Transmission failures. -2 FTP Protocol Chatter -3 Logic Flows -4 Data Parsing Flows -5 Data Dumps -7 ?? +0 CRITICAL Events +1 IMPORTANT Events + Protocol and Transmission failures. +2 FTP Protocol Chatter +3 Logic Flows +4 Data Parsing Flows +5 Data Dumps +7 ?? ************************************************/ /************************************************ ** State Machine Description (excluding hacks) ** ************************************************* -From To +From To --------------------------------------- -Welcome User -User Pass -Pass Type -Type TraverseDirectory / GetFile -TraverseDirectory Cwd / GetFile / ListDir -Cwd TraverseDirectory / Mkdir -GetFile Mdtm -Mdtm Size -Size Epsv -ListDir Epsv -Epsv FileOrList -FileOrList Rest / Retr / Nlst / List / Mkdir (PUT /xxx;type=d) -Rest Retr -Retr / Nlst / List DataRead* (on datachannel) -DataRead* ReadTransferDone -ReadTransferDone DataTransferDone -Stor DataWrite* (on datachannel) -DataWrite* RequestPutBody** (from client) -RequestPutBody** DataWrite* / WriteTransferDone -WriteTransferDone DataTransferDone -DataTransferDone Quit -Quit - +Welcome User +User Pass +Pass Type +Type TraverseDirectory / GetFile +TraverseDirectory Cwd / GetFile / ListDir +Cwd TraverseDirectory / Mkdir +GetFile Mdtm +Mdtm Size +Size Epsv +ListDir Epsv +Epsv FileOrList +FileOrList Rest / Retr / Nlst / List / Mkdir (PUT /xxx;type=d) +Rest Retr +Retr / Nlst / List DataRead* (on datachannel) +DataRead* ReadTransferDone +ReadTransferDone DataTransferDone +Stor DataWrite* (on datachannel) +DataWrite* RequestPutBody** (from client) +RequestPutBody** DataWrite* / WriteTransferDone +WriteTransferDone DataTransferDone +DataTransferDone Quit +Quit - ************************************************/ FTPSM *FTP_SM_FUNCS[] = { - ftpReadWelcome, /* BEGIN */ - ftpReadUser, /* SENT_USER */ - ftpReadPass, /* SENT_PASS */ - ftpReadType, /* SENT_TYPE */ - ftpReadMdtm, /* SENT_MDTM */ - ftpReadSize, /* SENT_SIZE */ - ftpReadEPRT, /* SENT_EPRT */ - ftpReadPORT, /* SENT_PORT */ - ftpReadEPSV, /* SENT_EPSV_ALL */ - ftpReadEPSV, /* SENT_EPSV_1 */ - ftpReadEPSV, /* SENT_EPSV_2 */ - ftpReadPasv, /* SENT_PASV */ - ftpReadCwd, /* SENT_CWD */ - ftpReadList, /* SENT_LIST */ - ftpReadList, /* SENT_NLST */ - ftpReadRest, /* SENT_REST */ - ftpReadRetr, /* SENT_RETR */ - ftpReadStor, /* SENT_STOR */ - ftpReadQuit, /* SENT_QUIT */ - ftpReadTransferDone, /* READING_DATA (RETR,LIST,NLST) */ - ftpWriteTransferDone, /* WRITING_DATA (STOR) */ - ftpReadMkdir, /* SENT_MKDIR */ - NULL, /* SENT_FEAT */ - NULL, /* SENT_PWD */ - NULL, /* SENT_CDUP*/ - NULL, /* SENT_DATA_REQUEST */ - NULL /* SENT_COMMAND */ + ftpReadWelcome, /* BEGIN */ + ftpReadUser, /* SENT_USER */ + ftpReadPass, /* SENT_PASS */ + ftpReadType, /* SENT_TYPE */ + ftpReadMdtm, /* SENT_MDTM */ + ftpReadSize, /* SENT_SIZE */ + ftpReadEPRT, /* SENT_EPRT */ + ftpReadPORT, /* SENT_PORT */ + ftpReadEPSV, /* SENT_EPSV_ALL */ + ftpReadEPSV, /* SENT_EPSV_1 */ + ftpReadEPSV, /* SENT_EPSV_2 */ + ftpReadPasv, /* SENT_PASV */ + ftpReadCwd, /* SENT_CWD */ + ftpReadList, /* SENT_LIST */ + ftpReadList, /* SENT_NLST */ + ftpReadRest, /* SENT_REST */ + ftpReadRetr, /* SENT_RETR */ + ftpReadStor, /* SENT_STOR */ + ftpReadQuit, /* SENT_QUIT */ + ftpReadTransferDone, /* READING_DATA (RETR,LIST,NLST) */ + ftpWriteTransferDone, /* WRITING_DATA (STOR) */ + ftpReadMkdir, /* SENT_MKDIR */ + NULL, /* SENT_FEAT */ + NULL, /* SENT_PWD */ + NULL, /* SENT_CDUP*/ + NULL, /* SENT_DATA_REQUEST */ + NULL /* SENT_COMMAND */ }; /// handler called by Comm when FTP data channel is closed unexpectedly @@ -327,23 +327,23 @@ Ftp::Gateway::dataClosed(const CommCloseCbParams &io) } Ftp::Gateway::Gateway(FwdState *fwdState): - AsyncJob("FtpStateData"), - Ftp::Client(fwdState), - password_url(0), - reply_hdr(NULL), - reply_hdr_state(0), - conn_att(0), - login_att(0), - mdtm(-1), - theSize(-1), - pathcomps(NULL), - filepath(NULL), - dirpath(NULL), - restart_offset(0), - proxy_host(NULL), - list_width(0), - old_filepath(NULL), - typecode('\0') + AsyncJob("FtpStateData"), + Ftp::Client(fwdState), + password_url(0), + reply_hdr(NULL), + reply_hdr_state(0), + conn_att(0), + login_att(0), + mdtm(-1), + theSize(-1), + pathcomps(NULL), + filepath(NULL), + dirpath(NULL), + restart_offset(0), + proxy_host(NULL), + list_width(0), + old_filepath(NULL), + typecode('\0') { debugs(9, 3, entry->url()); @@ -589,7 +589,7 @@ ftpListParseParts(const char *buf, struct Ftp::GatewayFlags flags) if (regexec(&scan_ftp_integer, day, 0, NULL, 0) != 0) continue; - if (regexec(&scan_ftp_time, year, 0, NULL, 0) != 0) /* Yr | hh:mm */ + if (regexec(&scan_ftp_time, year, 0, NULL, 0) != 0) /* Yr | hh:mm */ continue; snprintf(tbuf, 128, "%s %2s %5s", @@ -696,7 +696,7 @@ ftpListParseParts(const char *buf, struct Ftp::GatewayFlags flags) tm = (time_t) strtol(ct + 1, &tmp, 0); if (tmp != ct + 1) - break; /* not a valid integer */ + break; /* not a valid integer */ p->date = xstrdup(ctime(&tm)); @@ -745,7 +745,7 @@ found: xfree(tokens[i]); if (!p->name) - ftpListPartsFree(&p); /* cleanup */ + ftpListPartsFree(&p); /* cleanup */ return p; } @@ -814,7 +814,7 @@ Ftp::Gateway::htmlifyListEntry(const char *line) snprintf(icon, 2048, "\"%-6s\"", mimeGetIconURL("internal-dir"), "[DIR]"); - strcat(href, "/"); /* margin is allocated above */ + strcat(href, "/"); /* margin is allocated above */ break; case 'l': @@ -891,7 +891,7 @@ void Ftp::Gateway::parseListing() { char *buf = data.readBuf->content(); - char *sbuf; /* NULL-terminated copy of termedBuf */ + char *sbuf; /* NULL-terminated copy of termedBuf */ char *end; char *line; char *s; @@ -1034,8 +1034,8 @@ Ftp::Gateway::processReplyBody() * TODO: we might be able to do something about locating username from other sources: * ie, external ACL user=* tag or ident lookup * - \retval 1 if we have everything needed to complete this request. - \retval 0 if something is missing. + \retval 1 if we have everything needed to complete this request. + \retval 0 if something is missing. */ int Ftp::Gateway::checkAuth(const HttpHeader * req_hdr) @@ -1078,7 +1078,7 @@ Ftp::Gateway::checkAuth(const HttpHeader * req_hdr) } } - return 0; /* different username */ + return 0; /* different username */ } static String str_type_eq; @@ -1104,7 +1104,7 @@ Ftp::Gateway::checkUrlpath() if (!l) { flags.isdir = 1; flags.root_dir = 1; - flags.need_base_href = 1; /* Work around broken browsers */ + flags.need_base_href = 1; /* Work around broken browsers */ } else if (!request->urlpath.cmp("/%2f/")) { /* UNIX root directory */ flags.isdir = 1; @@ -1583,9 +1583,9 @@ ftpReadMkdir(Ftp::Gateway * ftpState) debugs(9, 3, HERE << "path " << path << ", code " << code); - if (code == 257) { /* success */ + if (code == 257) { /* success */ ftpSendCwd(ftpState); - } else if (code == 550) { /* dir exists */ + } else if (code == 550) { /* dir exists */ if (ftpState->flags.put_mkdir) { ftpState->flags.put_mkdir = 1; @@ -2029,9 +2029,9 @@ ftpRestOrList(Ftp::Gateway * ftpState) ftpState->flags.isdir = 1; if (ftpState->flags.put) { - ftpSendMkdir(ftpState); /* PUT name;type=d */ + ftpSendMkdir(ftpState); /* PUT name;type=d */ } else { - ftpSendNlst(ftpState); /* GET name;type=d sec 3.2.2 of RFC 1738 */ + ftpSendNlst(ftpState); /* GET name;type=d sec 3.2.2 of RFC 1738 */ } } else if (ftpState->flags.put) { ftpSendStor(ftpState); @@ -2311,7 +2311,7 @@ ftpReadTransferDone(Ftp::Gateway * ftpState) /* QUIT operation handles sending the reply to client */ } ftpSendQuit(ftpState); - } else { /* != 226 */ + } else { /* != 226 */ debugs(9, DBG_IMPORTANT, HERE << "Got code " << code << " after reading data"); ftpState->failed(ERR_FTP_FAILURE, 0); /* failed closes ctrl.conn and frees ftpState */ @@ -2340,7 +2340,7 @@ ftpWriteTransferDone(Ftp::Gateway * ftpState) return; } - ftpState->entry->timestampsSet(); /* XXX Is this needed? */ + ftpState->entry->timestampsSet(); /* XXX Is this needed? */ ftpSendReply(ftpState); } @@ -2438,10 +2438,10 @@ ftpFail(Ftp::Gateway *ftpState) "slashhack=" << (ftpState->request->urlpath.caseCmp("/%2f", 4)==0? "T":"F") ); /* Try the / hack to support "Netscape" FTP URL's for retreiving files */ - if (!ftpState->flags.isdir && /* Not a directory */ - !ftpState->flags.try_slash_hack && /* Not in slash hack */ - ftpState->mdtm <= 0 && ftpState->theSize < 0 && /* Not known as a file */ - ftpState->request->urlpath.caseCmp("/%2f", 4) != 0) { /* No slash encoded */ + if (!ftpState->flags.isdir && /* Not a directory */ + !ftpState->flags.try_slash_hack && /* Not in slash hack */ + ftpState->mdtm <= 0 && ftpState->theSize < 0 && /* Not known as a file */ + ftpState->request->urlpath.caseCmp("/%2f", 4) != 0) { /* No slash encoded */ switch (ftpState->state) { @@ -2563,7 +2563,7 @@ Ftp::Gateway::appendSuccessHeader() EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT); - entry->buffer(); /* released when done processing current data payload */ + entry->buffer(); /* released when done processing current data payload */ filename = (t = urlpath.rpos('/')) ? t + 1 : urlpath.termedBuf(); @@ -2703,7 +2703,7 @@ Ftp::Gateway::writeReplyBody(const char *dataToWrite, size_t dataLength) * A hack to ensure we do not double-complete on the forward entry. * \todo Ftp::Gateway logic should probably be rewritten to avoid - * double-completion or FwdState should be rewritten to allow it. + * double-completion or FwdState should be rewritten to allow it. */ void Ftp::Gateway::completeForwarding() @@ -2722,8 +2722,8 @@ Ftp::Gateway::completeForwarding() /** * Have we lost the FTP server control channel? * - \retval true The server control channel is available. - \retval false The server control channel is not available. + \retval true The server control channel is available. + \retval false The server control channel is not available. */ bool Ftp::Gateway::haveControlChannel(const char *caller_name) const @@ -2753,3 +2753,4 @@ Ftp::StartGateway(FwdState *const fwdState) { return AsyncJob::Start(new Ftp::Gateway(fwdState)); } + diff --git a/src/clients/FtpRelay.cc b/src/clients/FtpRelay.cc index 852fe35ac1..8233f8343c 100644 --- a/src/clients/FtpRelay.cc +++ b/src/clients/FtpRelay.cc @@ -135,10 +135,10 @@ const Ftp::Relay::SM_FUNC Ftp::Relay::SM_FUNCS[] = { }; Ftp::Relay::Relay(FwdState *const fwdState): - AsyncJob("Ftp::Relay"), - Ftp::Client(fwdState), - thePreliminaryCb(NULL), - forwardingCompleted(false) + AsyncJob("Ftp::Relay"), + Ftp::Client(fwdState), + thePreliminaryCb(NULL), + forwardingCompleted(false) { savedReply.message = NULL; savedReply.lastCommand = NULL; @@ -579,7 +579,7 @@ Ftp::Relay::readDataReply() forwardPreliminaryReply(&Ftp::Relay::startDataDownload); else if (fwd->request->forcedBodyContinuation /*&& serverState() == fssHandleUploadRequest*/) startDataUpload(); - else // serverState() == fssHandleUploadRequest + else // serverState() == fssHandleUploadRequest forwardPreliminaryReply(&Ftp::Relay::startDataUpload); } else forwardReply(); @@ -705,3 +705,4 @@ Ftp::StartRelay(FwdState *const fwdState) { return AsyncJob::Start(new Ftp::Relay(fwdState)); } + diff --git a/src/clients/forward.h b/src/clients/forward.h index 122faf333c..a23e391387 100644 --- a/src/clients/forward.h +++ b/src/clients/forward.h @@ -40,3 +40,4 @@ const char *UrlWith2f(HttpRequest *); } // namespace Ftp #endif /* SQUID_CLIENTS_FORWARD_H */ + diff --git a/src/comm.cc b/src/comm.cc index 7800f6fbbe..97be9030d5 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -840,7 +840,7 @@ comm_close_complete(const FdeCbParams ¶ms) F->dynamicSslContext = NULL; } #endif - fd_close(params.fd); /* update fdstat */ + fd_close(params.fd); /* update fdstat */ close(params.fd); ++ statCounter.syscalls.sock.closes; @@ -1017,7 +1017,7 @@ comm_remove_close_handler(int fd, CLCB * handler, void *data) typedef CommCloseCbParams Params; const Params ¶ms = GetCommParams(p); if (call->dialer.handler == handler && params.data == data) - break; /* This is our handler */ + break; /* This is our handler */ } // comm_close removes all close handlers so our handler may be gone @@ -1048,7 +1048,7 @@ commSetNoLinger(int fd) { struct linger L; - L.l_onoff = 0; /* off */ + L.l_onoff = 0; /* off */ L.l_linger = 0; if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0) @@ -1439,7 +1439,7 @@ ClientInfo::setWriteLimiter(const int aWriteSpeedLimit, const double anInitialBu } CommQuotaQueue::CommQuotaQueue(ClientInfo *info): clientInfo(info), - ins(0), outs(0) + ins(0), outs(0) { assert(clientInfo); } @@ -1521,7 +1521,7 @@ commCloseAllSockets(void) if (F->type != FD_SOCKET) continue; - if (F->flags.ipc) /* don't close inter-process sockets */ + if (F->flags.ipc) /* don't close inter-process sockets */ continue; if (F->timeoutHandler != NULL) { @@ -1695,7 +1695,7 @@ commHalfClosedReader(const Comm::ConnectionPointer &conn, char *, size_t size, C CommRead::CommRead() : conn(NULL), buf(NULL), len(0), callback(NULL) {} CommRead::CommRead(const Comm::ConnectionPointer &c, char *buf_, int len_, AsyncCall::Pointer &callback_) - : conn(c), buf(buf_), len(len_), callback(callback_) {} + : conn(c), buf(buf_), len(len_), callback(callback_) {} DeferredRead::DeferredRead () : theReader(NULL), theContext(NULL), theRead(), cancelled(false) {} @@ -1951,3 +1951,4 @@ comm_open_uds(int sock_type, return new_socket; } + diff --git a/src/comm.h b/src/comm.h index 2256ca71c7..094540abc8 100644 --- a/src/comm.h +++ b/src/comm.h @@ -110,3 +110,4 @@ public: }; #endif + diff --git a/src/comm/AcceptLimiter.cc b/src/comm/AcceptLimiter.cc index c7cb55049f..10abaff03c 100644 --- a/src/comm/AcceptLimiter.cc +++ b/src/comm/AcceptLimiter.cc @@ -65,3 +65,4 @@ Comm::AcceptLimiter::kick() } } } + diff --git a/src/comm/AcceptLimiter.h b/src/comm/AcceptLimiter.h index b07114602e..2045899e86 100644 --- a/src/comm/AcceptLimiter.h +++ b/src/comm/AcceptLimiter.h @@ -62,3 +62,4 @@ private: }; // namepace Comm #endif /* _SQUID_SRC_COMM_ACCEPT_LIMITER_H */ + diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index b8eb95244e..0f33ce661a 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -31,14 +31,14 @@ class CachePeer; CBDATA_NAMESPACED_CLASS_INIT(Comm, ConnOpener); Comm::ConnOpener::ConnOpener(Comm::ConnectionPointer &c, AsyncCall::Pointer &handler, time_t ctimeout) : - AsyncJob("Comm::ConnOpener"), - host_(NULL), - temporaryFd_(-1), - conn_(c), - callback_(handler), - totalTries_(0), - failRetries_(0), - deadline_(squid_curtime + static_cast(ctimeout)) + AsyncJob("Comm::ConnOpener"), + host_(NULL), + temporaryFd_(-1), + conn_(c), + callback_(handler), + totalTries_(0), + failRetries_(0), + deadline_(squid_curtime + static_cast(ctimeout)) {} Comm::ConnOpener::~ConnOpener() @@ -479,3 +479,4 @@ Comm::ConnOpener::DelayedConnectRetry(void *data) } delete ptr; } + diff --git a/src/comm/ConnOpener.h b/src/comm/ConnOpener.h index 49465d3626..9eed81650c 100644 --- a/src/comm/ConnOpener.h +++ b/src/comm/ConnOpener.h @@ -92,3 +92,4 @@ private: }; // namespace Comm #endif /* _SQUID_SRC_COMM_CONNOPENER_H */ + diff --git a/src/comm/Connection.cc b/src/comm/Connection.cc index 4d7b918814..01d204b11a 100644 --- a/src/comm/Connection.cc +++ b/src/comm/Connection.cc @@ -23,15 +23,15 @@ Comm::IsConnOpen(const Comm::ConnectionPointer &conn) } Comm::Connection::Connection() : - local(), - remote(), - peerType(HIER_NONE), - fd(-1), - tos(0), - nfmark(0), - flags(COMM_NONBLOCKING), - peer_(NULL), - startTime_(squid_curtime) + local(), + remote(), + peerType(HIER_NONE), + fd(-1), + tos(0), + nfmark(0), + flags(COMM_NONBLOCKING), + peer_(NULL), + startTime_(squid_curtime) { *rfc931 = 0; // quick init the head. the rest does not matter. } @@ -101,3 +101,4 @@ Comm::Connection::setPeer(CachePeer *p) peer_ = cbdataReference(p); } } + diff --git a/src/comm/Connection.h b/src/comm/Connection.h index 8a820318d5..cb79405320 100644 --- a/src/comm/Connection.h +++ b/src/comm/Connection.h @@ -172,3 +172,4 @@ operator << (std::ostream &os, const Comm::ConnectionPointer &conn) } #endif + diff --git a/src/comm/Flag.h b/src/comm/Flag.h index 1874ace95c..7d2e4a6ca7 100644 --- a/src/comm/Flag.h +++ b/src/comm/Flag.h @@ -31,3 +31,4 @@ typedef enum { } // namespace Comm #endif /* _SQUID_SRC_COMM_FLAG_H */ + diff --git a/src/comm/IoCallback.cc b/src/comm/IoCallback.cc index 44090e5b06..f773432250 100644 --- a/src/comm/IoCallback.cc +++ b/src/comm/IoCallback.cc @@ -139,3 +139,4 @@ Comm::IoCallback::finish(Comm::Flag code, int xerrn) /* Reset for next round. */ reset(); } + diff --git a/src/comm/IoCallback.h b/src/comm/IoCallback.h index e104a4e81e..e02c957d30 100644 --- a/src/comm/IoCallback.h +++ b/src/comm/IoCallback.h @@ -82,3 +82,4 @@ void CallbackTableDestruct(); } // namespace Comm #endif /* _SQUID_COMM_IOCALLBACK_H */ + diff --git a/src/comm/Loops.h b/src/comm/Loops.h index 735e3d1ab3..93588ca01c 100644 --- a/src/comm/Loops.h +++ b/src/comm/Loops.h @@ -73,3 +73,4 @@ void QuickPollRequired(void); } // namespace Comm #endif /* _SQUID_SRC_COMM_LOOPS_H */ + diff --git a/src/comm/ModDevPoll.cc b/src/comm/ModDevPoll.cc index 26961aa94f..1d68e0c73d 100644 --- a/src/comm/ModDevPoll.cc +++ b/src/comm/ModDevPoll.cc @@ -51,8 +51,8 @@ #define DEBUG_DEVPOLL 0 // OPEN_MAX is defined in -#define DEVPOLL_UPDATESIZE OPEN_MAX -#define DEVPOLL_QUERYSIZE OPEN_MAX +#define DEVPOLL_UPDATESIZE OPEN_MAX +#define DEVPOLL_QUERYSIZE OPEN_MAX /* TYPEDEFS */ typedef short pollfd_events_t; /* type of pollfd.events from sys/poll.h */ @@ -442,3 +442,4 @@ Comm::QuickPollRequired(void) } #endif /* USE_DEVPOLL */ + diff --git a/src/comm/ModEpoll.cc b/src/comm/ModEpoll.cc index b444d0a7a0..65eacc3033 100644 --- a/src/comm/ModEpoll.cc +++ b/src/comm/ModEpoll.cc @@ -255,7 +255,7 @@ Comm::DoSelect(int msec) statCounter.select_fds_hist.count(num); if (num == 0) - return Comm::TIMEOUT; /* No error.. */ + return Comm::TIMEOUT; /* No error.. */ PROF_start(comm_handle_ready_fd); @@ -312,3 +312,4 @@ Comm::QuickPollRequired(void) } #endif /* USE_EPOLL */ + diff --git a/src/comm/ModKqueue.cc b/src/comm/ModKqueue.cc index 31287cfd8d..3fbb817213 100644 --- a/src/comm/ModKqueue.cc +++ b/src/comm/ModKqueue.cc @@ -258,7 +258,7 @@ Comm::DoSelect(int msec) getCurrentTime(); if (num == 0) - return Comm::OK; /* No error.. */ + return Comm::OK; /* No error.. */ for (i = 0; i < num; ++i) { int fd = (int) ke[i].ident; @@ -307,3 +307,4 @@ commKQueueRegisterWithCacheManager(void) } #endif /* USE_KQUEUE */ + diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index d3132b30b1..bd4b721bf8 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -40,7 +40,7 @@ #endif #endif -static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ +static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) @@ -649,3 +649,4 @@ Comm::QuickPollRequired(void) } #endif /* USE_POLL */ + diff --git a/src/comm/ModSelect.cc b/src/comm/ModSelect.cc index c67a6c9e32..b1286c2125 100644 --- a/src/comm/ModSelect.cc +++ b/src/comm/ModSelect.cc @@ -30,7 +30,7 @@ #include #endif -static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ +static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) @@ -388,7 +388,7 @@ Comm::DoSelect(int msec) for (j = 0; j < maxindex; ++j) { if ((tmask = fdsp[j]) == 0) - continue; /* no bits here */ + continue; /* no bits here */ for (k = 0; k < FD_MASK_BITS; ++k) { if (!EBIT_TEST(tmask, k)) @@ -472,11 +472,11 @@ Comm::DoSelect(int msec) for (j = 0; j < maxindex; ++j) { if ((tmask = (fdsp[j] | pfdsp[j])) == 0) - continue; /* no bits here */ + continue; /* no bits here */ for (k = 0; k < FD_MASK_BITS; ++k) { if (tmask == 0) - break; /* no more bits left */ + break; /* no more bits left */ if (!EBIT_TEST(tmask, k)) continue; @@ -484,7 +484,7 @@ Comm::DoSelect(int msec) /* Found a set bit */ fd = (j * FD_MASK_BITS) + k; - EBIT_CLR(tmask, k); /* this will be done */ + EBIT_CLR(tmask, k); /* this will be done */ #if DEBUG_FDBITS @@ -537,11 +537,11 @@ Comm::DoSelect(int msec) for (j = 0; j < maxindex; ++j) { if ((tmask = fdsp[j]) == 0) - continue; /* no bits here */ + continue; /* no bits here */ for (k = 0; k < FD_MASK_BITS; ++k) { if (tmask == 0) - break; /* no more bits left */ + break; /* no more bits left */ if (!EBIT_TEST(tmask, k)) continue; @@ -549,7 +549,7 @@ Comm::DoSelect(int msec) /* Found a set bit */ fd = (j * FD_MASK_BITS) + k; - EBIT_CLR(tmask, k); /* this will be done */ + EBIT_CLR(tmask, k); /* this will be done */ #if DEBUG_FDBITS @@ -791,3 +791,4 @@ Comm::QuickPollRequired(void) } #endif /* USE_SELECT */ + diff --git a/src/comm/ModSelectWin32.cc b/src/comm/ModSelectWin32.cc index 998731b5f8..df3cd5a423 100644 --- a/src/comm/ModSelectWin32.cc +++ b/src/comm/ModSelectWin32.cc @@ -24,7 +24,7 @@ #include -static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ +static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) @@ -805,3 +805,4 @@ Comm::QuickPollRequired(void) } #endif /* USE_SELECT_WIN32 */ + diff --git a/src/comm/Read.cc b/src/comm/Read.cc index b881adc5ad..0d68230e94 100644 --- a/src/comm/Read.cc +++ b/src/comm/Read.cc @@ -239,3 +239,4 @@ Comm::ReadCancel(int fd, AsyncCall::Pointer &callback) /* And the IO event */ Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); } + diff --git a/src/comm/Read.h b/src/comm/Read.h index 90cb7560fd..8980ac6af9 100644 --- a/src/comm/Read.h +++ b/src/comm/Read.h @@ -60,3 +60,4 @@ inline void comm_read(const Comm::ConnectionPointer &conn, char *buf, int len, A void comm_read_cancel(int fd, IOCB *callback, void *data); #endif /* _SQUID_COMM_READ_H */ + diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index 995de5fabf..e9f39be131 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -39,21 +39,21 @@ CBDATA_NAMESPACED_CLASS_INIT(Comm, TcpAcceptor); Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const char *note, const Subscription::Pointer &aSub) : - AsyncJob("Comm::TcpAcceptor"), - errcode(0), - isLimited(0), - theCallSub(aSub), - conn(newConn), - listenPort_() + AsyncJob("Comm::TcpAcceptor"), + errcode(0), + isLimited(0), + theCallSub(aSub), + conn(newConn), + listenPort_() {} Comm::TcpAcceptor::TcpAcceptor(const AnyP::PortCfgPointer &p, const char *note, const Subscription::Pointer &aSub) : - AsyncJob("Comm::TcpAcceptor"), - errcode(0), - isLimited(0), - theCallSub(aSub), - conn(p->listenConn), - listenPort_(p) + AsyncJob("Comm::TcpAcceptor"), + errcode(0), + isLimited(0), + theCallSub(aSub), + conn(p->listenConn), + listenPort_(p) {} void @@ -421,3 +421,4 @@ Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details) PROF_stop(comm_accept); return Comm::OK; } + diff --git a/src/comm/TcpAcceptor.h b/src/comm/TcpAcceptor.h index f8c45578be..87d7efacf7 100644 --- a/src/comm/TcpAcceptor.h +++ b/src/comm/TcpAcceptor.h @@ -109,3 +109,4 @@ private: } // namespace Comm #endif /* SQUID_COMM_TCPACCEPTOR_H */ + diff --git a/src/comm/UdpOpenDialer.h b/src/comm/UdpOpenDialer.h index ca31ce2cd5..2ca0c622f9 100644 --- a/src/comm/UdpOpenDialer.h +++ b/src/comm/UdpOpenDialer.h @@ -16,7 +16,7 @@ namespace Comm /// dials a UDP port-opened call class UdpOpenDialer: public CallDialer, - public Ipc::StartListeningCb + public Ipc::StartListeningCb { public: typedef void (*Handler)(const Comm::ConnectionPointer &conn, int errNo); @@ -33,3 +33,4 @@ public: } // namespace Comm #endif /* SQUID_COMM_UDPOPENDIALER_H */ + diff --git a/src/comm/Write.cc b/src/comm/Write.cc index 4f52c74913..1282a29943 100644 --- a/src/comm/Write.cc +++ b/src/comm/Write.cc @@ -160,3 +160,4 @@ Comm::HandleWrite(int fd, void *data) PROF_stop(commHandleWrite); } + diff --git a/src/comm/Write.h b/src/comm/Write.h index 9c9058b9a2..7071f04a89 100644 --- a/src/comm/Write.h +++ b/src/comm/Write.h @@ -40,3 +40,4 @@ extern PF HandleWrite; } // namespace Comm #endif /* _SQUID_COMM_IOWRITE_H */ + diff --git a/src/comm/comm_internal.h b/src/comm/comm_internal.h index 5754c91741..1fc2445bc5 100644 --- a/src/comm/comm_internal.h +++ b/src/comm/comm_internal.h @@ -23,3 +23,4 @@ bool isOpen(const int fd); void commStopHalfClosedMonitor(int fd); #endif + diff --git a/src/comm/forward.h b/src/comm/forward.h index 7c456e69be..bcbb6e9619 100644 --- a/src/comm/forward.h +++ b/src/comm/forward.h @@ -29,3 +29,4 @@ bool IsConnOpen(const Comm::ConnectionPointer &conn); }; // namespace Comm #endif /* _SQUID_COMM_FORWARD_H */ + diff --git a/src/comm_poll.h b/src/comm_poll.h index f363132db8..ebe7f86d19 100644 --- a/src/comm_poll.h +++ b/src/comm_poll.h @@ -10,3 +10,4 @@ #define SQUID_COMM_POLL_H #endif /* SQUID_COMM_POLL_H */ + diff --git a/src/debug.cc b/src/debug.cc index 1d6335196f..915ca72164 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -217,7 +217,7 @@ debugOpenLog(const char *logfile) if (debug_log_file) xfree(debug_log_file); - debug_log_file = xstrdup(logfile); /* keep a static copy */ + debug_log_file = xstrdup(logfile); /* keep a static copy */ if (debug_log && debug_log != stderr) fclose(debug_log); @@ -753,7 +753,7 @@ Debug::xassert(const char *msg, const char *file, int line) if (CurrentDebug) { *CurrentDebug << "assertion failed: " << file << ":" << line << - ": \"" << msg << "\""; + ": \"" << msg << "\""; } abort(); } @@ -803,3 +803,4 @@ Raw::print(std::ostream &os) const return os; } + diff --git a/src/defines.h b/src/defines.h index ae347ef3a3..52432f88fb 100644 --- a/src/defines.h +++ b/src/defines.h @@ -22,15 +22,15 @@ #define BROWSERNAMELEN 128 -#define ACL_SUNDAY 0x01 -#define ACL_MONDAY 0x02 -#define ACL_TUESDAY 0x04 -#define ACL_WEDNESDAY 0x08 -#define ACL_THURSDAY 0x10 -#define ACL_FRIDAY 0x20 -#define ACL_SATURDAY 0x40 -#define ACL_ALLWEEK 0x7F -#define ACL_WEEKDAYS 0x3E +#define ACL_SUNDAY 0x01 +#define ACL_MONDAY 0x02 +#define ACL_TUESDAY 0x04 +#define ACL_WEDNESDAY 0x08 +#define ACL_THURSDAY 0x10 +#define ACL_FRIDAY 0x20 +#define ACL_SATURDAY 0x40 +#define ACL_ALLWEEK 0x7F +#define ACL_WEEKDAYS 0x3E /* Select types. */ #define COMM_SELECT_READ (0x1) @@ -43,26 +43,26 @@ #define DNS_INBUF_SZ 4096 -#define FD_DESC_SZ 64 +#define FD_DESC_SZ 64 -#define FQDN_LOOKUP_IF_MISS 0x01 +#define FQDN_LOOKUP_IF_MISS 0x01 #define FQDN_MAX_NAMES 5 #define HTTP_REPLY_FIELD_SZ 128 -#define BUF_TYPE_8K 1 +#define BUF_TYPE_8K 1 #define BUF_TYPE_MALLOC 2 -#define ANONYMIZER_NONE 0 -#define ANONYMIZER_STANDARD 1 -#define ANONYMIZER_PARANOID 2 +#define ANONYMIZER_NONE 0 +#define ANONYMIZER_STANDARD 1 +#define ANONYMIZER_PARANOID 2 #define USER_IDENT_SZ 64 #define IDENT_NONE 0 #define IDENT_PENDING 1 #define IDENT_DONE 2 -#define IP_LOOKUP_IF_MISS 0x01 +#define IP_LOOKUP_IF_MISS 0x01 #define MAX_MIME 4096 @@ -73,9 +73,9 @@ #define ICP_FLAG_SRC_RTT 0x40000000ul /* Version */ -#define ICP_VERSION_2 2 -#define ICP_VERSION_3 3 -#define ICP_VERSION_CURRENT ICP_VERSION_2 +#define ICP_VERSION_2 2 +#define ICP_VERSION_3 3 +#define ICP_VERSION_CURRENT ICP_VERSION_2 #define DIRECT_UNKNOWN 0 #define DIRECT_NO 1 @@ -104,16 +104,16 @@ #define SM_PAGE_SIZE 4096 #define MAX_CLIENT_BUF_SZ 4096 -#define EBIT_SET(flag, bit) ((void)((flag) |= ((1L<<(bit))))) -#define EBIT_CLR(flag, bit) ((void)((flag) &= ~((1L<<(bit))))) -#define EBIT_TEST(flag, bit) ((flag) & ((1L<<(bit)))) +#define EBIT_SET(flag, bit) ((void)((flag) |= ((1L<<(bit))))) +#define EBIT_CLR(flag, bit) ((void)((flag) &= ~((1L<<(bit))))) +#define EBIT_TEST(flag, bit) ((flag) & ((1L<<(bit)))) /* bit opearations on a char[] mask of unlimited length */ #define CBIT_BIT(bit) (1<<((bit)%8)) #define CBIT_BIN(mask, bit) (mask)[(bit)>>3] -#define CBIT_SET(mask, bit) ((void)(CBIT_BIN(mask, bit) |= CBIT_BIT(bit))) -#define CBIT_CLR(mask, bit) ((void)(CBIT_BIN(mask, bit) &= ~CBIT_BIT(bit))) -#define CBIT_TEST(mask, bit) (CBIT_BIN(mask, bit) & CBIT_BIT(bit)) +#define CBIT_SET(mask, bit) ((void)(CBIT_BIN(mask, bit) |= CBIT_BIT(bit))) +#define CBIT_CLR(mask, bit) ((void)(CBIT_BIN(mask, bit) &= ~CBIT_BIT(bit))) +#define CBIT_TEST(mask, bit) (CBIT_BIN(mask, bit) & CBIT_BIT(bit)) #define MAX_FILES_PER_DIR (1<<20) @@ -122,7 +122,7 @@ #define PEER_MAX_ADDRESSES 10 #define RTT_AV_FACTOR 50 -#define RTT_BACKGROUND_AV_FACTOR 25 /* Background pings need a smaller factor since they are sent less frequently */ +#define RTT_BACKGROUND_AV_FACTOR 25 /* Background pings need a smaller factor since they are sent less frequently */ #define PEER_DEAD 0 #define PEER_ALIVE 1 @@ -215,20 +215,21 @@ #define FILE_MODE(x) ((x)&(O_RDONLY|O_WRONLY|O_RDWR)) #endif -#define HTTP_REQBUF_SZ 4096 +#define HTTP_REQBUF_SZ 4096 /* CygWin & Windows NT Port */ #if _SQUID_WINDOWS_ #define _WIN_SQUID_SERVICE_CONTROL_STOP SERVICE_CONTROL_STOP #define _WIN_SQUID_SERVICE_CONTROL_SHUTDOWN SERVICE_CONTROL_SHUTDOWN #define _WIN_SQUID_SERVICE_CONTROL_INTERROGATE SERVICE_CONTROL_INTERROGATE -#define _WIN_SQUID_SERVICE_CONTROL_ROTATE 128 -#define _WIN_SQUID_SERVICE_CONTROL_RECONFIGURE 129 -#define _WIN_SQUID_SERVICE_CONTROL_DEBUG 130 -#define _WIN_SQUID_SERVICE_CONTROL_INTERRUPT 131 -#define _WIN_SQUID_SERVICE_OPTION "--ntservice" -#define _WIN_SQUID_RUN_MODE_INTERACTIVE 0 -#define _WIN_SQUID_RUN_MODE_SERVICE 1 +#define _WIN_SQUID_SERVICE_CONTROL_ROTATE 128 +#define _WIN_SQUID_SERVICE_CONTROL_RECONFIGURE 129 +#define _WIN_SQUID_SERVICE_CONTROL_DEBUG 130 +#define _WIN_SQUID_SERVICE_CONTROL_INTERRUPT 131 +#define _WIN_SQUID_SERVICE_OPTION "--ntservice" +#define _WIN_SQUID_RUN_MODE_INTERACTIVE 0 +#define _WIN_SQUID_RUN_MODE_SERVICE 1 #endif #endif /* SQUID_DEFINES_H */ + diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 9949542d5d..ef7a586d22 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -1008,3 +1008,4 @@ ClassCHostPool::Id::bytesIn(int qty) } #endif /* USE_DELAY_POOLS */ + diff --git a/src/disk.cc b/src/disk.cc index e05fddcbb6..3311937aac 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -421,7 +421,7 @@ diskHandleRead(int fd, void *data) { #endif debugs(6, 3, "diskHandleRead: FD " << fd << " seeking to offset " << ctrl_dat->offset); - lseek(fd, ctrl_dat->offset, SEEK_SET); /* XXX ignore return? */ + lseek(fd, ctrl_dat->offset, SEEK_SET); /* XXX ignore return? */ ++ statCounter.syscalls.disk.seeks; F->disk.offset = ctrl_dat->offset; } diff --git a/src/disk.h b/src/disk.h index 835924a061..d8de3fb619 100644 --- a/src/disk.h +++ b/src/disk.h @@ -60,3 +60,4 @@ void safeunlink(const char *path, int quiet); int xrename(const char *from, const char *to); //disk.cc #endif /* SQUID_DISK_H_ */ + diff --git a/src/dlink.cc b/src/dlink.cc index feb923f0db..9d52ad640e 100644 --- a/src/dlink.cc +++ b/src/dlink.cc @@ -104,3 +104,4 @@ dlinkDelete(dlink_node * m, dlink_list * list) m->next = m->prev = NULL; } + diff --git a/src/dlink.h b/src/dlink.h index 7d3985a19c..2deb00cc58 100644 --- a/src/dlink.h +++ b/src/dlink.h @@ -39,3 +39,4 @@ void dlinkNodeDelete(dlink_node * m); dlink_node *dlinkNodeNew(void); #endif /* SQUID_DLINK_H */ + diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 3f899278d0..7be099be1e 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1148,9 +1148,9 @@ idnsGrokReply(const char *buf, size_t sz, int from_ns) #if WHEN_EDNS_RESPONSES_ARE_PARSED // TODO: actually gr the message right here. -// pull out the DNS meta data we need (A records, AAAA records and EDNS OPT) and store in q -// this is overall better than force-feeding A response with AAAA an section later anyway. -// AND allows us to merge AN+AR sections from both responses (one day) +// pull out the DNS meta data we need (A records, AAAA records and EDNS OPT) and store in q +// this is overall better than force-feeding A response with AAAA an section later anyway. +// AND allows us to merge AN+AR sections from both responses (one day) if (q->edns_seen >= 0) { if (max_shared_edns == nameservers[from_ns].last_seen_edns && max_shared_edns < q->edns_seen) { @@ -1853,3 +1853,4 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP) } #endif /*SQUID_SNMP */ + diff --git a/src/enums.h b/src/enums.h index a5a3d88c35..3088d0f5f3 100644 --- a/src/enums.h +++ b/src/enums.h @@ -114,8 +114,8 @@ enum { * its status */ typedef enum { - STREAM_NONE, /* No particular status */ - STREAM_COMPLETE, /* All data has been flushed, no more reads allowed */ + STREAM_NONE, /* No particular status */ + STREAM_COMPLETE, /* All data has been flushed, no more reads allowed */ /* an unpredicted end has occured, no more * reads occured, but no need to tell * downstream that an error occured @@ -250,3 +250,4 @@ typedef enum { #endif /* USE_HTCP */ #endif /* SQUID_ENUMS_H */ + diff --git a/src/err_detail_type.h b/src/err_detail_type.h index 50b1f927e5..e6a4984e7b 100644 --- a/src/err_detail_type.h +++ b/src/err_detail_type.h @@ -50,3 +50,4 @@ const char *errorDetailName(int errDetailId) } #endif + diff --git a/src/err_type.h b/src/err_type.h index 4ebe9da935..581286e9bb 100644 --- a/src/err_type.h +++ b/src/err_type.h @@ -82,3 +82,4 @@ typedef enum { extern const char *err_type_str[]; #endif /* _SQUID_ERR_TYPE_H */ + diff --git a/src/errorpage.cc b/src/errorpage.cc index 9e0fe23348..122e20b22f 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -76,7 +76,7 @@ typedef struct { * automagically to give you more control on the format */ static const struct { - int type; /* and page_id */ + int type; /* and page_id */ const char *text; } @@ -538,13 +538,13 @@ errorReservePageId(const char *page_name) const char * errorPageName(int pageId) { - if (pageId >= ERR_NONE && pageId < ERR_MAX) /* common case */ + if (pageId >= ERR_NONE && pageId < ERR_MAX) /* common case */ return err_type_str[pageId]; if (pageId >= ERR_MAX && pageId - ERR_MAX < (ssize_t)ErrorDynamicPages.size()) return ErrorDynamicPages[pageId - ERR_MAX]->page_name; - return "ERR_UNKNOWN"; /* should not happen */ + return "ERR_UNKNOWN"; /* should not happen */ } ErrorState * @@ -557,29 +557,29 @@ ErrorState::NewForwarding(err_type type, HttpRequest *request) } ErrorState::ErrorState(err_type t, Http::StatusCode status, HttpRequest * req) : - type(t), - page_id(t), - err_language(NULL), - httpStatus(status), + type(t), + page_id(t), + err_language(NULL), + httpStatus(status), #if USE_AUTH - auth_user_request (NULL), + auth_user_request (NULL), #endif - request(NULL), - url(NULL), - xerrno(0), - port(0), - dnsError(), - ttl(0), - src_addr(), - redirect_url(NULL), - callback(NULL), - callback_data(NULL), - request_hdrs(NULL), - err_msg(NULL), + request(NULL), + url(NULL), + xerrno(0), + port(0), + dnsError(), + ttl(0), + src_addr(), + redirect_url(NULL), + callback(NULL), + callback_data(NULL), + request_hdrs(NULL), + err_msg(NULL), #if USE_OPENSSL - detail(NULL), + detail(NULL), #endif - detailCode(ERR_DETAIL_NONE) + detailCode(ERR_DETAIL_NONE) { memset(&ftp, 0, sizeof(ftp)); @@ -779,7 +779,7 @@ const char * ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion) { static MemBuf mb; - const char *p = NULL; /* takes priority over mb if set */ + const char *p = NULL; /* takes priority over mb if set */ int do_quote = 1; int no_urlescape = 0; /* if true then item is NOT to be further URL-encoded */ char ntoabuf[MAX_IPSTRLEN]; @@ -1091,7 +1091,7 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion } if (!p) - p = mb.buf; /* do not use mb after this assignment! */ + p = mb.buf; /* do not use mb after this assignment! */ assert(p); @@ -1276,14 +1276,14 @@ MemBuf *ErrorState::ConvertText(const char *text, bool allowRecursion) content->init(); while ((p = strchr(m, '%'))) { - content->append(m, p - m); /* copy */ - const char *t = Convert(*++p, false, allowRecursion); /* convert */ - content->Printf("%s", t); /* copy */ - m = p + 1; /* advance */ + content->append(m, p - m); /* copy */ + const char *t = Convert(*++p, false, allowRecursion); /* convert */ + content->Printf("%s", t); /* copy */ + m = p + 1; /* advance */ } if (*m) - content->Printf("%s", m); /* copy tail */ + content->Printf("%s", m); /* copy tail */ content->terminate(); @@ -1291,3 +1291,4 @@ MemBuf *ErrorState::ConvertText(const char *text, bool allowRecursion) return content; } + diff --git a/src/errorpage.h b/src/errorpage.h index 3f69e4893d..2ca081853d 100644 --- a/src/errorpage.h +++ b/src/errorpage.h @@ -304,3 +304,4 @@ protected: bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos); #endif /* SQUID_ERRORPAGE_H */ + diff --git a/src/esi/Assign.cc b/src/esi/Assign.cc index a68f0100dd..57e7ef7ce4 100644 --- a/src/esi/Assign.cc +++ b/src/esi/Assign.cc @@ -173,3 +173,4 @@ ESIVariableExpression::eval (ESIVarState &state, char const *subref, char const } #endif /* USE_SQUID_ESI == 1 */ + diff --git a/src/esi/Assign.h b/src/esi/Assign.h index 4d55013a53..635e5a405b 100644 --- a/src/esi/Assign.h +++ b/src/esi/Assign.h @@ -57,3 +57,4 @@ private: }; #endif /* SQUID_ESIASSIGN_H */ + diff --git a/src/esi/Attempt.h b/src/esi/Attempt.h index 2af1681e59..78440fa877 100644 --- a/src/esi/Attempt.h +++ b/src/esi/Attempt.h @@ -23,3 +23,4 @@ struct esiAttempt : public esiSequence { }; #endif /* SQUID_ESIATTEMPT_H */ + diff --git a/src/esi/Context.cc b/src/esi/Context.cc index ef472a2255..e2a37b34e2 100644 --- a/src/esi/Context.cc +++ b/src/esi/Context.cc @@ -89,3 +89,4 @@ ESIContext::setErrorMessage(char const *anError) } #endif /* USE_SQUID_ESI == 1 */ + diff --git a/src/esi/Context.h b/src/esi/Context.h index d9091ec4b9..c43773760e 100644 --- a/src/esi/Context.h +++ b/src/esi/Context.h @@ -27,19 +27,19 @@ class ESIContext : public esiTreeParent, public ESIParserClient public: typedef RefCount Pointer; ESIContext() : - thisNode(NULL), - http(NULL), - errorpage(ERR_NONE), - errorstatus(Http::scNone), - errormessage(NULL), - rep(NULL), - outbound_offset(0), - readpos(0), - pos(0), - varState(NULL), - cachedASTInUse(false), - reading_(true), - processing(false) { + thisNode(NULL), + http(NULL), + errorpage(ERR_NONE), + errorstatus(Http::scNone), + errormessage(NULL), + rep(NULL), + outbound_offset(0), + readpos(0), + pos(0), + varState(NULL), + cachedASTInUse(false), + reading_(true), + processing(false) { memset(&flags, 0, sizeof(flags)); } @@ -159,3 +159,4 @@ private: }; #endif /* SQUID_ESICONTEXT_H */ + diff --git a/src/esi/CustomParser.cc b/src/esi/CustomParser.cc index 1a27349097..ba71e90157 100644 --- a/src/esi/CustomParser.cc +++ b/src/esi/CustomParser.cc @@ -48,8 +48,8 @@ ESICustomParser::GetTrie() } ESICustomParser::ESICustomParser(ESIParserClient *aClient) : - theClient(aClient), - lastTag(ESITAG) + theClient(aClient), + lastTag(ESITAG) {} ESICustomParser::~ESICustomParser() @@ -295,3 +295,4 @@ ESICustomParser::errorString() const else return "Parsing error strings not implemented"; } + diff --git a/src/esi/CustomParser.h b/src/esi/CustomParser.h index 2291087f88..4fe623af00 100644 --- a/src/esi/CustomParser.h +++ b/src/esi/CustomParser.h @@ -52,3 +52,4 @@ private: }; #endif /* SQUID_ESICUSTOMPARSER_H */ + diff --git a/src/esi/Element.h b/src/esi/Element.h index 5453274e61..86961f413e 100644 --- a/src/esi/Element.h +++ b/src/esi/Element.h @@ -84,3 +84,4 @@ public: }; #endif /* SQUID_ESIELEMENT_H */ + diff --git a/src/esi/ElementList.h b/src/esi/ElementList.h index 1b88599c5b..c0a1df473b 100644 --- a/src/esi/ElementList.h +++ b/src/esi/ElementList.h @@ -38,3 +38,4 @@ private: }; #endif /* SQUID_ELEMENTLIST_H */ + diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc index b6044f9ce6..6f2dbbd22c 100644 --- a/src/esi/Esi.cc +++ b/src/esi/Esi.cc @@ -402,9 +402,9 @@ esiStreamRead (clientStreamNode *thisNode, ClientHttpRequest *http) switch (context->kick ()) { case ESIContext::ESI_KICK_FAILED: - /* this can not happen - processing can't fail until we have data, - * and when we come here we have sent data to the client - */ + /* this can not happen - processing can't fail until we have data, + * and when we come here we have sent data to the client + */ case ESIContext::ESI_KICK_SENT: @@ -921,9 +921,9 @@ ESIContext::ParserState::top() } ESIContext::ParserState::ParserState() : - stackdepth(0), - parsing(0), - inited_(false) + stackdepth(0), + parsing(0), + inited_(false) {} bool @@ -1565,7 +1565,7 @@ esiLiteral::process (int dovars) } esiLiteral::esiLiteral(esiLiteral const &old) : buffer (old.buffer->cloneList()), - varState (NULL) + varState (NULL) { flags.donevars = 0; } @@ -1662,8 +1662,8 @@ esiTry::~esiTry() } esiTry::esiTry(esiTreeParentPtr aParent) : - parent(aParent), - exceptbuffer(NULL) + parent(aParent), + exceptbuffer(NULL) { memset(&flags, 0, sizeof(flags)); } @@ -2287,10 +2287,10 @@ ElementList::size() const /* esiWhen */ esiWhen::esiWhen(esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) : - esiSequence(aParent), - testValue(false), - unevaluatedExpression(NULL), - varState(NULL) + esiSequence(aParent), + testValue(false), + unevaluatedExpression(NULL), + varState(NULL) { char const *expression = NULL; @@ -2346,10 +2346,10 @@ esiWhen::evaluate() } esiWhen::esiWhen(esiWhen const &old) : - esiSequence(old), - testValue(false), - unevaluatedExpression(NULL), - varState(NULL) + esiSequence(old), + testValue(false), + unevaluatedExpression(NULL), + varState(NULL) { if (old.unevaluatedExpression) unevaluatedExpression = xstrdup(old.unevaluatedExpression); @@ -2419,3 +2419,4 @@ esiEnableProcessing (HttpReply *rep) } #endif /* USE_SQUID_ESI == 1 */ + diff --git a/src/esi/Esi.h b/src/esi/Esi.h index 506b7371dc..92c3765114 100644 --- a/src/esi/Esi.h +++ b/src/esi/Esi.h @@ -19,3 +19,4 @@ extern CSS esiStreamStatus; int esiEnableProcessing (HttpReply *); #endif /* SQUID_ESI_H */ + diff --git a/src/esi/Except.h b/src/esi/Except.h index 62dd9d3cee..540b99fa28 100644 --- a/src/esi/Except.h +++ b/src/esi/Except.h @@ -26,3 +26,4 @@ public: }; #endif /* SQUID_ESIEXCEPT_H */ + diff --git a/src/esi/ExpatParser.cc b/src/esi/ExpatParser.cc index fe16e0129f..d961dc078c 100644 --- a/src/esi/ExpatParser.cc +++ b/src/esi/ExpatParser.cc @@ -84,3 +84,4 @@ ESIExpatParser::errorString() const } #endif /* USE_SQUID_ESI */ + diff --git a/src/esi/ExpatParser.h b/src/esi/ExpatParser.h index f68dd544a0..5d73117aee 100644 --- a/src/esi/ExpatParser.h +++ b/src/esi/ExpatParser.h @@ -24,7 +24,7 @@ public: ESIExpatParser(ESIParserClient *); ~ESIExpatParser(); - /** \retval true on success */ + /** \retval true on success */ bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream); long int lineNumber() const; @@ -47,3 +47,4 @@ private: #endif /* USE_SQUID_ESI */ #endif /* SQUID_ESIEXPATPARSER_H */ + diff --git a/src/esi/Expression.cc b/src/esi/Expression.cc index eb165a69bf..5e8dd86e82 100644 --- a/src/esi/Expression.cc +++ b/src/esi/Expression.cc @@ -51,7 +51,7 @@ typedef enum { ESI_EXPR_LESSEQ, ESI_EXPR_MORE, ESI_EXPR_MOREEQ, - ESI_EXPR_EXPR /* the result of an expr PRI 1 */ + ESI_EXPR_EXPR /* the result of an expr PRI 1 */ } evaltype; typedef enum { @@ -503,11 +503,11 @@ evalmorethan(stackmember * stack, int *depth, int whereAmI, stackmember * candid /* invalid comparison */ return 1; - stackpop(stack, depth); /* arg rhs */ + stackpop(stack, depth); /* arg rhs */ - stackpop(stack, depth); /* me */ + stackpop(stack, depth); /* me */ - stackpop(stack, depth); /* arg lhs */ + stackpop(stack, depth); /* arg lhs */ srv.valuetype = ESI_EXPR_EXPR; @@ -552,11 +552,11 @@ evalequals(stackmember * stack, int *depth, int whereAmI, /* invalid comparison */ return 1; - stackpop(stack, depth); /* arg rhs */ + stackpop(stack, depth); /* arg rhs */ - stackpop(stack, depth); /* me */ + stackpop(stack, depth); /* me */ - stackpop(stack, depth); /* arg lhs */ + stackpop(stack, depth); /* arg lhs */ srv.valuetype = ESI_EXPR_EXPR; @@ -599,11 +599,11 @@ evalnotequals(stackmember * stack, int *depth, int whereAmI, stackmember * candi /* invalid comparison */ return 1; - stackpop(stack, depth); /* arg rhs */ + stackpop(stack, depth); /* arg rhs */ - stackpop(stack, depth); /* me */ + stackpop(stack, depth); /* me */ - stackpop(stack, depth); /* arg lhs */ + stackpop(stack, depth); /* arg lhs */ srv.valuetype = ESI_EXPR_EXPR; @@ -672,7 +672,7 @@ getsymbol(const char *s, char const **endptr) char const *origs = s; /* trim whitespace */ s = trim(s); - rv.eval = NULL; /* A literal */ + rv.eval = NULL; /* A literal */ rv.valuetype = ESI_EXPR_INVALID; rv.valuestored = ESI_LITERAL_INVALID; rv.precedence = 1; /* A literal */ @@ -1034,3 +1034,4 @@ ESIExpression::Evaluate(char const *s) return stack[0].value.integral ? 1 : 0; } + diff --git a/src/esi/Expression.h b/src/esi/Expression.h index c2754a2bac..cf88c2bc14 100644 --- a/src/esi/Expression.h +++ b/src/esi/Expression.h @@ -19,3 +19,4 @@ public: }; #endif /* SQUID_ESIEXPRESSION_H */ + diff --git a/src/esi/Include.cc b/src/esi/Include.cc index 5505bac0d6..c87564c4d8 100644 --- a/src/esi/Include.cc +++ b/src/esi/Include.cc @@ -260,12 +260,12 @@ ESIInclude::makeUsable(esiTreeParentPtr newParent, ESIVarState &newVarState) con } ESIInclude::ESIInclude(ESIInclude const &old) : - varState(NULL), - srcurl(NULL), - alturl(NULL), - parent(NULL), - started(false), - sent(false) + varState(NULL), + srcurl(NULL), + alturl(NULL), + parent(NULL), + started(false), + sent(false) { memset(&flags, 0, sizeof(flags)); flags.onerrorcontinue = old.flags.onerrorcontinue; @@ -310,12 +310,12 @@ ESIInclude::Start (ESIStreamContext::Pointer stream, char const *url, ESIVarStat } ESIInclude::ESIInclude(esiTreeParentPtr aParent, int attrcount, char const **attr, ESIContext *aContext) : - varState(NULL), - srcurl(NULL), - alturl(NULL), - parent(aParent), - started(false), - sent(false) + varState(NULL), + srcurl(NULL), + alturl(NULL), + parent(aParent), + started(false), + sent(false) { assert (aContext); memset(&flags, 0, sizeof(flags)); @@ -563,3 +563,4 @@ ESIInclude::subRequestDone (ESIStreamContext::Pointer stream, bool success) } #endif /* USE_SQUID_ESI == 1 */ + diff --git a/src/esi/Include.h b/src/esi/Include.h index bef8f30768..ac91354256 100644 --- a/src/esi/Include.h +++ b/src/esi/Include.h @@ -72,3 +72,4 @@ private: }; #endif /* SQUID_ESIINCLUDE_H */ + diff --git a/src/esi/Libxml2Parser.cc b/src/esi/Libxml2Parser.cc index 7bc8f8a944..4f7f4da4fd 100644 --- a/src/esi/Libxml2Parser.cc +++ b/src/esi/Libxml2Parser.cc @@ -127,3 +127,4 @@ ESILibxml2Parser::errorString() const } #endif /* USE_SQUID_ESI */ + diff --git a/src/esi/Libxml2Parser.h b/src/esi/Libxml2Parser.h index 7290d7365a..8ce4b0cc49 100644 --- a/src/esi/Libxml2Parser.h +++ b/src/esi/Libxml2Parser.h @@ -62,3 +62,4 @@ private: #endif /* USE_SQUID_ESI */ #endif /* SQUID_ESILIBXML2PARSER_H */ + diff --git a/src/esi/Literal.h b/src/esi/Literal.h index 8b54ff5002..3ebf884884 100644 --- a/src/esi/Literal.h +++ b/src/esi/Literal.h @@ -43,3 +43,4 @@ private: }; #endif /* SQUID_ESILITERAL_H */ + diff --git a/src/esi/Module.cc b/src/esi/Module.cc index 61ce3afaeb..34a98455c6 100644 --- a/src/esi/Module.cc +++ b/src/esi/Module.cc @@ -54,3 +54,4 @@ void Esi::Clean() delete prCustom; prCustom = NULL; } + diff --git a/src/esi/Module.h b/src/esi/Module.h index 2458435dec..dde279cb33 100644 --- a/src/esi/Module.h +++ b/src/esi/Module.h @@ -18,3 +18,4 @@ void Clean(); } // namespace Esi #endif /* SQUID_ESI_MODULE_H */ + diff --git a/src/esi/Parser.cc b/src/esi/Parser.cc index 45ad62e91b..e27c1dce1b 100644 --- a/src/esi/Parser.cc +++ b/src/esi/Parser.cc @@ -44,3 +44,4 @@ ESIParser::Register::~Register() assert(ESIParser::Parsers == this); ESIParser::Parsers = next; } + diff --git a/src/esi/Parser.h b/src/esi/Parser.h index ce669badbc..faebbe6645 100644 --- a/src/esi/Parser.h +++ b/src/esi/Parser.h @@ -65,10 +65,11 @@ public: #define EsiParserDefinition(ThisClass) \ ESIParser::Pointer ThisClass::NewParser(ESIParserClient *aClient) \ { \ - return new ThisClass (aClient); \ + return new ThisClass (aClient); \ } #define EsiParserDeclaration \ static ESIParser::Pointer NewParser(ESIParserClient *aClient) #endif /* SQUID_ESIPARSER_H */ + diff --git a/src/esi/Segment.cc b/src/esi/Segment.cc index 5c0c88efcc..89d4e1270d 100644 --- a/src/esi/Segment.cc +++ b/src/esi/Segment.cc @@ -214,3 +214,4 @@ ESISegment::dumpOne() const temp.limitInit(buf, len); debugs(86, 9, "ESISegment::dumpOne: \"" << temp << "\""); } + diff --git a/src/esi/Segment.h b/src/esi/Segment.h index 627b7465bd..546f6ca8af 100644 --- a/src/esi/Segment.h +++ b/src/esi/Segment.h @@ -53,3 +53,4 @@ private: void ESISegmentFreeList (ESISegment::Pointer &head); #endif /* SQUID_ESISEGMENT_H */ + diff --git a/src/esi/Sequence.cc b/src/esi/Sequence.cc index 38c00f5bae..8dfe8912db 100644 --- a/src/esi/Sequence.cc +++ b/src/esi/Sequence.cc @@ -30,15 +30,15 @@ esiSequence::~esiSequence () } esiSequence::esiSequence(esiTreeParentPtr aParent, bool incrementalFlag) : - elements(), - processedcount(0), - parent(aParent), - mayFail_(true), - failed(false), - provideIncrementalData(incrementalFlag), - processing(false), - processingResult(ESI_PROCESS_COMPLETE), - nextElementToProcess_(0) + elements(), + processedcount(0), + parent(aParent), + mayFail_(true), + failed(false), + provideIncrementalData(incrementalFlag), + processing(false), + processingResult(ESI_PROCESS_COMPLETE), + nextElementToProcess_(0) { memset(&flags, 0, sizeof(flags)); } @@ -318,14 +318,14 @@ esiSequence::fail (ESIElement *source, char const *anError) } esiSequence::esiSequence(esiSequence const &old) : - processedcount(0), - parent(NULL), - mayFail_(old.mayFail_), - failed(old.failed), - provideIncrementalData(old.provideIncrementalData), - processing(false), - processingResult(ESI_PROCESS_COMPLETE), - nextElementToProcess_(0) + processedcount(0), + parent(NULL), + mayFail_(old.mayFail_), + failed(old.failed), + provideIncrementalData(old.provideIncrementalData), + processing(false), + processingResult(ESI_PROCESS_COMPLETE), + nextElementToProcess_(0) { flags.dovars = old.flags.dovars; } @@ -391,3 +391,4 @@ esiSequence::makeUsable(esiTreeParentPtr newParent, ESIVarState &newVarState) co } #endif /* USE_SQUID_ESI == 1 */ + diff --git a/src/esi/Sequence.h b/src/esi/Sequence.h index e668497831..576d271dd6 100644 --- a/src/esi/Sequence.h +++ b/src/esi/Sequence.h @@ -65,3 +65,4 @@ private: }; #endif /* SQUID_ESISEQUENCE_H */ + diff --git a/src/esi/Var.h b/src/esi/Var.h index 48babc3c9f..85d03f7ac9 100644 --- a/src/esi/Var.h +++ b/src/esi/Var.h @@ -28,3 +28,4 @@ public: }; #endif /* SQUID_ESIVAR_H */ + diff --git a/src/esi/VarState.cc b/src/esi/VarState.cc index 1091925a11..d33d3cb715 100644 --- a/src/esi/VarState.cc +++ b/src/esi/VarState.cc @@ -270,8 +270,8 @@ ESIVariableQuery::~ESIVariableQuery() } ESIVarState::ESIVarState(HttpHeader const *aHeader, char const *uri) : - output(NULL), - hdr(hoReply) + output(NULL), + hdr(hoReply) { memset(&flags, 0, sizeof(flags)); @@ -636,9 +636,9 @@ ESIVarState::doIt () #define LOOKFORSTART 0 ESIVariableProcessor::ESIVariableProcessor(char *aString, ESISegment::Pointer &aSegment, Trie &aTrie, ESIVarState *aState) : - string(aString), output (aSegment), variables(aTrie), varState (aState), - state(LOOKFORSTART), pos(0), var_pos(0), done_pos(0), found_subref (NULL), - found_default (NULL), currentFunction(NULL) + string(aString), output (aSegment), variables(aTrie), varState (aState), + state(LOOKFORSTART), pos(0), var_pos(0), done_pos(0), found_subref (NULL), + found_default (NULL), currentFunction(NULL) { len = strlen (string); vartype = varState->GetVar("",0); diff --git a/src/esi/VarState.h b/src/esi/VarState.h index da82b8ebd5..757d970730 100644 --- a/src/esi/VarState.h +++ b/src/esi/VarState.h @@ -171,3 +171,4 @@ private: }; #endif /* SQUID_ESIVARSTATE_H */ + diff --git a/src/eui/Config.cc b/src/eui/Config.cc index 9f70883df7..3576fb27dc 100644 --- a/src/eui/Config.cc +++ b/src/eui/Config.cc @@ -10,3 +10,4 @@ #include "eui/Config.h" Eui::EuiConfig Eui::TheConfig; + diff --git a/src/eui/Config.h b/src/eui/Config.h index 84b28272e9..bb82ed1b6c 100644 --- a/src/eui/Config.h +++ b/src/eui/Config.h @@ -23,3 +23,4 @@ extern EuiConfig TheConfig; } // namespace Eui #endif /* SQUID_EUI_CONFIG_H */ + diff --git a/src/eui/Eui48.cc b/src/eui/Eui48.cc index 3556c3c151..a09ebcbb2a 100644 --- a/src/eui/Eui48.cc +++ b/src/eui/Eui48.cc @@ -101,7 +101,7 @@ Eui::Eui48::decode(const char *asc) if (sscanf(asc, "%x:%x:%x:%x:%x:%x", &a1, &a2, &a3, &a4, &a5, &a6) != 6) { debugs(28, DBG_CRITICAL, "Decode EUI-48: Invalid ethernet address '" << asc << "'"); clear(); - return false; /* This is not valid address */ + return false; /* This is not valid address */ } eui[0] = (u_char) a1; @@ -521,3 +521,4 @@ Eui::Eui48::lookup(const Ip::Address &c) /* ==== END EUI LOOKUP SUPPORT =============================================== */ #endif /* USE_SQUID_EUI */ + diff --git a/src/eui/Eui48.h b/src/eui/Eui48.h index dad409a8cb..f1fcc673e4 100644 --- a/src/eui/Eui48.h +++ b/src/eui/Eui48.h @@ -75,3 +75,4 @@ private: #endif /* USE_SQUID_EUI */ #endif /* _SQUID_EUI_EUI48_H */ + diff --git a/src/eui/Eui64.cc b/src/eui/Eui64.cc index 6016703583..654f36c42d 100644 --- a/src/eui/Eui64.cc +++ b/src/eui/Eui64.cc @@ -93,3 +93,4 @@ Eui::Eui64::lookupNdp(const Ip::Address &c) } #endif /* USE_SQUID_EUI */ + diff --git a/src/eui/Eui64.h b/src/eui/Eui64.h index 3e97a3f1f1..029833f502 100644 --- a/src/eui/Eui64.h +++ b/src/eui/Eui64.h @@ -88,3 +88,4 @@ private: #endif /* USE_SQUID_EUI */ #endif /* _SQUID_EUI_EUI64_H */ + diff --git a/src/event.cc b/src/event.cc index b51e2e8670..6f9c8f3b08 100644 --- a/src/event.cc +++ b/src/event.cc @@ -47,14 +47,14 @@ private: }; EventDialer::EventDialer(EVH *aHandler, void *anArg, bool lockedArg): - theHandler(aHandler), theArg(anArg), isLockedArg(lockedArg) + theHandler(aHandler), theArg(anArg), isLockedArg(lockedArg) { if (isLockedArg) (void)cbdataReference(theArg); } EventDialer::EventDialer(const EventDialer &d): - theHandler(d.theHandler), theArg(d.theArg), isLockedArg(d.isLockedArg) + theHandler(d.theHandler), theArg(d.theArg), isLockedArg(d.isLockedArg) { if (isLockedArg) (void)cbdataReference(theArg); @@ -90,8 +90,8 @@ EventDialer::print(std::ostream &os) const ev_entry::ev_entry(char const * aName, EVH * aFunction, void * aArgument, double evWhen, int aWeight, bool haveArgument) : name(aName), func(aFunction), - arg(haveArgument ? cbdataReference(aArgument) : aArgument), when(evWhen), weight(aWeight), - cbdata(haveArgument) + arg(haveArgument ? cbdataReference(aArgument) : aArgument), when(evWhen), weight(aWeight), + cbdata(haveArgument) { } @@ -284,7 +284,7 @@ EventScheduler::dump(StoreEntry * sentry) while (e != NULL) { storeAppendPrintf(sentry, "%-25s\t%0.3f sec\t%5d\t %s\n", e->name, e->when ? e->when - current_dtime : 0, e->weight, - (e->arg && e->cbdata) ? cbdataReferenceValid(e->arg) ? "yes" : "no" : "N/A"); + (e->arg && e->cbdata) ? cbdataReferenceValid(e->arg) ? "yes" : "no" : "N/A"); e = e->next; } } @@ -330,3 +330,4 @@ EventScheduler::schedule(const char *name, EVH * func, void *arg, double when, i event->next = *E; *E = event; } + diff --git a/src/event.h b/src/event.h index 4046a16dd3..0e0897d93c 100644 --- a/src/event.h +++ b/src/event.h @@ -71,3 +71,4 @@ private: }; #endif /* SQUID_EVENT_H */ + diff --git a/src/external_acl.cc b/src/external_acl.cc index 9339464795..3668b483fc 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1285,10 +1285,10 @@ free_externalAclState(void *data) * * user= The users name (login) * message= Message describing the reason - * tag= A string tag to be applied to the request that triggered the acl match. - * applies to both OK and ERR responses. - * Won't override existing request tags. - * log= A string to be used in access logging + * tag= A string tag to be applied to the request that triggered the acl match. + * applies to both OK and ERR responses. + * Won't override existing request tags. + * log= A string to be used in access logging * * Other keywords may be added to the protocol later * @@ -1588,3 +1588,4 @@ ACLExternal::isProxyAuth() const return false; #endif } + diff --git a/src/fatal.h b/src/fatal.h index 08ea87f817..d1fca623fe 100644 --- a/src/fatal.h +++ b/src/fatal.h @@ -14,3 +14,4 @@ void fatalf(const char *fmt,...) PRINTF_FORMAT_ARG1; void fatal_dump(const char *message); #endif /* SQUID_FATAL_H */ + diff --git a/src/fd.cc b/src/fd.cc index 96e37ae39a..069a063c60 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -351,3 +351,4 @@ fdAdjustReserved(void) " due to failures (" << (Squid_MaxFD - newReserve) << "/" << Squid_MaxFD << " file descriptors available)"); RESERVED_FD = newReserve; } + diff --git a/src/fd.h b/src/fd.h index fcefa0ecb5..09d9c2d3e5 100644 --- a/src/fd.h +++ b/src/fd.h @@ -22,3 +22,4 @@ int default_read_method(int, char *, int); int default_write_method(int, const char *, int); #endif /* SQUID_FD_H_ */ + diff --git a/src/fde.cc b/src/fde.cc index fd3c2c0610..a99fa3b8c6 100644 --- a/src/fde.cc +++ b/src/fde.cc @@ -103,3 +103,4 @@ fde::noteUse() { ++ pconn.uses; } + diff --git a/src/fde.h b/src/fde.h index d202e4f137..80a2f481cb 100644 --- a/src/fde.h +++ b/src/fde.h @@ -181,3 +181,4 @@ int fdNFree(void); #define FD_WRITE_METHOD(fd, buf, len) (*fd_table[fd].write_method)(fd, buf, len) #endif /* SQUID_FDE_H */ + diff --git a/src/filemap.cc b/src/filemap.cc index e37a572c38..52a3b4ab37 100644 --- a/src/filemap.cc +++ b/src/filemap.cc @@ -33,8 +33,8 @@ #define FM_INITIAL_NUMBER (1<<14) FileMap::FileMap() : - capacity_(FM_INITIAL_NUMBER), usedSlots_(0), - nwords(capacity_ >> LONG_BIT_SHIFT) + capacity_(FM_INITIAL_NUMBER), usedSlots_(0), + nwords(capacity_ >> LONG_BIT_SHIFT) { debugs(8, 3, HERE << "creating space for " << capacity_ << " files"); debugs(8, 5, "--> " << nwords << " words of " << sizeof(*bitmap) << " bytes each"); @@ -47,7 +47,7 @@ FileMap::grow() int old_sz = nwords * sizeof(*bitmap); void *old_map = bitmap; capacity_ <<= 1; - assert(capacity_ <= (1 << 24)); /* swap_filen is 25 bits, signed */ + assert(capacity_ <= (1 << 24)); /* swap_filen is 25 bits, signed */ nwords = capacity_ >> LONG_BIT_SHIFT; debugs(8, 3, HERE << " creating space for " << capacity_ << " files"); debugs(8, 5, "--> " << nwords << " words of " << sizeof(*bitmap) << " bytes each"); @@ -136,3 +136,4 @@ FileMap::~FileMap() { safe_free(bitmap); } + diff --git a/src/format/ByteCode.h b/src/format/ByteCode.h index 7fed3e421f..06fdd9af97 100644 --- a/src/format/ByteCode.h +++ b/src/format/ByteCode.h @@ -28,7 +28,7 @@ namespace Format * Bytecodes for the configureable format stuff */ typedef enum { - LFT_NONE, /* dummy */ + LFT_NONE, /* dummy */ /* arbitrary string between tokens */ LFT_STRING, @@ -220,7 +220,7 @@ typedef enum { #endif LFT_NOTE, - LFT_PERCENT, /* special string cases for escaped chars */ + LFT_PERCENT, /* special string cases for escaped chars */ // TODO assign better bytecode names and Token strings for these LFT_EXT_ACL_USER_CERT_RAW, @@ -246,3 +246,4 @@ enum Quoting { } // namespace Format #endif /* _SQUID_FMT_BYTECODE_H */ + diff --git a/src/format/Config.cc b/src/format/Config.cc index bb67a7f949..82081cf368 100644 --- a/src/format/Config.cc +++ b/src/format/Config.cc @@ -51,3 +51,4 @@ Format::FmtConfig::registerTokens(const String &nsName, TokenTableEntry const *t else debugs(0, DBG_CRITICAL, "BUG: format tokens for '" << nsName << "' missing!"); } + diff --git a/src/format/Config.h b/src/format/Config.h index c71e36becd..cdcdd61fee 100644 --- a/src/format/Config.h +++ b/src/format/Config.h @@ -82,3 +82,4 @@ extern FmtConfig TheConfig; #define dump_format(E,N,D) (D).dumpFormats((E),(N)) #endif + diff --git a/src/format/Format.cc b/src/format/Format.cc index 82d743b0a8..904f658942 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -32,8 +32,8 @@ #define strOrNull(s) ((s)==NULL||(s)[0]=='\0'?NULL:(s)) Format::Format::Format(const char *n) : - format(NULL), - next(NULL) + format(NULL), + next(NULL) { name = xstrdup(n); } @@ -106,7 +106,7 @@ Format::Format::dump(StoreEntry * entry, const char *directiveName) ByteCode_t type = t->type; switch (type) { - /* special cases */ + /* special cases */ case LFT_STRING: break; @@ -315,7 +315,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS char tmp[1024]; String sb; - for (Token *fmt = format; fmt != NULL; fmt = fmt->next) { /* for each token */ + for (Token *fmt = format; fmt != NULL; fmt = fmt->next) { /* for each token */ const char *out = NULL; int quote = 0; long int outint = 0; @@ -510,7 +510,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS case LFT_TIME_START: outtv = al->cache.start_time; doSec = 1; - break; + break; case LFT_TIME_TO_HANDLE_REQUEST: outtv = al->cache.trTime; @@ -840,11 +840,11 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS out = strOrNull(al->cache.extuser); break; - /* case LFT_USER_REALM: */ - /* case LFT_USER_SCHEME: */ + /* case LFT_USER_REALM: */ + /* case LFT_USER_SCHEME: */ - // the fmt->type can not be LFT_HTTP_SENT_STATUS_CODE_OLD_30 - // but compiler complains if ommited + // the fmt->type can not be LFT_HTTP_SENT_STATUS_CODE_OLD_30 + // but compiler complains if ommited case LFT_HTTP_SENT_STATUS_CODE_OLD_30: case LFT_HTTP_SENT_STATUS_CODE: outint = al->http.code; @@ -861,11 +861,11 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS doint = 1; } break; - /* case LFT_HTTP_STATUS: - * out = statusline->text; - * quote = 1; - * break; - */ + /* case LFT_HTTP_STATUS: + * out = statusline->text; + * quote = 1; + * break; + */ case LFT_HTTP_BODY_BYTES_READ: if (al->hier.bodyBytesRead >= 0) { outoff = al->hier.bodyBytesRead; @@ -1068,8 +1068,8 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS dooff =1; break; - /*case LFT_REQUEST_SIZE_BODY: */ - /*case LFT_REQUEST_SIZE_BODY_NO_TE: */ + /*case LFT_REQUEST_SIZE_BODY: */ + /*case LFT_REQUEST_SIZE_BODY_NO_TE: */ case LFT_ADAPTED_REPLY_SIZE_TOTAL: outoff = al->http.clientReplySz.messageTotal(); @@ -1095,14 +1095,14 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS doint = 1; break; - /*case LFT_REPLY_SIZE_BODY: */ - /*case LFT_REPLY_SIZE_BODY_NO_TE: */ + /*case LFT_REPLY_SIZE_BODY: */ + /*case LFT_REPLY_SIZE_BODY_NO_TE: */ case LFT_CLIENT_IO_SIZE_TOTAL: outint = al->http.clientRequestSz.messageTotal() + al->http.clientReplySz.messageTotal(); doint = 1; break; - /*case LFT_SERVER_IO_SIZE_TOTAL: */ + /*case LFT_SERVER_IO_SIZE_TOTAL: */ case LFT_TAG: if (al->request) @@ -1217,10 +1217,10 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS out = "%"; break; - // XXX: external_acl_type format tokens which are not output by logformat. - // They are listed here because the switch requires - // every ByteCode_t to be explicitly enumerated. - // But do not output due to lack of access to the values. + // XXX: external_acl_type format tokens which are not output by logformat. + // They are listed here because the switch requires + // every ByteCode_t to be explicitly enumerated. + // But do not output due to lack of access to the values. case LFT_EXT_ACL_USER_CERT_RAW: case LFT_EXT_ACL_USER_CERTCHAIN_RAW: case LFT_EXT_ACL_USER_CERT: @@ -1325,3 +1325,4 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS safe_free(out); } } + diff --git a/src/format/Format.h b/src/format/Format.h index ad818281a7..60ce321166 100644 --- a/src/format/Format.h +++ b/src/format/Format.h @@ -61,3 +61,4 @@ public: } // namespace Format #endif /* _SQUID_FORMAT_FORMAT_H */ + diff --git a/src/format/Quoting.cc b/src/format/Quoting.cc index 35e6e1c707..54add3c449 100644 --- a/src/format/Quoting.cc +++ b/src/format/Quoting.cc @@ -121,3 +121,4 @@ Format::QuoteMimeBlob(const char *header) *buf_cursor = '\0'; return buf; } + diff --git a/src/format/Quoting.h b/src/format/Quoting.h index f1630671f3..a8be744dbc 100644 --- a/src/format/Quoting.h +++ b/src/format/Quoting.h @@ -25,3 +25,4 @@ char *QuoteMimeBlob(const char *header); }; // namespace Format #endif /* _SQUID_FORMAT_QUOTING_H */ + diff --git a/src/format/Token.cc b/src/format/Token.cc index afe6126239..c016b479bf 100644 --- a/src/format/Token.cc +++ b/src/format/Token.cc @@ -39,7 +39,7 @@ static TokenTableEntry TokenTable1C[] = { {"%", LFT_PERCENT}, - {NULL, LFT_NONE} /* this must be last */ + {NULL, LFT_NONE} /* this must be last */ }; /// 2-char tokens @@ -97,7 +97,7 @@ static TokenTableEntry TokenTable2C[] = { {">rv", LFT_CLIENT_REQ_VERSION}, {"rm", LFT_REQUEST_METHOD}, - {"ru", LFT_REQUEST_URI}, /* doesn't include the query-string */ + {"ru", LFT_REQUEST_URI}, /* doesn't include the query-string */ {"rp", LFT_REQUEST_URLPATH_OLD_31}, /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ {"rv", LFT_REQUEST_VERSION}, @@ -131,7 +131,7 @@ static TokenTableEntry TokenTable2C[] = { {"ea", LFT_EXT_LOG}, {"sn", LFT_SEQUENCE_NUMBER}, - {NULL, LFT_NONE} /* this must be last */ + {NULL, LFT_NONE} /* this must be last */ }; /// Miscellaneous >2 byte tokens @@ -145,7 +145,7 @@ static TokenTableEntry TokenTableMisc[] = { {"err_detail", LFT_SQUID_ERROR_DETAIL }, {"note", LFT_NOTE }, {"credentials", LFT_CREDENTIALS}, - {NULL, LFT_NONE} /* this must be last */ + {NULL, LFT_NONE} /* this must be last */ }; #if USE_ADAPTATION @@ -571,15 +571,15 @@ Format::Token::parse(const char *def, Quoting *quoting) } Format::Token::Token() : type(LFT_NONE), - label(NULL), - widthMin(-1), - widthMax(-1), - quote(LOG_QUOTE_NONE), - left(false), - space(false), - zero(false), - divisor(1), - next(NULL) + label(NULL), + widthMin(-1), + widthMax(-1), + quote(LOG_QUOTE_NONE), + left(false), + space(false), + zero(false), + divisor(1), + next(NULL) { data.string = NULL; data.header.header = NULL; diff --git a/src/format/Token.h b/src/format/Token.h index b38b25e8da..b14e520f84 100644 --- a/src/format/Token.h +++ b/src/format/Token.h @@ -65,7 +65,7 @@ public: bool space; bool zero; int divisor; // class invariant: MUST NOT be zero. - Token *next; /* todo: move from linked list to array */ + Token *next; /* todo: move from linked list to array */ private: const char *scanForToken(TokenTableEntry const table[], const char *cur); @@ -74,3 +74,4 @@ private: } // namespace Format #endif /* _SQUID_FORMAT_TOKEN_H */ + diff --git a/src/format/TokenTableEntry.h b/src/format/TokenTableEntry.h index ebddc016ef..c30da86b6d 100644 --- a/src/format/TokenTableEntry.h +++ b/src/format/TokenTableEntry.h @@ -44,3 +44,4 @@ public: } // namespace Format #endif /* _SQUID_FORMAT_TOKENTABLEENTRY_H */ + diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 45550ae4fc..dc57ea17f2 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -79,7 +79,7 @@ class fqdncache_entry { public: - hash_link hash; /* must be first */ + hash_link hash; /* must be first */ time_t lastref; time_t expires; unsigned char name_count; @@ -168,7 +168,7 @@ fqdncacheRelease(fqdncache_entry * f) /** \ingroup FQDNCacheInternal - \param name FQDN hash string. + \param name FQDN hash string. \retval Match for given name */ static fqdncache_entry * @@ -239,8 +239,8 @@ purge_entries_fromhosts(void) fqdncache_entry *t; while (m) { - if (i != NULL) { /* need to delay deletion */ - fqdncacheRelease(i); /* we just override locks */ + if (i != NULL) { /* need to delay deletion */ + fqdncacheRelease(i); /* we just override locks */ i = NULL; } @@ -408,12 +408,12 @@ fqdncacheHandleReply(void *data, const rfc1035_rr * answers, int na, const char /** \ingroup FQDNCacheAPI * - \param addr IP address of domain to resolve. - \param handler A pointer to the function to be called when - * the reply from the FQDN cache - * (or the DNS if the FQDN cache misses) - \param handlerData Information that is passed to the handler - * and does not affect the FQDN cache. + \param addr IP address of domain to resolve. + \param handler A pointer to the function to be called when + * the reply from the FQDN cache + * (or the DNS if the FQDN cache misses) + \param handlerData Information that is passed to the handler + * and does not affect the FQDN cache. */ void fqdncache_nbgethostbyaddr(const Ip::Address &addr, FQDNH * handler, void *handlerData) @@ -478,8 +478,8 @@ fqdncache_nbgethostbyaddr(const Ip::Address &addr, FQDNH * handler, void *handle * DNS, unless this is requested, by setting the flags * to FQDN_LOOKUP_IF_MISS. * - \param addr address of the FQDN being resolved - \param flags values are NULL or FQDN_LOOKUP_IF_MISS. default is NULL. + \param addr address of the FQDN being resolved + \param flags values are NULL or FQDN_LOOKUP_IF_MISS. default is NULL. * */ const char * @@ -653,8 +653,8 @@ fqdncache_restart(void) * The worldist is to be managed by the caller, * including pointed-to strings * - \param addr FQDN name to be added. - \param hostnames ?? + \param addr FQDN name to be added. + \param hostnames ?? */ void fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames) @@ -686,7 +686,7 @@ fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames) } fce->name_count = j; - fce->names[j] = NULL; /* it's safe */ + fce->names[j] = NULL; /* it's safe */ fce->flags.fromhosts = true; fqdncacheAddEntry(fce); fqdncacheLockEntry(fce); @@ -804,3 +804,4 @@ snmp_netFqdnFn(variable_list * Var, snint * ErrP) } #endif /*SQUID_SNMP */ + diff --git a/src/fqdncache.h b/src/fqdncache.h index ccbef21f53..4081736f93 100644 --- a/src/fqdncache.h +++ b/src/fqdncache.h @@ -28,3 +28,4 @@ const char *fqdncache_gethostbyaddr(const Ip::Address &, int flags); void fqdncache_nbgethostbyaddr(const Ip::Address &, FQDNH *, void *); #endif /* SQUID_FQDNCACHE_H_ */ + diff --git a/src/fs/Module.cc b/src/fs/Module.cc index 36d1064bd4..bf8c0dc260 100644 --- a/src/fs/Module.cc +++ b/src/fs/Module.cc @@ -70,3 +70,4 @@ void Fs::Clean() #endif } + diff --git a/src/fs/Module.h b/src/fs/Module.h index 35ad788785..62f00a8e67 100644 --- a/src/fs/Module.h +++ b/src/fs/Module.h @@ -18,3 +18,4 @@ void Clean(); } // namespace Fs #endif /* SQUID_FS_MODULE_H */ + diff --git a/src/fs/aufs/StoreFSaufs.cc b/src/fs/aufs/StoreFSaufs.cc index f1cd5a388f..5c70428e37 100644 --- a/src/fs/aufs/StoreFSaufs.cc +++ b/src/fs/aufs/StoreFSaufs.cc @@ -20,3 +20,4 @@ */ /* Unused variable: */ + diff --git a/src/fs/diskd/StoreFSdiskd.cc b/src/fs/diskd/StoreFSdiskd.cc index 9727227c98..23893d7ac6 100644 --- a/src/fs/diskd/StoreFSdiskd.cc +++ b/src/fs/diskd/StoreFSdiskd.cc @@ -21,3 +21,4 @@ /* Unused variable: */ Fs::Ufs::StoreFSufs *DiskdInstance_foo = NULL; + diff --git a/src/fs/rock/RockDbCell.cc b/src/fs/rock/RockDbCell.cc index 8598e910f2..ace61a1ee5 100644 --- a/src/fs/rock/RockDbCell.cc +++ b/src/fs/rock/RockDbCell.cc @@ -15,3 +15,4 @@ Rock::DbCellHeader::DbCellHeader() { memset(this, 0, sizeof(*this)); } + diff --git a/src/fs/rock/RockDbCell.h b/src/fs/rock/RockDbCell.h index 81a43c2cea..f23e827adc 100644 --- a/src/fs/rock/RockDbCell.h +++ b/src/fs/rock/RockDbCell.h @@ -49,3 +49,4 @@ public: } // namespace Rock #endif /* SQUID_FS_ROCK_DB_CELL_H */ + diff --git a/src/fs/rock/RockForward.h b/src/fs/rock/RockForward.h index f3d53181fc..d34911f594 100644 --- a/src/fs/rock/RockForward.h +++ b/src/fs/rock/RockForward.h @@ -39,3 +39,4 @@ class DbCellHeader; } #endif /* SQUID_FS_ROCK_FORWARD_H */ + diff --git a/src/fs/rock/RockIoRequests.cc b/src/fs/rock/RockIoRequests.cc index c22ec6b262..3fb0427a4b 100644 --- a/src/fs/rock/RockIoRequests.cc +++ b/src/fs/rock/RockIoRequests.cc @@ -16,17 +16,18 @@ CBDATA_NAMESPACED_CLASS_INIT(Rock, WriteRequest); Rock::ReadRequest::ReadRequest(const ::ReadRequest &base, const IoState::Pointer &anSio): - ::ReadRequest(base), - sio(anSio) + ::ReadRequest(base), + sio(anSio) { } Rock::WriteRequest::WriteRequest(const ::WriteRequest &base, const IoState::Pointer &anSio): - ::WriteRequest(base), - sio(anSio), - sidCurrent(-1), - sidNext(-1), - eof(false) + ::WriteRequest(base), + sio(anSio), + sidCurrent(-1), + sidNext(-1), + eof(false) { } + diff --git a/src/fs/rock/RockIoRequests.h b/src/fs/rock/RockIoRequests.h index a5193e03fa..9f5257b0d8 100644 --- a/src/fs/rock/RockIoRequests.h +++ b/src/fs/rock/RockIoRequests.h @@ -48,3 +48,4 @@ public: } // namespace Rock #endif /* SQUID_FS_ROCK_IO_REQUESTS_H */ + diff --git a/src/fs/rock/RockIoState.cc b/src/fs/rock/RockIoState.cc index e9a5f5494f..ee70acbae4 100644 --- a/src/fs/rock/RockIoState.cc +++ b/src/fs/rock/RockIoState.cc @@ -27,13 +27,13 @@ Rock::IoState::IoState(Rock::SwapDir::Pointer &aDir, StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data): - readableAnchor_(NULL), - writeableAnchor_(NULL), - sidCurrent(-1), - dir(aDir), - slotSize(dir->slotSize), - objOffset(0), - theBuf(dir->slotSize) + readableAnchor_(NULL), + writeableAnchor_(NULL), + sidCurrent(-1), + dir(aDir), + slotSize(dir->slotSize), + objOffset(0), + theBuf(dir->slotSize) { e = anEntry; e->lock("rock I/O"); @@ -351,20 +351,20 @@ class StoreIOStateCb: public CallDialer { public: StoreIOStateCb(StoreIOState::STIOCB *cb, void *data, int err, const Rock::IoState::Pointer &anSio): - callback(NULL), - callback_data(NULL), - errflag(err), - sio(anSio) { + callback(NULL), + callback_data(NULL), + errflag(err), + sio(anSio) { callback = cb; callback_data = cbdataReference(data); } StoreIOStateCb(const StoreIOStateCb &cb): - callback(NULL), - callback_data(NULL), - errflag(cb.errflag), - sio(cb.sio) { + callback(NULL), + callback_data(NULL), + errflag(cb.errflag), + sio(cb.sio) { callback = cb.callback; callback_data = cbdataReference(cb.callback_data); diff --git a/src/fs/rock/RockIoState.h b/src/fs/rock/RockIoState.h index be52e7ba1f..4d18db032b 100644 --- a/src/fs/rock/RockIoState.h +++ b/src/fs/rock/RockIoState.h @@ -77,3 +77,4 @@ private: } // namespace Rock #endif /* SQUID_FS_ROCK_IO_STATE_H */ + diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc index d10bf79090..d1265f4e43 100644 --- a/src/fs/rock/RockRebuild.cc +++ b/src/fs/rock/RockRebuild.cc @@ -81,7 +81,7 @@ class LoadingEntry { public: LoadingEntry(): size(0), version(0), state(leEmpty), anchored(0), - mapped(0), freed(0), more(-1) {} + mapped(0), freed(0), more(-1) {} /* store entry-level information indexed by sfileno */ uint64_t size; ///< payload seen so far @@ -102,16 +102,16 @@ public: } /* namespace Rock */ Rock::Rebuild::Rebuild(SwapDir *dir): AsyncJob("Rock::Rebuild"), - sd(dir), - entries(NULL), - dbSize(0), - dbSlotSize(0), - dbSlotLimit(0), - dbEntryLimit(0), - fd(-1), - dbOffset(0), - loadingPos(0), - validationPos(0) + sd(dir), + entries(NULL), + dbSize(0), + dbSlotSize(0), + dbSlotLimit(0), + dbEntryLimit(0), + fd(-1), + dbOffset(0), + loadingPos(0), + validationPos(0) { assert(sd); memset(&counts, 0, sizeof(counts)); @@ -687,3 +687,4 @@ Rock::Rebuild::useNewSlot(const SlotId slotId, const DbCellHeader &header) } } } + diff --git a/src/fs/rock/RockRebuild.h b/src/fs/rock/RockRebuild.h index 30103bd743..c7c516f88c 100644 --- a/src/fs/rock/RockRebuild.h +++ b/src/fs/rock/RockRebuild.h @@ -83,3 +83,4 @@ private: } // namespace Rock #endif /* SQUID_FS_ROCK_REBUILD_H */ + diff --git a/src/fs/rock/RockStoreFileSystem.cc b/src/fs/rock/RockStoreFileSystem.cc index b2584a4b67..2f7bdc8c47 100644 --- a/src/fs/rock/RockStoreFileSystem.cc +++ b/src/fs/rock/RockStoreFileSystem.cc @@ -55,3 +55,4 @@ Rock::StoreFileSystem::Stats(StoreEntry *sentry) { assert(false); // XXX: implement } + diff --git a/src/fs/rock/RockStoreFileSystem.h b/src/fs/rock/RockStoreFileSystem.h index 6583e549fc..40f64ff4ed 100644 --- a/src/fs/rock/RockStoreFileSystem.h +++ b/src/fs/rock/RockStoreFileSystem.h @@ -41,3 +41,4 @@ private: } // namespace Rock #endif /* SQUID_FS_ROCK_FS_H */ + diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index ef22b9e7ba..5871e0da0d 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -39,8 +39,8 @@ const int64_t Rock::SwapDir::HeaderSize = 16*1024; Rock::SwapDir::SwapDir(): ::SwapDir("rock"), - slotSize(HeaderSize), filePath(NULL), map(NULL), io(NULL), - waitingForPage(NULL) + slotSize(HeaderSize), filePath(NULL), map(NULL), io(NULL), + waitingForPage(NULL) { } @@ -95,7 +95,7 @@ Rock::SwapDir::anchorCollapsed(StoreEntry &collapsed, bool &inSync) sfileno filen; const Ipc::StoreMapAnchor *const slot = map->openForReading( - reinterpret_cast(collapsed.key), filen); + reinterpret_cast(collapsed.key), filen); if (!slot) return false; @@ -1067,3 +1067,4 @@ Rock::SwapDirRr::~SwapDirRr() delete freeSlotsOwners[i]; } } + diff --git a/src/fs/rock/RockSwapDir.h b/src/fs/rock/RockSwapDir.h index 1eefe5e25c..665c4e2e7c 100644 --- a/src/fs/rock/RockSwapDir.h +++ b/src/fs/rock/RockSwapDir.h @@ -160,3 +160,4 @@ private: } // namespace Rock #endif /* SQUID_FS_ROCK_SWAP_DIR_H */ + diff --git a/src/fs/ufs/RebuildState.cc b/src/fs/ufs/RebuildState.cc index 54efaec20f..fa84c1bc82 100644 --- a/src/fs/ufs/RebuildState.cc +++ b/src/fs/ufs/RebuildState.cc @@ -29,7 +29,7 @@ CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,RebuildState); Fs::Ufs::RebuildState::RebuildState(RefCount aSwapDir) : - sd (aSwapDir), LogParser(NULL), e(NULL), fromLog(true), _done (false) + sd (aSwapDir), LogParser(NULL), e(NULL), fromLog(true), _done (false) { /* * If the swap.state file exists in the cache_dir, then @@ -541,3 +541,4 @@ Fs::Ufs::RebuildState::currentItem() { return currentEntry(); } + diff --git a/src/fs/ufs/RebuildState.h b/src/fs/ufs/RebuildState.h index 4be3edc0c7..1f5201cd97 100644 --- a/src/fs/ufs/RebuildState.h +++ b/src/fs/ufs/RebuildState.h @@ -79,3 +79,4 @@ private: } /* namespace Fs */ #endif /* SQUID_FS_UFS_REBUILDSTATE_H */ + diff --git a/src/fs/ufs/StoreFSufs.cc b/src/fs/ufs/StoreFSufs.cc index 3e6ab83904..4ac1e7a798 100644 --- a/src/fs/ufs/StoreFSufs.cc +++ b/src/fs/ufs/StoreFSufs.cc @@ -16,3 +16,4 @@ /* Unused variable: */ Fs::Ufs::StoreFSufs *UfsInstance_foo = NULL; + diff --git a/src/fs/ufs/StoreFSufs.h b/src/fs/ufs/StoreFSufs.h index 5873d03dea..cf15e07245 100644 --- a/src/fs/ufs/StoreFSufs.h +++ b/src/fs/ufs/StoreFSufs.h @@ -10,7 +10,7 @@ #define SQUID_STOREFSUFS_H /** - \defgroup UFS UFS Storage Filesystem + \defgroup UFS UFS Storage Filesystem \ingroup FileSystems */ @@ -92,3 +92,4 @@ StoreFSufs::setup() } /* namespace Fs */ #endif /* SQUID_STOREFSUFS_H */ + diff --git a/src/fs/ufs/StoreSearchUFS.cc b/src/fs/ufs/StoreSearchUFS.cc index ec01cfbb08..503f1a53f9 100644 --- a/src/fs/ufs/StoreSearchUFS.cc +++ b/src/fs/ufs/StoreSearchUFS.cc @@ -16,8 +16,8 @@ CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,StoreSearchUFS); Fs::Ufs::StoreSearchUFS::StoreSearchUFS(RefCount aSwapDir) : - sd(aSwapDir), walker (sd->repl->WalkInit(sd->repl)), - current (NULL), _done (false) + sd(aSwapDir), walker (sd->repl->WalkInit(sd->repl)), + current (NULL), _done (false) {} Fs::Ufs::StoreSearchUFS::~StoreSearchUFS() @@ -66,3 +66,4 @@ Fs::Ufs::StoreSearchUFS::currentItem() { return current; } + diff --git a/src/fs/ufs/StoreSearchUFS.h b/src/fs/ufs/StoreSearchUFS.h index fa9df4739f..caeef28f48 100644 --- a/src/fs/ufs/StoreSearchUFS.h +++ b/src/fs/ufs/StoreSearchUFS.h @@ -60,3 +60,4 @@ private: } //namespace Ufs } //namespace Fs #endif /* SQUID_FS_UFS_STORESEARCHUFS_H */ + diff --git a/src/fs/ufs/UFSStoreState.cc b/src/fs/ufs/UFSStoreState.cc index e7fa5d6ab0..e51133a7da 100644 --- a/src/fs/ufs/UFSStoreState.cc +++ b/src/fs/ufs/UFSStoreState.cc @@ -316,7 +316,7 @@ Fs::Ufs::UFSStoreState::doCloseCallback(int errflag) * us that the file has been closed. This must be the last line, * as theFile may be the only object holding us in memory. */ - theFile = NULL; // refcounted + theFile = NULL; // refcounted } /* ============= THE REAL UFS CODE ================ */ @@ -438,7 +438,7 @@ Fs::Ufs::UFSStoreState::drainWriteQueue() /* * DPW 2006-05-24 - * This blows. DiskThreadsDiskFile::close() won't actually do the close + * This blows. DiskThreadsDiskFile::close() won't actually do the close * if ioInProgress() is true. So we have to check it here. Maybe someday * DiskThreadsDiskFile::close() will be modified to have a return value, * or will remember to do the close for us. diff --git a/src/fs/ufs/UFSStoreState.h b/src/fs/ufs/UFSStoreState.h index 69c5c9eb50..03ffd1a701 100644 --- a/src/fs/ufs/UFSStoreState.h +++ b/src/fs/ufs/UFSStoreState.h @@ -104,3 +104,4 @@ private: } //namespace Fs #endif /* SQUID_FS_UFS_UFSSTORESTATE_H */ + diff --git a/src/fs/ufs/UFSStrategy.cc b/src/fs/ufs/UFSStrategy.cc index 29e52fab1b..d2db4cbe46 100644 --- a/src/fs/ufs/UFSStrategy.cc +++ b/src/fs/ufs/UFSStrategy.cc @@ -160,3 +160,4 @@ Fs::Ufs::UFSStrategy::statfs(StoreEntry & sentry)const { io->statfs(sentry); } + diff --git a/src/fs/ufs/UFSStrategy.h b/src/fs/ufs/UFSStrategy.h index fd3a9b63f8..be5a11e0a3 100644 --- a/src/fs/ufs/UFSStrategy.h +++ b/src/fs/ufs/UFSStrategy.h @@ -67,3 +67,4 @@ private: } //namespace Fs #endif /* SQUID_FS_UFS_UFSSTRATEGY_H */ + diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc index 52179c90a9..0d3e3f9ca9 100644 --- a/src/fs/ufs/UFSSwapDir.cc +++ b/src/fs/ufs/UFSSwapDir.cc @@ -62,8 +62,8 @@ public: }; UFSCleanLog::UFSCleanLog(SwapDir *aSwapDir) : - cur(NULL), newLog(NULL), cln(NULL), outbuf(NULL), - outbuf_offset(0), fd(-1),walker(NULL), sd(aSwapDir) + cur(NULL), newLog(NULL), cln(NULL), outbuf(NULL), + outbuf_offset(0), fd(-1),walker(NULL), sd(aSwapDir) {} const StoreEntry * @@ -305,18 +305,18 @@ Fs::Ufs::UFSSwapDir::create() } Fs::Ufs::UFSSwapDir::UFSSwapDir(char const *aType, const char *anIOType) : - SwapDir(aType), - IO(NULL), - fsdata(NULL), - map(new FileMap()), - suggest(0), - l1(16), - l2(256), - swaplog_fd(-1), - currentIOOptions(new ConfigOptionVector()), - ioType(xstrdup(anIOType)), - cur_size(0), - n_disk_objects(0) + SwapDir(aType), + IO(NULL), + fsdata(NULL), + map(new FileMap()), + suggest(0), + l1(16), + l2(256), + swaplog_fd(-1), + currentIOOptions(new ConfigOptionVector()), + ioType(xstrdup(anIOType)), + cur_size(0), + n_disk_objects(0) { /* modulename is only set to disk modules that are built, by configure, * so the Find call should never return NULL here. @@ -1326,3 +1326,4 @@ Fs::Ufs::UFSSwapDir::DirClean(int swap_index) debugs(36, 3, HERE << "Cleaned " << k << " unused files from " << p1); return k; } + diff --git a/src/fs/ufs/UFSSwapDir.h b/src/fs/ufs/UFSSwapDir.h index e910a78c29..f322ff21e9 100644 --- a/src/fs/ufs/UFSSwapDir.h +++ b/src/fs/ufs/UFSSwapDir.h @@ -169,3 +169,4 @@ private: } //namespace Ufs } //namespace Fs #endif /* SQUID_FS_UFS_UFSSWAPDIR_H */ + diff --git a/src/fs/ufs/UFSSwapLogParser.cc b/src/fs/ufs/UFSSwapLogParser.cc index 2bf42f59ef..9c85df1b41 100644 --- a/src/fs/ufs/UFSSwapLogParser.cc +++ b/src/fs/ufs/UFSSwapLogParser.cc @@ -181,3 +181,4 @@ Fs::Ufs::UFSSwapLogParser::SwapLogEntries() return 0; } + diff --git a/src/fs/ufs/UFSSwapLogParser.h b/src/fs/ufs/UFSSwapLogParser.h index cb9a16ef2c..aa06f1bec9 100644 --- a/src/fs/ufs/UFSSwapLogParser.h +++ b/src/fs/ufs/UFSSwapLogParser.h @@ -42,3 +42,4 @@ public: } //namespace Ufs } //namespace Fs #endif /* SQUID_FS_UFS_UFSSWAPLOGPARSER_H */ + diff --git a/src/ftp/Elements.cc b/src/ftp/Elements.cc index 653b745dc4..454bc6791a 100644 --- a/src/ftp/Elements.cc +++ b/src/ftp/Elements.cc @@ -191,3 +191,4 @@ Ftp::cmdUser() static const SBuf cmd("USER"); return cmd; } + diff --git a/src/ftp/Elements.h b/src/ftp/Elements.h index b9fdf94676..ad7cf0f602 100644 --- a/src/ftp/Elements.h +++ b/src/ftp/Elements.h @@ -53,3 +53,4 @@ const SBuf &cmdUser(); } // namespace Ftp #endif /* SQUID_FTP_ELEMENTS_H */ + diff --git a/src/ftp/Parsing.cc b/src/ftp/Parsing.cc index 7c824d8d3e..27909b2f22 100644 --- a/src/ftp/Parsing.cc +++ b/src/ftp/Parsing.cc @@ -112,3 +112,4 @@ Ftp::UnescapeDoubleQuoted(const char *quotedPath) } return path.content(); } + diff --git a/src/ftp/Parsing.h b/src/ftp/Parsing.h index 9a23332d25..cb50346c82 100644 --- a/src/ftp/Parsing.h +++ b/src/ftp/Parsing.h @@ -27,3 +27,4 @@ const char *UnescapeDoubleQuoted(const char *quotedPath); } // namespace Ftp #endif /* SQUID_FTP_PARSING_H */ + diff --git a/src/globals.h b/src/globals.h index 00ac24fee5..d588a79b28 100644 --- a/src/globals.h +++ b/src/globals.h @@ -17,7 +17,7 @@ #include "rfc2181.h" #include "SBuf.h" -extern char *ConfigFile; /* NULL */ +extern char *ConfigFile; /* NULL */ extern char *IcpOpcodeStr[]; extern char tmp_error_buf[ERROR_BUF_SZ]; extern char ThisCache[RFC2181_MAXHOSTNAMELEN << 1]; @@ -25,12 +25,12 @@ extern char ThisCache2[RFC2181_MAXHOSTNAMELEN << 1]; extern char config_input_line[BUFSIZ]; /// During parsing, the name of the current squid.conf directive being parsed. extern const char *cfg_directive; /* NULL */ -extern const char *DefaultConfigFile; /* DEFAULT_CONFIG_FILE */ -extern const char *cfg_filename; /* NULL */ -extern const char *dash_str; /* "-" */ -extern const char *null_string; /* "" */ -extern const char *version_string; /* VERSION */ -extern const char *appname_string; /* PACKAGE */ +extern const char *DefaultConfigFile; /* DEFAULT_CONFIG_FILE */ +extern const char *cfg_filename; /* NULL */ +extern const char *dash_str; /* "-" */ +extern const char *null_string; /* "" */ +extern const char *version_string; /* VERSION */ +extern const char *appname_string; /* PACKAGE */ extern char const *visible_appname_string; /* NULL */ extern const char *fdTypeStr[]; extern const char *hier_strings[]; @@ -38,72 +38,72 @@ extern const char *memStatusStr[]; extern const char *pingStatusStr[]; extern const char *storeStatusStr[]; extern const char *swapStatusStr[]; -extern int Biggest_FD; /* -1 */ -extern int Number_FD; /* 0 */ -extern int Opening_FD; /* 0 */ -extern int NDnsServersAlloc; /* 0 */ +extern int Biggest_FD; /* -1 */ +extern int Number_FD; /* 0 */ +extern int Opening_FD; /* 0 */ +extern int NDnsServersAlloc; /* 0 */ extern int RESERVED_FD; -extern int Squid_MaxFD; /* SQUID_MAXFD */ -extern int config_lineno; /* 0 */ -extern int opt_reuseaddr; /* 1 */ -extern int neighbors_do_private_keys; /* 1 */ -extern int opt_catch_signals; /* 1 */ -extern int opt_foreground_rebuild; /* 0 */ -extern char *opt_forwarded_for; /* NULL */ -extern int opt_reload_hit_only; /* 0 */ +extern int Squid_MaxFD; /* SQUID_MAXFD */ +extern int config_lineno; /* 0 */ +extern int opt_reuseaddr; /* 1 */ +extern int neighbors_do_private_keys; /* 1 */ +extern int opt_catch_signals; /* 1 */ +extern int opt_foreground_rebuild; /* 0 */ +extern char *opt_forwarded_for; /* NULL */ +extern int opt_reload_hit_only; /* 0 */ -extern int opt_udp_hit_obj; /* 0 */ -extern int opt_create_swap_dirs; /* 0 */ -extern int opt_store_doublecheck; /* 0 */ -extern int syslog_enable; /* 0 */ -extern int DnsSocketA; /* -1 */ -extern int DnsSocketB; /* -1 */ -extern int n_disk_objects; /* 0 */ +extern int opt_udp_hit_obj; /* 0 */ +extern int opt_create_swap_dirs; /* 0 */ +extern int opt_store_doublecheck; /* 0 */ +extern int syslog_enable; /* 0 */ +extern int DnsSocketA; /* -1 */ +extern int DnsSocketB; /* -1 */ +extern int n_disk_objects; /* 0 */ extern IoStats IOStats; -extern AclDenyInfoList *DenyInfoList; /* NULL */ +extern AclDenyInfoList *DenyInfoList; /* NULL */ extern struct timeval squid_start; -extern int starting_up; /* 1 */ -extern int shutting_down; /* 0 */ -extern int reconfiguring; /* 0 */ -extern time_t hit_only_mode_until; /* 0 */ -extern double request_failure_ratio; /* 0.0 */ -extern int store_hash_buckets; /* 0 */ -extern hash_table *store_table; /* NULL */ -extern int hot_obj_count; /* 0 */ -extern int CacheDigestHashFuncCount; /* 4 */ -extern CacheDigest *store_digest; /* NULL */ -extern const char *StoreDigestFileName; /* "store_digest" */ -extern const char *StoreDigestMimeStr; /* "application/cache-digest" */ +extern int starting_up; /* 1 */ +extern int shutting_down; /* 0 */ +extern int reconfiguring; /* 0 */ +extern time_t hit_only_mode_until; /* 0 */ +extern double request_failure_ratio; /* 0.0 */ +extern int store_hash_buckets; /* 0 */ +extern hash_table *store_table; /* NULL */ +extern int hot_obj_count; /* 0 */ +extern int CacheDigestHashFuncCount; /* 4 */ +extern CacheDigest *store_digest; /* NULL */ +extern const char *StoreDigestFileName; /* "store_digest" */ +extern const char *StoreDigestMimeStr; /* "application/cache-digest" */ -extern const char *MultipartMsgBoundaryStr; /* "Unique-Squid-Separator" */ +extern const char *MultipartMsgBoundaryStr; /* "Unique-Squid-Separator" */ #if USE_HTTP_VIOLATIONS -extern int refresh_nocache_hack; /* 0 */ +extern int refresh_nocache_hack; /* 0 */ #endif -extern int store_open_disk_fd; /* 0 */ +extern int store_open_disk_fd; /* 0 */ extern const char *SwapDirType[]; -extern int store_swap_low; /* 0 */ -extern int store_swap_high; /* 0 */ -extern size_t store_pages_max; /* 0 */ -extern int64_t store_maxobjsize; /* 0 */ -extern hash_table *proxy_auth_username_cache; /* NULL */ +extern int store_swap_low; /* 0 */ +extern int store_swap_high; /* 0 */ +extern size_t store_pages_max; /* 0 */ +extern int64_t store_maxobjsize; /* 0 */ +extern hash_table *proxy_auth_username_cache; /* NULL */ extern int incoming_sockets_accepted; #if _SQUID_WINDOWS_ -extern unsigned int WIN32_Socks_initialized; /* 0 */ +extern unsigned int WIN32_Socks_initialized; /* 0 */ #endif #if _SQUID_WINDOWS_ -extern unsigned int WIN32_OS_version; /* 0 */ +extern unsigned int WIN32_OS_version; /* 0 */ extern char *WIN32_OS_string; /* NULL */ extern char *WIN32_Command_Line; /* NULL */ extern char *WIN32_Service_Command_Line; /* NULL */ extern unsigned int WIN32_run_mode; /* _WIN_SQUID_RUN_MODE_INTERACTIVE */ #endif -extern int ssl_ex_index_server; /* -1 */ +extern int ssl_ex_index_server; /* -1 */ extern int ssl_ctx_ex_index_dont_verify_domain; /* -1 */ -extern int ssl_ex_index_cert_error_check; /* -1 */ +extern int ssl_ex_index_cert_error_check; /* -1 */ extern int ssl_ex_index_ssl_error_detail; /* -1 */ extern int ssl_ex_index_ssl_peeked_cert; /* -1 */ extern int ssl_ex_index_ssl_errors; /* -1 */ @@ -111,7 +111,7 @@ extern int ssl_ex_index_ssl_cert_chain; /* -1 */ extern int ssl_ex_index_ssl_validation_counter; /* -1 */ extern const char *external_acl_message; /* NULL */ -extern int opt_send_signal; /* -1 */ +extern int opt_send_signal; /* -1 */ extern int opt_no_daemon; /* 0 */ extern int opt_parse_cfg_only; /* 0 */ @@ -120,3 +120,4 @@ extern int opt_parse_cfg_only; /* 0 */ extern int KidIdentifier; /* 0 */ #endif /* SQUID_GLOBALS_H */ + diff --git a/src/gopher.cc b/src/gopher.cc index 17d9e12996..0043260543 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -117,7 +117,7 @@ public: char request[MAX_URL]; int cso_recno; int len; - char *buf; /* pts to a 4k page */ + char *buf; /* pts to a 4k page */ Comm::ConnectionPointer serverConn; FwdState::Pointer fwd; char replybuf[BUFSIZ]; @@ -278,9 +278,9 @@ gopher_request_parse(const HttpRequest * req, char *type_id, char *request) /** * Parse the request to determine whether it is cachable. * - * \param req Request data. - * \retval 0 Not cachable. - * \retval 1 Cachable. + * \param req Request data. + * \retval 0 Not cachable. + * \retval 1 Cachable. */ int gopherCachable(const HttpRequest * req) @@ -493,22 +493,22 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) junk = strchr(host, TAB); if (junk) - *junk++ = 0; /* Chop port */ + *junk++ = 0; /* Chop port */ else { junk = strchr(host, '\r'); if (junk) - *junk++ = 0; /* Chop port */ + *junk++ = 0; /* Chop port */ else { junk = strchr(host, '\n'); if (junk) - *junk++ = 0; /* Chop port */ + *junk++ = 0; /* Chop port */ } } if ((port[1] == '0') && (!port[2])) - port[0] = 0; /* 0 means none */ + port[0] = 0; /* 0 means none */ } /* escape a selector here */ @@ -613,7 +613,7 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) } break; - } /* HTML_DIR, HTML_INDEX_RESULT */ + } /* HTML_DIR, HTML_INDEX_RESULT */ case GopherStateData::HTML_CSO_RESULT: { if (line[0] == '-') { @@ -663,11 +663,11 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) break; } - case 102: /* Number of matches */ + case 102: /* Number of matches */ - case 501: /* No Match */ + case 501: /* No Match */ - case 502: { /* Too Many Matches */ + case 502: { /* Too Many Matches */ /* Print the message the server returns */ snprintf(tmpbuf, TEMP_BUF_SIZE, "

%s

\n
", html_quote(result));
                     outbuf.append(tmpbuf);
@@ -677,14 +677,14 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
                 }
             }
 
-        }			/* HTML_CSO_RESULT */
+            }           /* HTML_CSO_RESULT */
 
         default:
-            break;		/* do nothing */
+            break;      /* do nothing */
 
-        }			/* switch */
+        }           /* switch */
 
-    }				/* while loop */
+    }               /* while loop */
 
     if (outbuf.size() > 0) {
         entry->append(outbuf.rawBuf(), outbuf.size());
@@ -836,7 +836,7 @@ gopherSendComplete(const Comm::ConnectionPointer &conn, char *buf, size_t size,
         gopherState->serverConn->close();
 
         if (buf)
-            memFree(buf, MEM_4K_BUF);	/* Allocated by gopherSendRequest. */
+            memFree(buf, MEM_4K_BUF);   /* Allocated by gopherSendRequest. */
 
         return;
     }
@@ -881,7 +881,7 @@ gopherSendComplete(const Comm::ConnectionPointer &conn, char *buf, size_t size,
     entry->delayAwareRead(conn, gopherState->replybuf, BUFSIZ, call);
 
     if (buf)
-        memFree(buf, MEM_4K_BUF);	/* Allocated by gopherSendRequest. */
+        memFree(buf, MEM_4K_BUF);   /* Allocated by gopherSendRequest. */
 }
 
 /**
@@ -897,7 +897,7 @@ gopherSendRequest(int fd, void *data)
         const char *t = strchr(gopherState->request, '?');
 
         if (t != NULL)
-            ++t;		/* skip the ? */
+            ++t;        /* skip the ? */
         else
             t = "";
 
@@ -965,3 +965,4 @@ gopherStart(FwdState * fwd)
                                      CommTimeoutCbPtrFun(gopherTimeout, gopherState));
     commSetConnTimeout(fwd->serverConnection(), Config.Timeout.read, timeoutCall);
 }
+
diff --git a/src/gopher.h b/src/gopher.h
index 267d5d658c..e703dfb54f 100644
--- a/src/gopher.h
+++ b/src/gopher.h
@@ -26,3 +26,4 @@ void gopherStart(FwdState *);
 int gopherCachable(const HttpRequest *);
 
 #endif /* SQUID_GOPHER_H_ */
+
diff --git a/src/helper.cc b/src/helper.cc
index db438e1b0f..df6cace971 100644
--- a/src/helper.cc
+++ b/src/helper.cc
@@ -239,13 +239,12 @@ helperOpenServers(helper * hlp)
         AsyncCall::Pointer closeCall = asyncCall(5,4, "helperServerFree", cbdataDialer(helperServerFree, srv));
         comm_add_close_handler(rfd, closeCall);
 
-        if (hlp->timeout && hlp->childs.concurrency){
+        if (hlp->timeout && hlp->childs.concurrency) {
             AsyncCall::Pointer timeoutCall = commCbCall(84, 4, "helper_server::requestTimeout",
-                                                        CommTimeoutCbPtrFun(helper_server::requestTimeout, srv));
+                                             CommTimeoutCbPtrFun(helper_server::requestTimeout, srv));
             commSetConnTimeout(srv->readPipe, hlp->timeout, timeoutCall);
         }
 
-
         AsyncCall::Pointer call = commCbCall(5,4, "helperHandleRead",
                                              CommIoCbPtrFun(helperHandleRead, srv));
         comm_read(srv->readPipe, srv->rbuf, srv->rbuf_sz - 1, call);
@@ -631,9 +630,9 @@ helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp, const char *label
                           srv->flags.reserved ? 'R' : ' ',
                           srv->flags.shutdown ? 'S' : ' ',
                           srv->request ? (srv->request->placeholder ? 'P' : ' ') : ' ',
-                                  tt < 0.0 ? 0.0 : tt,
-                                  (int) srv->roffset,
-                                  srv->request ? Format::QuoteMimeBlob(srv->request->buf) : "(none)");
+                          tt < 0.0 ? 0.0 : tt,
+                          (int) srv->roffset,
+                          srv->request ? Format::QuoteMimeBlob(srv->request->buf) : "(none)");
     }
 
     storeAppendPrintf(sentry, "\nFlags key:\n\n");
@@ -661,7 +660,7 @@ helperShutdown(helper * hlp)
 
         assert(hlp->childs.n_active > 0);
         -- hlp->childs.n_active;
-        srv->flags.shutdown = true;	/* request it to shut itself down */
+        srv->flags.shutdown = true; /* request it to shut itself down */
 
         if (srv->flags.closing) {
             debugs(84, 3, "helperShutdown: " << hlp->id_name << " #" << srv->index << " is CLOSING.");
@@ -698,7 +697,7 @@ helperStatefulShutdown(statefulhelper * hlp)
 
         assert(hlp->childs.n_active > 0);
         -- hlp->childs.n_active;
-        srv->flags.shutdown = true;	/* request it to shut itself down */
+        srv->flags.shutdown = true; /* request it to shut itself down */
 
         if (srv->stats.pending) {
             debugs(84, 3, "helperStatefulShutdown: " << hlp->id_name << " #" << srv->index << " is BUSY.");
@@ -934,7 +933,7 @@ helperReturnBuffer(int request_number, helper_server * srv, helper * hlp, char *
             hlp->submitRequest(r);
         } else
             delete r;
-    } else if (srv->stats.timedout){
+    } else if (srv->stats.timedout) {
         debugs(84, 3, "Timedout reply received for request-ID: " << request_number << " , ignore");
     } else {
         debugs(84, DBG_IMPORTANT, "helperHandleRead: unexpected reply on channel " <<
@@ -1531,7 +1530,7 @@ helper_server::checkForTimedOutRequests(bool const retry)
         } else if (cbdataReferenceValidDone(r->data, &cbdata)) {
             if (!parent->onTimedOutResponse.isEmpty()) {
                 // Helper::Reply needs a non const buffer
-                char *replyMsg = xstrdup(parent->onTimedOutResponse.c_str()); 
+                char *replyMsg = xstrdup(parent->onTimedOutResponse.c_str());
                 r->callback(cbdata, Helper::Reply(replyMsg, strlen(replyMsg)));
                 xfree(replyMsg);
             } else
@@ -1558,10 +1557,11 @@ helper_server::requestTimeout(const CommTimeoutCbParams &io)
 
     debugs(84, 3, HERE << io.conn << " establish new helper_server::requestTimeout");
     AsyncCall::Pointer timeoutCall = commCbCall(84, 4, "helper_server::requestTimeout",
-                                                CommTimeoutCbPtrFun(helper_server::requestTimeout, srv));
+                                     CommTimeoutCbPtrFun(helper_server::requestTimeout, srv));
 
     const int timeSpent = srv->requests.empty() ? 0 : (squid_curtime - srv->requests.front()->dispatch_time.tv_sec);
     const int timeLeft = max(1, (static_cast(srv->parent->timeout) - timeSpent));
 
     commSetConnTimeout(io.conn, timeLeft, timeoutCall);
 }
+
diff --git a/src/helper.h b/src/helper.h
index 8c7237836e..b7c4cea4cd 100644
--- a/src/helper.h
+++ b/src/helper.h
@@ -45,16 +45,16 @@ class helper
 
 public:
     inline helper(const char *name) :
-            cmdline(NULL),
-            id_name(name),
-            ipc_type(0),
-            full_time(0),
-            last_queue_warn(0),
-            last_restart(0),
-            timeout(0),
-            retryTimedOut(false),
-            retryBrokenHelper(false),
-            eom('\n') {
+        cmdline(NULL),
+        id_name(name),
+        ipc_type(0),
+        full_time(0),
+        last_queue_warn(0),
+        last_restart(0),
+        timeout(0),
+        retryTimedOut(false),
+        retryBrokenHelper(false),
+        eom('\n') {
         memset(&stats, 0, sizeof(stats));
     }
     ~helper();
@@ -65,7 +65,7 @@ public:
     ///< If not full, submit request. Otherwise, either kill Squid or return false.
     bool trySubmit(const char *buf, HLPCB * callback, void *data);
 
-    /// Submits a request to the helper or add it to the queue if none of 
+    /// Submits a request to the helper or add it to the queue if none of
     /// the servers is available.
     void submitRequest(Helper::Request *r);
 public:
@@ -200,7 +200,7 @@ public:
     /// or the configured "on timeout response" for timedout requests.
     void checkForTimedOutRequests(bool const retry);
 
-    /// Read timeout handler 
+    /// Read timeout handler
     static void requestTimeout(const CommTimeoutCbParams &io);
 };
 
@@ -215,7 +215,7 @@ public:
     statefulhelper *parent;
     Helper::Request *request;
 
-    void *data;			/* State data used by the calling routines */
+    void *data;         /* State data used by the calling routines */
 };
 
 /* helper.c */
@@ -231,3 +231,4 @@ void helperStatefulReleaseServer(helper_stateful_server * srv);
 void *helperStatefulServerGetData(helper_stateful_server * srv);
 
 #endif /* SQUID_HELPER_H */
+
diff --git a/src/helper/ChildConfig.cc b/src/helper/ChildConfig.cc
index f628025dbc..d1fb3203fd 100644
--- a/src/helper/ChildConfig.cc
+++ b/src/helper/ChildConfig.cc
@@ -17,25 +17,25 @@
 #include 
 
 Helper::ChildConfig::ChildConfig():
-        n_max(0),
-        n_startup(0),
-        n_idle(1),
-        concurrency(0),
-        n_running(0),
-        n_active(0),
-        queue_size(0),
-        defaultQueueSize(true)
+    n_max(0),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(0),
+    defaultQueueSize(true)
 {}
 
 Helper::ChildConfig::ChildConfig(const unsigned int m):
-        n_max(m),
-        n_startup(0),
-        n_idle(1),
-        concurrency(0),
-        n_running(0),
-        n_active(0),
-        queue_size(2 * m),
-        defaultQueueSize(true)
+    n_max(m),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(2 * m),
+    defaultQueueSize(true)
 {}
 
 Helper::ChildConfig &
@@ -113,7 +113,8 @@ Helper::ChildConfig::parseConfig()
         debugs(0, DBG_CRITICAL, "WARNING OVERIDE: Capping idle=" << n_idle << " to the defined maximum (" << n_max <<")");
         n_idle = n_max;
     }
-    
+
     if (defaultQueueSize)
         queue_size = 2 * n_max;
 }
+
diff --git a/src/helper/ChildConfig.h b/src/helper/ChildConfig.h
index a5ed9fa9a2..f2caf6f190 100644
--- a/src/helper/ChildConfig.h
+++ b/src/helper/ChildConfig.h
@@ -106,3 +106,4 @@ public:
 #define free_HelperChildConfig(dummy)  // NO.
 
 #endif /* _SQUID_SRC_HELPER_CHILDCONFIG_H */
+
diff --git a/src/helper/Reply.cc b/src/helper/Reply.cc
index fdb28a8ee9..41501e95aa 100644
--- a/src/helper/Reply.cc
+++ b/src/helper/Reply.cc
@@ -17,8 +17,8 @@
 #include "SquidString.h"
 
 Helper::Reply::Reply(char *buf, size_t len) :
-        result(Helper::Unknown),
-        whichServer(NULL)
+    result(Helper::Unknown),
+    whichServer(NULL)
 {
     parse(buf,len);
 }
@@ -225,3 +225,4 @@ operator <<(std::ostream &os, const Helper::Reply &r)
 
     return os;
 }
+
diff --git a/src/helper/Reply.h b/src/helper/Reply.h
index a361fbccba..1544dbe132 100644
--- a/src/helper/Reply.h
+++ b/src/helper/Reply.h
@@ -82,3 +82,4 @@ private:
 std::ostream &operator <<(std::ostream &os, const Helper::Reply &r);
 
 #endif /* _SQUID_SRC_HELPER_REPLY_H */
+
diff --git a/src/helper/Request.h b/src/helper/Request.h
index a77b0e0433..f41758c4d2 100644
--- a/src/helper/Request.h
+++ b/src/helper/Request.h
@@ -21,12 +21,12 @@ class Request
 
 public:
     Request(HLPCB *c, void *d, const char *b) :
-            buf(b ? xstrdup(b) : NULL),
-            callback(c),
-            data(cbdataReference(d)),
-            placeholder(b == NULL),
-            Id(0),
-            retries(0)
+        buf(b ? xstrdup(b) : NULL),
+        callback(c),
+        data(cbdataReference(d)),
+        placeholder(b == NULL),
+        Id(0),
+        retries(0)
     {
         memset(&dispatch_time, 0, sizeof(dispatch_time));
     }
@@ -56,3 +56,4 @@ public:
 } // namespace Helper
 
 #endif /* _SQUID_SRC_HELPER_REQUEST_H */
+
diff --git a/src/helper/ResultCode.h b/src/helper/ResultCode.h
index 8a7b0304a0..d675568f53 100644
--- a/src/helper/ResultCode.h
+++ b/src/helper/ResultCode.h
@@ -28,3 +28,4 @@ enum ResultCode {
 } // namespace Helper
 
 #endif /* _SQUID_SRC_HELPER_RESULTCODE_H */
+
diff --git a/src/helper/forward.h b/src/helper/forward.h
index 8d4c43b6cc..4832bb742a 100644
--- a/src/helper/forward.h
+++ b/src/helper/forward.h
@@ -27,3 +27,4 @@ class Request;
 typedef void HLPCB(void *, const Helper::Reply &);
 
 #endif /* SQUID_SRC_HELPER_FORWARD_H */
+
diff --git a/src/hier_code.h b/src/hier_code.h
index b64d90272a..0eefe4460f 100644
--- a/src/hier_code.h
+++ b/src/hier_code.h
@@ -43,3 +43,4 @@ extern const char *hier_code_str[];
 inline hier_code operator++(hier_code &i) { return i = (hier_code)(1+(int)i); }
 
 #endif /* SQUID__HIER_CODE_H */
+
diff --git a/src/htcp.cc b/src/htcp.cc
index ceed3637d9..db592cbd2a 100644
--- a/src/htcp.cc
+++ b/src/htcp.cc
@@ -142,14 +142,14 @@ class htcpSpecifier : public StoreClient
 
 public:
     htcpSpecifier() :
-         method(NULL),
-         uri(NULL),
-         version(NULL),
-         req_hdrs(NULL),
-         reqHdrsSz(0),
-         request(NULL),
-         checkHitRequest(NULL),
-         dhdr(NULL)
+        method(NULL),
+        uri(NULL),
+        version(NULL),
+        req_hdrs(NULL),
+        reqHdrsSz(0),
+        request(NULL),
+        checkHitRequest(NULL),
+        dhdr(NULL)
     {}
     // XXX: destructor?
 
@@ -446,9 +446,9 @@ htcpBuildTstOpData(char *buf, size_t buflen, htcpStuff * stuff)
         debugs(31, 3, "htcpBuildTstOpData: RR_RESPONSE");
         debugs(31, 3, "htcpBuildTstOpData: F1 = " << stuff->f1);
 
-        if (stuff->f1)		/* cache miss */
+        if (stuff->f1)      /* cache miss */
             return 0;
-        else			/* cache hit */
+        else            /* cache hit */
             return htcpBuildDetail(buf, buflen, stuff);
 
     default:
@@ -513,7 +513,7 @@ htcpBuildData(char *buf, size_t buflen, htcpStuff * stuff)
     if (buflen < hdr_sz)
         return -1;
 
-    off += hdr_sz;		/* skip! */
+    off += hdr_sz;      /* skip! */
 
     op_data_sz = htcpBuildOpData(buf + off, buflen - off, stuff);
 
@@ -1076,7 +1076,7 @@ htcpHandleTst(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
 }
 
 HtcpReplyData::HtcpReplyData() :
-        hit(0), hdr(hoHtcpReply), msg_id(0), version(0.0)
+    hit(0), hdr(hoHtcpReply), msg_id(0), version(0.0)
 {
     memset(&cto, 0, sizeof(cto));
 }
@@ -1202,10 +1202,10 @@ void
 htcpSpecifier::checkedHit(StoreEntry *e)
 {
     if (e) {
-        htcpTstReply(dhdr, e, this, from);		/* hit */
+        htcpTstReply(dhdr, e, this, from);      /* hit */
         htcpLogHtcp(from, dhdr->opcode, LOG_UDP_HIT, uri);
     } else {
-        htcpTstReply(dhdr, NULL, NULL, from);	/* cache miss */
+        htcpTstReply(dhdr, NULL, NULL, from);   /* cache miss */
         htcpLogHtcp(from, dhdr->opcode, LOG_UDP_MISS, uri);
     }
 
@@ -1276,12 +1276,12 @@ htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, Ip::Address &from)
     switch (htcpClrStore(s)) {
 
     case 1:
-        htcpClrReply(hdr, 1, from);	/* hit */
+        htcpClrReply(hdr, 1, from); /* hit */
         htcpLogHtcp(from, hdr->opcode, LOG_UDP_HIT, s->uri);
         break;
 
     case 0:
-        htcpClrReply(hdr, 0, from);	/* miss */
+        htcpClrReply(hdr, 0, from); /* miss */
         htcpLogHtcp(from, hdr->opcode, LOG_UDP_MISS, s->uri);
         break;
 
@@ -1714,3 +1714,4 @@ htcpLogHtcp(Ip::Address &caddr, int opcode, LogTags logcode, const char *url)
     al->cache.trTime.tv_usec = 0;
     accessLogLog(al, NULL);
 }
+
diff --git a/src/htcp.h b/src/htcp.h
index 31d109542b..eb3592ce99 100644
--- a/src/htcp.h
+++ b/src/htcp.h
@@ -50,7 +50,7 @@ void htcpOpenPorts(void);
  * \param p
  * \retval 1    Successfully sent request.
  * \retval 0    Unable to send request at this time. HTCP may be shutting down or starting up.
- * 		Don't wait for a reply or count in stats as sent.
+ *      Don't wait for a reply or count in stats as sent.
  * \retval -1   Error sending request.
  */
 int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
@@ -67,3 +67,4 @@ void htcpClosePorts(void);
 #endif /* USE_HTCP */
 
 #endif /* SQUID_HTCP_H */
+
diff --git a/src/http.cc b/src/http.cc
index ea319aca20..a4250c0a11 100644
--- a/src/http.cc
+++ b/src/http.cc
@@ -66,11 +66,11 @@
 
 #define SQUID_ENTER_THROWING_CODE() try {
 #define SQUID_EXIT_THROWING_CODE(status) \
-  	status = true; \
+    status = true; \
     } \
     catch (const std::exception &e) { \
-	debugs (11, 1, "Exception error:" << e.what()); \
-	status = false; \
+    debugs (11, 1, "Exception error:" << e.what()); \
+    status = false; \
     }
 
 CBDATA_CLASS_INIT(HttpStateData);
@@ -84,8 +84,8 @@ static void copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeader
 void httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headers_add);
 
 HttpStateData::HttpStateData(FwdState *theFwdState) : AsyncJob("HttpStateData"), Client(theFwdState),
-        lastChunk(0), header_bytes_read(0), reply_bytes_read(0),
-        body_bytes_truncated(0), httpChunkDecoder(NULL)
+    lastChunk(0), header_bytes_read(0), reply_bytes_read(0),
+    body_bytes_truncated(0), httpChunkDecoder(NULL)
 {
     debugs(11,5,HERE << "HttpStateData " << this << " created");
     ignoreCacheControl = false;
@@ -447,7 +447,7 @@ HttpStateData::cacheableReply()
         }
 
     switch (rep->sline.status()) {
-        /* Responses that are cacheable */
+    /* Responses that are cacheable */
 
     case Http::scOkay:
 
@@ -474,7 +474,7 @@ HttpStateData::cacheableReply()
         /* NOTREACHED */
         break;
 
-        /* Responses that only are cacheable if the server says so */
+    /* Responses that only are cacheable if the server says so */
 
     case Http::scFound:
     case Http::scTemporaryRedirect:
@@ -492,7 +492,7 @@ HttpStateData::cacheableReply()
         /* NOTREACHED */
         break;
 
-        /* Errors can be negatively cached */
+    /* Errors can be negatively cached */
 
     case Http::scNoContent:
 
@@ -525,9 +525,9 @@ HttpStateData::cacheableReply()
         /* NOTREACHED */
         break;
 
-        /* Some responses can never be cached */
+    /* Some responses can never be cached */
 
-    case Http::scPartialContent:	/* Not yet supported */
+    case Http::scPartialContent:    /* Not yet supported */
 
     case Http::scSeeOther:
 
@@ -537,7 +537,7 @@ HttpStateData::cacheableReply()
 
     case Http::scProxyAuthenticationRequired:
 
-    case Http::scInvalidHeader:	/* Squid header parsing error */
+    case Http::scInvalidHeader: /* Squid header parsing error */
 
     case Http::scHeaderTooLarge:
 
@@ -1873,7 +1873,7 @@ copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, co
 
     switch (e->id) {
 
-        /** \par RFC 2616 sect 13.5.1 - Hop-by-Hop headers which Squid should not pass on. */
+    /** \par RFC 2616 sect 13.5.1 - Hop-by-Hop headers which Squid should not pass on. */
 
     case HDR_PROXY_AUTHORIZATION:
         /** \par Proxy-Authorization:
@@ -1888,7 +1888,7 @@ copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, co
         }
         break;
 
-        /** \par RFC 2616 sect 13.5.1 - Hop-by-Hop headers which Squid does not pass on. */
+    /** \par RFC 2616 sect 13.5.1 - Hop-by-Hop headers which Squid does not pass on. */
 
     case HDR_CONNECTION:          /** \par Connection: */
     case HDR_TE:                  /** \par TE: */
@@ -1899,7 +1899,7 @@ copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, co
     case HDR_TRANSFER_ENCODING:   /** \par Transfer-Encoding: */
         break;
 
-        /** \par OTHER headers I haven't bothered to track down yet. */
+    /** \par OTHER headers I haven't bothered to track down yet. */
 
     case HDR_AUTHORIZATION:
         /** \par WWW-Authorization:
@@ -2412,3 +2412,4 @@ HttpStateData::abortTransaction(const char *reason)
     fwd->handleUnregisteredServerEnd();
     mustStop("HttpStateData::abortTransaction");
 }
+
diff --git a/src/http.h b/src/http.h
index e4606e5e9a..5a99a396c0 100644
--- a/src/http.h
+++ b/src/http.h
@@ -42,13 +42,13 @@ public:
     // Determine whether the response is a cacheable representation
     int cacheableReply();
 
-    CachePeer *_peer;		/* CachePeer request made to */
-    int eof;			/* reached end-of-object? */
-    int lastChunk;		/* reached last chunk of a chunk-encoded reply */
+    CachePeer *_peer;       /* CachePeer request made to */
+    int eof;            /* reached end-of-object? */
+    int lastChunk;      /* reached last chunk of a chunk-encoded reply */
     HttpStateFlags flags;
     size_t read_sz;
-    int header_bytes_read;	// to find end of response,
-    int64_t reply_bytes_read;	// without relying on StoreEntry
+    int header_bytes_read;  // to find end of response,
+    int64_t reply_bytes_read;   // without relying on StoreEntry
     int body_bytes_truncated; // positive when we read more than we wanted
     MemBuf *readBuf;
     bool ignoreCacheControl;
@@ -118,3 +118,4 @@ void httpStart(FwdState *);
 const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
 
 #endif /* SQUID_HTTP_H */
+
diff --git a/src/http/MethodType.h b/src/http/MethodType.h
index cfe2e52d42..e408f32df1 100644
--- a/src/http/MethodType.h
+++ b/src/http/MethodType.h
@@ -107,3 +107,4 @@ MethodStr(const MethodType m)
 }; // namespace Http
 
 #endif /* SQUID_SRC_HTTP_METHODTYPE_H */
+
diff --git a/src/http/ProtocolVersion.h b/src/http/ProtocolVersion.h
index 8d4cda37f7..4bd1481545 100644
--- a/src/http/ProtocolVersion.h
+++ b/src/http/ProtocolVersion.h
@@ -31,9 +31,10 @@ ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
 inline AnyP::ProtocolVersion
 ProtocolVersion()
 {
-  return AnyP::ProtocolVersion(AnyP::PROTO_HTTP,1,1);
+    return AnyP::ProtocolVersion(AnyP::PROTO_HTTP,1,1);
 }
 
 }; // namespace Http
 
 #endif /* SQUID_HTTP_PROTOCOLVERSION_H */
+
diff --git a/src/http/RegisteredHeaders.h b/src/http/RegisteredHeaders.h
index 40b5d3188f..977f721a78 100644
--- a/src/http/RegisteredHeaders.h
+++ b/src/http/RegisteredHeaders.h
@@ -120,3 +120,4 @@ typedef enum {
 } http_hdr_type;
 
 #endif /* SQUID_HTTP_REGISTEREDHEADERS_H */
+
diff --git a/src/http/RequestMethod.cc b/src/http/RequestMethod.cc
index 0c6b0b28df..417cccb37b 100644
--- a/src/http/RequestMethod.cc
+++ b/src/http/RequestMethod.cc
@@ -121,25 +121,25 @@ HttpRequestMethod::isHttpSafe() const
     // checking and adding. If only to say it is known to define none.
 
     switch (theMethod) {
-        // RFC 2068 - none
+    // RFC 2068 - none
 
-        // RFC 2616 section 9.1.1
+    // RFC 2616 section 9.1.1
     case Http::METHOD_GET:
     case Http::METHOD_HEAD:
     case Http::METHOD_OPTIONS:
 
-        // RFC 3253 section 3.6
+    // RFC 3253 section 3.6
     case Http::METHOD_REPORT:
 
-        // RFC 3648 - none
-        // RFC 3744 - none
-        // RFC 4437 - none
-        // RFC 4791 - none
+    // RFC 3648 - none
+    // RFC 3744 - none
+    // RFC 4437 - none
+    // RFC 4791 - none
 
-        // RFC 4918 section 9.1
+    // RFC 4918 section 9.1
     case Http::METHOD_PROPFIND:
 
-        // RFC 5323 section 2
+    // RFC 5323 section 2
     case Http::METHOD_SEARCH:
 
         // RFC 5789 - none
@@ -163,9 +163,9 @@ HttpRequestMethod::isIdempotent() const
     // checking and adding. If only to say it is known to define none.
 
     switch (theMethod) {
-        // RFC 2068 - TODO check LINK/UNLINK definition
+    // RFC 2068 - TODO check LINK/UNLINK definition
 
-        // RFC 2616 section 9.1.2
+    // RFC 2616 section 9.1.2
     case Http::METHOD_GET:
     case Http::METHOD_HEAD:
     case Http::METHOD_PUT:
@@ -173,13 +173,13 @@ HttpRequestMethod::isIdempotent() const
     case Http::METHOD_OPTIONS:
     case Http::METHOD_TRACE:
 
-        // RFC 3253 - TODO check
-        // RFC 3648 - TODO check
-        // RFC 3744 - TODO check
-        // RFC 4437 - TODO check
-        // RFC 4791 - TODO check
+    // RFC 3253 - TODO check
+    // RFC 3648 - TODO check
+    // RFC 3744 - TODO check
+    // RFC 4437 - TODO check
+    // RFC 4791 - TODO check
 
-        // RFC 4918 section 9
+    // RFC 4918 section 9
     case Http::METHOD_PROPFIND:
     case Http::METHOD_PROPPATCH:
     case Http::METHOD_MKCOL:
@@ -204,7 +204,7 @@ HttpRequestMethod::respMaybeCacheable() const
     // Only a few methods are defined as cacheable.
     // All other methods from the below RFC are "MUST NOT cache"
     switch (theMethod) {
-        // RFC 2616 section 9
+    // RFC 2616 section 9
     case Http::METHOD_GET:
     case Http::METHOD_HEAD:
         return true;
@@ -245,9 +245,9 @@ HttpRequestMethod::respMaybeCacheable() const
         return ??;
 #endif
 
-        // Special Squid method tokens are not cacheable.
-        // RFC 2616 defines all unregistered or unspecified methods as non-cacheable
-        // until such time as an RFC defines them cacheable.
+    // Special Squid method tokens are not cacheable.
+    // RFC 2616 defines all unregistered or unspecified methods as non-cacheable
+    // until such time as an RFC defines them cacheable.
     default:
         return false;
     }
@@ -257,22 +257,22 @@ bool
 HttpRequestMethod::shouldInvalidate() const
 {
     switch (theMethod) {
-        /* RFC 2616 section 13.10 - "MUST invalidate" */
+    /* RFC 2616 section 13.10 - "MUST invalidate" */
     case Http::METHOD_POST:
     case Http::METHOD_PUT:
     case Http::METHOD_DELETE:
         return true;
 
-        /* Squid extension to force invalidation */
+    /* Squid extension to force invalidation */
     case Http::METHOD_PURGE:
         return true;
 
-        /*
-         * RFC 2616 sayeth, in section 13.10, final paragraph:
-         * A cache that passes through requests for methods it does not
-         * understand SHOULD invalidate any entities referred to by the
-         * Request-URI.
-         */
+    /*
+     * RFC 2616 sayeth, in section 13.10, final paragraph:
+     * A cache that passes through requests for methods it does not
+     * understand SHOULD invalidate any entities referred to by the
+     * Request-URI.
+     */
     case Http::METHOD_OTHER:
         return true;
 
@@ -289,7 +289,7 @@ HttpRequestMethod::purgesOthers() const
         return true;
 
     switch (theMethod) {
-        /* common sense suggests purging is not required? */
+    /* common sense suggests purging is not required? */
     case Http::METHOD_GET:     // XXX: but we do purge HEAD on successful GET
     case Http::METHOD_HEAD:
     case Http::METHOD_NONE:
@@ -307,3 +307,4 @@ HttpRequestMethod::purgesOthers() const
         return true;
     }
 }
+
diff --git a/src/http/RequestMethod.h b/src/http/RequestMethod.h
index a95861fc52..19b15d4145 100644
--- a/src/http/RequestMethod.h
+++ b/src/http/RequestMethod.h
@@ -123,3 +123,4 @@ operator << (std::ostream &os, HttpRequestMethod const &method)
 }
 
 #endif /* SQUID_HTTPREQUESTMETHOD_H */
+
diff --git a/src/http/StatusCode.cc b/src/http/StatusCode.cc
index 2bea66beaa..c6058ba118 100644
--- a/src/http/StatusCode.cc
+++ b/src/http/StatusCode.cc
@@ -15,12 +15,12 @@ Http::StatusCodeString(const Http::StatusCode status)
 {
     switch (status) {
 
-        // 000
+    // 000
     case Http::scNone:
-        return "Init";		/* we init .status with code 0 */
+        return "Init";      /* we init .status with code 0 */
         break;
 
-        // 100-199
+    // 100-199
     case Http::scContinue:
         return "Continue";
         break;
@@ -33,7 +33,7 @@ Http::StatusCodeString(const Http::StatusCode status)
         return "Processing";
         break;
 
-        // 200-299
+    // 200-299
     case Http::scOkay:
         return "OK";
         break;
@@ -74,7 +74,7 @@ Http::StatusCodeString(const Http::StatusCode status)
         return "IM Used";
         break;
 
-        // 300-399
+    // 300-399
     case Http::scMultipleChoices:
         return "Multiple Choices";
         break;
@@ -107,7 +107,7 @@ Http::StatusCodeString(const Http::StatusCode status)
         return "Permanent Redirect";
         break;
 
-        // 400-499
+    // 400-499
     case Http::scBadRequest:
         return "Bad Request";
         break;
@@ -212,7 +212,7 @@ Http::StatusCodeString(const Http::StatusCode status)
         return "Request Header Fields Too Large";
         break;
 
-        // 500-599
+    // 500-599
     case Http::scInternalServerError:
         return "Internal Server Error";
         break;
@@ -257,13 +257,14 @@ Http::StatusCodeString(const Http::StatusCode status)
         return "Network Authentication Required";
         break;
 
-        // 600+
+    // 600+
     case Http::scInvalidHeader:
     case Http::scHeaderTooLarge:
-        // fall through to default.
+    // fall through to default.
 
     default:
         debugs(57, 3, "Unassigned HTTP status code: " << status);
     }
     return "Unassigned";
 }
+
diff --git a/src/http/StatusCode.h b/src/http/StatusCode.h
index 88fe7cf688..3c5d95eaa1 100644
--- a/src/http/StatusCode.h
+++ b/src/http/StatusCode.h
@@ -90,3 +90,4 @@ const char *StatusCodeString(const Http::StatusCode status);
 } // namespace Http
 
 #endif /* _SQUID_SRC_HTTP_STATUSCODE_H */
+
diff --git a/src/http/StatusLine.cc b/src/http/StatusLine.cc
index ff0a77e953..26f921b88f 100644
--- a/src/http/StatusLine.cc
+++ b/src/http/StatusLine.cc
@@ -74,7 +74,7 @@ Http::StatusLine::packInto(Packer * p) const
 bool
 Http::StatusLine::parse(const String &protoPrefix, const char *start, const char *end)
 {
-    status_ = Http::scInvalidHeader;	/* Squid header parsing error */
+    status_ = Http::scInvalidHeader;    /* Squid header parsing error */
 
     // XXX: HttpMsg::parse() has a similar check but is using
     // casesensitive comparison (which is required by HTTP errata?)
@@ -110,5 +110,6 @@ Http::StatusLine::parse(const String &protoPrefix, const char *start, const char
 
     /* we ignore 'reason-phrase' */
     /* Should assert start < end ? */
-    return true;			/* success */
+    return true;            /* success */
 }
+
diff --git a/src/http/StatusLine.h b/src/http/StatusLine.h
index a464aebab9..1fe13219c9 100644
--- a/src/http/StatusLine.h
+++ b/src/http/StatusLine.h
@@ -76,3 +76,4 @@ private:
 } // namespace Http
 
 #endif /* SQUID_HTTP_STATUSLINE_H */
+
diff --git a/src/http/forward.h b/src/http/forward.h
index 6e80624c72..f5220f2b72 100644
--- a/src/http/forward.h
+++ b/src/http/forward.h
@@ -22,3 +22,4 @@ class HttpReply;
 typedef RefCount HttpReplyPointer;
 
 #endif /* SQUID_SRC_HTTP_FORWARD_H */
+
diff --git a/src/http/one/Parser.cc b/src/http/one/Parser.cc
index 10ed3603dc..dbc96bd80f 100644
--- a/src/http/one/Parser.cc
+++ b/src/http/one/Parser.cc
@@ -24,7 +24,7 @@ Http::One::Parser::clear()
 }
 
 // arbitrary maximum-length for headers which can be found by Http1Parser::getHeaderField()
-#define GET_HDR_SZ	1024
+#define GET_HDR_SZ  1024
 
 // BUG: returns only the first header line with given name,
 //      ignores multi-line headers and obs-fold headers
@@ -78,3 +78,4 @@ Http::One::Parser::getHeaderField(const char *name)
 
     return NULL;
 }
+
diff --git a/src/http/one/Parser.h b/src/http/one/Parser.h
index 2c9c584b4e..be92831a6e 100644
--- a/src/http/one/Parser.h
+++ b/src/http/one/Parser.h
@@ -108,3 +108,4 @@ protected:
 } // namespace Http
 
 #endif /*  _SQUID_SRC_HTTP_ONE_PARSER_H */
+
diff --git a/src/http/one/RequestParser.cc b/src/http/one/RequestParser.cc
index e455785b2c..64ffbfde3f 100644
--- a/src/http/one/RequestParser.cc
+++ b/src/http/one/RequestParser.cc
@@ -15,8 +15,8 @@
 #include "SquidConfig.h"
 
 Http::One::RequestParser::RequestParser() :
-        Parser(),
-        request_parse_status(Http::scNone)
+    Parser(),
+    request_parse_status(Http::scNone)
 {
     req.start = req.end = -1;
     req.m_start = req.m_end = -1;
@@ -362,3 +362,4 @@ Http::One::RequestParser::parse(const SBuf &aBuf)
 
     return !needsMoreData();
 }
+
diff --git a/src/http/one/RequestParser.h b/src/http/one/RequestParser.h
index 5c6538ae64..b6636bd7bb 100644
--- a/src/http/one/RequestParser.h
+++ b/src/http/one/RequestParser.h
@@ -71,3 +71,4 @@ private:
 } // namespace Http
 
 #endif /*  _SQUID_SRC_HTTP_ONE_REQUESTPARSER_H */
+
diff --git a/src/http/one/forward.h b/src/http/one/forward.h
index fa63ebc1f5..b849b8e7be 100644
--- a/src/http/one/forward.h
+++ b/src/http/one/forward.h
@@ -26,3 +26,4 @@ typedef RefCount RequestParserPointer;
 namespace Http1 = Http::One;
 
 #endif /* SQUID_SRC_HTTP_ONE_FORWARD_H */
+
diff --git a/src/icmp/Icmp.cc b/src/icmp/Icmp.cc
index d13ee039d5..08dc74b8e1 100644
--- a/src/icmp/Icmp.cc
+++ b/src/icmp/Icmp.cc
@@ -96,3 +96,4 @@ Icmp::Log(const Ip::Address &addr, const uint8_t type, const char* pkt_str, cons
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/Icmp.h b/src/icmp/Icmp.h
index 73f15db68a..c0a0b2d7b7 100644
--- a/src/icmp/Icmp.h
+++ b/src/icmp/Icmp.h
@@ -13,7 +13,7 @@
 
 #include "ip/Address.h"
 
-#define PINGER_PAYLOAD_SZ	8192
+#define PINGER_PAYLOAD_SZ   8192
 
 #define MAX_PAYLOAD 256 // WAS: SQUIDHOSTNAMELEN
 #define MAX_PKT4_SZ (MAX_PAYLOAD + sizeof(struct timeval) + sizeof (char) + sizeof(struct icmphdr) + 1)
@@ -98,13 +98,13 @@ protected:
     /**
      * Translate TTL to a hop distance
      *
-     \param ttl	negative     : n > 33
-     \param ttl	n(0...32)    : 32 >= n >= 1
-     \param ttl	n(33...62)   : 32 >= n >= 1
-     \param ttl	n(63...64)   : 2 >= n >= 1
-     \param ttl	n(65...128)  : 64 >= n >= 1
-     \param ttl	n(129...192) : 64 >= n >= 1
-     \param ttl	n(193...)    : n < 255
+     \param ttl negative     : n > 33
+     \param ttl n(0...32)    : 32 >= n >= 1
+     \param ttl n(33...62)   : 32 >= n >= 1
+     \param ttl n(63...64)   : 2 >= n >= 1
+     \param ttl n(65...128)  : 64 >= n >= 1
+     \param ttl n(129...192) : 64 >= n >= 1
+     \param ttl n(193...)    : n < 255
      *
      \bug BUG? ttl<0 can produce high hop values
      \bug BUG? ttl>255 can produce zero or negative hop values
@@ -121,3 +121,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/icmp/Icmp4.cc b/src/icmp/Icmp4.cc
index 02f19d33a1..06b8754ae7 100644
--- a/src/icmp/Icmp4.cc
+++ b/src/icmp/Icmp4.cc
@@ -253,3 +253,4 @@ Icmp4::Recv(void)
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/Icmp4.h b/src/icmp/Icmp4.h
index 2e1e258931..bba20bd661 100644
--- a/src/icmp/Icmp4.h
+++ b/src/icmp/Icmp4.h
@@ -152,3 +152,4 @@ extern Icmp4 icmp4;
 #endif /* USE_ICMP && SQUID_HELPER */
 
 #endif
+
diff --git a/src/icmp/Icmp6.cc b/src/icmp/Icmp6.cc
index d9e3627689..cdd6a863a1 100644
--- a/src/icmp/Icmp6.cc
+++ b/src/icmp/Icmp6.cc
@@ -34,11 +34,11 @@ IcmpPacketType(uint8_t v)
 {
     // NP: LowPktStr is for codes 0-127
     static const char *icmp6LowPktStr[] = {
-        "ICMPv6 0",			// 0
-        "Destination Unreachable",	// 1 - RFC2463
-        "Packet Too Big", 		// 2 - RFC2463
-        "Time Exceeded",		// 3 - RFC2463
-        "Parameter Problem",		// 4 - RFC2463
+        "ICMPv6 0",         // 0
+        "Destination Unreachable",  // 1 - RFC2463
+        "Packet Too Big",       // 2 - RFC2463
+        "Time Exceeded",        // 3 - RFC2463
+        "Parameter Problem",        // 4 - RFC2463
     };
 
     // low codes 1-4 registered
@@ -47,32 +47,32 @@ IcmpPacketType(uint8_t v)
 
     // NP: HighPktStr is for codes 128-255
     static const char *icmp6HighPktStr[] = {
-        "Echo Request",					// 128 - RFC2463
-        "Echo Reply",					// 129 - RFC2463
-        "Multicast Listener Query",			// 130 - RFC2710
-        "Multicast Listener Report",			// 131 - RFC2710
-        "Multicast Listener Done",			// 132 - RFC2710
-        "Router Solicitation",				// 133 - RFC4861
-        "Router Advertisement",				// 134 - RFC4861
-        "Neighbor Solicitation",			// 135 - RFC4861
-        "Neighbor Advertisement",			// 136 - RFC4861
-        "Redirect Message",				// 137 - RFC4861
-        "Router Renumbering",				// 138 - Crawford
-        "ICMP Node Information Query",			// 139 - RFC4620
-        "ICMP Node Information Response",		// 140 - RFC4620
-        "Inverse Neighbor Discovery Solicitation",	// 141 - RFC3122
-        "Inverse Neighbor Discovery Advertisement",	// 142 - RFC3122
-        "Version 2 Multicast Listener Report",		// 143 - RFC3810
-        "Home Agent Address Discovery Request",		// 144 - RFC3775
-        "Home Agent Address Discovery Reply",		// 145 - RFC3775
-        "Mobile Prefix Solicitation",			// 146 - RFC3775
-        "Mobile Prefix Advertisement",			// 147 - RFC3775
-        "Certification Path Solicitation",		// 148 - RFC3971
-        "Certification Path Advertisement",		// 149 - RFC3971
-        "ICMP Experimental (150)",			// 150 - RFC4065
-        "Multicast Router Advertisement",		// 151 - RFC4286
-        "Multicast Router Solicitation",		// 152 - RFC4286
-        "Multicast Router Termination",			// 153 - [RFC4286]
+        "Echo Request",                 // 128 - RFC2463
+        "Echo Reply",                   // 129 - RFC2463
+        "Multicast Listener Query",         // 130 - RFC2710
+        "Multicast Listener Report",            // 131 - RFC2710
+        "Multicast Listener Done",          // 132 - RFC2710
+        "Router Solicitation",              // 133 - RFC4861
+        "Router Advertisement",             // 134 - RFC4861
+        "Neighbor Solicitation",            // 135 - RFC4861
+        "Neighbor Advertisement",           // 136 - RFC4861
+        "Redirect Message",             // 137 - RFC4861
+        "Router Renumbering",               // 138 - Crawford
+        "ICMP Node Information Query",          // 139 - RFC4620
+        "ICMP Node Information Response",       // 140 - RFC4620
+        "Inverse Neighbor Discovery Solicitation",  // 141 - RFC3122
+        "Inverse Neighbor Discovery Advertisement", // 142 - RFC3122
+        "Version 2 Multicast Listener Report",      // 143 - RFC3810
+        "Home Agent Address Discovery Request",     // 144 - RFC3775
+        "Home Agent Address Discovery Reply",       // 145 - RFC3775
+        "Mobile Prefix Solicitation",           // 146 - RFC3775
+        "Mobile Prefix Advertisement",          // 147 - RFC3775
+        "Certification Path Solicitation",      // 148 - RFC3971
+        "Certification Path Advertisement",     // 149 - RFC3971
+        "ICMP Experimental (150)",          // 150 - RFC4065
+        "Multicast Router Advertisement",       // 151 - RFC4286
+        "Multicast Router Solicitation",        // 152 - RFC4286
+        "Multicast Router Termination",         // 153 - [RFC4286]
     };
 
     // high codes 127-153 registered
@@ -242,27 +242,27 @@ Icmp6::Recv(void)
 // FIXME INET6 : The IPv6 Header (ip6_hdr) is not availble directly >:-(
 //
 // TTL still has to come from the IP header somewhere.
-//	still need to strip and process it properly.
-//	probably have to rely on RTT as given by timestamp in data sent and current.
+//  still need to strip and process it properly.
+//  probably have to rely on RTT as given by timestamp in data sent and current.
     /* IPv6 Header Structures (linux)
     struct ip6_hdr
 
     // fields (via simple define)
-    #define ip6_vfc		// N.A
-    #define ip6_flow	// N/A
-    #define ip6_plen	// payload length.
-    #define ip6_nxt		// expect to be type 0x3a - ICMPv6
-    #define ip6_hlim	// MAX hops  (always 64, but no guarantee)
-    #define ip6_hops	// HOPS!!!  (can it be true??)
+    #define ip6_vfc     // N.A
+    #define ip6_flow    // N/A
+    #define ip6_plen    // payload length.
+    #define ip6_nxt     // expect to be type 0x3a - ICMPv6
+    #define ip6_hlim    // MAX hops  (always 64, but no guarantee)
+    #define ip6_hops    // HOPS!!!  (can it be true??)
 
         ip = (struct ip6_hdr *) pkt;
         pkt += sizeof(ip6_hdr);
 
     debugs(42, DBG_CRITICAL, HERE << "ip6_nxt=" << ip->ip6_nxt <<
-    		", ip6_plen=" << ip->ip6_plen <<
-    		", ip6_hlim=" << ip->ip6_hlim <<
-    		", ip6_hops=" << ip->ip6_hops	<<
-    		" ::: 40 == sizef(ip6_hdr) == " << sizeof(ip6_hdr)
+            ", ip6_plen=" << ip->ip6_plen <<
+            ", ip6_hlim=" << ip->ip6_hlim <<
+            ", ip6_hops=" << ip->ip6_hops   <<
+            " ::: 40 == sizef(ip6_hdr) == " << sizeof(ip6_hdr)
     );
     */
 
@@ -303,7 +303,7 @@ Icmp6::Recv(void)
     /*
      * FIXME INET6: Without access to the IPv6-Hops header we must rely on the total RTT
      *      and could caculate the hops from that, but it produces some weird value mappings using ipHops
-     *	for now everything is 1 v6 hop away with variant RTT
+     *  for now everything is 1 v6 hop away with variant RTT
      * WANT:    preply.hops = ip->ip6_hops; // ipHops(ip->ip_hops);
      */
     preply.hops = 1;
@@ -329,3 +329,4 @@ Icmp6::Recv(void)
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/Icmp6.h b/src/icmp/Icmp6.h
index 5242d07375..f00d67cdc4 100644
--- a/src/icmp/Icmp6.h
+++ b/src/icmp/Icmp6.h
@@ -63,3 +63,4 @@ extern Icmp6 icmp6;
 
 #endif /* USE_ICMP && SQUID_HELPER */
 #endif /* _INCLUDE_ICMPV6_H */
+
diff --git a/src/icmp/IcmpConfig.h b/src/icmp/IcmpConfig.h
index 30323899df..98376efaa3 100644
--- a/src/icmp/IcmpConfig.h
+++ b/src/icmp/IcmpConfig.h
@@ -40,3 +40,4 @@ public:
 };
 
 #endif /* ICMPCONFIG_H */
+
diff --git a/src/icmp/IcmpPinger.cc b/src/icmp/IcmpPinger.cc
index 95f7a6fe40..c6602b36e4 100644
--- a/src/icmp/IcmpPinger.cc
+++ b/src/icmp/IcmpPinger.cc
@@ -218,3 +218,4 @@ IcmpPinger::SendResult(pingerReplyData &preply, int len)
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/IcmpPinger.h b/src/icmp/IcmpPinger.h
index 0360793762..f012b5ccdc 100644
--- a/src/icmp/IcmpPinger.h
+++ b/src/icmp/IcmpPinger.h
@@ -56,3 +56,4 @@ extern IcmpPinger control;
 #endif
 
 #endif
+
diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc
index 63cb78897b..83deeb032a 100644
--- a/src/icmp/IcmpSquid.cc
+++ b/src/icmp/IcmpSquid.cc
@@ -282,3 +282,4 @@ IcmpSquid::Close(void)
 
 #endif
 }
+
diff --git a/src/icmp/IcmpSquid.h b/src/icmp/IcmpSquid.h
index 503a4abf55..b21fe26c39 100644
--- a/src/icmp/IcmpSquid.h
+++ b/src/icmp/IcmpSquid.h
@@ -42,3 +42,4 @@ public:
 extern IcmpSquid icmpEngine;
 
 #endif /* _INCLUDE_ICMPSQUID_H */
+
diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc
index 19ed0d057d..198c37b8ba 100644
--- a/src/icmp/net_db.cc
+++ b/src/icmp/net_db.cc
@@ -50,7 +50,7 @@
 #include "ipcache.h"
 #include "StoreClient.h"
 
-#define	NETDB_REQBUF_SZ	4096
+#define NETDB_REQBUF_SZ 4096
 
 typedef enum {
     STATE_NONE,
@@ -568,7 +568,7 @@ netdbReloadState(void)
         if (! (addr = q) )
             continue;
 
-        if (netdbLookupAddr(addr) != NULL)	/* no dups! */
+        if (netdbLookupAddr(addr) != NULL)  /* no dups! */
             continue;
 
         if ((q = strtok(NULL, w_space)) == NULL)
@@ -616,7 +616,7 @@ netdbReloadState(void)
         netdbHashInsert(n, addr);
 
         while ((q = strtok(NULL, w_space)) != NULL) {
-            if (netdbLookupHost(q) != NULL)	/* no dups! */
+            if (netdbLookupHost(q) != NULL) /* no dups! */
                 continue;
 
             netdbHostInsert(n, q);
@@ -1148,7 +1148,7 @@ netdbExchangeUpdatePeer(Ip::Address &addr, CachePeer * e, double rtt, double hop
 
     p->hops = hops;
 
-    p->expires = squid_curtime + 3600;	/* XXX ? */
+    p->expires = squid_curtime + 3600;  /* XXX ? */
 
     if (n->n_peers < 2)
         return;
@@ -1206,7 +1206,7 @@ netdbBinaryExchange(StoreEntry * s)
         if (0.0 == n->rtt)
             continue;
 
-        if (n->rtt > 60000)	/* RTT > 1 MIN probably bogus */
+        if (n->rtt > 60000) /* RTT > 1 MIN probably bogus */
             continue;
 
         if (! (addr = n->network) )
@@ -1304,7 +1304,7 @@ netdbExchangeStart(void *data)
     tempBuffer.data = ex->buf;
     storeClientCopy(ex->sc, ex->e, tempBuffer,
                     netdbExchangeHandleReply, ex);
-    ex->r->flags.loopDetected = true;	/* cheat! -- force direct */
+    ex->r->flags.loopDetected = true;   /* cheat! -- force direct */
 
     // XXX: send as Proxy-Authenticate instead
     if (p->login)
@@ -1358,13 +1358,13 @@ netdbClosestParent(HttpRequest * request)
 
         p = peerFindByName(h->peername);
 
-        if (NULL == p)		/* not found */
+        if (NULL == p)      /* not found */
             continue;
 
         if (neighborType(p, request) != PEER_PARENT)
             continue;
 
-        if (!peerHTTPOkay(p, request))	/* not allowed */
+        if (!peerHTTPOkay(p, request))  /* not allowed */
             continue;
 
         return p;
@@ -1373,3 +1373,4 @@ netdbClosestParent(HttpRequest * request)
 #endif
     return NULL;
 }
+
diff --git a/src/icmp/net_db.h b/src/icmp/net_db.h
index ad5a89c38d..a9f6d925e8 100644
--- a/src/icmp/net_db.h
+++ b/src/icmp/net_db.h
@@ -78,3 +78,4 @@ CachePeer *netdbClosestParent(HttpRequest *);
 void netdbHostData(const char *host, int *samp, int *rtt, int *hops);
 
 #endif /* ICMP_NET_DB_H */
+
diff --git a/src/icmp/pinger.cc b/src/icmp/pinger.cc
index 7303e4d62d..c064bc1663 100644
--- a/src/icmp/pinger.cc
+++ b/src/icmp/pinger.cc
@@ -82,9 +82,9 @@ Win32__WSAFDIsSet(int fd, fd_set FAR * set)
 #define PINGER_TIMEOUT 10
 
 /* non-windows use STDOUT for feedback to squid */
-#define LINK_TO_SQUID	1
+#define LINK_TO_SQUID   1
 
-#endif	/* _SQUID_WINDOWS_ */
+#endif  /* _SQUID_WINDOWS_ */
 
 // ICMP Engines are declared global here so they can call each other easily.
 IcmpPinger control;
@@ -234,3 +234,4 @@ main(int argc, char *argv[])
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/testIcmp.cc b/src/icmp/testIcmp.cc
index 7217a0dfb9..de9722a358 100644
--- a/src/icmp/testIcmp.cc
+++ b/src/icmp/testIcmp.cc
@@ -115,3 +115,4 @@ testIcmp::testHops()
 }
 
 #endif /* USE_ICMP */
+
diff --git a/src/icmp/testIcmp.h b/src/icmp/testIcmp.h
index 74ef80a28a..e720e0ac6a 100644
--- a/src/icmp/testIcmp.h
+++ b/src/icmp/testIcmp.h
@@ -55,3 +55,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/icp_opcode.h b/src/icp_opcode.h
index 55299ac119..92e68ad492 100644
--- a/src/icp_opcode.h
+++ b/src/icp_opcode.h
@@ -41,3 +41,4 @@ typedef enum {
 extern const char *icp_opcode_str[];
 
 #endif /* _SQUID_ICP_OPCODE_H */
+
diff --git a/src/icp_v2.cc b/src/icp_v2.cc
index 9686aaae22..5ff6c3cd50 100644
--- a/src/icp_v2.cc
+++ b/src/icp_v2.cc
@@ -75,12 +75,12 @@ Comm::ConnectionPointer icpOutgoingConn = NULL;
 
 /* icp_common_t */
 _icp_common_t::_icp_common_t() :
-        opcode(ICP_INVALID), version(0), length(0), reqnum(0),
-        flags(0), pad(0), shostid(0)
+    opcode(ICP_INVALID), version(0), length(0), reqnum(0),
+    flags(0), pad(0), shostid(0)
 {}
 
 _icp_common_t::_icp_common_t(char *buf, unsigned int len) :
-        opcode(ICP_INVALID), version(0), reqnum(0), flags(0), pad(0), shostid(0)
+    opcode(ICP_INVALID), version(0), reqnum(0), flags(0), pad(0), shostid(0)
 {
     if (len < sizeof(_icp_common_t)) {
         /* mark as invalid */
@@ -110,10 +110,10 @@ _icp_common_t::getOpCode() const
 /* ICPState */
 
 ICPState::ICPState(icp_common_t &aHeader, HttpRequest *aRequest):
-        header(aHeader),
-        request(aRequest),
-        fd(-1),
-        url(NULL)
+    header(aHeader),
+    request(aRequest),
+    fd(-1),
+    url(NULL)
 {
     HTTPMSGLOCK(request);
 }
@@ -134,7 +134,7 @@ class ICP2State : public ICPState, public StoreClient
 
 public:
     ICP2State(icp_common_t & aHeader, HttpRequest *aRequest):
-            ICPState(aHeader, aRequest),rtt(0),src_rtt(0),flags(0) {}
+        ICPState(aHeader, aRequest),rtt(0),src_rtt(0),flags(0) {}
 
     ~ICP2State();
     void created(StoreEntry * newEntry);
@@ -633,7 +633,7 @@ icpHandleUdp(int sock, void *data)
             break;
         }
 
-        icp_version = (int) buf[1];	/* cheat! */
+        icp_version = (int) buf[1]; /* cheat! */
 
         if (icpOutgoingConn->local == from)
             // ignore ICP packets which loop back (multicast usually)
@@ -834,3 +834,4 @@ icpGetCacheKey(const char *url, int reqnum)
 
     return storeKeyPublic(url, Http::METHOD_GET);
 }
+
diff --git a/src/icp_v3.cc b/src/icp_v3.cc
index 16a0dbc181..15100653c4 100644
--- a/src/icp_v3.cc
+++ b/src/icp_v3.cc
@@ -24,7 +24,7 @@ class ICP3State : public ICPState, public StoreClient
 
 public:
     ICP3State(icp_common_t &aHeader, HttpRequest *aRequest) :
-            ICPState(aHeader, aRequest) {}
+        ICPState(aHeader, aRequest) {}
 
     ~ICP3State();
     void created (StoreEntry *newEntry);
@@ -126,3 +126,4 @@ icpHandleIcpV3(int fd, Ip::Address &from, char *buf, int len)
         break;
     }
 }
+
diff --git a/src/ident/AclIdent.cc b/src/ident/AclIdent.cc
index 7efbc49531..bc640fdd14 100644
--- a/src/ident/AclIdent.cc
+++ b/src/ident/AclIdent.cc
@@ -138,3 +138,4 @@ IdentLookup::LookupDone(const char *ident, void *data)
 }
 
 #endif /* USE_IDENT */
+
diff --git a/src/ident/AclIdent.h b/src/ident/AclIdent.h
index e0d2280eb6..50901fb592 100644
--- a/src/ident/AclIdent.h
+++ b/src/ident/AclIdent.h
@@ -60,3 +60,4 @@ private:
 
 #endif /* USE_IDENT */
 #endif /* SQUID_IDENT_ACLIDENT_H */
+
diff --git a/src/ident/Config.h b/src/ident/Config.h
index ef70fd5c15..9af8efcb93 100644
--- a/src/ident/Config.h
+++ b/src/ident/Config.h
@@ -29,3 +29,4 @@ extern IdentConfig TheConfig;
 
 #endif /* USE_IDENT */
 #endif /* SQUID_IDENT_CONFIG_H */
+
diff --git a/src/ident/Ident.cc b/src/ident/Ident.cc
index 3169c1ef3a..1058062e91 100644
--- a/src/ident/Ident.cc
+++ b/src/ident/Ident.cc
@@ -39,7 +39,7 @@ typedef struct _IdentClient {
 class IdentStateData
 {
 public:
-    hash_link hash;		/* must be first */
+    hash_link hash;     /* must be first */
 private:
     CBDATA_CLASS(IdentStateData);
 
@@ -287,3 +287,4 @@ Ident::Init(void)
 }
 
 #endif /* USE_IDENT */
+
diff --git a/src/ident/Ident.h b/src/ident/Ident.h
index d0b971bd84..37dbb85cb7 100644
--- a/src/ident/Ident.h
+++ b/src/ident/Ident.h
@@ -38,3 +38,4 @@ void Init(void);
 
 #endif /* USE_IDENT */
 #endif /* SQUID_IDENT_H */
+
diff --git a/src/int.cc b/src/int.cc
index ba7f999fee..9dcead258b 100644
--- a/src/int.cc
+++ b/src/int.cc
@@ -22,3 +22,4 @@ isPowTen(int count)
 
     return 1;
 }
+
diff --git a/src/int.h b/src/int.h
index 626e6bb8b3..df4a31a6fc 100644
--- a/src/int.h
+++ b/src/int.h
@@ -14,3 +14,4 @@
 int isPowTen(int); //int.cc
 
 #endif /* SQUID_INT_H_ */
+
diff --git a/src/internal.cc b/src/internal.cc
index 0dc3edd3e1..a3a8f4a11f 100644
--- a/src/internal.cc
+++ b/src/internal.cc
@@ -161,3 +161,4 @@ internalHostnameIs(const char *arg)
 
     return 0;
 }
+
diff --git a/src/internal.h b/src/internal.h
index aeeeb43cff..b4a39c37dc 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -27,3 +27,4 @@ const char *internalHostname(void);
 int internalHostnameIs(const char *);
 
 #endif /* SQUID_INTERNAL_H_ */
+
diff --git a/src/ip/Address.cc b/src/ip/Address.cc
index 682a20b8d2..e4bb1b2d20 100644
--- a/src/ip/Address.cc
+++ b/src/ip/Address.cc
@@ -34,13 +34,13 @@
 
 /* Debugging only. Dump the address content when a fatal assert is encountered. */
 #define IASSERT(a,b)  \
-	if(!(b)){	printf("assert \"%s\" at line %d\n", a, __LINE__); \
-		printf("Ip::Address invalid? with isIPv4()=%c, isIPv6()=%c\n",(isIPv4()?'T':'F'),(isIPv6()?'T':'F')); \
-		printf("ADDRESS:"); \
-		for(unsigned int i = 0; i < sizeof(mSocketAddr_.sin6_addr); ++i) { \
-			printf(" %x", mSocketAddr_.sin6_addr.s6_addr[i]); \
-		} printf("\n"); assert(b); \
-	}
+    if(!(b)){   printf("assert \"%s\" at line %d\n", a, __LINE__); \
+        printf("Ip::Address invalid? with isIPv4()=%c, isIPv6()=%c\n",(isIPv4()?'T':'F'),(isIPv6()?'T':'F')); \
+        printf("ADDRESS:"); \
+        for(unsigned int i = 0; i < sizeof(mSocketAddr_.sin6_addr); ++i) { \
+            printf(" %x", mSocketAddr_.sin6_addr.s6_addr[i]); \
+        } printf("\n"); assert(b); \
+    }
 
 int
 Ip::Address::cidr() const
@@ -189,17 +189,29 @@ const struct in6_addr Ip::Address::v4_anyaddr = {{{ 0x00000000, 0x00000000, 0x00
 const struct in6_addr Ip::Address::v4_noaddr = {{{ 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff }}};
 const struct in6_addr Ip::Address::v6_noaddr = {{{ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }}};
 #else
-const struct in6_addr Ip::Address::v4_localhost = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-            0x00, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}
+const struct in6_addr Ip::Address::v4_localhost = {{{
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01
+        }
+    }
 };
-const struct in6_addr Ip::Address::v4_anyaddr = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-            0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}
+const struct in6_addr Ip::Address::v4_anyaddr = {{{
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00
+        }
+    }
 };
-const struct in6_addr Ip::Address::v4_noaddr = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-            0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}
+const struct in6_addr Ip::Address::v4_noaddr = {{{
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+        }
+    }
 };
-const struct in6_addr Ip::Address::v6_noaddr = {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-            0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}
+const struct in6_addr Ip::Address::v6_noaddr = {{{
+            0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+            0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+        }
+    }
 };
 #endif
 
@@ -1000,3 +1012,4 @@ Ip::Address::getInAddr(struct in_addr &buf) const
     assert(false);
     return false;
 }
+
diff --git a/src/ip/Address.h b/src/ip/Address.h
index d8a6f12626..9cd93e623e 100644
--- a/src/ip/Address.h
+++ b/src/ip/Address.h
@@ -171,8 +171,8 @@ public:
 
     /** Require an IPv4-only address for this usage.
      *  Converts the object to prefer only IPv4 output.
-     \retval true	Content can be IPv4
-     \retval false	Content CANNOT be IPv4
+     \retval true   Content can be IPv4
+     \retval false  Content CANNOT be IPv4
      */
     bool setIPv4();
 
@@ -286,8 +286,8 @@ public:
     /**
      *  Lookup a Host by Name. Equivalent to system call gethostbyname(char*)
      \param s The textual FQDN of the host being located.
-     \retval true	lookup was successful and an IPA was located.
-     \retval false	lookup failed or FQDN has no IP associated.
+     \retval true   lookup was successful and an IPA was located.
+     \retval false  lookup failed or FQDN has no IP associated.
      */
     bool GetHostByName(const char *s);
 
@@ -365,3 +365,4 @@ public:
 void parse_IpAddress_list_token(Ip::Address_list **, char *);
 
 #endif /* _SQUID_SRC_IP_ADDRESS_H */
+
diff --git a/src/ip/Intercept.cc b/src/ip/Intercept.cc
index fe649af4fb..27b84c0217 100644
--- a/src/ip/Intercept.cc
+++ b/src/ip/Intercept.cc
@@ -84,7 +84,7 @@
 #include 
 #endif
 #if !defined(IP6T_SO_ORIGINAL_DST)
-#define IP6T_SO_ORIGINAL_DST	80	// stolen with prejudice from the above file.
+#define IP6T_SO_ORIGINAL_DST    80  // stolen with prejudice from the above file.
 #endif
 #endif /* LINUX_NETFILTER required headers */
 
@@ -463,3 +463,4 @@ Ip::Intercept::ProbeForTproxy(Ip::Address &test)
         leave_suid();
     return false;
 }
+
diff --git a/src/ip/Intercept.h b/src/ip/Intercept.h
index 3431cad8e3..b9bb510b5d 100644
--- a/src/ip/Intercept.h
+++ b/src/ip/Intercept.h
@@ -48,7 +48,7 @@ public:
     bool ProbeForTproxy(Address &test);
 
     /**
-     \retval 0	Full transparency is disabled.
+     \retval 0  Full transparency is disabled.
      \retval 1  Full transparency is enabled and active.
      */
     inline int TransparentActive() { return transparentActive_; };
@@ -69,7 +69,7 @@ public:
     void StopTransparency(const char *str);
 
     /**
-     \retval 0	IP Interception is disabled.
+     \retval 0  IP Interception is disabled.
      \retval 1  IP Interception is enabled and active.
      */
     inline int InterceptActive() { return interceptActive_; };
@@ -156,3 +156,4 @@ extern Intercept Interceptor;
 } // namespace Ip
 
 #endif /* SQUID_IP_IPINTERCEPT_H */
+
diff --git a/src/ip/Qos.cci b/src/ip/Qos.cci
index 4699c3fc58..abbc1e7eb6 100644
--- a/src/ip/Qos.cci
+++ b/src/ip/Qos.cci
@@ -125,3 +125,4 @@ Ip::Qos::Config::isAclTosActive() const
 
     return false;
 }
+
diff --git a/src/ip/QosConfig.cc b/src/ip/QosConfig.cc
index 7a79f79f33..de8fc3907a 100644
--- a/src/ip/QosConfig.cc
+++ b/src/ip/QosConfig.cc
@@ -190,12 +190,12 @@ Ip::Qos::doNfmarkLocalHit(const Comm::ConnectionPointer &conn)
 Ip::Qos::Config Ip::Qos::TheConfig;
 
 Ip::Qos::Config::Config() : tosLocalHit(0), tosSiblingHit(0), tosParentHit(0),
-        tosMiss(0), tosMissMask(0), preserveMissTos(false),
-        preserveMissTosMask(0xFF), markLocalHit(0), markSiblingHit(0),
-        markParentHit(0), markMiss(0), markMissMask(0),
-        preserveMissMark(false), preserveMissMarkMask(0xFFFFFFFF),
-        tosToServer(NULL), tosToClient(NULL), nfmarkToServer(NULL),
-        nfmarkToClient(NULL)
+    tosMiss(0), tosMissMask(0), preserveMissTos(false),
+    preserveMissTosMask(0xFF), markLocalHit(0), markSiblingHit(0),
+    markParentHit(0), markMiss(0), markMissMask(0),
+    preserveMissMark(false), preserveMissMarkMask(0xFFFFFFFF),
+    tosToServer(NULL), tosToClient(NULL), nfmarkToServer(NULL),
+    nfmarkToClient(NULL)
 {
 }
 
@@ -436,3 +436,4 @@ Ip::Qos::Config::dumpConfigLine(char *entry, const char *name) const
 #if !_USE_INLINE_
 #include "Qos.cci"
 #endif
+
diff --git a/src/ip/QosConfig.h b/src/ip/QosConfig.h
index b90b7ba7a5..aaa5c6e061 100644
--- a/src/ip/QosConfig.h
+++ b/src/ip/QosConfig.h
@@ -222,13 +222,13 @@ public:
 extern Config TheConfig;
 
 /* legacy parser access wrappers */
-#define parse_QosConfig(X)	(X)->parseConfigLine()
+#define parse_QosConfig(X)  (X)->parseConfigLine()
 #define free_QosConfig(X)
 #define dump_QosConfig(e,n,X) do { \
-		char temp[256]; /* random number. change as needed. max config line length. */ \
-		(X).dumpConfigLine(temp,n); \
-	        storeAppendPrintf(e, "%s", temp); \
-	} while(0);
+        char temp[256]; /* random number. change as needed. max config line length. */ \
+        (X).dumpConfigLine(temp,n); \
+            storeAppendPrintf(e, "%s", temp); \
+    } while(0);
 
 } // namespace Qos
 
@@ -239,3 +239,4 @@ extern Config TheConfig;
 #endif
 
 #endif /* SQUID_QOSCONFIG_H */
+
diff --git a/src/ip/forward.h b/src/ip/forward.h
index 8f7c870bcf..b8d8cc1709 100644
--- a/src/ip/forward.h
+++ b/src/ip/forward.h
@@ -18,3 +18,4 @@ namespace Ip
 class Address;
 }
 #endif /* _SQUID_IP_FORWARD_H */
+
diff --git a/src/ip/stubQosConfig.cc b/src/ip/stubQosConfig.cc
index caa4545fe3..b56dc06374 100644
--- a/src/ip/stubQosConfig.cc
+++ b/src/ip/stubQosConfig.cc
@@ -85,3 +85,4 @@ Ip::Qos::dumpConfigLine(char *entry, const char *name)
 #if !_USE_INLINE_
 #include "Qos.cci"
 #endif
+
diff --git a/src/ip/testAddress.cc b/src/ip/testAddress.cc
index 182963cbc8..2f36587f95 100644
--- a/src/ip/testAddress.cc
+++ b/src/ip/testAddress.cc
@@ -784,3 +784,4 @@ testIpAddress::testBugNullingDisplay()
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
 
 }
+
diff --git a/src/ip/testAddress.h b/src/ip/testAddress.h
index 4ad6d5714d..3b49eeb30a 100644
--- a/src/ip/testAddress.h
+++ b/src/ip/testAddress.h
@@ -68,3 +68,4 @@ protected:
 };
 
 #endif /* SQUID_SRC_TEST_IPADDRESS_H */
+
diff --git a/src/ip/tools.cc b/src/ip/tools.cc
index f551f3aeb8..2363f6e31b 100644
--- a/src/ip/tools.cc
+++ b/src/ip/tools.cc
@@ -64,3 +64,4 @@ Ip::ProbeTransport()
     EnableIpv6 = IPV6_OFF;
 #endif
 }
+
diff --git a/src/ip/tools.h b/src/ip/tools.h
index fb9e9b995b..adb5c3ad8e 100644
--- a/src/ip/tools.h
+++ b/src/ip/tools.h
@@ -27,3 +27,4 @@ extern int EnableIpv6;
 } // namespace Ip
 
 #endif /* _SQUID_SRC_IP_TOOLS_H */
+
diff --git a/src/ipc.cc b/src/ipc.cc
index 0b6ecc0db1..240d5d622d 100644
--- a/src/ipc.cc
+++ b/src/ipc.cc
@@ -98,9 +98,9 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
                                 COMM_NOCLOEXEC,
                                 name);
         prfd = pwfd = comm_open(SOCK_STREAM,
-                                0,			/* protocol */
+                                0,          /* protocol */
                                 local_addr,
-                                0,			/* blocking */
+                                0,          /* blocking */
                                 name);
         IPC_CHECK_FAIL(crfd, "child read", "TCP " << local_addr);
         IPC_CHECK_FAIL(prfd, "parent read", "TCP " << local_addr);
@@ -230,7 +230,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
         return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
     }
 
-    if (pid > 0) {		/* parent */
+    if (pid > 0) {      /* parent */
         /* close shared socket with child */
         comm_close(crfd);
 
@@ -290,7 +290,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
 
     /* child */
     TheProcessKind = pkHelper;
-    no_suid();			/* give up extra priviliges */
+    no_suid();          /* give up extra priviliges */
 
     /* close shared socket with parent */
     close(prfd);
@@ -391,3 +391,4 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
 
     return 0;
 }
+
diff --git a/src/ipc/AtomicWord.cc b/src/ipc/AtomicWord.cc
index a3509cc4cc..925de887cc 100644
--- a/src/ipc/AtomicWord.cc
+++ b/src/ipc/AtomicWord.cc
@@ -20,3 +20,4 @@ bool Ipc::Atomic::Enabled()
     return !UsingSmp();
 #endif
 }
+
diff --git a/src/ipc/AtomicWord.h b/src/ipc/AtomicWord.h
index e581246a86..2a9a9e9b5f 100644
--- a/src/ipc/AtomicWord.h
+++ b/src/ipc/AtomicWord.h
@@ -102,3 +102,4 @@ typedef WordT Word;
 } // namespace Ipc
 
 #endif // SQUID_IPC_ATOMIC_WORD_H
+
diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc
index a968fedeee..b75a7edba7 100644
--- a/src/ipc/Coordinator.cc
+++ b/src/ipc/Coordinator.cc
@@ -32,7 +32,7 @@ CBDATA_NAMESPACED_CLASS_INIT(Ipc, Coordinator);
 Ipc::Coordinator* Ipc::Coordinator::TheInstance = NULL;
 
 Ipc::Coordinator::Coordinator():
-        Port(Ipc::Port::CoordinatorAddr())
+    Port(Ipc::Port::CoordinatorAddr())
 {
 }
 
@@ -303,3 +303,4 @@ Ipc::Coordinator::strands() const
 {
     return strands_;
 }
+
diff --git a/src/ipc/Coordinator.h b/src/ipc/Coordinator.h
index d5ae68190c..4e863999e1 100644
--- a/src/ipc/Coordinator.h
+++ b/src/ipc/Coordinator.h
@@ -84,3 +84,4 @@ private:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_COORDINATOR_H */
+
diff --git a/src/ipc/FdNotes.cc b/src/ipc/FdNotes.cc
index a88f8492f6..92e403c99b 100644
--- a/src/ipc/FdNotes.cc
+++ b/src/ipc/FdNotes.cc
@@ -34,3 +34,4 @@ Ipc::FdNote(int fdNoteId)
     debugs(54, DBG_IMPORTANT, HERE << "salvaged bug: wrong fd_note ID: " << fdNoteId);
     return FdNotes[fdnNone];
 }
+
diff --git a/src/ipc/FdNotes.h b/src/ipc/FdNotes.h
index d3b50b4edd..3999ed55ca 100644
--- a/src/ipc/FdNotes.h
+++ b/src/ipc/FdNotes.h
@@ -29,3 +29,4 @@ const char *FdNote(int fdNodeId); ///< converts FdNoteId into a string
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_FD_NOTES_H */
+
diff --git a/src/ipc/Forwarder.cc b/src/ipc/Forwarder.cc
index b93439f8cb..3c347f406c 100644
--- a/src/ipc/Forwarder.cc
+++ b/src/ipc/Forwarder.cc
@@ -24,8 +24,8 @@ Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap;
 unsigned int Ipc::Forwarder::LastRequestId = 0;
 
 Ipc::Forwarder::Forwarder(Request::Pointer aRequest, double aTimeout):
-        AsyncJob("Ipc::Forwarder"),
-        request(aRequest), timeout(aTimeout)
+    AsyncJob("Ipc::Forwarder"),
+    request(aRequest), timeout(aTimeout)
 {
     debugs(54, 5, HERE);
 }
@@ -182,3 +182,4 @@ Ipc::Forwarder::HandleRemoteAck(unsigned int requestId)
     if (call != NULL)
         ScheduleCallHere(call);
 }
+
diff --git a/src/ipc/Forwarder.h b/src/ipc/Forwarder.h
index 93af9b9c01..8e6533e9f4 100644
--- a/src/ipc/Forwarder.h
+++ b/src/ipc/Forwarder.h
@@ -71,3 +71,4 @@ protected:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_FORWARDER_H */
+
diff --git a/src/ipc/Inquirer.cc b/src/ipc/Inquirer.cc
index 3d6029a878..d445ff5105 100644
--- a/src/ipc/Inquirer.cc
+++ b/src/ipc/Inquirer.cc
@@ -32,8 +32,8 @@ LesserStrandByKidId(const Ipc::StrandCoord &c1, const Ipc::StrandCoord &c2)
 
 Ipc::Inquirer::Inquirer(Request::Pointer aRequest, const StrandCoords& coords,
                         double aTimeout):
-        AsyncJob("Ipc::Inquirer"),
-        request(aRequest), strands(coords), pos(strands.begin()), timeout(aTimeout)
+    AsyncJob("Ipc::Inquirer"),
+    request(aRequest), strands(coords), pos(strands.begin()), timeout(aTimeout)
 {
     debugs(54, 5, HERE);
 
@@ -207,3 +207,4 @@ Ipc::Inquirer::status() const
     buf.terminate();
     return buf.content();
 }
+
diff --git a/src/ipc/Inquirer.h b/src/ipc/Inquirer.h
index c4d1e37dfa..88cd5c0bf3 100644
--- a/src/ipc/Inquirer.h
+++ b/src/ipc/Inquirer.h
@@ -85,3 +85,4 @@ protected:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_INQUIRER_H */
+
diff --git a/src/ipc/Kid.cc b/src/ipc/Kid.cc
index 17e3637f49..215b85cf47 100644
--- a/src/ipc/Kid.cc
+++ b/src/ipc/Kid.cc
@@ -20,21 +20,21 @@
 int TheProcessKind = pkOther;
 
 Kid::Kid():
-        badFailures(0),
-        pid(-1),
-        startTime(0),
-        isRunning(false),
-        status(0)
+    badFailures(0),
+    pid(-1),
+    startTime(0),
+    isRunning(false),
+    status(0)
 {
 }
 
 Kid::Kid(const String& kid_name):
-        theName(kid_name),
-        badFailures(0),
-        pid(-1),
-        startTime(0),
-        isRunning(false),
-        status(0)
+    theName(kid_name),
+    badFailures(0),
+    pid(-1),
+    startTime(0),
+    isRunning(false),
+    status(0)
 {
 }
 
@@ -145,3 +145,4 @@ const String& Kid::name() const
 {
     return theName;
 }
+
diff --git a/src/ipc/Kid.h b/src/ipc/Kid.h
index 97fe55a131..607575755c 100644
--- a/src/ipc/Kid.h
+++ b/src/ipc/Kid.h
@@ -102,3 +102,4 @@ typedef enum {
 extern int TheProcessKind;
 
 #endif /* SQUID_IPC_KID_H */
+
diff --git a/src/ipc/Kids.cc b/src/ipc/Kids.cc
index 19b175e377..a6f5a27e12 100644
--- a/src/ipc/Kids.cc
+++ b/src/ipc/Kids.cc
@@ -127,3 +127,4 @@ size_t Kids::count() const
 {
     return storage.size();
 }
+
diff --git a/src/ipc/Kids.h b/src/ipc/Kids.h
index b957de14f8..6e3adff947 100644
--- a/src/ipc/Kids.h
+++ b/src/ipc/Kids.h
@@ -61,3 +61,4 @@ typedef char KidName[64]; ///< Squid process name (e.g., "squid-coord")
 extern KidName TheKidName; ///< current Squid process name
 
 #endif /* SQUID_IPC_KIDS_H */
+
diff --git a/src/ipc/MemMap.cc b/src/ipc/MemMap.cc
index 47b5ca8735..d9bed9d1d8 100644
--- a/src/ipc/MemMap.cc
+++ b/src/ipc/MemMap.cc
@@ -14,9 +14,9 @@
 #include "tools.h"
 
 Ipc::MemMap::MemMap(const char *const aPath) :
-        cleaner(NULL),
-        path(aPath),
-        shared(shm_old(Shared)(aPath))
+    cleaner(NULL),
+    path(aPath),
+    shared(shm_old(Shared)(aPath))
 {
     assert(shared->limit > 0); // we should not be created otherwise
     debugs(54, 5, "attached map [" << path << "] created: " <<
@@ -281,8 +281,8 @@ Ipc::MemMap::freeLocked(Slot &s, bool keepLocked)
 
 /* Ipc::MemMapSlot */
 Ipc::MemMapSlot::MemMapSlot() :
-        pSize(0),
-        expire(0)
+    pSize(0),
+    expire(0)
 {
     memset(key, 0, sizeof(key));
     memset(p, 0, sizeof(p));
@@ -317,7 +317,7 @@ Ipc::MemMapSlot::empty() const
 /* Ipc::MemMap::Shared */
 
 Ipc::MemMap::Shared::Shared(const int aLimit, const size_t anExtrasSize):
-        limit(aLimit), extrasSize(anExtrasSize), count(0), slots(aLimit)
+    limit(aLimit), extrasSize(anExtrasSize), count(0), slots(aLimit)
 {
 }
 
@@ -336,3 +336,4 @@ Ipc::MemMap::Shared::SharedMemorySize(const int limit, const size_t extrasSize)
 {
     return sizeof(Shared) + limit * (sizeof(Slot) + extrasSize);
 }
+
diff --git a/src/ipc/MemMap.h b/src/ipc/MemMap.h
index 7923df2915..ea567167f0 100644
--- a/src/ipc/MemMap.h
+++ b/src/ipc/MemMap.h
@@ -146,3 +146,4 @@ public:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_STORE_MAP_H */
+
diff --git a/src/ipc/Messages.h b/src/ipc/Messages.h
index 2ff0e4bdf4..f4d2b91150 100644
--- a/src/ipc/Messages.h
+++ b/src/ipc/Messages.h
@@ -32,3 +32,4 @@ typedef enum { mtNone = 0, mtRegistration,
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_MESSAGES_H */
+
diff --git a/src/ipc/Port.cc b/src/ipc/Port.cc
index 0b0e213411..cc05313065 100644
--- a/src/ipc/Port.cc
+++ b/src/ipc/Port.cc
@@ -22,7 +22,7 @@ static const char coordinatorAddrLabel[] = "-coordinator";
 const char Ipc::strandAddrLabel[] =  "-kid";
 
 Ipc::Port::Port(const String& aListenAddr):
-        UdsOp(aListenAddr)
+    UdsOp(aListenAddr)
 {
     setOptions(COMM_NONBLOCKING | COMM_DOBIND);
 }
@@ -86,3 +86,4 @@ void Ipc::Port::noteRead(const CommIoCbParams& params)
 
     doListen();
 }
+
diff --git a/src/ipc/Port.h b/src/ipc/Port.h
index 588ebf8c78..5ad033235d 100644
--- a/src/ipc/Port.h
+++ b/src/ipc/Port.h
@@ -50,3 +50,4 @@ extern const char strandAddrLabel[]; ///< strand's listening address unique labe
 } // namespace Ipc
 
 #endif /* SQUID_IPC_PORT_H */
+
diff --git a/src/ipc/Queue.cc b/src/ipc/Queue.cc
index f224618517..aa284193d3 100644
--- a/src/ipc/Queue.cc
+++ b/src/ipc/Queue.cc
@@ -45,7 +45,7 @@ ReadersId(String id)
 InstanceIdDefinitions(Ipc::QueueReader, "ipcQR");
 
 Ipc::QueueReader::QueueReader(): popBlocked(1), popSignal(0),
-        rateLimit(0), balance(0)
+    rateLimit(0), balance(0)
 {
     debugs(54, 7, HERE << "constructed " << id);
 }
@@ -53,7 +53,7 @@ Ipc::QueueReader::QueueReader(): popBlocked(1), popSignal(0),
 /* QueueReaders */
 
 Ipc::QueueReaders::QueueReaders(const int aCapacity): theCapacity(aCapacity),
-        theReaders(theCapacity)
+    theReaders(theCapacity)
 {
     Must(theCapacity > 0);
 }
@@ -73,8 +73,8 @@ Ipc::QueueReaders::SharedMemorySize(const int capacity)
 // OneToOneUniQueue
 
 Ipc::OneToOneUniQueue::OneToOneUniQueue(const unsigned int aMaxItemSize, const int aCapacity):
-        theIn(0), theOut(0), theSize(0), theMaxItemSize(aMaxItemSize),
-        theCapacity(aCapacity)
+    theIn(0), theOut(0), theSize(0), theMaxItemSize(aMaxItemSize),
+    theCapacity(aCapacity)
 {
     Must(theMaxItemSize > 0);
     Must(theCapacity > 0);
@@ -131,8 +131,8 @@ Ipc::OneToOneUniQueues::operator [](const int index) const
 // BaseMultiQueue
 
 Ipc::BaseMultiQueue::BaseMultiQueue(const int aLocalProcessId):
-        theLocalProcessId(aLocalProcessId),
-        theLastPopProcessId(std::numeric_limits::max() - 1)
+    theLocalProcessId(aLocalProcessId),
+    theLastPopProcessId(std::numeric_limits::max() - 1)
 {
 }
 
@@ -205,11 +205,11 @@ Ipc::FewToFewBiQueue::Init(const String &id, const int groupASize, const int gro
 }
 
 Ipc::FewToFewBiQueue::FewToFewBiQueue(const String &id, const Group aLocalGroup, const int aLocalProcessId):
-        BaseMultiQueue(aLocalProcessId),
-        metadata(shm_old(Metadata)(MetadataId(id).termedBuf())),
-        queues(shm_old(OneToOneUniQueues)(QueuesId(id).termedBuf())),
-        readers(shm_old(QueueReaders)(ReadersId(id).termedBuf())),
-        theLocalGroup(aLocalGroup)
+    BaseMultiQueue(aLocalProcessId),
+    metadata(shm_old(Metadata)(MetadataId(id).termedBuf())),
+    queues(shm_old(OneToOneUniQueues)(QueuesId(id).termedBuf())),
+    readers(shm_old(QueueReaders)(ReadersId(id).termedBuf())),
+    theLocalGroup(aLocalGroup)
 {
     Must(queues->theCapacity == metadata->theGroupASize * metadata->theGroupBSize * 2);
     Must(readers->theCapacity == metadata->theGroupASize + metadata->theGroupBSize);
@@ -315,17 +315,17 @@ Ipc::FewToFewBiQueue::remotesIdOffset() const
 }
 
 Ipc::FewToFewBiQueue::Metadata::Metadata(const int aGroupASize, const int aGroupAIdOffset, const int aGroupBSize, const int aGroupBIdOffset):
-        theGroupASize(aGroupASize), theGroupAIdOffset(aGroupAIdOffset),
-        theGroupBSize(aGroupBSize), theGroupBIdOffset(aGroupBIdOffset)
+    theGroupASize(aGroupASize), theGroupAIdOffset(aGroupAIdOffset),
+    theGroupBSize(aGroupBSize), theGroupBIdOffset(aGroupBIdOffset)
 {
     Must(theGroupASize > 0);
     Must(theGroupBSize > 0);
 }
 
 Ipc::FewToFewBiQueue::Owner::Owner(const String &id, const int groupASize, const int groupAIdOffset, const int groupBSize, const int groupBIdOffset, const unsigned int maxItemSize, const int capacity):
-        metadataOwner(shm_new(Metadata)(MetadataId(id).termedBuf(), groupASize, groupAIdOffset, groupBSize, groupBIdOffset)),
-        queuesOwner(shm_new(OneToOneUniQueues)(QueuesId(id).termedBuf(), groupASize*groupBSize*2, maxItemSize, capacity)),
-        readersOwner(shm_new(QueueReaders)(ReadersId(id).termedBuf(), groupASize+groupBSize))
+    metadataOwner(shm_new(Metadata)(MetadataId(id).termedBuf(), groupASize, groupAIdOffset, groupBSize, groupBIdOffset)),
+    queuesOwner(shm_new(OneToOneUniQueues)(QueuesId(id).termedBuf(), groupASize*groupBSize*2, maxItemSize, capacity)),
+    readersOwner(shm_new(QueueReaders)(ReadersId(id).termedBuf(), groupASize+groupBSize))
 {
 }
 
@@ -345,10 +345,10 @@ Ipc::MultiQueue::Init(const String &id, const int processCount, const int proces
 }
 
 Ipc::MultiQueue::MultiQueue(const String &id, const int localProcessId):
-        BaseMultiQueue(localProcessId),
-        metadata(shm_old(Metadata)(MetadataId(id).termedBuf())),
-        queues(shm_old(OneToOneUniQueues)(QueuesId(id).termedBuf())),
-        readers(shm_old(QueueReaders)(ReadersId(id).termedBuf()))
+    BaseMultiQueue(localProcessId),
+    metadata(shm_old(Metadata)(MetadataId(id).termedBuf())),
+    queues(shm_old(OneToOneUniQueues)(QueuesId(id).termedBuf())),
+    readers(shm_old(QueueReaders)(ReadersId(id).termedBuf()))
 {
     Must(queues->theCapacity == metadata->theProcessCount * metadata->theProcessCount);
     Must(readers->theCapacity == metadata->theProcessCount);
@@ -419,15 +419,15 @@ Ipc::MultiQueue::remotesIdOffset() const
 }
 
 Ipc::MultiQueue::Metadata::Metadata(const int aProcessCount, const int aProcessIdOffset):
-        theProcessCount(aProcessCount), theProcessIdOffset(aProcessIdOffset)
+    theProcessCount(aProcessCount), theProcessIdOffset(aProcessIdOffset)
 {
     Must(theProcessCount > 0);
 }
 
 Ipc::MultiQueue::Owner::Owner(const String &id, const int processCount, const int processIdOffset, const unsigned int maxItemSize, const int capacity):
-        metadataOwner(shm_new(Metadata)(MetadataId(id).termedBuf(), processCount, processIdOffset)),
-        queuesOwner(shm_new(OneToOneUniQueues)(QueuesId(id).termedBuf(), processCount*processCount, maxItemSize, capacity)),
-        readersOwner(shm_new(QueueReaders)(ReadersId(id).termedBuf(), processCount))
+    metadataOwner(shm_new(Metadata)(MetadataId(id).termedBuf(), processCount, processIdOffset)),
+    queuesOwner(shm_new(OneToOneUniQueues)(QueuesId(id).termedBuf(), processCount*processCount, maxItemSize, capacity)),
+    readersOwner(shm_new(QueueReaders)(ReadersId(id).termedBuf(), processCount))
 {
 }
 
@@ -437,3 +437,4 @@ Ipc::MultiQueue::Owner::~Owner()
     delete queuesOwner;
     delete readersOwner;
 }
+
diff --git a/src/ipc/Queue.h b/src/ipc/Queue.h
index 93be91ea65..0aa354914f 100644
--- a/src/ipc/Queue.h
+++ b/src/ipc/Queue.h
@@ -500,3 +500,4 @@ FewToFewBiQueue::findOldest(const int remoteProcessId, Value &value) const
 } // namespace Ipc
 
 #endif // SQUID_IPC_QUEUE_H
+
diff --git a/src/ipc/ReadWriteLock.cc b/src/ipc/ReadWriteLock.cc
index cf81b5038d..3d8a2a9f79 100644
--- a/src/ipc/ReadWriteLock.cc
+++ b/src/ipc/ReadWriteLock.cc
@@ -118,3 +118,4 @@ Ipc::ReadWriteLockStats::dump(StoreEntry &e) const
                           appenders, appPerc);
     }
 }
+
diff --git a/src/ipc/ReadWriteLock.h b/src/ipc/ReadWriteLock.h
index a1825215b4..472f5abd53 100644
--- a/src/ipc/ReadWriteLock.h
+++ b/src/ipc/ReadWriteLock.h
@@ -68,3 +68,4 @@ public:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_READ_WRITE_LOCK_H */
+
diff --git a/src/ipc/Request.h b/src/ipc/Request.h
index c0880b2d5d..2cccea4cff 100644
--- a/src/ipc/Request.h
+++ b/src/ipc/Request.h
@@ -25,7 +25,7 @@ public:
 
 public:
     Request(int aRequestorId, unsigned int aRequestId):
-            requestorId(aRequestorId), requestId(aRequestId) {}
+        requestorId(aRequestorId), requestId(aRequestId) {}
 
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
@@ -42,3 +42,4 @@ public:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_REQUEST_H */
+
diff --git a/src/ipc/Response.h b/src/ipc/Response.h
index 7033850e63..d5787b8880 100644
--- a/src/ipc/Response.h
+++ b/src/ipc/Response.h
@@ -25,7 +25,7 @@ public:
 
 public:
     explicit Response(unsigned int aRequestId):
-            requestId(aRequestId) {}
+        requestId(aRequestId) {}
 
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
@@ -48,3 +48,4 @@ std::ostream& operator << (std::ostream &os, const Response& response)
 } // namespace Ipc
 
 #endif /* SQUID_IPC_RESPONSE_H */
+
diff --git a/src/ipc/SharedListen.cc b/src/ipc/SharedListen.cc
index 481f7b956e..8551913120 100644
--- a/src/ipc/SharedListen.cc
+++ b/src/ipc/SharedListen.cc
@@ -86,12 +86,12 @@ void Ipc::SharedListenRequest::pack(TypedMsgHdr &hdrMsg) const
 }
 
 Ipc::SharedListenResponse::SharedListenResponse(int aFd, int anErrNo, int aMapId):
-        fd(aFd), errNo(anErrNo), mapId(aMapId)
+    fd(aFd), errNo(anErrNo), mapId(aMapId)
 {
 }
 
 Ipc::SharedListenResponse::SharedListenResponse(const TypedMsgHdr &hdrMsg):
-        fd(-1), errNo(0), mapId(-1)
+    fd(-1), errNo(0), mapId(-1)
 {
     hdrMsg.checkType(mtSharedListenResponse);
     hdrMsg.getPod(*this);
@@ -159,3 +159,4 @@ void Ipc::SharedListenJoined(const SharedListenResponse &response)
     cbd->handlerSubscription = por.params.handlerSubscription;
     ScheduleCallHere(por.callback);
 }
+
diff --git a/src/ipc/SharedListen.h b/src/ipc/SharedListen.h
index 1713317eb8..dd6f8ea474 100644
--- a/src/ipc/SharedListen.h
+++ b/src/ipc/SharedListen.h
@@ -82,3 +82,4 @@ void SharedListenJoined(const SharedListenResponse &response);
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_SHARED_LISTEN_H */
+
diff --git a/src/ipc/StartListening.cc b/src/ipc/StartListening.cc
index 2cb1acff13..afb5e2eb06 100644
--- a/src/ipc/StartListening.cc
+++ b/src/ipc/StartListening.cc
@@ -58,3 +58,4 @@ Ipc::StartListening(int sock_type, int proto, const Comm::ConnectionPointer &lis
     debugs(54, 3, HERE << "opened listen " << cbd->conn);
     ScheduleCallHere(callback);
 }
+
diff --git a/src/ipc/StartListening.h b/src/ipc/StartListening.h
index 4f7f22b6e3..40dff36172 100644
--- a/src/ipc/StartListening.h
+++ b/src/ipc/StartListening.h
@@ -46,3 +46,4 @@ void StartListening(int sock_type, int proto, const Comm::ConnectionPointer &lis
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_START_LISTENING_H */
+
diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc
index 7c4f8d86d3..b69d6bc1a3 100644
--- a/src/ipc/StoreMap.cc
+++ b/src/ipc/StoreMap.cc
@@ -40,8 +40,8 @@ Ipc::StoreMap::Init(const SBuf &path, const int sliceLimit)
 }
 
 Ipc::StoreMap::StoreMap(const SBuf &aPath): cleaner(NULL), path(aPath),
-        anchors(shm_old(Anchors)(StoreMapAnchorsId(path).c_str())),
-        slices(shm_old(Slices)(StoreMapSlicesId(path).c_str()))
+    anchors(shm_old(Anchors)(StoreMapAnchorsId(path).c_str())),
+    slices(shm_old(Slices)(StoreMapSlicesId(path).c_str()))
 {
     debugs(54, 5, "attached " << path << " with " <<
            anchors->capacity << '+' << slices->capacity);
@@ -520,10 +520,10 @@ Ipc::StoreMap::Owner::~Owner()
 /* Ipc::StoreMapAnchors */
 
 Ipc::StoreMapAnchors::StoreMapAnchors(const int aCapacity):
-        count(0),
-        victim(0),
-        capacity(aCapacity),
-        items(aCapacity)
+    count(0),
+    victim(0),
+    capacity(aCapacity),
+    items(aCapacity)
 {
 }
 
diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h
index 311141629a..26d919bc80 100644
--- a/src/ipc/StoreMap.h
+++ b/src/ipc/StoreMap.h
@@ -259,3 +259,4 @@ public:
 // resulting in sfilenos that are pointing beyond the database.
 
 #endif /* SQUID_IPC_STORE_MAP_H */
+
diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc
index e55ef8344c..da212580f0 100644
--- a/src/ipc/Strand.cc
+++ b/src/ipc/Strand.cc
@@ -37,8 +37,8 @@
 CBDATA_NAMESPACED_CLASS_INIT(Ipc, Strand);
 
 Ipc::Strand::Strand():
-        Port(MakeAddr(strandAddrLabel, KidIdentifier)),
-        isRegistered(false)
+    Port(MakeAddr(strandAddrLabel, KidIdentifier)),
+    isRegistered(false)
 {
 }
 
@@ -164,3 +164,4 @@ void Ipc::Strand::timedout()
     if (!isRegistered)
         fatalf("kid%d registration timed out", KidIdentifier);
 }
+
diff --git a/src/ipc/Strand.h b/src/ipc/Strand.h
index 9c16ea2fe4..dc6f59482a 100644
--- a/src/ipc/Strand.h
+++ b/src/ipc/Strand.h
@@ -58,3 +58,4 @@ private:
 }
 
 #endif /* SQUID_IPC_STRAND_H */
+
diff --git a/src/ipc/StrandCoord.cc b/src/ipc/StrandCoord.cc
index 531cf5c1b4..aaf44fd793 100644
--- a/src/ipc/StrandCoord.cc
+++ b/src/ipc/StrandCoord.cc
@@ -38,7 +38,7 @@ void Ipc::StrandCoord::pack(TypedMsgHdr &hdrMsg) const
 }
 
 Ipc::HereIamMessage::HereIamMessage(const StrandCoord &aStrand):
-        strand(aStrand)
+    strand(aStrand)
 {
 }
 
@@ -53,3 +53,4 @@ void Ipc::HereIamMessage::pack(TypedMsgHdr &hdrMsg) const
     hdrMsg.setType(mtRegistration);
     strand.pack(hdrMsg);
 }
+
diff --git a/src/ipc/StrandCoord.h b/src/ipc/StrandCoord.h
index 07f4cf98f1..a6f8e05155 100644
--- a/src/ipc/StrandCoord.h
+++ b/src/ipc/StrandCoord.h
@@ -47,3 +47,4 @@ public:
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_STRAND_COORD_H */
+
diff --git a/src/ipc/StrandCoords.h b/src/ipc/StrandCoords.h
index b5fe5bcc18..3175b2a24b 100644
--- a/src/ipc/StrandCoords.h
+++ b/src/ipc/StrandCoords.h
@@ -21,3 +21,4 @@ typedef std::vector StrandCoords;
 } // namespace Ipc
 
 #endif /* SQUID_IPC_STRAND_COORDS_H */
+
diff --git a/src/ipc/StrandSearch.cc b/src/ipc/StrandSearch.cc
index 4c9dd688a1..f7b67ec8f2 100644
--- a/src/ipc/StrandSearch.cc
+++ b/src/ipc/StrandSearch.cc
@@ -18,7 +18,7 @@ Ipc::StrandSearchRequest::StrandSearchRequest(): requestorId(-1)
 }
 
 Ipc::StrandSearchRequest::StrandSearchRequest(const TypedMsgHdr &hdrMsg):
-        requestorId(-1)
+    requestorId(-1)
 {
     hdrMsg.checkType(mtStrandSearchRequest);
     hdrMsg.getPod(requestorId);
@@ -35,7 +35,7 @@ void Ipc::StrandSearchRequest::pack(TypedMsgHdr &hdrMsg) const
 /* StrandSearchResponse */
 
 Ipc::StrandSearchResponse::StrandSearchResponse(const Ipc::StrandCoord &aStrand):
-        strand(aStrand)
+    strand(aStrand)
 {
 }
 
@@ -50,3 +50,4 @@ void Ipc::StrandSearchResponse::pack(TypedMsgHdr &hdrMsg) const
     hdrMsg.setType(mtStrandSearchResponse);
     strand.pack(hdrMsg);
 }
+
diff --git a/src/ipc/StrandSearch.h b/src/ipc/StrandSearch.h
index 8d47f9290b..8d9154f2a4 100644
--- a/src/ipc/StrandSearch.h
+++ b/src/ipc/StrandSearch.h
@@ -44,3 +44,4 @@ public:
 } // namespace Ipc;
 
 #endif /* SQUID_IPC_STRAND_SEARCH_H */
+
diff --git a/src/ipc/TypedMsgHdr.cc b/src/ipc/TypedMsgHdr.cc
index 3198cf4195..57e70f0099 100644
--- a/src/ipc/TypedMsgHdr.cc
+++ b/src/ipc/TypedMsgHdr.cc
@@ -256,3 +256,4 @@ Ipc::TypedMsgHdr::allocControl()
     msg_control = &ctrl;
     msg_controllen = sizeof(ctrl);
 }
+
diff --git a/src/ipc/TypedMsgHdr.h b/src/ipc/TypedMsgHdr.h
index 88dfe3a9c5..cb993263a0 100644
--- a/src/ipc/TypedMsgHdr.h
+++ b/src/ipc/TypedMsgHdr.h
@@ -106,3 +106,4 @@ private:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_TYPED_MSG_HDR_H */
+
diff --git a/src/ipc/UdsOp.cc b/src/ipc/UdsOp.cc
index 393d46b41f..9f1e2afec7 100644
--- a/src/ipc/UdsOp.cc
+++ b/src/ipc/UdsOp.cc
@@ -17,9 +17,9 @@
 #include "ipc/UdsOp.h"
 
 Ipc::UdsOp::UdsOp(const String& pathAddr):
-        AsyncJob("Ipc::UdsOp"),
-        address(PathToAddress(pathAddr)),
-        options(COMM_NONBLOCKING)
+    AsyncJob("Ipc::UdsOp"),
+    address(PathToAddress(pathAddr)),
+    options(COMM_NONBLOCKING)
 {
     debugs(54, 5, HERE << '[' << this << "] pathAddr=" << pathAddr);
 }
@@ -82,12 +82,12 @@ Ipc::PathToAddress(const String& pathAddr) {
 CBDATA_NAMESPACED_CLASS_INIT(Ipc, UdsSender);
 
 Ipc::UdsSender::UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage):
-        UdsOp(pathAddr),
-        message(aMessage),
-        retries(10), // TODO: make configurable?
-        timeout(10), // TODO: make configurable?
-        sleeping(false),
-        writing(false)
+    UdsOp(pathAddr),
+    message(aMessage),
+    retries(10), // TODO: make configurable?
+    timeout(10), // TODO: make configurable?
+    sleeping(false),
+    writing(false)
 {
     message.address(address);
 }
@@ -209,3 +209,4 @@ Ipc::ImportFdIntoComm(const Comm::ConnectionPointer &conn, int socktype, int pro
     }
     return conn;
 }
+
diff --git a/src/ipc/UdsOp.h b/src/ipc/UdsOp.h
index 00459173a6..bcc861731b 100644
--- a/src/ipc/UdsOp.h
+++ b/src/ipc/UdsOp.h
@@ -105,3 +105,4 @@ const Comm::ConnectionPointer & ImportFdIntoComm(const Comm::ConnectionPointer &
 }
 
 #endif /* SQUID_IPC_ASYNCUDSOP_H */
+
diff --git a/src/ipc/forward.h b/src/ipc/forward.h
index c671084d32..e876de8576 100644
--- a/src/ipc/forward.h
+++ b/src/ipc/forward.h
@@ -26,3 +26,4 @@ class Response;
 } // namespace Ipc
 
 #endif /* SQUID_IPC_FORWARD_H */
+
diff --git a/src/ipc/mem/FlexibleArray.h b/src/ipc/mem/FlexibleArray.h
index b64ed81c22..3a73c899d6 100644
--- a/src/ipc/mem/FlexibleArray.h
+++ b/src/ipc/mem/FlexibleArray.h
@@ -48,3 +48,4 @@ private:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_MEM_FLEXIBLE_ARRAY_H */
+
diff --git a/src/ipc/mem/Page.cc b/src/ipc/mem/Page.cc
index 47eb71cd19..19e56c6f36 100644
--- a/src/ipc/mem/Page.cc
+++ b/src/ipc/mem/Page.cc
@@ -17,3 +17,4 @@ std::ostream &Ipc::Mem::operator <<(std::ostream &os, const PageId &page)
 {
     return os << "sh_page" << page.pool << '.' << page.number;
 }
+
diff --git a/src/ipc/mem/Page.h b/src/ipc/mem/Page.h
index ff65a8bb46..38419b7b86 100644
--- a/src/ipc/mem/Page.h
+++ b/src/ipc/mem/Page.h
@@ -46,3 +46,4 @@ std::ostream &operator <<(std::ostream &os, const PageId &page);
 } // namespace Ipc
 
 #endif // SQUID_IPC_MEM_PAGE_H
+
diff --git a/src/ipc/mem/PagePool.cc b/src/ipc/mem/PagePool.cc
index 7f8cf94001..5ce75aaf86 100644
--- a/src/ipc/mem/PagePool.cc
+++ b/src/ipc/mem/PagePool.cc
@@ -25,11 +25,11 @@ Ipc::Mem::PagePool::Init(const char *const id, const unsigned int capacity, cons
 }
 
 Ipc::Mem::PagePool::PagePool(const char *const id):
-        pageIndex(shm_old(PageStack)(id)),
-        theLevels(reinterpret_cast(
-                      reinterpret_cast(pageIndex.getRaw()) +
-                      pageIndex->stackSize())),
-        theBuf(reinterpret_cast(theLevels + PageId::maxPurpose))
+    pageIndex(shm_old(PageStack)(id)),
+    theLevels(reinterpret_cast(
+                  reinterpret_cast(pageIndex.getRaw()) +
+                  pageIndex->stackSize())),
+    theBuf(reinterpret_cast(theLevels + PageId::maxPurpose))
 {
 }
 
@@ -70,3 +70,4 @@ Ipc::Mem::PagePool::pagePointer(const PageId &page)
     Must(pageIndex->pageIdIsValid(page));
     return theBuf + pageSize() * (page.number - 1);
 }
+
diff --git a/src/ipc/mem/PagePool.h b/src/ipc/mem/PagePool.h
index 78922fe8ce..dc7d1e1018 100644
--- a/src/ipc/mem/PagePool.h
+++ b/src/ipc/mem/PagePool.h
@@ -59,3 +59,4 @@ private:
 } // namespace Ipc
 
 #endif // SQUID_IPC_MEM_PAGE_POOL_H
+
diff --git a/src/ipc/mem/PageStack.cc b/src/ipc/mem/PageStack.cc
index 124aacb371..a9023da42b 100644
--- a/src/ipc/mem/PageStack.cc
+++ b/src/ipc/mem/PageStack.cc
@@ -19,10 +19,10 @@
 const Ipc::Mem::PageStack::Value Writable = 0;
 
 Ipc::Mem::PageStack::PageStack(const uint32_t aPoolId, const unsigned int aCapacity, const size_t aPageSize):
-        thePoolId(aPoolId), theCapacity(aCapacity), thePageSize(aPageSize),
-        theSize(theCapacity),
-        theLastReadable(prev(theSize)), theFirstWritable(next(theLastReadable)),
-        theItems(aCapacity)
+    thePoolId(aPoolId), theCapacity(aCapacity), thePageSize(aPageSize),
+    theSize(theCapacity),
+    theLastReadable(prev(theSize)), theFirstWritable(next(theLastReadable)),
+    theItems(aCapacity)
 {
     // initially, all pages are free
     for (Offset i = 0; i < theSize; ++i)
@@ -137,3 +137,4 @@ Ipc::Mem::PageStack::stackSize() const
 {
     return StackSize(theCapacity);
 }
+
diff --git a/src/ipc/mem/PageStack.h b/src/ipc/mem/PageStack.h
index f7e2b47047..a9816103c3 100644
--- a/src/ipc/mem/PageStack.h
+++ b/src/ipc/mem/PageStack.h
@@ -79,3 +79,4 @@ private:
 } // namespace Ipc
 
 #endif // SQUID_IPC_MEM_PAGE_STACK_H
+
diff --git a/src/ipc/mem/Pages.cc b/src/ipc/mem/Pages.cc
index 83e23e1c81..1d80db7bc4 100644
--- a/src/ipc/mem/Pages.cc
+++ b/src/ipc/mem/Pages.cc
@@ -139,3 +139,4 @@ SharedMemPagesRr::~SharedMemPagesRr()
     ThePagePool = NULL;
     delete owner;
 }
+
diff --git a/src/ipc/mem/Pages.h b/src/ipc/mem/Pages.h
index 589a04044a..057b410ab9 100644
--- a/src/ipc/mem/Pages.h
+++ b/src/ipc/mem/Pages.h
@@ -61,3 +61,4 @@ void NotePageNeed(const int purpose, const int count);
 } // namespace Ipc
 
 #endif // SQUID_IPC_MEM_PAGES_H
+
diff --git a/src/ipc/mem/Pointer.h b/src/ipc/mem/Pointer.h
index e1943f2ba6..c7c5efdc5c 100644
--- a/src/ipc/mem/Pointer.h
+++ b/src/ipc/mem/Pointer.h
@@ -94,7 +94,7 @@ public:
 
 template 
 Owner::Owner(const char *const id, const off_t sharedSize):
-        theSegment(id), theObject(NULL)
+    theSegment(id), theObject(NULL)
 {
     theSegment.create(sharedSize);
     Must(theSegment.mem());
@@ -184,3 +184,4 @@ Object::Old(const char *const id)
 } // namespace Ipc
 
 #endif /* SQUID_IPC_MEM_POINTER_H */
+
diff --git a/src/ipc/mem/Segment.cc b/src/ipc/mem/Segment.cc
index 127e7f70b5..f6afb5a24c 100644
--- a/src/ipc/mem/Segment.cc
+++ b/src/ipc/mem/Segment.cc
@@ -59,8 +59,8 @@ Ipc::Mem::Segment::Name(const SBuf &prefix, const char *suffix)
 #if HAVE_SHM
 
 Ipc::Mem::Segment::Segment(const char *const id):
-        theFD(-1), theName(GenerateName(id)), theMem(NULL),
-        theSize(0), theReserved(0), doUnlink(false)
+    theFD(-1), theName(GenerateName(id)), theMem(NULL),
+    theSize(0), theReserved(0), doUnlink(false)
 {
 }
 
@@ -232,7 +232,7 @@ typedef std::map SegmentMap;
 static SegmentMap Segments;
 
 Ipc::Mem::Segment::Segment(const char *const id):
-        theName(id), theMem(NULL), theSize(0), theReserved(0), doUnlink(false)
+    theName(id), theMem(NULL), theSize(0), theReserved(0), doUnlink(false)
 {
 }
 
@@ -320,3 +320,4 @@ Ipc::Mem::RegisteredRunner::useConfig()
     if (!InDaemonMode() || !IamMasterProcess())
         open();
 }
+
diff --git a/src/ipc/mem/Segment.h b/src/ipc/mem/Segment.h
index a79ada666b..d4a0bf3c8a 100644
--- a/src/ipc/mem/Segment.h
+++ b/src/ipc/mem/Segment.h
@@ -97,3 +97,4 @@ protected:
 } // namespace Ipc
 
 #endif /* SQUID_IPC_MEM_SEGMENT_H */
+
diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc
index 729407be38..0decff80d0 100644
--- a/src/ipc_win32.cc
+++ b/src/ipc_win32.cc
@@ -134,9 +134,9 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
                                 COMM_NOCLOEXEC,
                                 name);
         prfd = pwfd = comm_open(SOCK_STREAM,
-                                IPPROTO_TCP,	/* protocol */
+                                IPPROTO_TCP,    /* protocol */
                                 local_addr,
-                                0,			/* blocking */
+                                0,          /* blocking */
                                 name);
     } else if (type == IPC_UDP_SOCKET) {
         crfd = cwfd = comm_open(SOCK_DGRAM,
@@ -503,7 +503,7 @@ ipc_thread_1(void *in_params)
             ipcSend(cwfd, err_string, strlen(err_string));
             goto cleanup;
         }
-    }				/* IPC_UDP_SOCKET */
+    }               /* IPC_UDP_SOCKET */
 
     t1 = dup(0);
 
@@ -654,7 +654,7 @@ ipc_thread_1(void *in_params)
         x = recv(prfd_ipc, (void *)(buf1 + 200), bufSz -1 - 200, 0);
         assert((size_t) x == strlen(ok_string)
                && !strncmp(ok_string, buf1 + 200, strlen(ok_string)));
-    }				/* IPC_UDP_SOCKET */
+    }               /* IPC_UDP_SOCKET */
 
     snprintf(buf1, bufSz-1, "%s(%ld) CHILD socket", prog, (long int) pid);
 
@@ -839,3 +839,4 @@ ipc_thread_2(void *in_params)
     xfree(buf2);
     return 0;
 }
+
diff --git a/src/ipcache.cc b/src/ipcache.cc
index 8cdccb991d..52d6b65d74 100644
--- a/src/ipcache.cc
+++ b/src/ipcache.cc
@@ -50,8 +50,8 @@
  \defgroup IPCacheInternal IP Cache Internals
  \ingroup IPCacheAPI
  \todo  when IP cache is provided as a class. These sub-groups will be obsolete
- *	for now they are used to seperate the public and private functions.
- *	with the private ones all being in IPCachInternal and public in IPCacheAPI
+ *  for now they are used to seperate the public and private functions.
+ *  with the private ones all being in IPCachInternal and public in IPCacheAPI
  *
  \section InternalOperation Internal Operation
  *
@@ -80,7 +80,7 @@
 class ipcache_entry
 {
 public:
-    hash_link hash;		/* must be first */
+    hash_link hash;     /* must be first */
     time_t lastref;
     time_t expires;
     ipcache_addrs addrs;
@@ -249,8 +249,8 @@ purge_entries_fromhosts(void)
     ipcache_entry *i = NULL, *t;
 
     while (m) {
-        if (i != NULL) {	/* need to delay deletion */
-            ipcacheRelease(i);	/* we just override locks */
+        if (i != NULL) {    /* need to delay deletion */
+            ipcacheRelease(i);  /* we just override locks */
             i = NULL;
         }
 
@@ -479,10 +479,10 @@ ipcacheHandleReply(void *data, const rfc1035_rr * answers, int na, const char *e
 /**
  \ingroup IPCacheAPI
  *
- \param name		Host to resolve.
- \param handler		Pointer to the function to be called when the reply
- *			from the IP cache (or the DNS if the IP cache misses)
- \param handlerData	Information that is passed to the handler and does not affect the IP cache.
+ \param name        Host to resolve.
+ \param handler     Pointer to the function to be called when the reply
+ *          from the IP cache (or the DNS if the IP cache misses)
+ \param handlerData Information that is passed to the handler and does not affect the IP cache.
  *
  * XXX: on hits and some errors, the handler is called immediately instead
  * of scheduling an async call. This reentrant behavior means that the
@@ -602,13 +602,13 @@ ipcache_init(void)
  * if an entry exists in the cache and does not by default contact the DNS,
  * unless this is requested, by setting the flags.
  *
- \param name		Host name to resolve.
- \param flags		Default is NULL, set to IP_LOOKUP_IF_MISS
- *			to explicitly perform DNS lookups.
+ \param name        Host name to resolve.
+ \param flags       Default is NULL, set to IP_LOOKUP_IF_MISS
+ *          to explicitly perform DNS lookups.
  *
- \retval NULL	An error occured during lookup
- \retval NULL	No results available in cache and no lookup specified
- \retval *	Pointer to the ipcahce_addrs structure containing the lookup results
+ \retval NULL   An error occured during lookup
+ \retval NULL   No results available in cache and no lookup specified
+ \retval *  Pointer to the ipcahce_addrs structure containing the lookup results
  */
 const ipcache_addrs *
 ipcache_gethostbyname(const char *name, int flags)
@@ -892,8 +892,8 @@ ipcacheCycleAddr(const char *name, ipcache_addrs * ia)
 /**
  \ingroup IPCacheAPI
  *
- \param name	domain name to have an IP marked bad
- \param addr	specific addres to be marked bad
+ \param name    domain name to have an IP marked bad
+ \param addr    specific addres to be marked bad
  */
 void
 ipcacheMarkBadAddr(const char *name, const Ip::Address &addr)
@@ -968,10 +968,10 @@ ipcacheMarkGoodAddr(const char *name, const Ip::Address &addr)
             break;
     }
 
-    if (k == (int) ia->count)	/* not found */
+    if (k == (int) ia->count)   /* not found */
         return;
 
-    if (!ia->bad_mask[k])	/* already OK */
+    if (!ia->bad_mask[k])   /* already OK */
         return;
 
     ia->bad_mask[k] = FALSE;
@@ -1024,11 +1024,11 @@ ipcache_restart(void)
  *
  * Adds a "static" entry from /etc/hosts
  *
- \param name	Hostname to be linked with IP
- \param ipaddr	IP Address to be cached.
+ \param name    Hostname to be linked with IP
+ \param ipaddr  IP Address to be cached.
  *
- \retval 0	Success.
- \retval 1	IP address is invalid or other error.
+ \retval 0  Success.
+ \retval 1  IP address is invalid or other error.
  */
 int
 ipcacheAddEntryFromHosts(const char *name, const char *ipaddr)
@@ -1147,3 +1147,4 @@ snmp_netIpFn(variable_list * Var, snint * ErrP)
 }
 
 #endif /*SQUID_SNMP */
+
diff --git a/src/ipcache.h b/src/ipcache.h
index 84c150728e..c7dfcb6d8b 100644
--- a/src/ipcache.h
+++ b/src/ipcache.h
@@ -42,3 +42,4 @@ void ipcache_restart(void);
 int ipcacheAddEntryFromHosts(const char *name, const char *ipaddr);
 
 #endif /* _SQUID_IPCACHE_H */
+
diff --git a/src/log/Config.cc b/src/log/Config.cc
index 36569ca4b7..ee4f6484ef 100644
--- a/src/log/Config.cc
+++ b/src/log/Config.cc
@@ -42,3 +42,4 @@ Log::LogConfig::parseFormats()
     nlf->next = logformats;
     logformats = nlf;
 }
+
diff --git a/src/log/Config.h b/src/log/Config.h
index 28dde58af7..6ef7a2d1c8 100644
--- a/src/log/Config.h
+++ b/src/log/Config.h
@@ -49,3 +49,4 @@ extern LogConfig TheConfig;
 #define dump_logformat(E,N,D) (D).dumpFormats((E),(N))
 
 #endif
+
diff --git a/src/log/CustomLog.h b/src/log/CustomLog.h
index fafdfa49f4..8e4e3db9d5 100644
--- a/src/log/CustomLog.h
+++ b/src/log/CustomLog.h
@@ -36,3 +36,4 @@ public:
 };
 
 #endif /* SQUID_CUSTOMLOG_H_ */
+
diff --git a/src/log/File.cc b/src/log/File.cc
index a18718e801..7baded7089 100644
--- a/src/log/File.cc
+++ b/src/log/File.cc
@@ -136,3 +136,4 @@ logfileFlush(Logfile * lf)
 {
     lf->f_flush(lf);
 }
+
diff --git a/src/log/File.h b/src/log/File.h
index 4d6a0786ac..61c49975cf 100644
--- a/src/log/File.h
+++ b/src/log/File.h
@@ -68,3 +68,4 @@ void logfileLineStart(Logfile * lf);
 void logfileLineEnd(Logfile * lf);
 
 #endif /* SQUID_SRC_LOG_FILE_H */
+
diff --git a/src/log/FormatHttpdCombined.cc b/src/log/FormatHttpdCombined.cc
index bdb4e11ae8..df37b3684a 100644
--- a/src/log/FormatHttpdCombined.cc
+++ b/src/log/FormatHttpdCombined.cc
@@ -80,3 +80,4 @@ Log::Format::HttpdCombined(const AccessLogEntry::Pointer &al, Logfile * logfile)
         safe_free(erep);
     }
 }
+
diff --git a/src/log/FormatHttpdCommon.cc b/src/log/FormatHttpdCommon.cc
index 4779f80877..030f8183e9 100644
--- a/src/log/FormatHttpdCommon.cc
+++ b/src/log/FormatHttpdCommon.cc
@@ -65,3 +65,4 @@ Log::Format::HttpdCommon(const AccessLogEntry::Pointer &al, Logfile * logfile)
         safe_free(erep);
     }
 }
+
diff --git a/src/log/FormatSquidCustom.cc b/src/log/FormatSquidCustom.cc
index 02ca82e027..980ca3cc15 100644
--- a/src/log/FormatSquidCustom.cc
+++ b/src/log/FormatSquidCustom.cc
@@ -27,3 +27,4 @@ Log::Format::SquidCustom(const AccessLogEntry::Pointer &al, CustomLog * log)
 
     logfilePrintf(log->logfile, "%s\n", mb.buf);
 }
+
diff --git a/src/log/FormatSquidIcap.cc b/src/log/FormatSquidIcap.cc
index cf05b95390..e1abe3468f 100644
--- a/src/log/FormatSquidIcap.cc
+++ b/src/log/FormatSquidIcap.cc
@@ -71,3 +71,4 @@ Log::Format::SquidIcap(const AccessLogEntry::Pointer &al, Logfile * logfile)
     safe_free(user);
 }
 #endif
+
diff --git a/src/log/FormatSquidNative.cc b/src/log/FormatSquidNative.cc
index a5fb9011fb..3d4e5a4114 100644
--- a/src/log/FormatSquidNative.cc
+++ b/src/log/FormatSquidNative.cc
@@ -82,3 +82,4 @@ Log::Format::SquidNative(const AccessLogEntry::Pointer &al, Logfile * logfile)
         safe_free(erep);
     }
 }
+
diff --git a/src/log/FormatSquidReferer.cc b/src/log/FormatSquidReferer.cc
index 8cca22954b..b3b82845e1 100644
--- a/src/log/FormatSquidReferer.cc
+++ b/src/log/FormatSquidReferer.cc
@@ -35,3 +35,4 @@ Log::Format::SquidReferer(const AccessLogEntry::Pointer &al, Logfile *logfile)
                   referer,
                   al->url ? al->url : "-");
 }
+
diff --git a/src/log/FormatSquidUseragent.cc b/src/log/FormatSquidUseragent.cc
index 7fec540634..7f1b75fc51 100644
--- a/src/log/FormatSquidUseragent.cc
+++ b/src/log/FormatSquidUseragent.cc
@@ -34,3 +34,4 @@ Log::Format::SquidUserAgent(const AccessLogEntry::Pointer &al, Logfile * logfile
                   Time::FormatHttpd(squid_curtime),
                   agent);
 }
+
diff --git a/src/log/Formats.h b/src/log/Formats.h
index 68a36bb325..8a0386bab0 100644
--- a/src/log/Formats.h
+++ b/src/log/Formats.h
@@ -62,3 +62,4 @@ void HttpdCombined(const AccessLogEntryPointer &al, Logfile * logfile);
 }; // namespace Log
 
 #endif /* _SQUID_LOG_FORMATS_H */
+
diff --git a/src/log/ModDaemon.cc b/src/log/ModDaemon.cc
index 92feda3a3a..7cd25535db 100644
--- a/src/log/ModDaemon.cc
+++ b/src/log/ModDaemon.cc
@@ -24,16 +24,16 @@
 #include 
 
 /* How many buffers to keep before we say we've buffered too much */
-#define	LOGFILE_MAXBUFS		128
+#define LOGFILE_MAXBUFS     128
 
 /* Size of the logfile buffer */
 /*
  * For optimal performance this should match LOGFILE_BUFSIZ in logfile-daemon.c
  */
-#define	LOGFILE_BUFSZ		32768
+#define LOGFILE_BUFSZ       32768
 
 /* How many seconds between warnings */
-#define	LOGFILE_WARN_TIME	30
+#define LOGFILE_WARN_TIME   30
 
 static LOGWRITE logfile_mod_daemon_writeline;
 static LOGLINESTART logfile_mod_daemon_linestart;
@@ -345,3 +345,4 @@ logfile_mod_daemon_flush(Logfile * lf)
         return;
     }
 }
+
diff --git a/src/log/ModDaemon.h b/src/log/ModDaemon.h
index cbe2546f2a..594d2dd853 100644
--- a/src/log/ModDaemon.h
+++ b/src/log/ModDaemon.h
@@ -16,3 +16,4 @@ class Logfile;
 int logfile_mod_daemon_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag);
 
 #endif /* _SQUID_SRC_LOG_MODDAEMON_H */
+
diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc
index 3b9b85c8fa..ce1a7b44d6 100644
--- a/src/log/ModStdio.cc
+++ b/src/log/ModStdio.cc
@@ -134,7 +134,7 @@ logfile_mod_stdio_rotate(Logfile * lf)
     /* Rotate the current log to .0 */
     logfileFlush(lf);
 
-    file_close(ll->fd);		/* always close */
+    file_close(ll->fd);     /* always close */
 
     if (Config.Log.rotateNumber > 0) {
         snprintf(to, MAXPATHLEN, "%s.%d", realpath, 0);
@@ -206,3 +206,4 @@ logfile_mod_stdio_open(Logfile * lf, const char *path, size_t bufsz, int fatal_f
     }
     return 1;
 }
+
diff --git a/src/log/ModStdio.h b/src/log/ModStdio.h
index 2cf5c48c89..473cbc91dc 100644
--- a/src/log/ModStdio.h
+++ b/src/log/ModStdio.h
@@ -16,3 +16,4 @@ class Logfile;
 int logfile_mod_stdio_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag);
 
 #endif /* _SQUID_SRC_LOG_MODSTDIO_H */
+
diff --git a/src/log/ModSyslog.cc b/src/log/ModSyslog.cc
index e636be41e8..b8475b5616 100644
--- a/src/log/ModSyslog.cc
+++ b/src/log/ModSyslog.cc
@@ -168,3 +168,4 @@ logfile_mod_syslog_open(Logfile * lf, const char *path, size_t bufsz, int fatal_
     return 1;
 }
 #endif
+
diff --git a/src/log/ModSyslog.h b/src/log/ModSyslog.h
index aff4ad840f..b51a162187 100644
--- a/src/log/ModSyslog.h
+++ b/src/log/ModSyslog.h
@@ -16,3 +16,4 @@ class Logfile;
 int logfile_mod_syslog_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag);
 
 #endif /* _SQUID_SRC_LOG_MODSYSLOG_H */
+
diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc
index e295259d16..1daad07fa0 100644
--- a/src/log/ModUdp.cc
+++ b/src/log/ModUdp.cc
@@ -211,3 +211,4 @@ logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_fla
 
     return 1;
 }
+
diff --git a/src/log/ModUdp.h b/src/log/ModUdp.h
index 669273ae9b..b1cfb1ea39 100644
--- a/src/log/ModUdp.h
+++ b/src/log/ModUdp.h
@@ -16,3 +16,4 @@ class Logfile;
 int logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag);
 
 #endif /* _SQUID_SRC_LOG_MODUDP_H */
+
diff --git a/src/log/TcpLogger.cc b/src/log/TcpLogger.cc
index 8b58aa062f..bc8f7414a8 100644
--- a/src/log/TcpLogger.cc
+++ b/src/log/TcpLogger.cc
@@ -35,18 +35,18 @@ const size_t Log::TcpLogger::BufferCapacityMin = 2*Log::TcpLogger::IoBufSize;
 CBDATA_NAMESPACED_CLASS_INIT(Log, TcpLogger);
 
 Log::TcpLogger::TcpLogger(size_t bufCap, bool dieOnErr, Ip::Address them):
-        AsyncJob("TcpLogger"),
-        dieOnError(dieOnErr),
-        bufferCapacity(bufCap),
-        bufferedSize(0),
-        flushDebt(0),
-        quitOnEmpty(false),
-        reconnectScheduled(false),
-        writeScheduled(false),
-        conn(NULL),
-        remote(them),
-        connectFailures(0),
-        drops(0)
+    AsyncJob("TcpLogger"),
+    dieOnError(dieOnErr),
+    bufferCapacity(bufCap),
+    bufferedSize(0),
+    flushDebt(0),
+    quitOnEmpty(false),
+    reconnectScheduled(false),
+    writeScheduled(false),
+    conn(NULL),
+    remote(them),
+    connectFailures(0),
+    drops(0)
 {
     if (bufferCapacity < BufferCapacityMin) {
         debugs(MY_DEBUG_SECTION, DBG_IMPORTANT,
@@ -478,3 +478,4 @@ Log::TcpLogger::Open(Logfile * lf, const char *path, size_t bufsz, int fatalFlag
 
     return 1;
 }
+
diff --git a/src/log/TcpLogger.h b/src/log/TcpLogger.h
index 7798439c22..754a9d911d 100644
--- a/src/log/TcpLogger.h
+++ b/src/log/TcpLogger.h
@@ -110,3 +110,4 @@ private:
 } // namespace Log
 
 #endif /* _SQUID_SRC_LOG_TCPLOGGER_H */
+
diff --git a/src/log/access_log.cc b/src/log/access_log.cc
index c9356f59da..fdf8851fe2 100644
--- a/src/log/access_log.cc
+++ b/src/log/access_log.cc
@@ -227,13 +227,13 @@ accessLogClose(void)
 }
 
 HierarchyLogEntry::HierarchyLogEntry() :
-        code(HIER_NONE),
-        cd_lookup(LOOKUP_NONE),
-        n_choices(0),
-        n_ichoices(0),
-        peer_reply_status(Http::scNone),
-        tcpServer(NULL),
-        bodyBytesRead(-1)
+    code(HIER_NONE),
+    cd_lookup(LOOKUP_NONE),
+    n_choices(0),
+    n_ichoices(0),
+    peer_reply_status(Http::scNone),
+    tcpServer(NULL),
+    bodyBytesRead(-1)
 {
     memset(host, '\0', SQUIDHOSTNAMELEN);
     memset(cd_host, '\0', SQUIDHOSTNAMELEN);
@@ -592,3 +592,4 @@ headersLog(int cs, int pq, const HttpRequestMethod& method, void *data)
 }
 
 #endif
+
diff --git a/src/log/access_log.h b/src/log/access_log.h
index 25c342fadb..60cea11874 100644
--- a/src/log/access_log.h
+++ b/src/log/access_log.h
@@ -22,3 +22,4 @@ void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data);
 #endif
 
 #endif /* SQUID_LOG_ACCESS_LOG_H_ */
+
diff --git a/src/lookup_t.h b/src/lookup_t.h
index b46728f883..47f7fbd932 100644
--- a/src/lookup_t.h
+++ b/src/lookup_t.h
@@ -18,3 +18,4 @@ typedef enum {
 extern const char *lookup_t_str[];
 
 #endif /* _SQUID_LOOKUP_T_H */
+
diff --git a/src/main.cc b/src/main.cc
index 1ed2e28733..bc7bb62ac4 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -142,7 +142,7 @@ void WINAPI WIN32_svcHandler(DWORD);
 
 static int opt_signal_service = FALSE;
 static char *opt_syslog_facility = NULL;
-static int icpPortNumOverride = 1;	/* Want to detect "-u 0" */
+static int icpPortNumOverride = 1;  /* Want to detect "-u 0" */
 static int configured_once = 0;
 #if MALLOC_DBG
 static int malloc_debug_level = 0;
@@ -318,9 +318,9 @@ mainParseOptions(int argc, char *argv[])
     // short options
     const char *shortOpStr =
 #if USE_WIN32_SERVICE
-                            "O:Vir"
+        "O:Vir"
 #endif
-                            "CDFNRSYXa:d:f:hk:m::n:sl:u:vz?";
+        "CDFNRSYXa:d:f:hk:m::n:sl:u:vz?";
 
     // long options
     static struct option squidOptions[] = {
@@ -469,7 +469,7 @@ mainParseOptions(int argc, char *argv[])
 
             else if (!strncmp(optarg, "check", strlen(optarg)))
                 /** \li On check send 0 / SIGNULL. */
-                opt_send_signal = 0;	/* SIGNULL */
+                opt_send_signal = 0;    /* SIGNULL */
             else if (!strncmp(optarg, "parse", strlen(optarg)))
                 /** \li On parse set global flag to re-parse the config file only. */
                 opt_parse_cfg_only = 1;
@@ -574,7 +574,7 @@ mainParseOptions(int argc, char *argv[])
 
             exit(0);
 
-            /* NOTREACHED */
+        /* NOTREACHED */
 
         case 'z':
             /** \par z
@@ -776,7 +776,7 @@ mainReconfigureFinish(void *)
     debugs(1, 3, "finishing reconfiguring");
 
     errorClean();
-    enter_suid();		/* root to read config file */
+    enter_suid();       /* root to read config file */
 
     // we may have disabled the need for PURGE
     if (Config2.onoff.enable_purge)
@@ -805,10 +805,10 @@ mainReconfigureFinish(void *)
     Mem::Report();
     setEffectiveUser();
     _db_init(Debug::cache_log, Debug::debugOptions);
-    ipcache_restart();		/* clear stuck entries */
-    fqdncache_restart();	/* sigh, fqdncache too */
+    ipcache_restart();      /* clear stuck entries */
+    fqdncache_restart();    /* sigh, fqdncache too */
     parseEtcHosts();
-    errorInitialize();		/* reload error pages */
+    errorInitialize();      /* reload error pages */
     accessLogInit();
 
 #if USE_LOADABLE_MODULES
@@ -881,7 +881,7 @@ mainReconfigureFinish(void *)
             eventDelete(start_announce, NULL);
     }
 
-    writePidFile();		/* write PID file */
+    writePidFile();     /* write PID file */
 
     reconfiguring = 0;
 }
@@ -896,10 +896,10 @@ mainRotate(void)
 #endif
     externalAclShutdown();
 
-    _db_rotate_log();		/* cache.log */
+    _db_rotate_log();       /* cache.log */
     storeDirWriteCleanLogs(1);
-    storeLogRotate();		/* store.log */
-    accessLogRotate();		/* access.log */
+    storeLogRotate();       /* store.log */
+    accessLogRotate();      /* access.log */
 #if ICAP_CLIENT
     icapLogRotate();               /*icap.log*/
 #endif
@@ -915,7 +915,7 @@ static void
 setEffectiveUser(void)
 {
     keepCapabilities();
-    leave_suid();		/* Run as non privilegied user */
+    leave_suid();       /* Run as non privilegied user */
 #if _SQUID_OS2_
 
     return;
@@ -1027,7 +1027,7 @@ mainInitialize(void)
 #endif
 
     if (!configured_once)
-        disk_init();		/* disk_init must go before ipcache_init() */
+        disk_init();        /* disk_init must go before ipcache_init() */
 
     ipcache_init();
 
@@ -1055,9 +1055,9 @@ mainInitialize(void)
 #endif
     externalAclInit();
 
-    httpHeaderInitModule();	/* must go before any header processing (e.g. the one in errorInitialize) */
+    httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
 
-    httpReplyInitModule();	/* must go before accepting replies */
+    httpReplyInitModule();  /* must go before accepting replies */
 
     errorInitialize();
 
@@ -1133,7 +1133,7 @@ mainInitialize(void)
         no_suid();
 
     if (!configured_once)
-        writePidFile();		/* write PID file */
+        writePidFile();     /* write PID file */
 
 #if defined(_SQUID_LINUX_THREADS_)
 
@@ -1376,7 +1376,7 @@ SquidMain(int argc, char **argv)
 
         Mem::Init();
 
-        storeFsInit();		/* required for config parsing */
+        storeFsInit();      /* required for config parsing */
 
         /* TODO: call the FS::Clean() in shutdown to do Fs cleanups */
         Fs::Init();
@@ -1882,15 +1882,15 @@ SquidShutdown()
 
     Store::Root().sync(); /* Flush pending object writes/unlinks */
 
-    unlinkdClose();	  /* after sync/flush. NOP if !USE_UNLINKD */
+    unlinkdClose();   /* after sync/flush. NOP if !USE_UNLINKD */
 
     storeDirWriteCleanLogs(0);
     PrintRusage();
     dumpMallocStats();
-    Store::Root().sync();		/* Flush log writes */
+    Store::Root().sync();       /* Flush log writes */
     storeLogClose();
     accessLogClose();
-    Store::Root().sync();		/* Flush log close */
+    Store::Root().sync();       /* Flush log close */
     StoreFileSystem::FreeAllFs();
     DiskIOModule::FreeAllModules();
 #if LEAK_CHECK_MODE && 0 /* doesn't work at the moment */
diff --git a/src/mem/AllocatorProxy.cc b/src/mem/AllocatorProxy.cc
index c9128cfc58..0c70729634 100644
--- a/src/mem/AllocatorProxy.cc
+++ b/src/mem/AllocatorProxy.cc
@@ -53,3 +53,4 @@ Mem::AllocatorProxy::getStats(MemPoolStats * stats)
 {
     return getAllocator()->getStats(stats);
 }
+
diff --git a/src/mem/AllocatorProxy.h b/src/mem/AllocatorProxy.h
index 371a37f5a1..2ce940e6e8 100644
--- a/src/mem/AllocatorProxy.h
+++ b/src/mem/AllocatorProxy.h
@@ -62,8 +62,8 @@ public:
     MemPoolMeter const &getMeter() const;
 
     /**
-     * \param stats	Object to be filled with statistical data about pool.
-     * \retval		Number of objects in use, ie. allocated.
+     * \param stats Object to be filled with statistical data about pool.
+     * \retval      Number of objects in use, ie. allocated.
      */
     int getStats(MemPoolStats * stats);
 
@@ -78,3 +78,4 @@ private:
 } // namespace Mem
 
 #endif /* _SQUID_SRC_MEM_ALLOCATORPROXY_H */
+
diff --git a/src/mem/Pool.cc b/src/mem/Pool.cc
index 06aa4f828f..c5727cb5b2 100644
--- a/src/mem/Pool.cc
+++ b/src/mem/Pool.cc
@@ -18,7 +18,7 @@
 #include 
 #include 
 
-#define FLUSH_LIMIT 1000	/* Flush memPool counters to memMeters after flush limit calls */
+#define FLUSH_LIMIT 1000    /* Flush memPool counters to memMeters after flush limit calls */
 
 extern time_t squid_curtime;
 
@@ -85,7 +85,7 @@ MemPools::idleLimit() const
  * MemPools::GetInstance().setDefaultPoolChunking() can be called.
  */
 MemPools::MemPools() : pools(NULL), mem_idle_limit(2 << 20 /* 2 MB */),
-        poolCount(0), defaultIsChunked(USE_CHUNKEDMEMPOOLS && !RUNNING_ON_VALGRIND)
+    poolCount(0), defaultIsChunked(USE_CHUNKEDMEMPOOLS && !RUNNING_ON_VALGRIND)
 {
     char *cfg = getenv("MEMPOOLS");
     if (cfg)
@@ -316,11 +316,11 @@ memPoolsTotalAllocated(void)
 }
 
 MemImplementingAllocator::MemImplementingAllocator(char const *aLabel, size_t aSize) : MemAllocator(aLabel),
-        next(NULL),
-        alloc_calls(0),
-        free_calls(0),
-        saved_calls(0),
-        obj_size(RoundedSize(aSize))
+    next(NULL),
+    alloc_calls(0),
+    free_calls(0),
+    saved_calls(0),
+    obj_size(RoundedSize(aSize))
 {
     memPID = ++Pool_id_counter;
 
@@ -374,3 +374,4 @@ MemImplementingAllocator::objectSize() const
 {
     return obj_size;
 }
+
diff --git a/src/mem/Pool.h b/src/mem/Pool.h
index 1ea029cdc6..2306b14de3 100644
--- a/src/mem/Pool.h
+++ b/src/mem/Pool.h
@@ -57,7 +57,7 @@
 /// \ingroup MemPoolsAPI
 #define MEM_MIN_FREE  32
 /// \ingroup MemPoolsAPI
-#define MEM_MAX_FREE  65535	/* unsigned short is max number of items per chunk */
+#define MEM_MAX_FREE  65535 /* unsigned short is max number of items per chunk */
 
 class MemImplementingAllocator;
 class MemPoolStats;
@@ -122,8 +122,8 @@ public:
     void flushMeters();
 
     /**
-     \param label	Name for the pool. Displayed in stats.
-     \param obj_size	Size of elements in MemPool.
+     \param label   Name for the pool. Displayed in stats.
+     \param obj_size    Size of elements in MemPool.
      */
     MemImplementingAllocator * create(const char *label, size_t obj_size);
 
@@ -184,8 +184,8 @@ public:
     virtual ~MemAllocator() {}
 
     /**
-     \param stats	Object to be filled with statistical data about pool.
-     \retval		Number of objects in use, ie. allocated.
+     \param stats   Object to be filled with statistical data about pool.
+     \retval        Number of objects in use, ie. allocated.
      */
     virtual int getStats(MemPoolStats * stats, int accumulate = 0) = 0;
 
@@ -220,7 +220,7 @@ public:
     virtual void setChunkSize(size_t chunksize) {}
 
     /**
-     \param minSize	Minimum size needed to be allocated.
+     \param minSize Minimum size needed to be allocated.
      \retval n Smallest size divisible by sizeof(void*)
      */
     static size_t RoundedSize(size_t minSize);
@@ -363,3 +363,4 @@ extern int memPoolInUseCount(MemAllocator *);
 extern int memPoolsTotalAllocated(void);
 
 #endif /* _MEM_POOL_H_ */
+
diff --git a/src/mem/PoolChunked.cc b/src/mem/PoolChunked.cc
index cee007256f..9364b1eb99 100644
--- a/src/mem/PoolChunked.cc
+++ b/src/mem/PoolChunked.cc
@@ -231,7 +231,7 @@ MemPoolChunked::createChunk()
     newChunk = new MemChunk(this);
 
     chunk = Chunks;
-    if (chunk == NULL) {	/* first chunk in pool */
+    if (chunk == NULL) {    /* first chunk in pool */
         Chunks = newChunk;
         return;
     }
@@ -260,10 +260,10 @@ MemPoolChunked::setChunkSize(size_t chunksize)
     int cap;
     size_t csize = chunksize;
 
-    if (Chunks)		/* unsafe to tamper */
+    if (Chunks)     /* unsafe to tamper */
         return;
 
-    csize = ((csize + MEM_PAGE_SIZE - 1) / MEM_PAGE_SIZE) * MEM_PAGE_SIZE;	/* round up to page size */
+    csize = ((csize + MEM_PAGE_SIZE - 1) / MEM_PAGE_SIZE) * MEM_PAGE_SIZE;  /* round up to page size */
     cap = csize / obj_size;
 
     if (cap < MEM_MIN_FREE)
@@ -276,7 +276,7 @@ MemPoolChunked::setChunkSize(size_t chunksize)
         cap = 1;
 
     csize = cap * obj_size;
-    csize = ((csize + MEM_PAGE_SIZE - 1) / MEM_PAGE_SIZE) * MEM_PAGE_SIZE;	/* round up to page size */
+    csize = ((csize + MEM_PAGE_SIZE - 1) / MEM_PAGE_SIZE) * MEM_PAGE_SIZE;  /* round up to page size */
     cap = csize / obj_size;
 
     chunk_capacity = cap;
@@ -345,8 +345,8 @@ MemPoolChunked::convertFreeCacheToChunkFreeCache()
         assert(chunk->inuse_count > 0);
         -- chunk->inuse_count;
         (void) VALGRIND_MAKE_MEM_DEFINED(Free, sizeof(void *));
-        freeCache = *(void **)Free;	/* remove from global cache */
-        *(void **)Free = chunk->freeList;	/* stuff into chunks freelist */
+        freeCache = *(void **)Free; /* remove from global cache */
+        *(void **)Free = chunk->freeList;   /* stuff into chunks freelist */
         (void) VALGRIND_MAKE_MEM_NOACCESS(Free, sizeof(void *));
         chunk->freeList = Free;
         chunk->lastref = squid_curtime;
@@ -435,10 +435,10 @@ MemPoolChunked::getStats(MemPoolStats * stats, int accumulate)
     int chunks_free = 0;
     int chunks_partial = 0;
 
-    if (!accumulate)	/* need skip memset for GlobalStats accumulation */
+    if (!accumulate)    /* need skip memset for GlobalStats accumulation */
         memset(stats, 0, sizeof(MemPoolStats));
 
-    clean((time_t) 555555);	/* don't want to get chunks released before reporting */
+    clean((time_t) 555555); /* don't want to get chunks released before reporting */
 
     stats->pool = this;
     stats->label = objectType();
@@ -469,3 +469,4 @@ MemPoolChunked::getStats(MemPoolStats * stats, int accumulate)
 
     return meter.inuse.level;
 }
+
diff --git a/src/mem/PoolChunked.h b/src/mem/PoolChunked.h
index 826504cb7b..51ef6314ae 100644
--- a/src/mem/PoolChunked.h
+++ b/src/mem/PoolChunked.h
@@ -12,7 +12,7 @@
 #include "mem/Pool.h"
 
 #define MEM_CHUNK_SIZE        4 * 4096  /* 16KB ... 4 * VM_PAGE_SZ */
-#define MEM_CHUNK_MAX_SIZE  256 * 1024	/* 2MB */
+#define MEM_CHUNK_MAX_SIZE  256 * 1024  /* 2MB */
 
 class MemChunk;
 
@@ -27,8 +27,8 @@ public:
     virtual void clean(time_t maxage);
 
     /**
-     \param stats	Object to be filled with statistical data about pool.
-     \retval		Number of objects in use, ie. allocated.
+     \param stats   Object to be filled with statistical data about pool.
+     \retval        Number of objects in use, ie. allocated.
      */
     virtual int getStats(MemPoolStats * stats, int accumulate);
 
@@ -79,3 +79,4 @@ public:
 };
 
 #endif /* _MEM_POOL_CHUNKED_H_ */
+
diff --git a/src/mem/PoolMalloc.cc b/src/mem/PoolMalloc.cc
index 9bf19e3813..c514ec7590 100644
--- a/src/mem/PoolMalloc.cc
+++ b/src/mem/PoolMalloc.cc
@@ -60,7 +60,7 @@ MemPoolMalloc::deallocate(void *obj, bool aggressive)
 int
 MemPoolMalloc::getStats(MemPoolStats * stats, int accumulate)
 {
-    if (!accumulate)	/* need skip memset for GlobalStats accumulation */
+    if (!accumulate)    /* need skip memset for GlobalStats accumulation */
         memset(stats, 0, sizeof(MemPoolStats));
 
     stats->pool = this;
diff --git a/src/mem/PoolMalloc.h b/src/mem/PoolMalloc.h
index 0ee27411b9..8380fa9cab 100644
--- a/src/mem/PoolMalloc.h
+++ b/src/mem/PoolMalloc.h
@@ -42,8 +42,8 @@ public:
     virtual void clean(time_t maxage);
 
     /**
-     \param stats	Object to be filled with statistical data about pool.
-     \retval		Number of objects in use, ie. allocated.
+     \param stats   Object to be filled with statistical data about pool.
+     \retval        Number of objects in use, ie. allocated.
      */
     virtual int getStats(MemPoolStats * stats, int accumulate);
 
@@ -56,3 +56,4 @@ private:
 };
 
 #endif /* _MEM_POOL_MALLOC_H_ */
+
diff --git a/src/mem/forward.h b/src/mem/forward.h
index cd18c364ad..00157b8f21 100644
--- a/src/mem/forward.h
+++ b/src/mem/forward.h
@@ -23,12 +23,12 @@ class MemPoolMeter;
 
 namespace Mem
 {
-    void Init();
-    void Report();
-    void Stats(StoreEntry *);
-    void CleanIdlePools(void *unused);
-    void Report(std::ostream &);
-    void PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, std::ostream &);
+void Init();
+void Report();
+void Stats(StoreEntry *);
+void CleanIdlePools(void *unused);
+void Report(std::ostream &);
+void PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, std::ostream &);
 };
 
 extern const size_t squidSystemPageSize;
@@ -84,3 +84,4 @@ void memDataInit(mem_type, const char *, size_t, int, bool doZero = true);
 void memCheckInit(void);
 
 #endif /* _SQUID_SRC_MEM_FORWARD_H */
+
diff --git a/src/mem/old_api.cc b/src/mem/old_api.cc
index fb0cb5b1b9..1a46962b15 100644
--- a/src/mem/old_api.cc
+++ b/src/mem/old_api.cc
@@ -71,10 +71,10 @@ StrPoolsAttrs[mem_str_pool_count] = {
 
     {
         "Short Strings", MemAllocator::RoundedSize(36),
-    },				/* to fit rfc1123 and similar */
+    },              /* to fit rfc1123 and similar */
     {
         "Medium Strings", MemAllocator::RoundedSize(128),
-    },				/* to fit most urls */
+    },              /* to fit most urls */
     {
         "Long Strings", MemAllocator::RoundedSize(512),
     },
@@ -137,8 +137,8 @@ static void
 memBufStats(std::ostream & stream)
 {
     stream << "Large buffers: " <<
-    HugeBufCountMeter.level << " (" <<
-    HugeBufVolumeMeter.level / 1024 << " KB)\n";
+           HugeBufCountMeter.level << " (" <<
+           HugeBufVolumeMeter.level / 1024 << " KB)\n";
 }
 
 void
@@ -357,7 +357,7 @@ memFreeBuf(size_t size, void *buf)
     }
 }
 
-static double clean_interval = 15.0;	/* time to live of idle chunk before release */
+static double clean_interval = 15.0;    /* time to live of idle chunk before release */
 
 void
 Mem::CleanIdlePools(void *unused)
@@ -711,22 +711,22 @@ Mem::Report(std::ostream &stream)
     stream << "Current memory usage:\n";
     /* heading */
     stream << "Pool\t Obj Size\t"
-    "Chunks\t\t\t\t\t\t\t"
-    "Allocated\t\t\t\t\t"
-    "In Use\t\t\t\t\t"
-    "Idle\t\t\t"
-    "Allocations Saved\t\t\t"
-    "Rate\t"
-    "\n"
-    " \t (bytes)\t"
-    "KB/ch\t obj/ch\t"
-    "(#)\t used\t free\t part\t %Frag\t "
-    "(#)\t (KB)\t high (KB)\t high (hrs)\t %Tot\t"
-    "(#)\t (KB)\t high (KB)\t high (hrs)\t %alloc\t"
-    "(#)\t (KB)\t high (KB)\t"
-    "(#)\t %cnt\t %vol\t"
-    "(#)/sec\t"
-    "\n";
+           "Chunks\t\t\t\t\t\t\t"
+           "Allocated\t\t\t\t\t"
+           "In Use\t\t\t\t\t"
+           "Idle\t\t\t"
+           "Allocations Saved\t\t\t"
+           "Rate\t"
+           "\n"
+           " \t (bytes)\t"
+           "KB/ch\t obj/ch\t"
+           "(#)\t used\t free\t part\t %Frag\t "
+           "(#)\t (KB)\t high (KB)\t high (hrs)\t %Tot\t"
+           "(#)\t (KB)\t high (KB)\t high (hrs)\t %alloc\t"
+           "(#)\t (KB)\t high (KB)\t"
+           "(#)\t %cnt\t %vol\t"
+           "(#)/sec\t"
+           "\n";
     xm_deltat = current_dtime - xm_time;
     xm_time = current_dtime;
 
@@ -742,7 +742,7 @@ Mem::Report(std::ostream &stream)
     while ((pool = memPoolIterateNext(iter))) {
         pool->getStats(&mp_stats);
 
-        if (!mp_stats.pool)	/* pool destroyed */
+        if (!mp_stats.pool) /* pool destroyed */
             continue;
 
         if (mp_stats.pool->getMeter().gb_allocated.count > 0) {
@@ -785,7 +785,7 @@ Mem::Report(std::ostream &stream)
     stream << "Cumulative allocated volume: "<< double_to_str(buf, 64, mp_total.TheMeter->gb_allocated.bytes) << "\n";
     /* overhead */
     stream << "Current overhead: " << mp_total.tot_overhead << " bytes (" <<
-    std::setprecision(3) << xpercent(mp_total.tot_overhead, mp_total.TheMeter->inuse.level) << "%)\n";
+           std::setprecision(3) << xpercent(mp_total.tot_overhead, mp_total.TheMeter->inuse.level) << "%)\n";
     /* limits */
     if (mp_total.mem_idle_limit >= 0)
         stream << "Idle pool limit: " << std::setprecision(2) << toMB(mp_total.mem_idle_limit) << " MB\n";
@@ -794,3 +794,4 @@ Mem::Report(std::ostream &stream)
     stream << "Pools ever used:     " << mp_total.tot_pools_alloc - not_used << " (shown above)\n";
     stream << "Currently in use:    " << mp_total.tot_pools_inuse << "\n";
 }
+
diff --git a/src/mem_node.cc b/src/mem_node.cc
index f8e1fc860b..1e014c1804 100644
--- a/src/mem_node.cc
+++ b/src/mem_node.cc
@@ -42,8 +42,8 @@ memNodeWriteComplete(void* d)
 }
 
 mem_node::mem_node(int64_t offset) :
-        nodeBuffer(0,offset,data),
-        write_pending(false)
+    nodeBuffer(0,offset,data),
+    write_pending(false)
 {
     *data = 0;
 }
@@ -112,3 +112,4 @@ mem_node::operator < (mem_node const & rhs) const
 {
     return start() < rhs.start();
 }
+
diff --git a/src/mem_node.h b/src/mem_node.h
index d54da68588..7f1b39c879 100644
--- a/src/mem_node.h
+++ b/src/mem_node.h
@@ -48,3 +48,4 @@ operator << (std::ostream &os, mem_node &aNode)
 void memNodeWriteComplete(void *);
 
 #endif /* SQUID_MEM_NODE_H */
+
diff --git a/src/mgr/Action.cc b/src/mgr/Action.cc
index 686033f41d..f64ccf7bbf 100644
--- a/src/mgr/Action.cc
+++ b/src/mgr/Action.cc
@@ -123,3 +123,4 @@ Mgr::Action::fillEntry(StoreEntry* entry, bool writeHttpHeader)
     if (atomic())
         entry->complete();
 }
+
diff --git a/src/mgr/Action.h b/src/mgr/Action.h
index c15578d906..6131524f03 100644
--- a/src/mgr/Action.h
+++ b/src/mgr/Action.h
@@ -92,3 +92,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_ACTION_H */
+
diff --git a/src/mgr/ActionCreator.h b/src/mgr/ActionCreator.h
index d3b61bbc30..b2422015ff 100644
--- a/src/mgr/ActionCreator.h
+++ b/src/mgr/ActionCreator.h
@@ -34,3 +34,4 @@ public:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_ACTION_CREATOR_H */
+
diff --git a/src/mgr/ActionParams.cc b/src/mgr/ActionParams.cc
index 6865b30b65..7259dac330 100644
--- a/src/mgr/ActionParams.cc
+++ b/src/mgr/ActionParams.cc
@@ -48,3 +48,4 @@ Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const
     msg.putString(password);
     queryParams.pack(msg);
 }
+
diff --git a/src/mgr/ActionParams.h b/src/mgr/ActionParams.h
index 0ea07be9ee..14765d5d5e 100644
--- a/src/mgr/ActionParams.h
+++ b/src/mgr/ActionParams.h
@@ -47,3 +47,4 @@ public:
 std::ostream &operator <<(std::ostream &os, const Mgr::ActionParams ¶ms);
 
 #endif /* SQUID_MGR_ACTION_PARAMS_H */
+
diff --git a/src/mgr/ActionPasswordList.cc b/src/mgr/ActionPasswordList.cc
index dcc973b5ff..3aee7e6c86 100644
--- a/src/mgr/ActionPasswordList.cc
+++ b/src/mgr/ActionPasswordList.cc
@@ -16,3 +16,4 @@ Mgr::ActionPasswordList::~ActionPasswordList()
     wordlistDestroy(&actions);
     delete next;
 }
+
diff --git a/src/mgr/ActionPasswordList.h b/src/mgr/ActionPasswordList.h
index dc4b5d2bdc..50a695515b 100644
--- a/src/mgr/ActionPasswordList.h
+++ b/src/mgr/ActionPasswordList.h
@@ -29,3 +29,4 @@ public:
 } //namespace Mgr
 
 #endif /* SQUID_MGR_CACHEMGRPASSWD_H_ */
+
diff --git a/src/mgr/ActionProfile.h b/src/mgr/ActionProfile.h
index 3f3ebb5b39..ba63f83a65 100644
--- a/src/mgr/ActionProfile.h
+++ b/src/mgr/ActionProfile.h
@@ -26,8 +26,8 @@ public:
 public:
     ActionProfile(const char* aName, const char* aDesc, bool aPwReq,
                   bool anAtomic, const ActionCreatorPointer &aCreator):
-            name(aName), desc(aDesc), isPwReq(aPwReq), isAtomic(anAtomic),
-            creator(aCreator) {
+        name(aName), desc(aDesc), isPwReq(aPwReq), isAtomic(anAtomic),
+        creator(aCreator) {
     }
 
 public:
@@ -47,3 +47,4 @@ operator <<(std::ostream &os, const Mgr::ActionProfile &profile)
 }
 
 #endif /* SQUID_MGR_ACTION_PROFILE_H */
+
diff --git a/src/mgr/ActionWriter.cc b/src/mgr/ActionWriter.cc
index 6bfbaa0428..fb3b60848e 100644
--- a/src/mgr/ActionWriter.cc
+++ b/src/mgr/ActionWriter.cc
@@ -17,8 +17,8 @@
 CBDATA_NAMESPACED_CLASS_INIT(Mgr, ActionWriter);
 
 Mgr::ActionWriter::ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn):
-        StoreToCommWriter(conn, anAction->createStoreEntry()),
-        action(anAction)
+    StoreToCommWriter(conn, anAction->createStoreEntry()),
+    action(anAction)
 {
     debugs(16, 5, HERE << conn << " action: " << action);
 }
@@ -32,3 +32,4 @@ Mgr::ActionWriter::start()
     StoreToCommWriter::start();
     action->fillEntry(entry, false);
 }
+
diff --git a/src/mgr/ActionWriter.h b/src/mgr/ActionWriter.h
index a41b8ae0a5..89100ed355 100644
--- a/src/mgr/ActionWriter.h
+++ b/src/mgr/ActionWriter.h
@@ -37,3 +37,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_ACTION_WRITER_H */
+
diff --git a/src/mgr/BasicActions.cc b/src/mgr/BasicActions.cc
index 10fbed6665..3c653d6f1d 100644
--- a/src/mgr/BasicActions.cc
+++ b/src/mgr/BasicActions.cc
@@ -88,7 +88,7 @@ Mgr::ReconfigureAction::Create(const Command::Pointer &cmd)
 }
 
 Mgr::ReconfigureAction::ReconfigureAction(const Command::Pointer &aCmd):
-        Action(aCmd)
+    Action(aCmd)
 {
     debugs(16, 5, HERE);
 }
@@ -131,7 +131,7 @@ Mgr::OfflineToggleAction::Create(const Command::Pointer &cmd)
 }
 
 Mgr::OfflineToggleAction::OfflineToggleAction(const Command::Pointer &aCmd):
-        Action(aCmd)
+    Action(aCmd)
 {
     debugs(16, 5, HERE);
 }
@@ -156,3 +156,4 @@ Mgr::RegisterBasics()
     RegisterAction("reconfigure", "Reconfigure Squid", &Mgr::ReconfigureAction::Create, 1, 1);
     RegisterAction("rotate", "Rotate Squid Logs", &Mgr::RotateAction::Create, 1, 1);
 }
+
diff --git a/src/mgr/BasicActions.h b/src/mgr/BasicActions.h
index 4e1a1fbb45..ddd61603b8 100644
--- a/src/mgr/BasicActions.h
+++ b/src/mgr/BasicActions.h
@@ -99,3 +99,4 @@ void RegisterBasics();
 } // namespace Mgr
 
 #endif /* SQUID_MGR_BASIC_ACTIONS_H */
+
diff --git a/src/mgr/Command.cc b/src/mgr/Command.cc
index 964750d640..9bd4d10691 100644
--- a/src/mgr/Command.cc
+++ b/src/mgr/Command.cc
@@ -19,3 +19,4 @@ operator <<(std::ostream &os, const Mgr::Command &cmd)
         return os << *cmd.profile;
     return os << "undef";
 }
+
diff --git a/src/mgr/Command.h b/src/mgr/Command.h
index f146f306c9..23ee637749 100644
--- a/src/mgr/Command.h
+++ b/src/mgr/Command.h
@@ -33,3 +33,4 @@ public:
 std::ostream &operator <<(std::ostream &os, const Mgr::Command &cmd);
 
 #endif /* SQUID_MGR_COMMAND_H */
+
diff --git a/src/mgr/CountersAction.cc b/src/mgr/CountersAction.cc
index 77e6c15468..ec7f75228b 100644
--- a/src/mgr/CountersAction.cc
+++ b/src/mgr/CountersAction.cc
@@ -96,7 +96,7 @@ Mgr::CountersAction::Create(const CommandPointer &cmd)
 }
 
 Mgr::CountersAction::CountersAction(const CommandPointer &aCmd):
-        Action(aCmd), data()
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -136,3 +136,4 @@ Mgr::CountersAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/CountersAction.h b/src/mgr/CountersAction.h
index 0f2893bce9..352277ec56 100644
--- a/src/mgr/CountersAction.h
+++ b/src/mgr/CountersAction.h
@@ -107,3 +107,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_COUNTERS_ACTION_H */
+
diff --git a/src/mgr/Filler.cc b/src/mgr/Filler.cc
index 36cffefd99..f4ffb5941e 100644
--- a/src/mgr/Filler.cc
+++ b/src/mgr/Filler.cc
@@ -19,9 +19,9 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
 
 Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn,
                     unsigned int aRequestId):
-        StoreToCommWriter(conn, anAction->createStoreEntry()),
-        action(anAction),
-        requestId(aRequestId)
+    StoreToCommWriter(conn, anAction->createStoreEntry()),
+    action(anAction),
+    requestId(aRequestId)
 {
     debugs(16, 5, HERE << conn << " action: " << action);
 }
@@ -44,3 +44,4 @@ Mgr::Filler::swanSong()
     action->sendResponse(requestId);
     StoreToCommWriter::swanSong();
 }
+
diff --git a/src/mgr/Filler.h b/src/mgr/Filler.h
index e4e273048a..0ad23d9f33 100644
--- a/src/mgr/Filler.h
+++ b/src/mgr/Filler.h
@@ -39,3 +39,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_FILLER_H */
+
diff --git a/src/mgr/Forwarder.cc b/src/mgr/Forwarder.cc
index 8e2ade84d2..53507d791d 100644
--- a/src/mgr/Forwarder.cc
+++ b/src/mgr/Forwarder.cc
@@ -27,8 +27,8 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, Forwarder);
 
 Mgr::Forwarder::Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams,
                           HttpRequest* aRequest, StoreEntry* anEntry):
-        Ipc::Forwarder(new Request(KidIdentifier, 0, aConn, aParams), 10),
-        httpRequest(aRequest), entry(anEntry), conn(aConn)
+    Ipc::Forwarder(new Request(KidIdentifier, 0, aConn, aParams), 10),
+    httpRequest(aRequest), entry(anEntry), conn(aConn)
 {
     debugs(16, 5, HERE << conn);
     Must(Comm::IsConnOpen(conn));
@@ -130,3 +130,4 @@ Mgr::Forwarder::sendError(ErrorState *error)
     entry->flush();
     entry->complete();
 }
+
diff --git a/src/mgr/Forwarder.h b/src/mgr/Forwarder.h
index 20d1c59395..8d4bd734e5 100644
--- a/src/mgr/Forwarder.h
+++ b/src/mgr/Forwarder.h
@@ -58,3 +58,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_FORWARDER_H */
+
diff --git a/src/mgr/FunAction.cc b/src/mgr/FunAction.cc
index abdf818abb..38cbc5fcfd 100644
--- a/src/mgr/FunAction.cc
+++ b/src/mgr/FunAction.cc
@@ -27,7 +27,7 @@ Mgr::FunAction::Create(const Command::Pointer &aCmd, OBJH* aHandler)
 }
 
 Mgr::FunAction::FunAction(const Command::Pointer &aCmd, OBJH* aHandler):
-        Action(aCmd), handler(aHandler)
+    Action(aCmd), handler(aHandler)
 {
     Must(handler != NULL);
     debugs(16, 5, HERE);
@@ -54,3 +54,4 @@ Mgr::FunAction::dump(StoreEntry* entry)
     if (atomic() && UsingSmp())
         storeAppendPrintf(entry, "} by kid%d\n\n", KidIdentifier);
 }
+
diff --git a/src/mgr/FunAction.h b/src/mgr/FunAction.h
index 8ebdc22aa3..42367b8851 100644
--- a/src/mgr/FunAction.h
+++ b/src/mgr/FunAction.h
@@ -58,3 +58,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_FUN_ACTION_H */
+
diff --git a/src/mgr/InfoAction.cc b/src/mgr/InfoAction.cc
index ba8a7e014f..917d3ccde6 100644
--- a/src/mgr/InfoAction.cc
+++ b/src/mgr/InfoAction.cc
@@ -113,7 +113,7 @@ Mgr::InfoAction::Create(const CommandPointer &cmd)
 }
 
 Mgr::InfoAction::InfoAction(const CommandPointer &aCmd):
-        Action(aCmd), data()
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -171,3 +171,4 @@ Mgr::InfoAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/InfoAction.h b/src/mgr/InfoAction.h
index 6bc34f0ff8..b357b8124a 100644
--- a/src/mgr/InfoAction.h
+++ b/src/mgr/InfoAction.h
@@ -117,3 +117,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_INFO_ACTION_H */
+
diff --git a/src/mgr/Inquirer.cc b/src/mgr/Inquirer.cc
index 712e8a617e..1eb3819808 100644
--- a/src/mgr/Inquirer.cc
+++ b/src/mgr/Inquirer.cc
@@ -32,8 +32,8 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, Inquirer);
 
 Mgr::Inquirer::Inquirer(Action::Pointer anAction,
                         const Request &aCause, const Ipc::StrandCoords &coords):
-        Ipc::Inquirer(aCause.clone(), applyQueryParams(coords, aCause.params.queryParams), anAction->atomic() ? 10 : 100),
-        aggrAction(anAction)
+    Ipc::Inquirer(aCause.clone(), applyQueryParams(coords, aCause.params.queryParams), anAction->atomic() ? 10 : 100),
+    aggrAction(anAction)
 {
     conn = aCause.conn;
     Ipc::ImportFdIntoComm(conn, SOCK_STREAM, IPPROTO_TCP, Ipc::fdnHttpSocket);
@@ -191,3 +191,4 @@ Mgr::Inquirer::applyQueryParams(const Ipc::StrandCoords& aStrands, const QueryPa
 
     return sc;
 }
+
diff --git a/src/mgr/Inquirer.h b/src/mgr/Inquirer.h
index 6ba0f67275..96387e17ec 100644
--- a/src/mgr/Inquirer.h
+++ b/src/mgr/Inquirer.h
@@ -59,3 +59,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_INQUIRER_H */
+
diff --git a/src/mgr/IntParam.cc b/src/mgr/IntParam.cc
index 09567070bf..786ead50ce 100644
--- a/src/mgr/IntParam.cc
+++ b/src/mgr/IntParam.cc
@@ -14,12 +14,12 @@
 #include "mgr/IntParam.h"
 
 Mgr::IntParam::IntParam():
-        QueryParam(QueryParam::ptInt), array()
+    QueryParam(QueryParam::ptInt), array()
 {
 }
 
 Mgr::IntParam::IntParam(const std::vector& anArray):
-        QueryParam(QueryParam::ptInt), array(anArray)
+    QueryParam(QueryParam::ptInt), array(anArray)
 {
 }
 
@@ -48,3 +48,4 @@ Mgr::IntParam::value() const
 {
     return array;
 }
+
diff --git a/src/mgr/IntParam.h b/src/mgr/IntParam.h
index 3ea27407e8..83228099a9 100644
--- a/src/mgr/IntParam.h
+++ b/src/mgr/IntParam.h
@@ -35,3 +35,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_INT_PARAM_H */
+
diff --git a/src/mgr/IntervalAction.cc b/src/mgr/IntervalAction.cc
index 5454c8abf0..e481b36e5c 100644
--- a/src/mgr/IntervalAction.cc
+++ b/src/mgr/IntervalAction.cc
@@ -121,7 +121,7 @@ Mgr::IntervalAction::Create60min(const CommandPointer &cmd)
 }
 
 Mgr::IntervalAction::IntervalAction(const CommandPointer &aCmd, int aMinutes, int aHours):
-        Action(aCmd), minutes(aMinutes), hours(aHours), data()
+    Action(aCmd), minutes(aMinutes), hours(aHours), data()
 {
     debugs(16, 5, HERE);
 }
@@ -160,3 +160,4 @@ Mgr::IntervalAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/IntervalAction.h b/src/mgr/IntervalAction.h
index c23474bf0b..452111549c 100644
--- a/src/mgr/IntervalAction.h
+++ b/src/mgr/IntervalAction.h
@@ -129,3 +129,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_INTERVAL_ACTION_H */
+
diff --git a/src/mgr/IoAction.cc b/src/mgr/IoAction.cc
index ac8645783c..3c9c78209e 100644
--- a/src/mgr/IoAction.cc
+++ b/src/mgr/IoAction.cc
@@ -49,7 +49,7 @@ Mgr::IoAction::Create(const CommandPointer &cmd)
 }
 
 Mgr::IoAction::IoAction(const CommandPointer &aCmd):
-        Action(aCmd), data()
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -88,3 +88,4 @@ Mgr::IoAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/IoAction.h b/src/mgr/IoAction.h
index d533af261c..ce73259b07 100644
--- a/src/mgr/IoAction.h
+++ b/src/mgr/IoAction.h
@@ -58,3 +58,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_IO_ACTION_H */
+
diff --git a/src/mgr/QueryParam.h b/src/mgr/QueryParam.h
index 7d6eaa93e9..bdc6036088 100644
--- a/src/mgr/QueryParam.h
+++ b/src/mgr/QueryParam.h
@@ -40,3 +40,4 @@ public:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_QUERY_PARAM_H */
+
diff --git a/src/mgr/QueryParams.cc b/src/mgr/QueryParams.cc
index d7f842332a..97d4a311f5 100644
--- a/src/mgr/QueryParams.cc
+++ b/src/mgr/QueryParams.cc
@@ -138,3 +138,4 @@ Mgr::QueryParams::CreateParam(QueryParam::Type aType)
     }
     return NULL;
 }
+
diff --git a/src/mgr/QueryParams.h b/src/mgr/QueryParams.h
index 39a7bc49be..41f3b5e583 100644
--- a/src/mgr/QueryParams.h
+++ b/src/mgr/QueryParams.h
@@ -49,3 +49,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_QUERY_PARAMS_H */
+
diff --git a/src/mgr/Registration.cc b/src/mgr/Registration.cc
index 5aae8a506f..d1cab07c4f 100644
--- a/src/mgr/Registration.cc
+++ b/src/mgr/Registration.cc
@@ -29,3 +29,4 @@ Mgr::RegisterAction(char const * action, char const * desc,
     CacheManager::GetInstance()->registerProfile(action, desc, handler,
             pw_req_flag, atomic);
 }
+
diff --git a/src/mgr/Registration.h b/src/mgr/Registration.h
index cb9e350906..6a80a72b1d 100644
--- a/src/mgr/Registration.h
+++ b/src/mgr/Registration.h
@@ -28,3 +28,4 @@ void RegisterAction(char const * action, char const * desc,
 } // namespace Mgr
 
 #endif /* SQUID_MGR_REGISTRATION_H */
+
diff --git a/src/mgr/Request.cc b/src/mgr/Request.cc
index 65f940c643..bb504a140d 100644
--- a/src/mgr/Request.cc
+++ b/src/mgr/Request.cc
@@ -18,21 +18,21 @@
 
 Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn,
                       const ActionParams &aParams):
-        Ipc::Request(aRequestorId, aRequestId),
-        conn(aConn),
-        params(aParams)
+    Ipc::Request(aRequestorId, aRequestId),
+    conn(aConn),
+    params(aParams)
 {
     Must(requestorId > 0);
 }
 
 Mgr::Request::Request(const Request& request):
-        Ipc::Request(request.requestorId, request.requestId),
-        conn(request.conn), params(request.params)
+    Ipc::Request(request.requestorId, request.requestId),
+    conn(request.conn), params(request.params)
 {
 }
 
 Mgr::Request::Request(const Ipc::TypedMsgHdr& msg):
-        Ipc::Request(0, 0)
+    Ipc::Request(0, 0)
 {
     msg.checkType(Ipc::mtCacheMgrRequest);
     msg.getPod(requestorId);
@@ -61,3 +61,4 @@ Mgr::Request::clone() const
 {
     return new Request(*this);
 }
+
diff --git a/src/mgr/Request.h b/src/mgr/Request.h
index 99430e229d..ab3cb83dc6 100644
--- a/src/mgr/Request.h
+++ b/src/mgr/Request.h
@@ -42,3 +42,4 @@ public:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_REQUEST_H */
+
diff --git a/src/mgr/Response.cc b/src/mgr/Response.cc
index 7e914a0b38..05ae6cb882 100644
--- a/src/mgr/Response.cc
+++ b/src/mgr/Response.cc
@@ -18,18 +18,18 @@
 #include "mgr/Response.h"
 
 Mgr::Response::Response(unsigned int aRequestId, Action::Pointer anAction):
-        Ipc::Response(aRequestId), action(anAction)
+    Ipc::Response(aRequestId), action(anAction)
 {
     Must(!action || action->name()); // if there is an action, it must be named
 }
 
 Mgr::Response::Response(const Response& response):
-        Ipc::Response(response.requestId), action(response.action)
+    Ipc::Response(response.requestId), action(response.action)
 {
 }
 
 Mgr::Response::Response(const Ipc::TypedMsgHdr& msg):
-        Ipc::Response(0)
+    Ipc::Response(0)
 {
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(requestId);
@@ -74,3 +74,4 @@ Mgr::Response::getAction() const
     Must(hasAction());
     return *action;
 }
+
diff --git a/src/mgr/Response.h b/src/mgr/Response.h
index ac797a9126..bb4a516d5e 100644
--- a/src/mgr/Response.h
+++ b/src/mgr/Response.h
@@ -44,3 +44,4 @@ public:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_RESPONSE_H */
+
diff --git a/src/mgr/ServiceTimesAction.cc b/src/mgr/ServiceTimesAction.cc
index fa6a2992ed..b77e592c6a 100644
--- a/src/mgr/ServiceTimesAction.cc
+++ b/src/mgr/ServiceTimesAction.cc
@@ -61,7 +61,7 @@ Mgr::ServiceTimesAction::Create(const CommandPointer &cmd)
 }
 
 Mgr::ServiceTimesAction::ServiceTimesAction(const CommandPointer &aCmd):
-        Action(aCmd), data()
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -101,3 +101,4 @@ Mgr::ServiceTimesAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/ServiceTimesAction.h b/src/mgr/ServiceTimesAction.h
index a338eeb5be..dcebdfbbe2 100644
--- a/src/mgr/ServiceTimesAction.h
+++ b/src/mgr/ServiceTimesAction.h
@@ -69,3 +69,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_SERVICE_TIMES_ACTION_H */
+
diff --git a/src/mgr/StoreIoAction.cc b/src/mgr/StoreIoAction.cc
index e6d1a9397a..f59d4a962b 100644
--- a/src/mgr/StoreIoAction.cc
+++ b/src/mgr/StoreIoAction.cc
@@ -39,7 +39,7 @@ Mgr::StoreIoAction::Create(const CommandPointer &cmd)
 }
 
 Mgr::StoreIoAction::StoreIoAction(const CommandPointer &aCmd):
-        Action(aCmd), data()
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -85,3 +85,4 @@ Mgr::StoreIoAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+
diff --git a/src/mgr/StoreIoAction.h b/src/mgr/StoreIoAction.h
index dc163b804b..1c67e0479b 100644
--- a/src/mgr/StoreIoAction.h
+++ b/src/mgr/StoreIoAction.h
@@ -55,3 +55,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_STORE_IO_ACTION_H */
+
diff --git a/src/mgr/StoreToCommWriter.cc b/src/mgr/StoreToCommWriter.cc
index f1cb1afe23..66b37c15bf 100644
--- a/src/mgr/StoreToCommWriter.cc
+++ b/src/mgr/StoreToCommWriter.cc
@@ -21,8 +21,8 @@
 CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter);
 
 Mgr::StoreToCommWriter::StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry* anEntry):
-        AsyncJob("Mgr::StoreToCommWriter"),
-        clientConnection(conn), entry(anEntry), sc(NULL), writeOffset(0), closer(NULL)
+    AsyncJob("Mgr::StoreToCommWriter"),
+    clientConnection(conn), entry(anEntry), sc(NULL), writeOffset(0), closer(NULL)
 {
     debugs(16, 6, HERE << clientConnection);
     closer = asyncCall(16, 5, "Mgr::StoreToCommWriter::noteCommClosed",
@@ -164,3 +164,4 @@ Mgr::StoreToCommWriter::Abort(void* param)
     if (Comm::IsConnOpen(mgrWriter->clientConnection))
         mgrWriter->clientConnection->close();
 }
+
diff --git a/src/mgr/StoreToCommWriter.h b/src/mgr/StoreToCommWriter.h
index fcd140d3fe..5b3964867d 100644
--- a/src/mgr/StoreToCommWriter.h
+++ b/src/mgr/StoreToCommWriter.h
@@ -71,3 +71,4 @@ protected:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_STORE_TO_COMM_WRITER_H */
+
diff --git a/src/mgr/StringParam.cc b/src/mgr/StringParam.cc
index 08bc41d26c..0b961d2c71 100644
--- a/src/mgr/StringParam.cc
+++ b/src/mgr/StringParam.cc
@@ -13,12 +13,12 @@
 #include "mgr/StringParam.h"
 
 Mgr::StringParam::StringParam():
-        QueryParam(QueryParam::ptString), str()
+    QueryParam(QueryParam::ptString), str()
 {
 }
 
 Mgr::StringParam::StringParam(const String& aString):
-        QueryParam(QueryParam::ptString), str(aString)
+    QueryParam(QueryParam::ptString), str(aString)
 {
 }
 
@@ -40,3 +40,4 @@ Mgr::StringParam::value() const
 {
     return str;
 }
+
diff --git a/src/mgr/StringParam.h b/src/mgr/StringParam.h
index e66e363c80..7a2f612898 100644
--- a/src/mgr/StringParam.h
+++ b/src/mgr/StringParam.h
@@ -35,3 +35,4 @@ private:
 } // namespace Mgr
 
 #endif /* SQUID_MGR_STRING_PARAM_H */
+
diff --git a/src/mgr/forward.h b/src/mgr/forward.h
index cfcf189653..d72cee5c38 100644
--- a/src/mgr/forward.h
+++ b/src/mgr/forward.h
@@ -36,3 +36,4 @@ typedef ActionPointer (ClassActionCreationHandler)(const CommandPointer &cmd);
 } // namespace Mgr
 
 #endif /* SQUID_MGR_FORWARD_H */
+
diff --git a/src/mime.cc b/src/mime.cc
index 1b5372b66f..2809bb7498 100644
--- a/src/mime.cc
+++ b/src/mime.cc
@@ -114,7 +114,7 @@ mimeGetEntry(const char *fn, int skip_encodings)
 }
 
 MimeIcon::MimeIcon(const char *aName) :
-        icon_(xstrdup(aName))
+    icon_(xstrdup(aName))
 {
     url_ = xstrdup(internalLocalUri("/squid-internal-static/icons/", icon_));
 }
@@ -432,13 +432,13 @@ MimeEntry::MimeEntry(const char *aPattern, const regex_t &compiledPattern,
                      const char *aContentType, const char *aContentEncoding,
                      const char *aTransferMode, bool optionViewEnable,
                      bool optionDownloadEnable, const char *anIconName) :
-        pattern(xstrdup(aPattern)),
-        compiled_pattern(compiledPattern),
-        content_type(xstrdup(aContentType)),
-        content_encoding(xstrdup(aContentEncoding)),
-        view_option(optionViewEnable),
-        download_option(optionViewEnable),
-        theIcon(anIconName), next(NULL)
+    pattern(xstrdup(aPattern)),
+    compiled_pattern(compiledPattern),
+    content_type(xstrdup(aContentType)),
+    content_encoding(xstrdup(aContentEncoding)),
+    view_option(optionViewEnable),
+    download_option(optionViewEnable),
+    theIcon(anIconName), next(NULL)
 {
     if (!strcasecmp(aTransferMode, "ascii"))
         transfer_mode = 'A';
@@ -447,3 +447,4 @@ MimeEntry::MimeEntry(const char *aPattern, const regex_t &compiledPattern,
     else
         transfer_mode = 'I';
 }
+
diff --git a/src/mime.h b/src/mime.h
index 1824e992cc..ee3e666598 100644
--- a/src/mime.h
+++ b/src/mime.h
@@ -20,3 +20,4 @@ bool mimeGetDownloadOption(const char *fn);
 bool mimeGetViewOption(const char *fn);
 
 #endif /* SQUID_MIME_H_ */
+
diff --git a/src/mime_header.cc b/src/mime_header.cc
index 4d6f5d15ac..c55dc9d8b0 100644
--- a/src/mime_header.cc
+++ b/src/mime_header.cc
@@ -61,3 +61,4 @@ headersEnd(const char *mime, size_t l)
 
     return 0;
 }
+
diff --git a/src/mime_header.h b/src/mime_header.h
index e3fe46528f..30fc4e0dfc 100644
--- a/src/mime_header.h
+++ b/src/mime_header.h
@@ -14,3 +14,4 @@
 size_t headersEnd(const char *, size_t);
 
 #endif /* SQUID_MIME_HEADER_H_ */
+
diff --git a/src/multicast.cc b/src/multicast.cc
index 4fabfb42ee..9fb2f160c2 100644
--- a/src/multicast.cc
+++ b/src/multicast.cc
@@ -64,3 +64,4 @@ mcastJoinGroups(const ipcache_addrs *ia, const DnsLookupDetails &, void *datanot
 
 #endif
 }
+
diff --git a/src/multicast.h b/src/multicast.h
index e66c77ec60..a301ac25ab 100644
--- a/src/multicast.h
+++ b/src/multicast.h
@@ -17,3 +17,4 @@ int mcastSetTtl(int, int);
 extern IPH mcastJoinGroups;
 
 #endif /* SQUID_MULTICAST_H_ */
+
diff --git a/src/neighbors.cc b/src/neighbors.cc
index 79bcbe9195..e5612927e7 100644
--- a/src/neighbors.cc
+++ b/src/neighbors.cc
@@ -408,7 +408,7 @@ getWeightedRoundRobinParent(HttpRequest * request)
  * period. The larger the number of requests between cycled resets the
  * more balanced the operations.
  *
- \param data	unused.
+ \param data    unused.
  \todo Make the reset timing a selectable parameter in squid.conf
  */
 static void
@@ -626,7 +626,7 @@ neighborsUdpPing(HttpRequest * request,
         debugs(15, 5, "neighborsUdpPing: Peer " << p->host);
 
         if (!peerWouldBePinged(p, request))
-            continue;		/* next CachePeer */
+            continue;       /* next CachePeer */
 
         ++peers_pinged;
 
@@ -735,7 +735,7 @@ neighborsUdpPing(HttpRequest * request,
             else
                 *timeout = 2 * sibling_timeout / sibling_exprep;
         } else
-            *timeout = 2000;	/* 2 seconds */
+            *timeout = 2000;    /* 2 seconds */
 
         if (Config.Timeout.icp_query_max)
             if (*timeout > Config.Timeout.icp_query_max)
@@ -837,7 +837,7 @@ neighborsDigestSelect(HttpRequest * request)
             best_p = p;
             best_rtt = p_rtt;
 
-            if (p_rtt)		/* informative choice (aka educated guess) */
+            if (p_rtt)      /* informative choice (aka educated guess) */
                 ++ichoice_count;
 
             debugs(15, 4, "neighborsDigestSelect: peer " << p->host << " leads with rtt " << best_rtt);
@@ -1800,3 +1800,4 @@ neighborsHtcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const Htt
 }
 
 #endif
+
diff --git a/src/neighbors.h b/src/neighbors.h
index c2d12fc287..00052e5628 100644
--- a/src/neighbors.h
+++ b/src/neighbors.h
@@ -69,3 +69,4 @@ void peerConnClosed(CachePeer *p);
 CachePeer *whichPeer(const Ip::Address &from);
 
 #endif /* SQUID_NEIGHBORS_H_ */
+
diff --git a/src/parser/Tokenizer.cc b/src/parser/Tokenizer.cc
index 584041ab8f..83bbc05ad9 100644
--- a/src/parser/Tokenizer.cc
+++ b/src/parser/Tokenizer.cc
@@ -186,3 +186,4 @@ Parser::Tokenizer::int64(int64_t & result, int base)
     result = acc;
     return success(s - buf_.rawContent() - 1);
 }
+
diff --git a/src/parser/Tokenizer.h b/src/parser/Tokenizer.h
index 1e8c34c64b..40f1d04093 100644
--- a/src/parser/Tokenizer.h
+++ b/src/parser/Tokenizer.h
@@ -120,3 +120,4 @@ private:
 } /* namespace Parser */
 
 #endif /* SQUID_PARSER_TOKENIZER_H_ */
+
diff --git a/src/parser/testTokenizer.cc b/src/parser/testTokenizer.cc
index dc15d7d058..77b0568baf 100644
--- a/src/parser/testTokenizer.cc
+++ b/src/parser/testTokenizer.cc
@@ -246,3 +246,4 @@ testTokenizer::testTokenizerInt64()
 
     }
 }
+
diff --git a/src/parser/testTokenizer.h b/src/parser/testTokenizer.h
index e9acdf66d7..0edf78bfe0 100644
--- a/src/parser/testTokenizer.h
+++ b/src/parser/testTokenizer.h
@@ -30,3 +30,4 @@ protected:
 };
 
 #endif /* SQUID_TESTTOKENIZER_H_ */
+
diff --git a/src/pconn.cc b/src/pconn.cc
index 4ec2fa23c3..e4f4960bc8 100644
--- a/src/pconn.cc
+++ b/src/pconn.cc
@@ -23,7 +23,7 @@
 #include "SquidConfig.h"
 #include "Store.h"
 
-#define PCONN_FDS_SZ	8	/* pconn set size, increase for better memcache hit rate */
+#define PCONN_FDS_SZ    8   /* pconn set size, increase for better memcache hit rate */
 
 //TODO: re-attach to MemPools. WAS: static MemAllocator *pconn_fds_pool = NULL;
 PconnModule * PconnModule::instance = NULL;
@@ -32,9 +32,9 @@ CBDATA_CLASS_INIT(IdleConnList);
 /* ========== IdleConnList ============================================ */
 
 IdleConnList::IdleConnList(const char *key, PconnPool *thePool) :
-        capacity_(PCONN_FDS_SZ),
-        size_(0),
-        parent_(thePool)
+    capacity_(PCONN_FDS_SZ),
+    size_(0),
+    parent_(thePool)
 {
     hash.key = xstrdup(key);
     theList_ = new Comm::ConnectionPointer[capacity_];
@@ -364,9 +364,9 @@ PconnPool::dumpHash(StoreEntry *e) const
 /* ========== PconnPool PUBLIC FUNCTIONS ============================================ */
 
 PconnPool::PconnPool(const char *aDescr, const CbcPointer &aMgr):
-        table(NULL), descr(aDescr),
-        mgr(aMgr),
-        theCount(0)
+    table(NULL), descr(aDescr),
+    mgr(aMgr),
+    theCount(0)
 {
     int i;
     table = hash_create((HASHCMP *) strcmp, 229, hash_string);
@@ -559,3 +559,4 @@ PconnModule::DumpWrapper(StoreEntry *e)
 {
     PconnModule::GetInstance()->dump(e);
 }
+
diff --git a/src/pconn.h b/src/pconn.h
index eb995dfa3f..2ed4418997 100644
--- a/src/pconn.h
+++ b/src/pconn.h
@@ -189,3 +189,4 @@ private:
 };
 
 #endif /* SQUID_PCONN_H */
+
diff --git a/src/peer_digest.cc b/src/peer_digest.cc
index cb7690e5e3..c4197e2870 100644
--- a/src/peer_digest.cc
+++ b/src/peer_digest.cc
@@ -59,13 +59,13 @@ Version const CacheDigestVer = { 5, 3 };
 #define StoreDigestCBlockSize sizeof(StoreDigestCBlock)
 
 /* min interval for requesting digests from a given peer */
-static const time_t PeerDigestReqMinGap = 5 * 60;	/* seconds */
+static const time_t PeerDigestReqMinGap = 5 * 60;   /* seconds */
 /* min interval for requesting digests (cumulative request stream) */
-static const time_t GlobDigestReqMinGap = 1 * 60;	/* seconds */
+static const time_t GlobDigestReqMinGap = 1 * 60;   /* seconds */
 
 /* local vars */
 
-static time_t pd_last_req_time = 0;	/* last call to Check */
+static time_t pd_last_req_time = 0; /* last call to Check */
 
 /* initialize peer digest */
 static void
@@ -145,7 +145,7 @@ peerDigestNeeded(PeerDigest * pd)
 
     pd->flags.needed = true;
     pd->times.needed = squid_curtime;
-    peerDigestSetCheck(pd, 0);	/* check asap */
+    peerDigestSetCheck(pd, 0);  /* check asap */
 }
 
 /* currently we do not have a reason to disable without destroying */
@@ -156,7 +156,7 @@ peerDigestDisable(PeerDigest * pd)
 {
     debugs(72, 2, "peerDigestDisable: peer " << pd->host.buf() << " disabled for good");
     pd->times.disabled = squid_curtime;
-    pd->times.next_check = -1;	/* never */
+    pd->times.next_check = -1;  /* never */
     pd->flags.usable = 0;
 
     if (pd->cd) {
@@ -175,8 +175,8 @@ peerDigestIncDelay(const PeerDigest * pd)
 {
     assert(pd);
     return pd->times.retry_delay > 0 ?
-           2 * pd->times.retry_delay :	/* exponential backoff */
-           PeerDigestReqMinGap;	/* minimal delay */
+           2 * pd->times.retry_delay :  /* exponential backoff */
+           PeerDigestReqMinGap; /* minimal delay */
 }
 
 /* artificially increases Expires: setting to avoid race conditions
@@ -227,7 +227,7 @@ peerDigestCheck(void *data)
 
     assert(!pd->flags.requested);
 
-    pd->times.next_check = 0;	/* unknown */
+    pd->times.next_check = 0;   /* unknown */
 
     if (!cbdataReferenceValid(pd->peer)) {
         peerDigestNotePeerGone(pd);
@@ -265,7 +265,7 @@ peerDigestCheck(void *data)
     }
 
     if (req_time <= squid_curtime)
-        peerDigestRequest(pd);	/* will set pd->flags.requested */
+        peerDigestRequest(pd);  /* will set pd->flags.requested */
     else
         peerDigestSetCheck(pd, req_time - squid_curtime);
 }
@@ -562,7 +562,7 @@ peerDigestFetchReply(void *data, char *buf, ssize_t size)
         } else {
             /* some kind of a bug */
             peerDigestFetchAbort(fetch, buf, reply->sline.reason());
-            return -1;		/* XXX -1 will abort stuff in ReadReply! */
+            return -1;      /* XXX -1 will abort stuff in ReadReply! */
         }
 
         /* must have a ready-to-use store entry if we got here */
@@ -613,7 +613,7 @@ peerDigestSwapInHeaders(void *data, char *buf, ssize_t size)
         }
 
         fetch->state = DIGEST_READ_CBLOCK;
-        return hdr_size;	/* Say how much data we read */
+        return hdr_size;    /* Say how much data we read */
     } else {
         /* need more data, do we have space? */
 
@@ -621,7 +621,7 @@ peerDigestSwapInHeaders(void *data, char *buf, ssize_t size)
             peerDigestFetchAbort(fetch, buf, "stored header too big");
             return -1;
         } else {
-            return 0;		/* We need to read more to parse .. */
+            return 0;       /* We need to read more to parse .. */
         }
     }
 
@@ -662,7 +662,7 @@ peerDigestSwapInCBlock(void *data, char *buf, ssize_t size)
             peerDigestFetchAbort(fetch, buf, "digest cblock too big");
             return -1;
         } else {
-            return 0;		/* We need more data */
+            return 0;       /* We need more data */
         }
     }
 
@@ -697,7 +697,7 @@ peerDigestSwapInMask(void *data, char *buf, ssize_t size)
                fetch->mask_offset << ", expected " << pd->cd->mask_size);
         assert(fetch->mask_offset == pd->cd->mask_size);
         assert(peerDigestFetchedEnough(fetch, NULL, 0, "peerDigestSwapInMask"));
-        return -1;		/* XXX! */
+        return -1;      /* XXX! */
     } else {
         /* We always read everything, so return so */
         return size;
@@ -711,9 +711,9 @@ static int
 peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size, const char *step_name)
 {
     PeerDigest *pd = NULL;
-    const char *host = "";	/* peer host */
-    const char *reason = NULL;	/* reason for completion */
-    const char *no_bug = NULL;	/* successful completion if set */
+    const char *host = ""; /* peer host */
+    const char *reason = NULL;  /* reason for completion */
+    const char *no_bug = NULL;  /* successful completion if set */
     const int pdcb_valid = cbdataReferenceValid(fetch->pd);
     const int pcb_valid = cbdataReferenceValid(fetch->pd->peer);
 
@@ -724,7 +724,7 @@ peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size, const
         if (!(pd = fetch->pd))
             reason = "peer digest disappeared?!";
 
-#if DONT			/* WHY NOT? /HNO */
+#if DONT            /* WHY NOT? /HNO */
 
         else if (!cbdataReferenceValid(pd))
             reason = "invalidated peer digest?!";
@@ -1111,3 +1111,4 @@ peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e)
 }
 
 #endif
+
diff --git a/src/peer_proxy_negotiate_auth.cc b/src/peer_proxy_negotiate_auth.cc
index 94d8af960b..253c64cec1 100644
--- a/src/peer_proxy_negotiate_auth.cc
+++ b/src/peer_proxy_negotiate_auth.cc
@@ -24,13 +24,13 @@ extern "C" {
 
 #if HAVE_PROFILE_H
 #include 
-#endif				/* HAVE_PROFILE_H */
+#endif              /* HAVE_PROFILE_H */
 #if HAVE_KRB5_H
 #if HAVE_BROKEN_SOLARIS_KRB5_H
 #if defined(__cplusplus)
 #define KRB5INT_BEGIN_DECLS     extern "C" {
 #define KRB5INT_END_DECLS
-    KRB5INT_BEGIN_DECLS
+KRB5INT_BEGIN_DECLS
 #endif
 #endif
 #include 
@@ -39,24 +39,24 @@ extern "C" {
 #endif                          /* HAVE_COM_ERR_H */
 #if HAVE_COM_ERR_H
 #include 
-#endif				/* HAVE_COM_ERR_H */
+#endif              /* HAVE_COM_ERR_H */
 
 #if HAVE_GSSAPI_GSSAPI_H
 #include 
 #elif HAVE_GSSAPI_H
 #include 
-#endif				/* HAVE_GSSAPI_H */
+#endif              /* HAVE_GSSAPI_H */
 #if !USE_HEIMDAL_KRB5
 #if HAVE_GSSAPI_GSSAPI_EXT_H
 #include 
-#endif				/* HAVE_GSSAPI_GSSAPI_EXT_H */
+#endif              /* HAVE_GSSAPI_GSSAPI_EXT_H */
 #if HAVE_GSSAPI_GSSAPI_KRB5_H
 #include 
-#endif				/* HAVE_GSSAPI_GSSAPI_KRB5_H */
+#endif              /* HAVE_GSSAPI_GSSAPI_KRB5_H */
 #if HAVE_GSSAPI_GSSAPI_GENERIC_H
 #include 
-#endif				/* HAVE_GSSAPI_GSSAPI_GENERIC_H */
-#endif				/* !USE_HEIMDAL_KRB5 */
+#endif              /* HAVE_GSSAPI_GSSAPI_GENERIC_H */
+#endif              /* !USE_HEIMDAL_KRB5 */
 
 #ifndef gss_nt_service_name
 #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
@@ -67,508 +67,510 @@ extern "C" {
 #elif !HAVE_ERROR_MESSAGE && HAVE_KRB5_GET_ERR_TEXT
 #define error_message(code) krb5_get_err_text(kparam.context,code)
 #elif !HAVE_ERROR_MESSAGE
-    static char err_code[17];
-    const char *KRB5_CALLCONV 
-    error_message(long code) {
-        snprintf(err_code,16,"%ld",code);
-        return err_code;
-    }
+static char err_code[17];
+const char *KRB5_CALLCONV
+error_message(long code) {
+    snprintf(err_code,16,"%ld",code);
+    return err_code;
+}
 #endif
 
 #ifndef gss_mech_spnego
-    static gss_OID_desc _gss_mech_spnego =
-        { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
-    gss_OID gss_mech_spnego = &_gss_mech_spnego;
+static gss_OID_desc _gss_mech_spnego =
+{ 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
+gss_OID gss_mech_spnego = &_gss_mech_spnego;
 #endif
 
 #if USE_IBM_KERBEROS
 #include 
-    const char *KRB5_CALLCONV error_message(long code) {
-        char *msg = NULL;
-        krb5_svc_get_msg(code, &msg);
-        return msg;
-    }
+const char *KRB5_CALLCONV error_message(long code) {
+    char *msg = NULL;
+    krb5_svc_get_msg(code, &msg);
+    return msg;
+}
 #endif
 
-    /*
-     * Kerberos context and cache structure
-     * Caches authentication details to reduce
-     * number of authentication requests to kdc
-     */
-    static struct kstruct {
-        krb5_context context;
-        krb5_ccache cc;
-    } kparam = {
-        NULL, NULL};
+/*
+ * Kerberos context and cache structure
+ * Caches authentication details to reduce
+ * number of authentication requests to kdc
+ */
+static struct kstruct {
+    krb5_context context;
+    krb5_ccache cc;
+} kparam = {
+    NULL, NULL
+};
 
-    /*
-     * krb5_create_cache creates a Kerberos file credential cache or a memory
-     * credential cache if supported. The initial key for the principal
-     * principal_name is extracted from the keytab keytab_filename.
-     *
-     * If keytab_filename is NULL the default will be used.
-     * If principal_name is NULL the first working entry of the keytab will be used.
-     */
-    int krb5_create_cache(char *keytab_filename, char *principal_name);
+/*
+ * krb5_create_cache creates a Kerberos file credential cache or a memory
+ * credential cache if supported. The initial key for the principal
+ * principal_name is extracted from the keytab keytab_filename.
+ *
+ * If keytab_filename is NULL the default will be used.
+ * If principal_name is NULL the first working entry of the keytab will be used.
+ */
+int krb5_create_cache(char *keytab_filename, char *principal_name);
 
-    /*
-     * krb5_cleanup clears used Keberos memory
-     */
-    void krb5_cleanup(void);
+/*
+ * krb5_cleanup clears used Keberos memory
+ */
+void krb5_cleanup(void);
 
-    /*
-     * check_gss_err checks for gssapi error codes, extracts the error message
-     * and prints it.
-     */
-    int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status,
-                      const char *function);
-
-    int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status,
-                      const char *function) {
-        if (GSS_ERROR(major_status)) {
-            OM_uint32 maj_stat, min_stat;
-            OM_uint32 msg_ctx = 0;
-            gss_buffer_desc status_string;
-            char buf[1024];
-            size_t len;
-
-            len = 0;
-            msg_ctx = 0;
-            while (!msg_ctx) {
-                /* convert major status code (GSS-API error) to text */
-                maj_stat = gss_display_status(&min_stat, major_status,
-                                              GSS_C_GSS_CODE, GSS_C_NULL_OID, &msg_ctx, &status_string);
-                if (maj_stat == GSS_S_COMPLETE) {
-                    if (sizeof(buf) > len + status_string.length + 1) {
-                        memcpy(buf + len, status_string.value,
-                               status_string.length);
-                        len += status_string.length;
-                    }
-                    gss_release_buffer(&min_stat, &status_string);
-                    break;
+/*
+ * check_gss_err checks for gssapi error codes, extracts the error message
+ * and prints it.
+ */
+int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status,
+                  const char *function);
+
+int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status,
+                  const char *function) {
+    if (GSS_ERROR(major_status)) {
+        OM_uint32 maj_stat, min_stat;
+        OM_uint32 msg_ctx = 0;
+        gss_buffer_desc status_string;
+        char buf[1024];
+        size_t len;
+
+        len = 0;
+        msg_ctx = 0;
+        while (!msg_ctx) {
+            /* convert major status code (GSS-API error) to text */
+            maj_stat = gss_display_status(&min_stat, major_status,
+                                          GSS_C_GSS_CODE, GSS_C_NULL_OID, &msg_ctx, &status_string);
+            if (maj_stat == GSS_S_COMPLETE) {
+                if (sizeof(buf) > len + status_string.length + 1) {
+                    memcpy(buf + len, status_string.value,
+                           status_string.length);
+                    len += status_string.length;
                 }
                 gss_release_buffer(&min_stat, &status_string);
+                break;
             }
-            if (sizeof(buf) > len + 2) {
-                strcpy(buf + len, ". ");
-                len += 2;
-            }
-            msg_ctx = 0;
-            while (!msg_ctx) {
-                /* convert minor status code (underlying routine error) to text */
-                maj_stat = gss_display_status(&min_stat, minor_status,
-                                              GSS_C_MECH_CODE, GSS_C_NULL_OID, &msg_ctx, &status_string);
-                if (maj_stat == GSS_S_COMPLETE) {
-                    if (sizeof(buf) > len + status_string.length) {
-                        memcpy(buf + len, status_string.value,
-                               status_string.length);
-                        len += status_string.length;
-                    }
-                    gss_release_buffer(&min_stat, &status_string);
-                    break;
+            gss_release_buffer(&min_stat, &status_string);
+        }
+        if (sizeof(buf) > len + 2) {
+            strcpy(buf + len, ". ");
+            len += 2;
+        }
+        msg_ctx = 0;
+        while (!msg_ctx) {
+            /* convert minor status code (underlying routine error) to text */
+            maj_stat = gss_display_status(&min_stat, minor_status,
+                                          GSS_C_MECH_CODE, GSS_C_NULL_OID, &msg_ctx, &status_string);
+            if (maj_stat == GSS_S_COMPLETE) {
+                if (sizeof(buf) > len + status_string.length) {
+                    memcpy(buf + len, status_string.value,
+                           status_string.length);
+                    len += status_string.length;
                 }
                 gss_release_buffer(&min_stat, &status_string);
+                break;
             }
-            debugs(11, 5, HERE << function << "failed: " << buf);
-            return (1);
+            gss_release_buffer(&min_stat, &status_string);
         }
-        return (0);
+        debugs(11, 5, HERE << function << "failed: " << buf);
+        return (1);
     }
+    return (0);
+}
 
-    void krb5_cleanup() {
-        debugs(11, 5, HERE << "Cleanup kerberos context");
-        if (kparam.context) {
-            if (kparam.cc)
-                krb5_cc_destroy(kparam.context, kparam.cc);
-            kparam.cc = NULL;
-            krb5_free_context(kparam.context);
-            kparam.context = NULL;
-        }
+void krb5_cleanup() {
+    debugs(11, 5, HERE << "Cleanup kerberos context");
+    if (kparam.context) {
+        if (kparam.cc)
+            krb5_cc_destroy(kparam.context, kparam.cc);
+        kparam.cc = NULL;
+        krb5_free_context(kparam.context);
+        kparam.context = NULL;
     }
+}
 
-    int krb5_create_cache(char *kf, char *pn) {
+int krb5_create_cache(char *kf, char *pn) {
 
 #define KT_PATH_MAX 256
 #define MAX_RENEW_TIME "365d"
 #define DEFAULT_SKEW (krb5_deltat) 600
 
-        static char *keytab_filename = NULL, *principal_name = NULL;
-        static krb5_keytab keytab = 0;
-        static krb5_keytab_entry entry;
-        static krb5_kt_cursor cursor;
-        static krb5_creds *creds = NULL;
+    static char *keytab_filename = NULL, *principal_name = NULL;
+    static krb5_keytab keytab = 0;
+    static krb5_keytab_entry entry;
+    static krb5_kt_cursor cursor;
+    static krb5_creds *creds = NULL;
 #if USE_HEIMDAL_KRB5 && !HAVE_KRB5_GET_RENEWED_CREDS
-        static krb5_creds creds2;
+    static krb5_creds creds2;
 #endif
-        static krb5_principal principal = NULL;
-        static krb5_deltat skew;
+    static krb5_principal principal = NULL;
+    static krb5_deltat skew;
 
 #if HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
-        krb5_get_init_creds_opt *options;
+    krb5_get_init_creds_opt *options;
 #else
-        krb5_get_init_creds_opt options;
+    krb5_get_init_creds_opt options;
 #endif
-        krb5_error_code code = 0;
-        krb5_deltat rlife;
+    krb5_error_code code = 0;
+    krb5_deltat rlife;
 #if HAVE_PROFILE_H && HAVE_KRB5_GET_PROFILE && HAVE_PROFILE_GET_INTEGER && HAVE_PROFILE_RELEASE
-        profile_t profile;
+    profile_t profile;
 #endif
 #if USE_HEIMDAL_KRB5 && !HAVE_KRB5_GET_RENEWED_CREDS
-        krb5_kdc_flags flags;
+    krb5_kdc_flags flags;
 #if HAVE_KRB5_PRINCIPAL_GET_REALM
-        const char *client_realm;
+    const char *client_realm;
 #else
-        krb5_realm client_realm;
+    krb5_realm client_realm;
 #endif
 #endif
-        char *mem_cache;
+    char *mem_cache;
 
 restart:
-        /*
-         * Check if credentials need to be renewed
-         */
-        if (creds &&
-                (creds->times.endtime - time(0) > skew) &&
-                (creds->times.renew_till - time(0) > 2 * skew)) {
-            if (creds->times.endtime - time(0) < 2 * skew) {
+    /*
+     * Check if credentials need to be renewed
+     */
+    if (creds &&
+            (creds->times.endtime - time(0) > skew) &&
+            (creds->times.renew_till - time(0) > 2 * skew)) {
+        if (creds->times.endtime - time(0) < 2 * skew) {
 #if HAVE_KRB5_GET_RENEWED_CREDS
-                /* renew ticket */
-                code =
-                    krb5_get_renewed_creds(kparam.context, creds, principal,
-                                           kparam.cc, NULL);
+            /* renew ticket */
+            code =
+                krb5_get_renewed_creds(kparam.context, creds, principal,
+                                       kparam.cc, NULL);
 #else
-                /* renew ticket */
-                flags.i = 0;
-                flags.b.renewable = flags.b.renew = 1;
-
-                code =
-                    krb5_cc_get_principal(kparam.context, kparam.cc,
-                                          &creds2.client);
-                if (code) {
-                    debugs(11, 5,
-                           HERE <<
-                           "Error while getting principal from credential cache : "
-                           << error_message(code));
-                    return (1);
-                }
+            /* renew ticket */
+            flags.i = 0;
+            flags.b.renewable = flags.b.renew = 1;
+
+            code =
+                krb5_cc_get_principal(kparam.context, kparam.cc,
+                                      &creds2.client);
+            if (code) {
+                debugs(11, 5,
+                       HERE <<
+                       "Error while getting principal from credential cache : "
+                       << error_message(code));
+                return (1);
+            }
 #if HAVE_KRB5_PRINCIPAL_GET_REALM
-                client_realm = krb5_principal_get_realm(kparam.context, principal);
+            client_realm = krb5_principal_get_realm(kparam.context, principal);
 #else
-                client_realm = krb5_princ_realm(kparam.context, creds2.client);
-#endif
-                code =
-                    krb5_make_principal(kparam.context, &creds2.server,
-                                        (krb5_const_realm)&client_realm, KRB5_TGS_NAME,
-                                        (krb5_const_realm)&client_realm, NULL);
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while getting krbtgt principal : " <<
-                           error_message(code));
-                    return (1);
-                }
-                code =
-                    krb5_get_kdc_cred(kparam.context, kparam.cc, flags, NULL,
-                                      NULL, &creds2, &creds);
-                krb5_free_creds(kparam.context, &creds2);
+            client_realm = krb5_princ_realm(kparam.context, creds2.client);
 #endif
-                if (code) {
-                    if (code == KRB5KRB_AP_ERR_TKT_EXPIRED) {
-                        krb5_free_creds(kparam.context, creds);
-                        creds = NULL;
-                        /* this can happen because of clock skew */
-                        goto restart;
-                    }
-                    debugs(11, 5,
-                           HERE << "Error while get credentials : " <<
-                           error_message(code));
-                    return (1);
-                }
-            }
-        } else {
-            /* reinit */
-            if (!kparam.context) {
-                code = krb5_init_context(&kparam.context);
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while initialising Kerberos library : "
-                           << error_message(code));
-                    return (1);
-                }
-            }
-#if HAVE_PROFILE_H && HAVE_KRB5_GET_PROFILE && HAVE_PROFILE_GET_INTEGER && HAVE_PROFILE_RELEASE
-            code = krb5_get_profile(kparam.context, &profile);
+            code =
+                krb5_make_principal(kparam.context, &creds2.server,
+                                    (krb5_const_realm)&client_realm, KRB5_TGS_NAME,
+                                    (krb5_const_realm)&client_realm, NULL);
             if (code) {
-                if (profile)
-                    profile_release(profile);
                 debugs(11, 5,
-                       HERE << "Error while getting profile : " <<
+                       HERE << "Error while getting krbtgt principal : " <<
                        error_message(code));
                 return (1);
             }
             code =
-                profile_get_integer(profile, "libdefaults", "clockskew", 0,
-                                    5 * 60, &skew);
-            if (profile)
-                profile_release(profile);
+                krb5_get_kdc_cred(kparam.context, kparam.cc, flags, NULL,
+                                  NULL, &creds2, &creds);
+            krb5_free_creds(kparam.context, &creds2);
+#endif
             if (code) {
+                if (code == KRB5KRB_AP_ERR_TKT_EXPIRED) {
+                    krb5_free_creds(kparam.context, creds);
+                    creds = NULL;
+                    /* this can happen because of clock skew */
+                    goto restart;
+                }
                 debugs(11, 5,
-                       HERE << "Error while getting clockskew : " <<
+                       HERE << "Error while get credentials : " <<
                        error_message(code));
                 return (1);
             }
-#elif USE_HEIMDAL_KRB5 && HAVE_KRB5_GET_MAX_TIME_SKEW
-            skew = krb5_get_max_time_skew(kparam.context);
-#elif USE_HEIMDAL_KRB5 && HAVE_MAX_SKEW_IN_KRB5_CONTEXT
-            skew = kparam.context->max_skew;
-#else
-            skew = DEFAULT_SKEW;
-#endif
-
-            if (!kf) {
-                char buf[KT_PATH_MAX], *p;
-
-                krb5_kt_default_name(kparam.context, buf, KT_PATH_MAX);
-                p = strchr(buf, ':');
-                if (p)
-                    ++p;
-                xfree(keytab_filename);
-                keytab_filename = xstrdup(p ? p : buf);
-            } else {
-                keytab_filename = xstrdup(kf);
-            }
-
-            code = krb5_kt_resolve(kparam.context, keytab_filename, &keytab);
+        }
+    } else {
+        /* reinit */
+        if (!kparam.context) {
+            code = krb5_init_context(&kparam.context);
             if (code) {
                 debugs(11, 5,
-                       HERE << "Error while resolving keytab filename " <<
-                       keytab_filename << " : " << error_message(code));
+                       HERE << "Error while initialising Kerberos library : "
+                       << error_message(code));
                 return (1);
             }
-
-            if (!pn) {
-                code = krb5_kt_start_seq_get(kparam.context, keytab, &cursor);
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while starting keytab scan : " <<
-                           error_message(code));
-                    return (1);
-                }
-                code =
-                    krb5_kt_next_entry(kparam.context, keytab, &entry, &cursor);
-                krb5_copy_principal(kparam.context, entry.principal,
-                                    &principal);
-                if (code && code != KRB5_KT_END) {
-                    debugs(11, 5,
-                           HERE << "Error while scanning keytab : " <<
-                           error_message(code));
-                    return (1);
-                }
-
-                code = krb5_kt_end_seq_get(kparam.context, keytab, &cursor);
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while ending keytab scan : " <<
-                           error_message(code));
-                    return (1);
-                }
-#if USE_HEIMDAL_KRB5 || ( HAVE_KRB5_KT_FREE_ENTRY && HAVE_DECL_KRB5_KT_FREE_ENTRY)
-                code = krb5_kt_free_entry(kparam.context, &entry);
+        }
+#if HAVE_PROFILE_H && HAVE_KRB5_GET_PROFILE && HAVE_PROFILE_GET_INTEGER && HAVE_PROFILE_RELEASE
+        code = krb5_get_profile(kparam.context, &profile);
+        if (code) {
+            if (profile)
+                profile_release(profile);
+            debugs(11, 5,
+                   HERE << "Error while getting profile : " <<
+                   error_message(code));
+            return (1);
+        }
+        code =
+            profile_get_integer(profile, "libdefaults", "clockskew", 0,
+                                5 * 60, &skew);
+        if (profile)
+            profile_release(profile);
+        if (code) {
+            debugs(11, 5,
+                   HERE << "Error while getting clockskew : " <<
+                   error_message(code));
+            return (1);
+        }
+#elif USE_HEIMDAL_KRB5 && HAVE_KRB5_GET_MAX_TIME_SKEW
+        skew = krb5_get_max_time_skew(kparam.context);
+#elif USE_HEIMDAL_KRB5 && HAVE_MAX_SKEW_IN_KRB5_CONTEXT
+        skew = kparam.context->max_skew;
 #else
-                code = krb5_free_keytab_entry_contents(kparam.context, &entry);
+        skew = DEFAULT_SKEW;
 #endif
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while freeing keytab entry : " <<
-                           error_message(code));
-                    return (1);
-                }
 
-            } else {
-                principal_name = xstrdup(pn);
-            }
+        if (!kf) {
+            char buf[KT_PATH_MAX], *p;
 
-            if (!principal) {
-                code =
-                    krb5_parse_name(kparam.context, principal_name, &principal);
-                if (code) {
-                    debugs(11, 5,
-                           HERE << "Error while parsing principal name " <<
-                           principal_name << " : " << error_message(code));
-                    return (1);
-                }
-            }
+            krb5_kt_default_name(kparam.context, buf, KT_PATH_MAX);
+            p = strchr(buf, ':');
+            if (p)
+                ++p;
+            xfree(keytab_filename);
+            keytab_filename = xstrdup(p ? p : buf);
+        } else {
+            keytab_filename = xstrdup(kf);
+        }
 
-            creds = (krb5_creds *) xmalloc(sizeof(*creds));
-            memset(creds, 0, sizeof(*creds));
-#if HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
-            krb5_get_init_creds_opt_alloc(kparam.context, &options);
-#else
-            krb5_get_init_creds_opt_init(&options);
-#endif
-            code = krb5_string_to_deltat((char *) MAX_RENEW_TIME, &rlife);
-            if (code != 0 || rlife == 0) {
+        code = krb5_kt_resolve(kparam.context, keytab_filename, &keytab);
+        if (code) {
+            debugs(11, 5,
+                   HERE << "Error while resolving keytab filename " <<
+                   keytab_filename << " : " << error_message(code));
+            return (1);
+        }
+
+        if (!pn) {
+            code = krb5_kt_start_seq_get(kparam.context, keytab, &cursor);
+            if (code) {
                 debugs(11, 5,
-                       HERE << "Error bad lifetime value " << MAX_RENEW_TIME <<
-                       " : " << error_message(code));
+                       HERE << "Error while starting keytab scan : " <<
+                       error_message(code));
                 return (1);
             }
-#if HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
-            krb5_get_init_creds_opt_set_renew_life(options, rlife);
-            code =
-                krb5_get_init_creds_keytab(kparam.context, creds, principal,
-                                           keytab, 0, NULL, options);
-#if HAVE_KRB5_GET_INIT_CREDS_FREE_CONTEXT
-            krb5_get_init_creds_opt_free(kparam.context, options);
-#else
-            krb5_get_init_creds_opt_free(options);
-#endif
-#else
-            krb5_get_init_creds_opt_set_renew_life(&options, rlife);
             code =
-                krb5_get_init_creds_keytab(kparam.context, creds, principal,
-                                           keytab, 0, NULL, &options);
-#endif
-            if (code) {
+                krb5_kt_next_entry(kparam.context, keytab, &entry, &cursor);
+            krb5_copy_principal(kparam.context, entry.principal,
+                                &principal);
+            if (code && code != KRB5_KT_END) {
                 debugs(11, 5,
-                       HERE <<
-                       "Error while initializing credentials from keytab : " <<
+                       HERE << "Error while scanning keytab : " <<
                        error_message(code));
                 return (1);
             }
-#if !HAVE_KRB5_MEMORY_CACHE
-            mem_cache =
-                (char *) xmalloc(strlen("FILE:/tmp/peer_proxy_negotiate_auth_")
-                                 + 16);
-            if (!mem_cache) {
-                debugs(11, 5, "Error while allocating memory");
-                return(1);
-            }
-            snprintf(mem_cache,
-                     strlen("FILE:/tmp/peer_proxy_negotiate_auth_") + 16,
-                     "FILE:/tmp/peer_proxy_negotiate_auth_%d", (int) getpid());
-#else
-            mem_cache =
-                (char *) xmalloc(strlen("MEMORY:peer_proxy_negotiate_auth_") +
-                                 16);
-            if (!mem_cache) {
-                debugs(11, 5, "Error while allocating memory");
-                return(1);
-            }
-            snprintf(mem_cache,
-                     strlen("MEMORY:peer_proxy_negotiate_auth_") + 16,
-                     "MEMORY:peer_proxy_negotiate_auth_%d", (int) getpid());
-#endif
 
-            setenv("KRB5CCNAME", mem_cache, 1);
-            code = krb5_cc_resolve(kparam.context, mem_cache, &kparam.cc);
-            xfree(mem_cache);
+            code = krb5_kt_end_seq_get(kparam.context, keytab, &cursor);
             if (code) {
                 debugs(11, 5,
-                       HERE << "Error while resolving memory credential cache : "
-                       << error_message(code));
+                       HERE << "Error while ending keytab scan : " <<
+                       error_message(code));
                 return (1);
             }
-            code = krb5_cc_initialize(kparam.context, kparam.cc, principal);
+#if USE_HEIMDAL_KRB5 || ( HAVE_KRB5_KT_FREE_ENTRY && HAVE_DECL_KRB5_KT_FREE_ENTRY)
+            code = krb5_kt_free_entry(kparam.context, &entry);
+#else
+            code = krb5_free_keytab_entry_contents(kparam.context, &entry);
+#endif
             if (code) {
                 debugs(11, 5,
-                       HERE <<
-                       "Error while initializing memory credential cache : " <<
+                       HERE << "Error while freeing keytab entry : " <<
                        error_message(code));
                 return (1);
             }
-            code = krb5_cc_store_cred(kparam.context, kparam.cc, creds);
+
+        } else {
+            principal_name = xstrdup(pn);
+        }
+
+        if (!principal) {
+            code =
+                krb5_parse_name(kparam.context, principal_name, &principal);
             if (code) {
                 debugs(11, 5,
-                       HERE << "Error while storing credentials : " <<
-                       error_message(code));
+                       HERE << "Error while parsing principal name " <<
+                       principal_name << " : " << error_message(code));
                 return (1);
             }
-
-            if (!creds->times.starttime)
-                creds->times.starttime = creds->times.authtime;
         }
-        return (0);
-    }
 
-    /*
-     * peer_proxy_negotiate_auth gets a GSSAPI token for principal_name
-     * and base64 encodes it.
-     */
-    char *peer_proxy_negotiate_auth(char *principal_name, char *proxy) {
-        int rc = 0;
-        OM_uint32 major_status, minor_status;
-        gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
-        gss_name_t server_name = GSS_C_NO_NAME;
-        gss_buffer_desc service = GSS_C_EMPTY_BUFFER;
-        gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
-        gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
-        char *token = NULL;
-
-        setbuf(stdout, NULL);
-        setbuf(stdin, NULL);
-
-        if (!proxy) {
-            debugs(11, 5, HERE << "Error : No proxy server name");
-            return NULL;
+        creds = (krb5_creds *) xmalloc(sizeof(*creds));
+        memset(creds, 0, sizeof(*creds));
+#if HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
+        krb5_get_init_creds_opt_alloc(kparam.context, &options);
+#else
+        krb5_get_init_creds_opt_init(&options);
+#endif
+        code = krb5_string_to_deltat((char *) MAX_RENEW_TIME, &rlife);
+        if (code != 0 || rlife == 0) {
+            debugs(11, 5,
+                   HERE << "Error bad lifetime value " << MAX_RENEW_TIME <<
+                   " : " << error_message(code));
+            return (1);
         }
-
-        if (principal_name)
+#if HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
+        krb5_get_init_creds_opt_set_renew_life(options, rlife);
+        code =
+            krb5_get_init_creds_keytab(kparam.context, creds, principal,
+                                       keytab, 0, NULL, options);
+#if HAVE_KRB5_GET_INIT_CREDS_FREE_CONTEXT
+        krb5_get_init_creds_opt_free(kparam.context, options);
+#else
+        krb5_get_init_creds_opt_free(options);
+#endif
+#else
+        krb5_get_init_creds_opt_set_renew_life(&options, rlife);
+        code =
+            krb5_get_init_creds_keytab(kparam.context, creds, principal,
+                                       keytab, 0, NULL, &options);
+#endif
+        if (code) {
             debugs(11, 5,
-                   HERE << "Creating credential cache for " << principal_name);
-        else
-            debugs(11, 5, HERE << "Creating credential cache");
-        rc = krb5_create_cache(NULL, principal_name);
-        if (rc) {
-            debugs(11, 5, HERE << "Error : Failed to create Kerberos cache");
-            krb5_cleanup();
-            return NULL;
+                   HERE <<
+                   "Error while initializing credentials from keytab : " <<
+                   error_message(code));
+            return (1);
+        }
+#if !HAVE_KRB5_MEMORY_CACHE
+        mem_cache =
+            (char *) xmalloc(strlen("FILE:/tmp/peer_proxy_negotiate_auth_")
+                             + 16);
+        if (!mem_cache) {
+            debugs(11, 5, "Error while allocating memory");
+            return(1);
         }
+        snprintf(mem_cache,
+                 strlen("FILE:/tmp/peer_proxy_negotiate_auth_") + 16,
+                 "FILE:/tmp/peer_proxy_negotiate_auth_%d", (int) getpid());
+#else
+        mem_cache =
+            (char *) xmalloc(strlen("MEMORY:peer_proxy_negotiate_auth_") +
+                             16);
+        if (!mem_cache) {
+            debugs(11, 5, "Error while allocating memory");
+            return(1);
+        }
+        snprintf(mem_cache,
+                 strlen("MEMORY:peer_proxy_negotiate_auth_") + 16,
+                 "MEMORY:peer_proxy_negotiate_auth_%d", (int) getpid());
+#endif
 
-        service.value = (void *) xmalloc(strlen("HTTP") + strlen(proxy) + 2);
-        snprintf((char *) service.value, strlen("HTTP") + strlen(proxy) + 2,
-                 "%s@%s", "HTTP", proxy);
-        service.length = strlen((char *) service.value);
-
-        debugs(11, 5, HERE << "Import gss name");
-        major_status = gss_import_name(&minor_status, &service,
-                                       gss_nt_service_name, &server_name);
-
-        if (check_gss_err(major_status, minor_status, "gss_import_name()"))
-            goto cleanup;
-
-        debugs(11, 5, HERE << "Initialize gss security context");
-        major_status = gss_init_sec_context(&minor_status,
-                                            GSS_C_NO_CREDENTIAL,
-                                            &gss_context,
-                                            server_name,
-                                            gss_mech_spnego,
-                                            0,
-                                            0,
-                                            GSS_C_NO_CHANNEL_BINDINGS,
-                                            &input_token, NULL, &output_token, NULL, NULL);
-
-        if (check_gss_err(major_status, minor_status, "gss_init_sec_context()"))
-            goto cleanup;
-
-        debugs(11, 5, HERE << "Got token with length " << output_token.length);
-        if (output_token.length) {
-
-            token =
-                (char *) base64_encode_bin((const char *) output_token.value,
-                                           output_token.length);
+        setenv("KRB5CCNAME", mem_cache, 1);
+        code = krb5_cc_resolve(kparam.context, mem_cache, &kparam.cc);
+        xfree(mem_cache);
+        if (code) {
+            debugs(11, 5,
+                   HERE << "Error while resolving memory credential cache : "
+                   << error_message(code));
+            return (1);
+        }
+        code = krb5_cc_initialize(kparam.context, kparam.cc, principal);
+        if (code) {
+            debugs(11, 5,
+                   HERE <<
+                   "Error while initializing memory credential cache : " <<
+                   error_message(code));
+            return (1);
+        }
+        code = krb5_cc_store_cred(kparam.context, kparam.cc, creds);
+        if (code) {
+            debugs(11, 5,
+                   HERE << "Error while storing credentials : " <<
+                   error_message(code));
+            return (1);
         }
 
-cleanup:
-        gss_delete_sec_context(&minor_status, &gss_context, NULL);
-        gss_release_buffer(&minor_status, &service);
-        gss_release_buffer(&minor_status, &input_token);
-        gss_release_buffer(&minor_status, &output_token);
-        gss_release_name(&minor_status, &server_name);
+        if (!creds->times.starttime)
+            creds->times.starttime = creds->times.authtime;
+    }
+    return (0);
+}
+
+/*
+ * peer_proxy_negotiate_auth gets a GSSAPI token for principal_name
+ * and base64 encodes it.
+ */
+char *peer_proxy_negotiate_auth(char *principal_name, char *proxy) {
+    int rc = 0;
+    OM_uint32 major_status, minor_status;
+    gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
+    gss_name_t server_name = GSS_C_NO_NAME;
+    gss_buffer_desc service = GSS_C_EMPTY_BUFFER;
+    gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
+    gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
+    char *token = NULL;
+
+    setbuf(stdout, NULL);
+    setbuf(stdin, NULL);
+
+    if (!proxy) {
+        debugs(11, 5, HERE << "Error : No proxy server name");
+        return NULL;
+    }
+
+    if (principal_name)
+        debugs(11, 5,
+               HERE << "Creating credential cache for " << principal_name);
+    else
+        debugs(11, 5, HERE << "Creating credential cache");
+    rc = krb5_create_cache(NULL, principal_name);
+    if (rc) {
+        debugs(11, 5, HERE << "Error : Failed to create Kerberos cache");
+        krb5_cleanup();
+        return NULL;
+    }
 
-        return token;
+    service.value = (void *) xmalloc(strlen("HTTP") + strlen(proxy) + 2);
+    snprintf((char *) service.value, strlen("HTTP") + strlen(proxy) + 2,
+             "%s@%s", "HTTP", proxy);
+    service.length = strlen((char *) service.value);
+
+    debugs(11, 5, HERE << "Import gss name");
+    major_status = gss_import_name(&minor_status, &service,
+                                   gss_nt_service_name, &server_name);
+
+    if (check_gss_err(major_status, minor_status, "gss_import_name()"))
+        goto cleanup;
+
+    debugs(11, 5, HERE << "Initialize gss security context");
+    major_status = gss_init_sec_context(&minor_status,
+                                        GSS_C_NO_CREDENTIAL,
+                                        &gss_context,
+                                        server_name,
+                                        gss_mech_spnego,
+                                        0,
+                                        0,
+                                        GSS_C_NO_CHANNEL_BINDINGS,
+                                        &input_token, NULL, &output_token, NULL, NULL);
+
+    if (check_gss_err(major_status, minor_status, "gss_init_sec_context()"))
+        goto cleanup;
+
+    debugs(11, 5, HERE << "Got token with length " << output_token.length);
+    if (output_token.length) {
+
+        token =
+            (char *) base64_encode_bin((const char *) output_token.value,
+                                       output_token.length);
     }
 
+cleanup:
+    gss_delete_sec_context(&minor_status, &gss_context, NULL);
+    gss_release_buffer(&minor_status, &service);
+    gss_release_buffer(&minor_status, &input_token);
+    gss_release_buffer(&minor_status, &output_token);
+    gss_release_name(&minor_status, &server_name);
+
+    return token;
+}
+
 #ifdef __cplusplus
 }
 #endif
 #endif /* HAVE_KRB5 && HAVE_GSSAPI */
+
diff --git a/src/peer_proxy_negotiate_auth.h b/src/peer_proxy_negotiate_auth.h
index 7bb4767094..ac3a5b67a6 100644
--- a/src/peer_proxy_negotiate_auth.h
+++ b/src/peer_proxy_negotiate_auth.h
@@ -15,3 +15,4 @@ SQUIDCEXTERN char *peer_proxy_negotiate_auth(char *principal_name, char *proxy);
 #endif
 
 #endif /* SQUID_PEER_PROXY_NEGOTIATE_AUTH_H_ */
+
diff --git a/src/peer_select.cc b/src/peer_select.cc
index 77054912de..c4658c254b 100644
--- a/src/peer_select.cc
+++ b/src/peer_select.cc
@@ -949,19 +949,19 @@ peerAddFwdServer(FwdServer ** FSVR, CachePeer * p, hier_code code)
 }
 
 ps_state::ps_state() : request (NULL),
-        entry (NULL),
-        always_direct(Config.accessList.AlwaysDirect?ACCESS_DUNNO:ACCESS_DENIED),
-        never_direct(Config.accessList.NeverDirect?ACCESS_DUNNO:ACCESS_DENIED),
-        direct(DIRECT_UNKNOWN),
-        callback (NULL),
-        callback_data (NULL),
-        lastError(NULL),
-        servers (NULL),
-        first_parent_miss(),
-        closest_parent_miss(),
-        hit(NULL),
-        hit_type(PEER_NONE),
-        acl_checklist (NULL)
+    entry (NULL),
+    always_direct(Config.accessList.AlwaysDirect?ACCESS_DUNNO:ACCESS_DENIED),
+    never_direct(Config.accessList.NeverDirect?ACCESS_DUNNO:ACCESS_DENIED),
+    direct(DIRECT_UNKNOWN),
+    callback (NULL),
+    callback_data (NULL),
+    lastError(NULL),
+    servers (NULL),
+    first_parent_miss(),
+    closest_parent_miss(),
+    hit(NULL),
+    hit_type(PEER_NONE),
+    acl_checklist (NULL)
 {
     ; // no local defaults.
 }
@@ -979,16 +979,17 @@ ps_state::url() const
 }
 
 ping_data::ping_data() :
-        n_sent(0),
-        n_recv(0),
-        n_replies_expected(0),
-        timeout(0),
-        timedout(0),
-        w_rtt(0),
-        p_rtt(0)
+    n_sent(0),
+    n_recv(0),
+    n_replies_expected(0),
+    timeout(0),
+    timedout(0),
+    w_rtt(0),
+    p_rtt(0)
 {
     start.tv_sec = 0;
     start.tv_usec = 0;
     stop.tv_sec = 0;
     stop.tv_usec = 0;
 }
+
diff --git a/src/peer_sourcehash.cc b/src/peer_sourcehash.cc
index 52bdeb33a4..93d188174d 100644
--- a/src/peer_sourcehash.cc
+++ b/src/peer_sourcehash.cc
@@ -115,11 +115,11 @@ peerSourceHashInit(void)
      */
     K = n_sourcehash_peers;
 
-    P_last = 0.0;		/* Empty P_0 */
+    P_last = 0.0;       /* Empty P_0 */
 
-    Xn = 1.0;			/* Empty starting point of X_1 * X_2 * ... * X_{x-1} */
+    Xn = 1.0;           /* Empty starting point of X_1 * X_2 * ... * X_{x-1} */
 
-    X_last = 0.0;		/* Empty X_0, nullifies the first pow statement */
+    X_last = 0.0;       /* Empty X_0, nullifies the first pow statement */
 
     for (k = 1; k <= K; ++k) {
         double Kk1 = (double) (K - k + 1);
@@ -210,3 +210,4 @@ peerSourceHashCachemgr(StoreEntry * sentry)
                           sumfetches ? (double) p->stats.fetches / sumfetches : -1.0);
     }
 }
+
diff --git a/src/peer_sourcehash.h b/src/peer_sourcehash.h
index ac34409938..3cefa03e06 100644
--- a/src/peer_sourcehash.h
+++ b/src/peer_sourcehash.h
@@ -18,3 +18,4 @@ void peerSourceHashInit(void);
 CachePeer * peerSourceHashSelectParent(HttpRequest * request);
 
 #endif /* SQUID_PEER_SOURCEHASH_H_ */
+
diff --git a/src/peer_userhash.cc b/src/peer_userhash.cc
index 82f2455925..441aa46959 100644
--- a/src/peer_userhash.cc
+++ b/src/peer_userhash.cc
@@ -120,11 +120,11 @@ peerUserHashInit(void)
      */
     K = n_userhash_peers;
 
-    P_last = 0.0;		/* Empty P_0 */
+    P_last = 0.0;       /* Empty P_0 */
 
-    Xn = 1.0;			/* Empty starting point of X_1 * X_2 * ... * X_{x-1} */
+    Xn = 1.0;           /* Empty starting point of X_1 * X_2 * ... * X_{x-1} */
 
-    X_last = 0.0;		/* Empty X_0, nullifies the first pow statement */
+    X_last = 0.0;       /* Empty X_0, nullifies the first pow statement */
 
     for (k = 1; k <= K; ++k) {
         double Kk1 = (double) (K - k + 1);
@@ -220,3 +220,4 @@ peerUserHashCachemgr(StoreEntry * sentry)
 }
 
 #endif /* USE_AUTH */
+
diff --git a/src/peer_userhash.h b/src/peer_userhash.h
index 6c8e59eea0..74bd717390 100644
--- a/src/peer_userhash.h
+++ b/src/peer_userhash.h
@@ -18,3 +18,4 @@ void peerUserHashInit(void);
 CachePeer * peerUserHashSelectParent(HttpRequest * request);
 
 #endif /* SQUID_PEER_USERHASH_H_ */
+
diff --git a/src/protos.h b/src/protos.h
index 0aa6ceb69b..44d9e9cbc0 100644
--- a/src/protos.h
+++ b/src/protos.h
@@ -14,3 +14,4 @@ void rotate_logs(int);
 void reconfigure(int);
 
 #endif /* SQUID_PROTOS_H */
+
diff --git a/src/recv-announce.cc b/src/recv-announce.cc
index b8f603fdbd..f1ddad1e7a 100644
--- a/src/recv-announce.cc
+++ b/src/recv-announce.cc
@@ -107,3 +107,4 @@ main(int argc, char *argv[])
 
     return 0;
 }
+
diff --git a/src/redirect.cc b/src/redirect.cc
index eec7905046..0424e03dcc 100644
--- a/src/redirect.cc
+++ b/src/redirect.cc
@@ -65,9 +65,9 @@ static Format::Format *storeIdExtrasFmt = NULL;
 CBDATA_CLASS_INIT(RedirectStateData);
 
 RedirectStateData::RedirectStateData(const char *url) :
-        data(NULL),
-        orig_url(url),
-        handler(NULL)
+    data(NULL),
+    orig_url(url),
+    handler(NULL)
 {
 }
 
@@ -432,3 +432,4 @@ redirectShutdown(void)
     delete storeIdExtrasFmt;
     storeIdExtrasFmt = NULL;
 }
+
diff --git a/src/redirect.h b/src/redirect.h
index 7731231717..4a2ccaf2e6 100644
--- a/src/redirect.h
+++ b/src/redirect.h
@@ -23,3 +23,4 @@ void redirectStart(ClientHttpRequest *, HLPCB *, void *);
 void storeIdStart(ClientHttpRequest *, HLPCB *, void *);
 
 #endif /* SQUID_REDIRECT_H_ */
+
diff --git a/src/refresh.cc b/src/refresh.cc
index 9ccb62a5e9..a33bd67ef1 100644
--- a/src/refresh.cc
+++ b/src/refresh.cc
@@ -9,7 +9,7 @@
 /* DEBUG: section 22    Refresh Calculation */
 
 #ifndef USE_POSIX_REGEX
-#define USE_POSIX_REGEX		/* put before includes; always use POSIX */
+#define USE_POSIX_REGEX     /* put before includes; always use POSIX */
 #endif
 
 #include "squid.h"
@@ -85,9 +85,9 @@ static struct RefreshCounts {
  *      PCT     20%
  *      MAX     3 days
  */
-#define REFRESH_DEFAULT_MIN	(time_t)0
-#define REFRESH_DEFAULT_PCT	0.20
-#define REFRESH_DEFAULT_MAX	(time_t)259200
+#define REFRESH_DEFAULT_MIN (time_t)0
+#define REFRESH_DEFAULT_PCT 0.20
+#define REFRESH_DEFAULT_MAX (time_t)259200
 
 static const RefreshPattern *refreshUncompiledPattern(const char *);
 static OBJH refreshStats;
@@ -759,3 +759,4 @@ refreshInit(void)
 
     refreshRegisterWithCacheManager();
 }
+
diff --git a/src/refresh.h b/src/refresh.h
index f815989164..3a43b98da9 100644
--- a/src/refresh.h
+++ b/src/refresh.h
@@ -24,3 +24,4 @@ void refreshInit(void);
 const RefreshPattern *refreshLimits(const char *url);
 
 #endif /* SQUID_REFRESH_H_ */
+
diff --git a/src/repl/heap/store_heap_replacement.cc b/src/repl/heap/store_heap_replacement.cc
index fdf85480f6..4d6453c029 100644
--- a/src/repl/heap/store_heap_replacement.cc
+++ b/src/repl/heap/store_heap_replacement.cc
@@ -129,3 +129,4 @@ HeapKeyGen_StoreEntry_LRU(void *entry, double heap_age)
 
     return (heap_key) e->lastref;
 }
+
diff --git a/src/repl/heap/store_heap_replacement.h b/src/repl/heap/store_heap_replacement.h
index 0d53c23e8f..f098358d28 100644
--- a/src/repl/heap/store_heap_replacement.h
+++ b/src/repl/heap/store_heap_replacement.h
@@ -16,3 +16,4 @@ heap_key HeapKeyGen_StoreEntry_GDSF(void *entry, double age);
 heap_key HeapKeyGen_StoreEntry_LRU(void *entry, double age);
 
 #endif /* _SQUIDINC_STORE_HEAP_REPLACEMENT_H */
+
diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc
index 9f54d0a546..109a529cee 100644
--- a/src/repl/heap/store_repl_heap.cc
+++ b/src/repl/heap/store_repl_heap.cc
@@ -83,7 +83,7 @@ heap_add(RemovalPolicy * policy, StoreEntry * entry, RemovalPolicyNode * node)
     assert(!node->data);
 
     if (EBIT_TEST(entry->flags, ENTRY_SPECIAL))
-        return;			/* We won't manage these.. they messes things up */
+        return;         /* We won't manage these.. they messes things up */
 
     node->data = heap_insert(h->theHeap, entry);
 
@@ -143,7 +143,7 @@ heap_walkNext(RemovalPolicyWalker * walker)
     StoreEntry *entry;
 
     if (heap_walk->current >= heap_nodes(h->theHeap))
-        return NULL;		/* done */
+        return NULL;        /* done */
 
     entry = (StoreEntry *) heap_peep(h->theHeap, heap_walk->current++);
 
@@ -200,7 +200,7 @@ heap_purgeNext(RemovalPurgeWalker * walker)
 try_again:
 
     if (heap_empty(h->theHeap))
-        return NULL;		/* done */
+        return NULL;        /* done */
 
     age = heap_peepminkey(h->theHeap);
 
@@ -346,3 +346,4 @@ createRemovalPolicy_heap(wordlist * args)
 
     return policy;
 }
+
diff --git a/src/repl/lru/store_repl_lru.cc b/src/repl/lru/store_repl_lru.cc
index 3e0a9553eb..65bbc25e5b 100644
--- a/src/repl/lru/store_repl_lru.cc
+++ b/src/repl/lru/store_repl_lru.cc
@@ -348,3 +348,4 @@ createRemovalPolicy_lru(wordlist * args)
 
     return policy;
 }
+
diff --git a/src/repl_modules.h b/src/repl_modules.h
index 0794cc903f..679f7ae2c8 100644
--- a/src/repl_modules.h
+++ b/src/repl_modules.h
@@ -16,3 +16,4 @@
 void storeReplSetup(void);
 
 #endif /* SQUID_REPL_MODULES_H_ */
+
diff --git a/src/send-announce.cc b/src/send-announce.cc
index e34d04355f..2b4e6c4f94 100644
--- a/src/send-announce.cc
+++ b/src/send-announce.cc
@@ -98,3 +98,4 @@ send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk)
     if (comm_udp_sendto(icpOutgoingConn->fd, S, sndbuf, strlen(sndbuf) + 1) < 0)
         debugs(27, DBG_IMPORTANT, "ERROR: Failed to announce to " << S << " from " << icpOutgoingConn->local << ": " << xstrerror());
 }
+
diff --git a/src/send-announce.h b/src/send-announce.h
index a4d07f6b82..d923d1482b 100644
--- a/src/send-announce.h
+++ b/src/send-announce.h
@@ -14,3 +14,4 @@
 void start_announce(void *unused);
 
 #endif /* SQUID_SEND_ANNOUNCE_H_ */
+
diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc
index 58e0c3f08e..10c79b23d0 100644
--- a/src/servers/FtpServer.cc
+++ b/src/servers/FtpServer.cc
@@ -49,19 +49,19 @@ static bool CommandHasPathParameter(const SBuf &cmd);
 };
 
 Ftp::Server::Server(const MasterXaction::Pointer &xact):
-        AsyncJob("Ftp::Server"),
-        ConnStateData(xact),
-        master(new MasterState),
-        uri(),
-        host(),
-        gotEpsvAll(false),
-        onDataAcceptCall(),
-        dataListenConn(),
-        dataConn(),
-        uploadAvailSize(0),
-        listener(),
-        connector(),
-        reader()
+    AsyncJob("Ftp::Server"),
+    ConnStateData(xact),
+    master(new MasterState),
+    uri(),
+    host(),
+    gotEpsvAll(false),
+    onDataAcceptCall(),
+    dataListenConn(),
+    dataConn(),
+    uploadAvailSize(0),
+    listener(),
+    connector(),
+    reader()
 {
     flags.readMore = false; // we need to announce ourselves first
     *uploadBuf = 0;
@@ -267,7 +267,7 @@ Ftp::StartListening()
         typedef CommCbFunPtrCallT AcceptCall;
         RefCount subCall = commCbCall(5, 5, "Ftp::Server::AcceptCtrlConnection",
                                        CommAcceptCbPtrFun(Ftp::Server::AcceptCtrlConnection,
-                                                          CommAcceptCbParams(NULL)));
+                                               CommAcceptCbParams(NULL)));
         clientStartListeningOn(s, subCall, Ipc::fdnFtpSocket);
     }
 }
diff --git a/src/servers/FtpServer.h b/src/servers/FtpServer.h
index 1629f60184..5e74125bf2 100644
--- a/src/servers/FtpServer.h
+++ b/src/servers/FtpServer.h
@@ -173,3 +173,4 @@ private:
 } // namespace Ftp
 
 #endif /* SQUID_SERVERS_FTP_SERVER_H */
+
diff --git a/src/servers/HttpServer.cc b/src/servers/HttpServer.cc
index e1340455e3..48243ba7cd 100644
--- a/src/servers/HttpServer.cc
+++ b/src/servers/HttpServer.cc
@@ -73,9 +73,9 @@ private:
 CBDATA_NAMESPACED_CLASS_INIT(Http, Server);
 
 Http::Server::Server(const MasterXaction::Pointer &xact, bool beHttpsServer):
-        AsyncJob("Http::Server"),
-        ConnStateData(xact),
-        isHttpsServer(beHttpsServer)
+    AsyncJob("Http::Server"),
+    ConnStateData(xact),
+    isHttpsServer(beHttpsServer)
 {
 }
 
@@ -157,7 +157,7 @@ Http::Server::buildHttpRequest(ClientSocketContext *context)
         err_type errPage = ERR_INVALID_REQ;
         switch (parser_->request_parse_status) {
         case Http::scRequestHeaderFieldsTooLarge:
-            // fall through to next case
+        // fall through to next case
         case Http::scUriTooLong:
             errPage = ERR_TOO_BIG;
             break;
@@ -196,7 +196,7 @@ Http::Server::buildHttpRequest(ClientSocketContext *context)
     /* We currently only support 0.9, 1.0, 1.1 properly */
     /* TODO: move HTTP-specific processing into servers/HttpServer and such */
     if ( (parser_->messageProtocol().major == 0 && parser_->messageProtocol().minor != 9) ||
-         (parser_->messageProtocol().major > 1) ) {
+            (parser_->messageProtocol().major > 1) ) {
 
         clientStreamNode *node = context->getClientReplyContext();
         debugs(33, 5, "Unsupported HTTP version discovered. :\n" << parser_->messageProtocol());
@@ -338,3 +338,4 @@ Https::NewServer(MasterXactionPointer &xact)
 {
     return new Http::Server(xact, true);
 }
+
diff --git a/src/servers/forward.h b/src/servers/forward.h
index 7acf64225d..7cdb32f3de 100644
--- a/src/servers/forward.h
+++ b/src/servers/forward.h
@@ -42,3 +42,4 @@ void StopListening();
 } // namespace Ftp
 
 #endif /* SQUID_SERVERS_FORWARD_H */
+
diff --git a/src/snmp/Forwarder.cc b/src/snmp/Forwarder.cc
index d7455ac949..7a2fa4c52b 100644
--- a/src/snmp/Forwarder.cc
+++ b/src/snmp/Forwarder.cc
@@ -23,8 +23,8 @@ CBDATA_NAMESPACED_CLASS_INIT(Snmp, Forwarder);
 
 Snmp::Forwarder::Forwarder(const Pdu& aPdu, const Session& aSession, int aFd,
                            const Ip::Address& anAddress):
-        Ipc::Forwarder(new Request(KidIdentifier, 0, aPdu, aSession, aFd, anAddress), 2),
-        fd(aFd)
+    Ipc::Forwarder(new Request(KidIdentifier, 0, aPdu, aSession, aFd, anAddress), 2),
+    fd(aFd)
 {
     debugs(49, 5, HERE << "FD " << aFd);
     Must(fd >= 0);
@@ -108,3 +108,4 @@ Snmp::SendResponse(unsigned int requestId, const Pdu& pdu)
     response.pack(message);
     Ipc::SendMessage(Ipc::Port::CoordinatorAddr(), message);
 }
+
diff --git a/src/snmp/Forwarder.h b/src/snmp/Forwarder.h
index df3d9bf1f3..e8f92fe2b0 100644
--- a/src/snmp/Forwarder.h
+++ b/src/snmp/Forwarder.h
@@ -52,3 +52,4 @@ void SendResponse(unsigned int requestId, const Pdu& pdu);
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_FORWARDER_H */
+
diff --git a/src/snmp/Inquirer.cc b/src/snmp/Inquirer.cc
index 69b878500b..60267978b3 100644
--- a/src/snmp/Inquirer.cc
+++ b/src/snmp/Inquirer.cc
@@ -22,8 +22,8 @@
 CBDATA_NAMESPACED_CLASS_INIT(Snmp, Inquirer);
 
 Snmp::Inquirer::Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords):
-        Ipc::Inquirer(aRequest.clone(), coords, 2),
-        aggrPdu(aRequest.pdu)
+    Ipc::Inquirer(aRequest.clone(), coords, 2),
+    aggrPdu(aRequest.pdu)
 {
     conn = new Comm::Connection;
     conn->fd = aRequest.fd;
@@ -110,3 +110,4 @@ Snmp::Inquirer::sendResponse()
     snmp_build(&req.session, &aggrPdu, buffer, &len);
     comm_udp_sendto(conn->fd, req.address, buffer, len);
 }
+
diff --git a/src/snmp/Inquirer.h b/src/snmp/Inquirer.h
index b7313430bb..122605b433 100644
--- a/src/snmp/Inquirer.h
+++ b/src/snmp/Inquirer.h
@@ -55,3 +55,4 @@ private:
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_INQUIRER_H */
+
diff --git a/src/snmp/Pdu.cc b/src/snmp/Pdu.cc
index 63387cd258..91520ea9e5 100644
--- a/src/snmp/Pdu.cc
+++ b/src/snmp/Pdu.cc
@@ -237,3 +237,4 @@ Snmp::Pdu::fixAggregate()
     }
     aggrCount = 0;
 }
+
diff --git a/src/snmp/Pdu.h b/src/snmp/Pdu.h
index d03b5ca692..85f11c6449 100644
--- a/src/snmp/Pdu.h
+++ b/src/snmp/Pdu.h
@@ -49,3 +49,4 @@ private:
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_PDU_H */
+
diff --git a/src/snmp/Request.cc b/src/snmp/Request.cc
index f324b7ad0c..8d751a97c1 100644
--- a/src/snmp/Request.cc
+++ b/src/snmp/Request.cc
@@ -16,20 +16,20 @@
 Snmp::Request::Request(int aRequestorId, unsigned int aRequestId,
                        const Pdu& aPdu, const Session& aSession,
                        int aFd, const Ip::Address& anAddress):
-        Ipc::Request(aRequestorId, aRequestId),
-        pdu(aPdu), session(aSession), fd(aFd), address(anAddress)
+    Ipc::Request(aRequestorId, aRequestId),
+    pdu(aPdu), session(aSession), fd(aFd), address(anAddress)
 {
 }
 
 Snmp::Request::Request(const Request& request):
-        Ipc::Request(request.requestorId, request.requestId),
-        pdu(request.pdu), session(request.session),
-        fd(request.fd), address(request.address)
+    Ipc::Request(request.requestorId, request.requestId),
+    pdu(request.pdu), session(request.session),
+    fd(request.fd), address(request.address)
 {
 }
 
 Snmp::Request::Request(const Ipc::TypedMsgHdr& msg):
-        Ipc::Request(0, 0)
+    Ipc::Request(0, 0)
 {
     msg.checkType(Ipc::mtSnmpRequest);
     msg.getPod(requestorId);
@@ -62,3 +62,4 @@ Snmp::Request::clone() const
 {
     return new Request(*this);
 }
+
diff --git a/src/snmp/Request.h b/src/snmp/Request.h
index b695cf07c7..316ae19dcb 100644
--- a/src/snmp/Request.h
+++ b/src/snmp/Request.h
@@ -45,3 +45,4 @@ public:
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_REQUEST_H */
+
diff --git a/src/snmp/Response.cc b/src/snmp/Response.cc
index 399c9ab262..23f6bbbab8 100644
--- a/src/snmp/Response.cc
+++ b/src/snmp/Response.cc
@@ -21,17 +21,17 @@ std::ostream& Snmp::operator << (std::ostream& os, const Response& response)
 }
 
 Snmp::Response::Response(unsigned int aRequestId):
-        Ipc::Response(aRequestId), pdu()
+    Ipc::Response(aRequestId), pdu()
 {
 }
 
 Snmp::Response::Response(const Response& response):
-        Ipc::Response(response.requestId), pdu(response.pdu)
+    Ipc::Response(response.requestId), pdu(response.pdu)
 {
 }
 
 Snmp::Response::Response(const Ipc::TypedMsgHdr& msg):
-        Ipc::Response(0)
+    Ipc::Response(0)
 {
     msg.checkType(Ipc::mtSnmpResponse);
     msg.getPod(requestId);
@@ -51,3 +51,4 @@ Snmp::Response::clone() const
 {
     return new Response(*this);
 }
+
diff --git a/src/snmp/Response.h b/src/snmp/Response.h
index 0df5f005be..54c9f3cb1c 100644
--- a/src/snmp/Response.h
+++ b/src/snmp/Response.h
@@ -41,3 +41,4 @@ std::ostream& operator << (std::ostream& os, const Response& response);
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_RESPONSE_H */
+
diff --git a/src/snmp/Session.cc b/src/snmp/Session.cc
index 854eba62c3..075f8ce5a5 100644
--- a/src/snmp/Session.cc
+++ b/src/snmp/Session.cc
@@ -112,3 +112,4 @@ Snmp::Session::unpack(const Ipc::TypedMsgHdr& msg)
     msg.getPod(remote_port);
     msg.getPod(local_port);
 }
+
diff --git a/src/snmp/Session.h b/src/snmp/Session.h
index 029d1e16e4..093ebd5b92 100644
--- a/src/snmp/Session.h
+++ b/src/snmp/Session.h
@@ -39,3 +39,4 @@ private:
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_SESSION_H */
+
diff --git a/src/snmp/Var.cc b/src/snmp/Var.cc
index 67607cbd7d..eb5c920b22 100644
--- a/src/snmp/Var.cc
+++ b/src/snmp/Var.cc
@@ -359,3 +359,4 @@ Snmp::Var::unpack(const Ipc::TypedMsgHdr& msg)
         msg.getFixed(val.string, val_len);
     }
 }
+
diff --git a/src/snmp/Var.h b/src/snmp/Var.h
index 519c3e21af..9178e95992 100644
--- a/src/snmp/Var.h
+++ b/src/snmp/Var.h
@@ -71,3 +71,4 @@ private:
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_VAR_H */
+
diff --git a/src/snmp/forward.h b/src/snmp/forward.h
index ca8b658bf2..d0b3ebd28b 100644
--- a/src/snmp/forward.h
+++ b/src/snmp/forward.h
@@ -23,3 +23,4 @@ class Var;
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_FORWARD_H */
+
diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc
index b7e0aec3a3..c5e52d61ed 100644
--- a/src/snmp_agent.cc
+++ b/src/snmp_agent.cc
@@ -432,7 +432,7 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
 
     switch (Var->name[LEN_SQ_PRF + 1]) {
 
-    case PERF_PROTOSTAT_AGGR:	/* cacheProtoAggregateStats */
+    case PERF_PROTOSTAT_AGGR:   /* cacheProtoAggregateStats */
 
         switch (Var->name[LEN_SQ_PRF + 2]) {
 
@@ -614,3 +614,4 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
     *ErrP = SNMP_ERR_NOSUCHNAME;
     return NULL;
 }
+
diff --git a/src/snmp_agent.h b/src/snmp_agent.h
index f00dc5de26..a94600a37b 100644
--- a/src/snmp_agent.h
+++ b/src/snmp_agent.h
@@ -27,3 +27,4 @@ variable_list *snmp_meshCtblFn(variable_list *, snint *);
 
 #endif /* SQUID_SNMP */
 #endif /* SQUID_SNMP_AGENT_H_ */
+
diff --git a/src/snmp_core.cc b/src/snmp_core.cc
index 352832a613..a609c0e286 100644
--- a/src/snmp_core.cc
+++ b/src/snmp_core.cc
@@ -1176,3 +1176,4 @@ ACLSNMPCommunityStrategy::Instance()
 }
 
 ACLSNMPCommunityStrategy ACLSNMPCommunityStrategy::Instance_;
+
diff --git a/src/snmp_core.h b/src/snmp_core.h
index 8a57199bb5..35280fe6eb 100644
--- a/src/snmp_core.h
+++ b/src/snmp_core.h
@@ -55,3 +55,4 @@ void addr2oid(Ip::Address &addr, oid *Dest);
 void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
 
 #endif /* SQUID_SNMP_CORE_H */
+
diff --git a/src/ssl/Config.cc b/src/ssl/Config.cc
index 49062273ce..04ef46d4dc 100644
--- a/src/ssl/Config.cc
+++ b/src/ssl/Config.cc
@@ -13,9 +13,9 @@ Ssl::Config Ssl::TheConfig;
 
 Ssl::Config::Config():
 #if USE_SSL_CRTD
-        ssl_crtd(NULL),
+    ssl_crtd(NULL),
 #endif
-        ssl_crt_validator(NULL)
+    ssl_crt_validator(NULL)
 {
     ssl_crt_validator_Children.concurrency = 1;
 }
@@ -27,3 +27,4 @@ Ssl::Config::~Config()
 #endif
     xfree(ssl_crt_validator);
 }
+
diff --git a/src/ssl/Config.h b/src/ssl/Config.h
index a64cf8cd27..bdebe52c00 100644
--- a/src/ssl/Config.h
+++ b/src/ssl/Config.h
@@ -35,3 +35,4 @@ extern Config TheConfig;
 
 } // namespace Ssl
 #endif
+
diff --git a/src/ssl/ErrorDetail.cc b/src/ssl/ErrorDetail.cc
index b59f1d1f57..ad66397198 100644
--- a/src/ssl/ErrorDetail.cc
+++ b/src/ssl/ErrorDetail.cc
@@ -25,76 +25,111 @@ typedef std::map SslErrors;
 SslErrors TheSslErrors;
 
 static SslErrorEntry TheSslErrorArray[] = {
-    {SQUID_X509_V_ERR_INFINITE_VALIDATION,
-        "SQUID_X509_V_ERR_INFINITE_VALIDATION"},
-    {SQUID_X509_V_ERR_CERT_CHANGE,
-     "SQUID_X509_V_ERR_CERT_CHANGE"},
-    {SQUID_ERR_SSL_HANDSHAKE,
-     "SQUID_ERR_SSL_HANDSHAKE"},
-    {SQUID_X509_V_ERR_DOMAIN_MISMATCH,
-     "SQUID_X509_V_ERR_DOMAIN_MISMATCH"},
-    {X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
-     "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT"},
-    {X509_V_ERR_UNABLE_TO_GET_CRL,
-     "X509_V_ERR_UNABLE_TO_GET_CRL"},
-    {X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
-     "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE"},
-    {X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
-     "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE"},
-    {X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
-     "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"},
-    {X509_V_ERR_CERT_SIGNATURE_FAILURE,
-     "X509_V_ERR_CERT_SIGNATURE_FAILURE"},
-    {X509_V_ERR_CRL_SIGNATURE_FAILURE,
-     "X509_V_ERR_CRL_SIGNATURE_FAILURE"},
-    {X509_V_ERR_CERT_NOT_YET_VALID,
-     "X509_V_ERR_CERT_NOT_YET_VALID"},
-    {X509_V_ERR_CERT_HAS_EXPIRED,
-     "X509_V_ERR_CERT_HAS_EXPIRED"},
-    {X509_V_ERR_CRL_NOT_YET_VALID,
-     "X509_V_ERR_CRL_NOT_YET_VALID"},
-    {X509_V_ERR_CRL_HAS_EXPIRED,
-     "X509_V_ERR_CRL_HAS_EXPIRED"},
-    {X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
-     "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD"},
-    {X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
-     "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD"},
-    {X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
-     "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD"},
-    {X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
-     "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD"},
-    {X509_V_ERR_OUT_OF_MEM,
-     "X509_V_ERR_OUT_OF_MEM"},
-    {X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
-     "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT"},
-    {X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
-     "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN"},
-    {X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
-     "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY"},
-    {X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
-     "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE"},
-    {X509_V_ERR_CERT_CHAIN_TOO_LONG,
-     "X509_V_ERR_CERT_CHAIN_TOO_LONG"},
-    {X509_V_ERR_CERT_REVOKED,
-     "X509_V_ERR_CERT_REVOKED"},
-    {X509_V_ERR_INVALID_CA,
-     "X509_V_ERR_INVALID_CA"},
-    {X509_V_ERR_PATH_LENGTH_EXCEEDED,
-     "X509_V_ERR_PATH_LENGTH_EXCEEDED"},
-    {X509_V_ERR_INVALID_PURPOSE,
-     "X509_V_ERR_INVALID_PURPOSE"},
-    {X509_V_ERR_CERT_UNTRUSTED,
-     "X509_V_ERR_CERT_UNTRUSTED"},
-    {X509_V_ERR_CERT_REJECTED,
-     "X509_V_ERR_CERT_REJECTED"},
-    {X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
-     "X509_V_ERR_SUBJECT_ISSUER_MISMATCH"},
-    {X509_V_ERR_AKID_SKID_MISMATCH,
-     "X509_V_ERR_AKID_SKID_MISMATCH"},
-    {X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
-     "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH"},
-    {X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
-     "X509_V_ERR_KEYUSAGE_NO_CERTSIGN"},
+    {   SQUID_X509_V_ERR_INFINITE_VALIDATION,
+        "SQUID_X509_V_ERR_INFINITE_VALIDATION"
+    },
+    {   SQUID_X509_V_ERR_CERT_CHANGE,
+        "SQUID_X509_V_ERR_CERT_CHANGE"
+    },
+    {   SQUID_ERR_SSL_HANDSHAKE,
+        "SQUID_ERR_SSL_HANDSHAKE"
+    },
+    {   SQUID_X509_V_ERR_DOMAIN_MISMATCH,
+        "SQUID_X509_V_ERR_DOMAIN_MISMATCH"
+    },
+    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
+        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT"
+    },
+    {   X509_V_ERR_UNABLE_TO_GET_CRL,
+        "X509_V_ERR_UNABLE_TO_GET_CRL"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
+        "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"
+    },
+    {   X509_V_ERR_CERT_SIGNATURE_FAILURE,
+        "X509_V_ERR_CERT_SIGNATURE_FAILURE"
+    },
+    {   X509_V_ERR_CRL_SIGNATURE_FAILURE,
+        "X509_V_ERR_CRL_SIGNATURE_FAILURE"
+    },
+    {   X509_V_ERR_CERT_NOT_YET_VALID,
+        "X509_V_ERR_CERT_NOT_YET_VALID"
+    },
+    {   X509_V_ERR_CERT_HAS_EXPIRED,
+        "X509_V_ERR_CERT_HAS_EXPIRED"
+    },
+    {   X509_V_ERR_CRL_NOT_YET_VALID,
+        "X509_V_ERR_CRL_NOT_YET_VALID"
+    },
+    {   X509_V_ERR_CRL_HAS_EXPIRED,
+        "X509_V_ERR_CRL_HAS_EXPIRED"
+    },
+    {   X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
+        "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
+        "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
+        "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
+        "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD"
+    },
+    {   X509_V_ERR_OUT_OF_MEM,
+        "X509_V_ERR_OUT_OF_MEM"
+    },
+    {   X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
+        "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT"
+    },
+    {   X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
+        "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN"
+    },
+    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
+        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY"
+    },
+    {   X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE"
+    },
+    {   X509_V_ERR_CERT_CHAIN_TOO_LONG,
+        "X509_V_ERR_CERT_CHAIN_TOO_LONG"
+    },
+    {   X509_V_ERR_CERT_REVOKED,
+        "X509_V_ERR_CERT_REVOKED"
+    },
+    {   X509_V_ERR_INVALID_CA,
+        "X509_V_ERR_INVALID_CA"
+    },
+    {   X509_V_ERR_PATH_LENGTH_EXCEEDED,
+        "X509_V_ERR_PATH_LENGTH_EXCEEDED"
+    },
+    {   X509_V_ERR_INVALID_PURPOSE,
+        "X509_V_ERR_INVALID_PURPOSE"
+    },
+    {   X509_V_ERR_CERT_UNTRUSTED,
+        "X509_V_ERR_CERT_UNTRUSTED"
+    },
+    {   X509_V_ERR_CERT_REJECTED,
+        "X509_V_ERR_CERT_REJECTED"
+    },
+    {   X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
+        "X509_V_ERR_SUBJECT_ISSUER_MISMATCH"
+    },
+    {   X509_V_ERR_AKID_SKID_MISMATCH,
+        "X509_V_ERR_AKID_SKID_MISMATCH"
+    },
+    {   X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
+        "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH"
+    },
+    {   X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
+        "X509_V_ERR_KEYUSAGE_NO_CERTSIGN"
+    },
 #if defined(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER)
     {
         X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER, //33
@@ -221,8 +256,9 @@ static SslErrorEntry TheSslErrorArray[] = {
         "X509_V_ERR_CRL_PATH_VALIDATION_ERROR"
     },
 #endif
-    {X509_V_ERR_APPLICATION_VERIFICATION,
-     "X509_V_ERR_APPLICATION_VERIFICATION"},
+    {   X509_V_ERR_APPLICATION_VERIFICATION,
+        "X509_V_ERR_APPLICATION_VERIFICATION"
+    },
     { SSL_ERROR_NONE, "SSL_ERROR_NONE"},
     {SSL_ERROR_NONE, NULL}
 };
@@ -261,11 +297,11 @@ static const Ssl::ssl_error_t hasExpired[] = {X509_V_ERR_CERT_HAS_EXPIRED, SSL_E
 static const Ssl::ssl_error_t notYetValid[] = {X509_V_ERR_CERT_NOT_YET_VALID, SSL_ERROR_NONE};
 static const Ssl::ssl_error_t domainMismatch[] = {SQUID_X509_V_ERR_DOMAIN_MISMATCH, SSL_ERROR_NONE};
 static const Ssl::ssl_error_t certUntrusted[] = {X509_V_ERR_INVALID_CA,
-        X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
-        X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
-        X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
-        X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
-        X509_V_ERR_CERT_UNTRUSTED, SSL_ERROR_NONE
+                                                 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
+                                                 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
+                                                 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
+                                                 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
+                                                 X509_V_ERR_CERT_UNTRUSTED, SSL_ERROR_NONE
                                                 };
 static const Ssl::ssl_error_t certSelfSigned[] = {X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT, SSL_ERROR_NONE};
 
@@ -615,3 +651,4 @@ Ssl::ErrorDetail::ErrorDetail(Ssl::ErrorDetail const &anErrDetail)
 
     lib_error_no = anErrDetail.lib_error_no;
 }
+
diff --git a/src/ssl/ErrorDetail.h b/src/ssl/ErrorDetail.h
index a228d71511..f5afe87870 100644
--- a/src/ssl/ErrorDetail.h
+++ b/src/ssl/ErrorDetail.h
@@ -114,3 +114,4 @@ private:
 
 }//namespace Ssl
 #endif
+
diff --git a/src/ssl/ErrorDetailManager.cc b/src/ssl/ErrorDetailManager.cc
index 43fc4b0052..3d22e25ac2 100644
--- a/src/ssl/ErrorDetailManager.cc
+++ b/src/ssl/ErrorDetailManager.cc
@@ -261,3 +261,4 @@ Ssl::ErrorDetailFile::parse(const char *buffer, int len, bool eof)
     debugs(83, 9, HERE << " Remain size: " << buf.contentSize() << " Content: " << buf.content());
     return true;
 }
+
diff --git a/src/ssl/ErrorDetailManager.h b/src/ssl/ErrorDetailManager.h
index 467639bde5..1436db9cc9 100644
--- a/src/ssl/ErrorDetailManager.h
+++ b/src/ssl/ErrorDetailManager.h
@@ -95,3 +95,4 @@ void errorDetailInitialize();
 void errorDetailClean();
 } //namespace Ssl
 #endif
+
diff --git a/src/ssl/PeerConnector.cc b/src/ssl/PeerConnector.cc
index d0b7fd68f4..095fe317c0 100644
--- a/src/ssl/PeerConnector.cc
+++ b/src/ssl/PeerConnector.cc
@@ -38,14 +38,14 @@ Ssl::PeerConnector::PeerConnector(
     const Comm::ConnectionPointer &aClientConn,
     AsyncCall::Pointer &aCallback,
     const time_t timeout):
-        AsyncJob("Ssl::PeerConnector"),
-        request(aRequest),
-        serverConn(aServerConn),
-        clientConn(aClientConn),
-        callback(aCallback),
-        negotiationTimeout(timeout),
-        startTime(squid_curtime),
-        splice(false)
+    AsyncJob("Ssl::PeerConnector"),
+    request(aRequest),
+    serverConn(aServerConn),
+    clientConn(aClientConn),
+    callback(aCallback),
+    negotiationTimeout(timeout),
+    startTime(squid_curtime),
+    splice(false)
 {
     // if this throws, the caller's cb dialer is not our CbDialer
     Must(dynamic_cast(callback->getDialer()));
@@ -366,7 +366,7 @@ Ssl::PeerConnector::checkForPeekAndSpliceDone(Ssl::BumpMode const action)
         debugs(83,5, "Retry the fwdNegotiateSSL on FD " << serverConn->fd);
     } else {
         splice = true;
-        // Ssl Negotiation stops here. Last SSL checks for valid certificates 
+        // Ssl Negotiation stops here. Last SSL checks for valid certificates
         // and if done, switch to tunnel mode
         if (sslFinalized())
             switchToTunnel(request.getRaw(), clientConn, serverConn);
@@ -694,3 +694,4 @@ Ssl::operator <<(std::ostream &os, const Ssl::PeerConnectorAnswer &answer)
 {
     return os << answer.conn << ", " << answer.error;
 }
+
diff --git a/src/ssl/PeerConnector.h b/src/ssl/PeerConnector.h
index 182dfbfb70..540cce512a 100644
--- a/src/ssl/PeerConnector.h
+++ b/src/ssl/PeerConnector.h
@@ -180,3 +180,4 @@ std::ostream &operator <<(std::ostream &os, const Ssl::PeerConnectorAnswer &a);
 } // namespace Ssl
 
 #endif /* SQUID_PEER_CONNECTOR_H */
+
diff --git a/src/ssl/ProxyCerts.h b/src/ssl/ProxyCerts.h
index 8dfeecf509..461b1e478d 100644
--- a/src/ssl/ProxyCerts.h
+++ b/src/ssl/ProxyCerts.h
@@ -31,3 +31,4 @@ public:
 #endif
 
 #endif /* SQUID_SSLPROXYCERTS_H_ */
+
diff --git a/src/ssl/ServerBump.cc b/src/ssl/ServerBump.cc
index 258c7557be..ac452890ec 100644
--- a/src/ssl/ServerBump.cc
+++ b/src/ssl/ServerBump.cc
@@ -20,9 +20,9 @@
 CBDATA_NAMESPACED_CLASS_INIT(Ssl, ServerBump);
 
 Ssl::ServerBump::ServerBump(HttpRequest *fakeRequest, StoreEntry *e, Ssl::BumpMode md):
-        request(fakeRequest),
-        sslErrors(NULL),
-        step(bumpStep1)
+    request(fakeRequest),
+    sslErrors(NULL),
+    step(bumpStep1)
 {
     debugs(33, 4, HERE << "will peek at " << request->GetHost() << ':' << request->port);
     act.step1 = md;
diff --git a/src/ssl/ServerBump.h b/src/ssl/ServerBump.h
index 6276e6b245..2bfe871fb9 100644
--- a/src/ssl/ServerBump.h
+++ b/src/ssl/ServerBump.h
@@ -52,3 +52,4 @@ private:
 } // namespace Ssl
 
 #endif
+
diff --git a/src/ssl/bio.cc b/src/ssl/bio.cc
index 6d37124032..b04616bdfc 100644
--- a/src/ssl/bio.cc
+++ b/src/ssl/bio.cc
@@ -605,16 +605,16 @@ squid_bio_ctrl(BIO *table, int cmd, long arg1, void *arg2)
         }
         return 0;
 
-        /*  we may also need to implement these:
-            case BIO_CTRL_RESET:
-            case BIO_C_FILE_SEEK:
-            case BIO_C_FILE_TELL:
-            case BIO_CTRL_INFO:
-            case BIO_CTRL_GET_CLOSE:
-            case BIO_CTRL_SET_CLOSE:
-            case BIO_CTRL_PENDING:
-            case BIO_CTRL_WPENDING:
-        */
+    /*  we may also need to implement these:
+        case BIO_CTRL_RESET:
+        case BIO_C_FILE_SEEK:
+        case BIO_C_FILE_TELL:
+        case BIO_CTRL_INFO:
+        case BIO_CTRL_GET_CLOSE:
+        case BIO_CTRL_SET_CLOSE:
+        case BIO_CTRL_PENDING:
+        case BIO_CTRL_WPENDING:
+    */
     default:
         return 0;
 
@@ -935,3 +935,4 @@ Ssl::Bio::sslFeatures::print(std::ostream &os) const
 }
 
 #endif /* USE_SSL */
+
diff --git a/src/ssl/bio.h b/src/ssl/bio.h
index 762cb33b1e..a2a7df8285 100644
--- a/src/ssl/bio.h
+++ b/src/ssl/bio.h
@@ -200,3 +200,4 @@ std::ostream &operator <<(std::ostream &os, Ssl::Bio::sslFeatures const &f)
 } // namespace Ssl
 
 #endif /* SQUID_SSL_BIO_H */
+
diff --git a/src/ssl/cert_validate_message.cc b/src/ssl/cert_validate_message.cc
index d9037aa5e4..a9f41533c6 100644
--- a/src/ssl/cert_validate_message.cc
+++ b/src/ssl/cert_validate_message.cc
@@ -240,3 +240,4 @@ const std::string Ssl::CertValidationMsg::param_error_reason("error_reason_");
 const std::string Ssl::CertValidationMsg::param_error_cert("error_cert_");
 const std::string Ssl::CertValidationMsg::param_proto_version("proto_version");
 const std::string Ssl::CertValidationMsg::param_cipher("cipher");
+
diff --git a/src/ssl/cert_validate_message.h b/src/ssl/cert_validate_message.h
index 7578415ba0..e29e4a5877 100644
--- a/src/ssl/cert_validate_message.h
+++ b/src/ssl/cert_validate_message.h
@@ -122,3 +122,4 @@ public:
 }//namespace Ssl
 
 #endif // SQUID_SSL_CERT_VALIDATE_MESSAGE_H
+
diff --git a/src/ssl/certificate_db.cc b/src/ssl/certificate_db.cc
index d144d34ead..f495ef153c 100644
--- a/src/ssl/certificate_db.cc
+++ b/src/ssl/certificate_db.cc
@@ -25,11 +25,11 @@
 #define HERE "(ssl_crtd) " << __FILE__ << ':' << __LINE__ << ": "
 
 Ssl::Lock::Lock(std::string const &aFilename) :
-        filename(aFilename),
+    filename(aFilename),
 #if _SQUID_WINDOWS_
-        hFile(INVALID_HANDLE_VALUE)
+    hFile(INVALID_HANDLE_VALUE)
 #else
-        fd(-1)
+    fd(-1)
 #endif
 {
 }
@@ -89,7 +89,7 @@ Ssl::Lock::~Lock()
 }
 
 Ssl::Locker::Locker(Lock &aLock, const char *aFileName, int aLineNo):
-        weLocked(false), lock(aLock), fileName(aFileName), lineNo(aLineNo)
+    weLocked(false), lock(aLock), fileName(aFileName), lineNo(aLineNo)
 {
     if (!lock.locked()) {
         lock.lock();
@@ -104,7 +104,7 @@ Ssl::Locker::~Locker()
 }
 
 Ssl::CertificateDb::Row::Row()
-        :   width(cnlNumber)
+    :   width(cnlNumber)
 {
     row = (char **)OPENSSL_malloc(sizeof(char *) * (width + 1));
     for (size_t i = 0; i < width + 1; ++i)
@@ -200,7 +200,7 @@ void Ssl::CertificateDb::sq_TXT_DB_delete_row(TXT_DB *db, int idx) {
 
     Row row(rrow, cnlNumber); // row wrapper used to free the rrow
 
-    const Columns db_indexes[]={cnlSerial, cnlName};
+    const Columns db_indexes[]= {cnlSerial, cnlName};
     for (unsigned int i = 0; i < countof(db_indexes); ++i) {
         void *data = NULL;
 #if SQUID_SSLTXTDB_PSTRINGDATA
@@ -242,15 +242,15 @@ const std::string Ssl::CertificateDb::cert_dir("certs");
 const std::string Ssl::CertificateDb::size_file("size");
 
 Ssl::CertificateDb::CertificateDb(std::string const & aDb_path, size_t aMax_db_size, size_t aFs_block_size)
-        :  db_path(aDb_path),
-        db_full(aDb_path + "/" + db_file),
-        cert_full(aDb_path + "/" + cert_dir),
-        size_full(aDb_path + "/" + size_file),
-        db(NULL),
-        max_db_size(aMax_db_size),
-        fs_block_size((aFs_block_size ? aFs_block_size : 2048)),
-        dbLock(db_full),
-        enabled_disk_store(true) {
+    :  db_path(aDb_path),
+       db_full(aDb_path + "/" + db_file),
+       cert_full(aDb_path + "/" + cert_dir),
+       size_full(aDb_path + "/" + size_file),
+       db(NULL),
+       max_db_size(aMax_db_size),
+       fs_block_size((aFs_block_size ? aFs_block_size : 2048)),
+       dbLock(db_full),
+       enabled_disk_store(true) {
     if (db_path.empty() && !max_db_size)
         enabled_disk_store = false;
     else if ((db_path.empty() && max_db_size) || (!db_path.empty() && !max_db_size))
@@ -408,7 +408,7 @@ size_t Ssl::CertificateDb::rebuildSize()
 #endif
         const std::string filename(cert_full + "/" + current_row[cnlSerial] + ".pem");
         const size_t fSize = getFileSize(filename);
-        dbSize += fSize;        
+        dbSize += fSize;
     }
     writeSize(dbSize);
     return dbSize;
@@ -607,3 +607,4 @@ bool Ssl::CertificateDb::deleteByHostname(std::string const & host) {
 bool Ssl::CertificateDb::IsEnabledDiskStore() const {
     return enabled_disk_store;
 }
+
diff --git a/src/ssl/certificate_db.h b/src/ssl/certificate_db.h
index ac0f38c899..00064637f9 100644
--- a/src/ssl/certificate_db.h
+++ b/src/ssl/certificate_db.h
@@ -185,3 +185,4 @@ private:
 
 } // namespace Ssl
 #endif // SQUID_SSL_CERTIFICATE_DB_H
+
diff --git a/src/ssl/context_storage.cc b/src/ssl/context_storage.cc
index f01e5899ca..1ba3176acc 100644
--- a/src/ssl/context_storage.cc
+++ b/src/ssl/context_storage.cc
@@ -18,7 +18,7 @@
 #endif
 
 Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &aCmd)
-        :   Mgr::Action(aCmd)
+    :   Mgr::Action(aCmd)
 {}
 
 Ssl::CertificateStorageAction::Pointer
@@ -54,7 +54,7 @@ void Ssl::CertificateStorageAction::dump (StoreEntry *sentry)
 ///////////////////////////////////////////////////////
 
 Ssl::GlobalContextStorage::GlobalContextStorage()
-        :   reconfiguring(true)
+    :   reconfiguring(true)
 {
     RegisterAction("cached_ssl_cert", "Statistic of cached generated ssl certificates", &CertificateStorageAction::Create, 0, 1);
 }
@@ -115,3 +115,4 @@ void Ssl::GlobalContextStorage::reconfigureFinish()
 }
 
 Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage;
+
diff --git a/src/ssl/context_storage.h b/src/ssl/context_storage.h
index a495726a41..0330d16695 100644
--- a/src/ssl/context_storage.h
+++ b/src/ssl/context_storage.h
@@ -78,3 +78,4 @@ extern GlobalContextStorage TheGlobalContextStorage;
 #endif // USE_OPENSSL
 
 #endif // SQUID_SSL_CONTEXT_STORAGE_H
+
diff --git a/src/ssl/crtd_message.cc b/src/ssl/crtd_message.cc
index 25b983c967..f2b73a57bc 100644
--- a/src/ssl/crtd_message.cc
+++ b/src/ssl/crtd_message.cc
@@ -15,7 +15,7 @@
 #include 
 
 Ssl::CrtdMessage::CrtdMessage(MessageKind kind)
-        :   body_size(0), state(kind == REPLY ? BEFORE_LENGTH: BEFORE_CODE)
+    :   body_size(0), state(kind == REPLY ? BEFORE_LENGTH: BEFORE_CODE)
 {}
 
 Ssl::CrtdMessage::ParseResult Ssl::CrtdMessage::parse(const char * buffer, size_t len)
@@ -268,3 +268,4 @@ const std::string Ssl::CrtdMessage::param_SetValidBefore(Ssl::CertAdaptAlgorithm
 const std::string Ssl::CrtdMessage::param_SetCommonName(Ssl::CertAdaptAlgorithmStr[algSetCommonName]);
 const std::string Ssl::CrtdMessage::param_Sign("Sign");
 const std::string Ssl::CrtdMessage::param_SignHash("SignHash");
+
diff --git a/src/ssl/crtd_message.h b/src/ssl/crtd_message.h
index d730d88e44..409f8c3ba8 100644
--- a/src/ssl/crtd_message.h
+++ b/src/ssl/crtd_message.h
@@ -106,3 +106,4 @@ protected:
 } //namespace Ssl
 
 #endif // SQUID_SSL_CRTD_MESSAGE_H
+
diff --git a/src/ssl/gadgets.cc b/src/ssl/gadgets.cc
index ca2373eeb5..3636acbd94 100644
--- a/src/ssl/gadgets.cc
+++ b/src/ssl/gadgets.cc
@@ -218,11 +218,11 @@ const char *Ssl::CertAdaptAlgorithmStr[] = {
 };
 
 Ssl::CertificateProperties::CertificateProperties():
-        setValidAfter(false),
-        setValidBefore(false),
-        setCommonName(false),
-        signAlgorithm(Ssl::algSignEnd),
-        signHash(NULL)
+    setValidAfter(false),
+    setValidBefore(false),
+    setCommonName(false),
+    signAlgorithm(Ssl::algSignEnd),
+    signHash(NULL)
 {}
 
 std::string & Ssl::CertificateProperties::dbKey() const
@@ -318,7 +318,7 @@ mimicExtensions(Ssl::X509_Pointer & cert, Ssl::X509_Pointer const & mimicCert)
                     assert(method && method->it);
                     unsigned char *ext_der = NULL;
                     int ext_len = ASN1_item_i2d((ASN1_VALUE *)keyusage,
-                                                &ext_der, 
+                                                &ext_der,
                                                 (const ASN1_ITEM *)ASN1_ITEM_ptr(method->it));
 
                     ASN1_OCTET_STRING *ext_oct = M_ASN1_OCTET_STRING_new();
diff --git a/src/ssl/gadgets.h b/src/ssl/gadgets.h
index 75a0c47044..ef7e46460d 100644
--- a/src/ssl/gadgets.h
+++ b/src/ssl/gadgets.h
@@ -301,3 +301,4 @@ const char *getOrganization(X509 *x509);
 
 } // namespace Ssl
 #endif // SQUID_SSL_GADGETS_H
+
diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc
index 81859c353e..c39ffd86f7 100644
--- a/src/ssl/helper.cc
+++ b/src/ssl/helper.cc
@@ -278,3 +278,4 @@ void Ssl::CertValidationHelper::sslSubmit(Ssl::CertValidationRequest const &requ
         return;
     }
 }
+
diff --git a/src/ssl/helper.h b/src/ssl/helper.h
index 45d1194724..3eb772c87b 100644
--- a/src/ssl/helper.h
+++ b/src/ssl/helper.h
@@ -60,3 +60,4 @@ public:
 
 } //namespace Ssl
 #endif // SQUID_SSL_HELPER_H
+
diff --git a/src/ssl/ssl_crtd.cc b/src/ssl/ssl_crtd.cc
index 24da4ce92f..0308e84d09 100644
--- a/src/ssl/ssl_crtd.cc
+++ b/src/ssl/ssl_crtd.cc
@@ -326,3 +326,4 @@ int main(int argc, char *argv[])
     }
     return 0;
 }
+
diff --git a/src/ssl/stub_libsslutil.cc b/src/ssl/stub_libsslutil.cc
index 0c0b4dfff6..4aabb68f1d 100644
--- a/src/ssl/stub_libsslutil.cc
+++ b/src/ssl/stub_libsslutil.cc
@@ -45,3 +45,4 @@ Ssl::Helper * Ssl::Helper::GetInstance() STUB_RETVAL(NULL)
 void Ssl::Helper::Init() STUB
 void Ssl::Helper::Shutdown() STUB
 void Ssl::Helper::sslSubmit(Ssl::CrtdMessage const & message, HLPCB * callback, void *data) STUB
+
diff --git a/src/ssl/support.cc b/src/ssl/support.cc
index bd9595bbf1..efb5c7ac45 100644
--- a/src/ssl/support.cc
+++ b/src/ssl/support.cc
@@ -522,7 +522,7 @@ Ssl::parse_options(const char *options)
             value = strtol(option + 2, NULL, 16);
         } else {
             fatalf("Unknown SSL option '%s'", option);
-            value = 0;		/* Keep GCC happy */
+            value = 0;      /* Keep GCC happy */
         }
 
         switch (mode) {
@@ -550,19 +550,19 @@ no_options:
 }
 
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_NO_DEFAULT_CA		(1<<0)
+#define SSL_FLAG_NO_DEFAULT_CA      (1<<0)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_DELAYED_AUTH		(1<<1)
+#define SSL_FLAG_DELAYED_AUTH       (1<<1)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_DONT_VERIFY_PEER	(1<<2)
+#define SSL_FLAG_DONT_VERIFY_PEER   (1<<2)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_DONT_VERIFY_DOMAIN	(1<<3)
+#define SSL_FLAG_DONT_VERIFY_DOMAIN (1<<3)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_NO_SESSION_REUSE	(1<<4)
+#define SSL_FLAG_NO_SESSION_REUSE   (1<<4)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_VERIFY_CRL		(1<<5)
+#define SSL_FLAG_VERIFY_CRL     (1<<5)
 /// \ingroup ServerProtocolSSLInternal
-#define SSL_FLAG_VERIFY_CRL_ALL		(1<<6)
+#define SSL_FLAG_VERIFY_CRL_ALL     (1<<6)
 
 /// \ingroup ServerProtocolSSLInternal
 long
@@ -2001,3 +2001,4 @@ SharedSessionCacheRr::~SharedSessionCacheRr()
 }
 
 #endif /* USE_OPENSSL */
+
diff --git a/src/ssl/support.h b/src/ssl/support.h
index bb70fabfe6..6d5326bd87 100644
--- a/src/ssl/support.h
+++ b/src/ssl/support.h
@@ -342,3 +342,4 @@ int SSL_set_fd(SSL *ssl, int fd)
 #endif /* _SQUID_WINDOWS_ */
 
 #endif /* SQUID_SSL_SUPPORT_H */
+
diff --git a/src/stat.cc b/src/stat.cc
index 2d3f3cc8de..5d7b8743ac 100644
--- a/src/stat.cc
+++ b/src/stat.cc
@@ -1351,7 +1351,7 @@ statCountersInitSpecial(StatCounters * C)
     C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
     C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
     C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
-    C->select_fds_hist.enumInit(256);	/* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
+    C->select_fds_hist.enumInit(256);   /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
 }
 
 /* add special cases here as they arrive */
@@ -1919,22 +1919,22 @@ statClientRequests(StoreEntry * s)
 
 #define GRAPH_PER_MIN(Y) \
     for (i=0;i<(N_COUNT_HIST-2);++i) { \
-	dt = tvSubDsec(CountHist[i+1].timestamp, CountHist[i].timestamp); \
-	if (dt <= 0.0) \
-	    break; \
-	storeAppendPrintf(e, "%lu,%0.2f:", \
-	    CountHist[i].timestamp.tv_sec, \
-	    ((CountHist[i].Y - CountHist[i+1].Y) / dt)); \
+    dt = tvSubDsec(CountHist[i+1].timestamp, CountHist[i].timestamp); \
+    if (dt <= 0.0) \
+        break; \
+    storeAppendPrintf(e, "%lu,%0.2f:", \
+        CountHist[i].timestamp.tv_sec, \
+        ((CountHist[i].Y - CountHist[i+1].Y) / dt)); \
     }
 
 #define GRAPH_PER_HOUR(Y) \
     for (i=0;i<(N_COUNT_HOUR_HIST-2);++i) { \
-	dt = tvSubDsec(CountHourHist[i+1].timestamp, CountHourHist[i].timestamp); \
-	if (dt <= 0.0) \
-	    break; \
-	storeAppendPrintf(e, "%lu,%0.2f:", \
-	    CountHourHist[i].timestamp.tv_sec, \
-	    ((CountHourHist[i].Y - CountHourHist[i+1].Y) / dt)); \
+    dt = tvSubDsec(CountHourHist[i+1].timestamp, CountHourHist[i].timestamp); \
+    if (dt <= 0.0) \
+        break; \
+    storeAppendPrintf(e, "%lu,%0.2f:", \
+        CountHourHist[i].timestamp.tv_sec, \
+        ((CountHourHist[i].Y - CountHourHist[i+1].Y) / dt)); \
     }
 
 #define GRAPH_TITLE(X,Y) storeAppendPrintf(e,"%s\t%s\t",X,Y);
@@ -2001,3 +2001,4 @@ statMemoryAccounted(void)
 {
     return memPoolsTotalAllocated();
 }
+
diff --git a/src/stat.h b/src/stat.h
index 7cfadd61ae..e27b77af02 100644
--- a/src/stat.h
+++ b/src/stat.h
@@ -26,3 +26,4 @@ class StatCounters;
 StatCounters *snmpStatGet(int);
 
 #endif /* SQUID_STAT_H_ */
+
diff --git a/src/stmem.cc b/src/stmem.cc
index 54d4440822..367801018d 100644
--- a/src/stmem.cc
+++ b/src/stmem.cc
@@ -425,3 +425,4 @@ mem_hdr::getNodes() const
 {
     return nodes;
 }
+
diff --git a/src/stmem.h b/src/stmem.h
index 6cf7dbc5d7..4d90252ae3 100644
--- a/src/stmem.h
+++ b/src/stmem.h
@@ -61,3 +61,4 @@ private:
 };
 
 #endif /* SQUID_STMEM_H */
+
diff --git a/src/store.cc b/src/store.cc
index 828da3e027..05877e0959 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -358,21 +358,21 @@ StoreEntry::storeClientType() const
 }
 
 StoreEntry::StoreEntry() :
-        mem_obj(NULL),
-        timestamp(-1),
-        lastref(-1),
-        expires(-1),
-        lastmod(-1),
-        swap_file_sz(0),
-        refcount(0),
-        flags(0),
-        swap_filen(-1),
-        swap_dirn(-1),
-        mem_status(NOT_IN_MEMORY),
-        ping_status(PING_NONE),
-        store_status(STORE_PENDING),
-        swap_status(SWAPOUT_NONE),
-        lock_count(0)
+    mem_obj(NULL),
+    timestamp(-1),
+    lastref(-1),
+    expires(-1),
+    lastmod(-1),
+    swap_file_sz(0),
+    refcount(0),
+    flags(0),
+    swap_filen(-1),
+    swap_dirn(-1),
+    mem_status(NOT_IN_MEMORY),
+    ping_status(PING_NONE),
+    store_status(STORE_PENDING),
+    swap_status(SWAPOUT_NONE),
+    lock_count(0)
 {
     debugs(20, 5, "StoreEntry constructed, this=" << this);
 }
@@ -2173,3 +2173,4 @@ NullStoreEntry::getSerialisedMetaData()
 {
     return NULL;
 }
+
diff --git a/src/store_client.cc b/src/store_client.cc
index 472c2f23b5..889be3a013 100644
--- a/src/store_client.cc
+++ b/src/store_client.cc
@@ -30,9 +30,9 @@
 
 /*
  * NOTE: 'Header' refers to the swapfile metadata header.
- * 	 'OBJHeader' refers to the object header, with cannonical
- *	 processed object headers (which may derive from FTP/HTTP etc
- *	 upstream protocols
+ *   'OBJHeader' refers to the object header, with cannonical
+ *   processed object headers (which may derive from FTP/HTTP etc
+ *   upstream protocols
  *       'Body' refers to the swapfile body, which is the full
  *        HTTP reply (including HTTP headers and body).
  */
@@ -148,10 +148,10 @@ storeClientCopyEvent(void *data)
 
 store_client::store_client(StoreEntry *e) : entry (e)
 #if USE_DELAY_POOLS
-        , delayId()
+    , delayId()
 #endif
-        , type (e->storeClientType())
-        ,  object_ok(true)
+    , type (e->storeClientType())
+    ,  object_ok(true)
 {
     cmp_offset = 0;
     flags.disk_io_pending = false;
@@ -894,3 +894,4 @@ store_client::setDelayId(DelayId delay_id)
     delayId = delay_id;
 }
 #endif
+
diff --git a/src/store_digest.cc b/src/store_digest.cc
index 9a79e1fe37..93e2ee83e1 100644
--- a/src/store_digest.cc
+++ b/src/store_digest.cc
@@ -46,8 +46,8 @@ class StoreDigestState
 
 public:
     StoreDigestCBlock cblock;
-    int rebuild_lock;		/* bucket number */
-    StoreEntry * rewrite_lock;	/* points to store entry with the digest */
+    int rebuild_lock;       /* bucket number */
+    StoreEntry * rewrite_lock;  /* points to store entry with the digest */
     StoreSearchPointer theSearch;
     int rewrite_offset;
     int rebuild_count;
@@ -55,12 +55,12 @@ public:
 };
 
 typedef struct {
-    int del_count;		/* #store entries deleted from store_digest */
-    int del_lost_count;		/* #store entries not found in store_digest on delete */
-    int add_count;		/* #store entries accepted to store_digest */
-    int add_coll_count;		/* #accepted entries that collided with existing ones */
-    int rej_count;		/* #store entries not accepted to store_digest */
-    int rej_coll_count;		/* #not accepted entries that collided with existing ones */
+    int del_count;      /* #store entries deleted from store_digest */
+    int del_lost_count;     /* #store entries not found in store_digest on delete */
+    int add_count;      /* #store entries accepted to store_digest */
+    int add_coll_count;     /* #accepted entries that collided with existing ones */
+    int rej_count;      /* #store entries not accepted to store_digest */
+    int rej_coll_count;     /* #not accepted entries that collided with existing ones */
 } StoreDigestStats;
 
 /* local vars */
@@ -301,7 +301,7 @@ storeDigestRebuildResume(void)
     /* resize or clear */
 
     if (!storeDigestResize())
-        cacheDigestClear(store_digest);		/* not clean()! */
+        cacheDigestClear(store_digest);     /* not clean()! */
 
     memset(&sd_stats, 0, sizeof(sd_stats));
 
@@ -524,3 +524,4 @@ storeDigestResize(void)
 }
 
 #endif /* USE_CACHE_DIGESTS */
+
diff --git a/src/store_digest.h b/src/store_digest.h
index d503b46c41..eb34396348 100644
--- a/src/store_digest.h
+++ b/src/store_digest.h
@@ -19,3 +19,4 @@ void storeDigestDel(const StoreEntry * entry);
 void storeDigestReport(StoreEntry *);
 
 #endif /* SQUID_STORE_DIGEST_H_ */
+
diff --git a/src/store_dir.cc b/src/store_dir.cc
index 3a54bf0d00..48b73d2f43 100644
--- a/src/store_dir.cc
+++ b/src/store_dir.cc
@@ -46,7 +46,7 @@ static STDIRSELECT storeDirSelectSwapDirLeastLoad;
 int StoreController::store_dirs_rebuilding = 1;
 
 StoreController::StoreController() : swapDir (new StoreHashIndex())
-        , memStore(NULL), transients(NULL)
+    , memStore(NULL), transients(NULL)
 {}
 
 StoreController::~StoreController()
@@ -1272,11 +1272,11 @@ StoreHashIndex::search(String const url, HttpRequest *)
 CBDATA_CLASS_INIT(StoreSearchHashIndex);
 
 StoreSearchHashIndex::StoreSearchHashIndex(RefCount aSwapDir) :
-        sd(aSwapDir),
-        callback(NULL),
-        cbdata(NULL),
-        _done(false),
-        bucket(0)
+    sd(aSwapDir),
+    callback(NULL),
+    cbdata(NULL),
+    _done(false),
+    bucket(0)
 {}
 
 /* do not link
@@ -1347,3 +1347,4 @@ StoreSearchHashIndex::copyBucket()
     ++bucket;
     debugs(47,3, "got entries: " << entries.size());
 }
+
diff --git a/src/store_io.cc b/src/store_io.cc
index e5b00c3c4a..e4f25748d1 100644
--- a/src/store_io.cc
+++ b/src/store_io.cc
@@ -88,3 +88,4 @@ storeIOWrite(StoreIOState::Pointer sio, char const *buf, size_t size, off_t offs
 {
     sio->write(buf,size,offset,free_func);
 }
+
diff --git a/src/store_key_md5.cc b/src/store_key_md5.cc
index 0e636b1190..24659ee499 100644
--- a/src/store_key_md5.cc
+++ b/src/store_key_md5.cc
@@ -180,3 +180,4 @@ storeKeyInit(void)
 {
     memset(null_key, '\0', SQUID_MD5_DIGEST_LENGTH);
 }
+
diff --git a/src/store_key_md5.h b/src/store_key_md5.h
index 60cd88cc17..9666841887 100644
--- a/src/store_key_md5.h
+++ b/src/store_key_md5.h
@@ -34,3 +34,4 @@ extern HASHHASH storeKeyHashHash;
 extern HASHCMP storeKeyHashCmp;
 
 #endif /* SQUID_STORE_KEY_MD5_H_ */
+
diff --git a/src/store_log.cc b/src/store_log.cc
index 81c8186009..bca660da97 100644
--- a/src/store_log.cc
+++ b/src/store_log.cc
@@ -139,3 +139,4 @@ storeLogTagsHist(StoreEntry *e)
                           storeLogTagsCounts[tag]);
     }
 }
+
diff --git a/src/store_log.h b/src/store_log.h
index 0e032b3246..921ae0411f 100644
--- a/src/store_log.h
+++ b/src/store_log.h
@@ -19,3 +19,4 @@ void storeLogClose(void);
 void storeLogOpen(void);
 
 #endif /* SQUID_STORE_LOG_H_ */
+
diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc
index 631e27a1f2..f39a56f286 100644
--- a/src/store_rebuild.cc
+++ b/src/store_rebuild.cc
@@ -399,10 +399,11 @@ storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key, StoreRebuild
         } else {
             /* URL already exists, this swapfile not being used */
             /* junk old, load new */
-            e->release();	/* release old entry */
+            e->release();   /* release old entry */
             ++stats.dupcount;
         }
     }
 
     return true;
 }
+
diff --git a/src/store_rebuild.h b/src/store_rebuild.h
index c774b0853d..7a41e7873c 100644
--- a/src/store_rebuild.h
+++ b/src/store_rebuild.h
@@ -39,3 +39,4 @@ bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, StoreReb
 bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, StoreRebuildData &counts);
 
 #endif /* SQUID_STORE_REBUILD_H_ */
+
diff --git a/src/store_swapin.cc b/src/store_swapin.cc
index 584e4ee320..39a4e33f91 100644
--- a/src/store_swapin.cc
+++ b/src/store_swapin.cc
@@ -79,3 +79,4 @@ storeSwapInFileNotify(void *data, int errflag, StoreIOState::Pointer self)
     e->swap_filen = sc->swapin_sio->swap_filen;
     e->swap_dirn = sc->swapin_sio->swap_dirn;
 }
+
diff --git a/src/store_swapin.h b/src/store_swapin.h
index e1592b1b3f..e0e6ce4f98 100644
--- a/src/store_swapin.h
+++ b/src/store_swapin.h
@@ -15,3 +15,4 @@ class store_client;
 void storeSwapInStart(store_client *);
 
 #endif /* SQUID_STORE_SWAPIN_H_ */
+
diff --git a/src/store_swapmeta.cc b/src/store_swapmeta.cc
index 727e4063d4..df5b39ebe9 100644
--- a/src/store_swapmeta.cc
+++ b/src/store_swapmeta.cc
@@ -37,7 +37,7 @@ storeSwapTLVFree(tlv * n)
 tlv *
 storeSwapMetaBuild(StoreEntry * e)
 {
-    tlv *TLV = NULL;		/* we'll return this */
+    tlv *TLV = NULL;        /* we'll return this */
     tlv **T = &TLV;
     const char *url;
     const char *vary;
@@ -111,8 +111,8 @@ storeSwapMetaPack(tlv * tlv_list, int *length)
     int j = 0;
     char *buf;
     assert(length != NULL);
-    ++buflen;			/* STORE_META_OK */
-    buflen += sizeof(int);	/* size of header to follow */
+    ++buflen;           /* STORE_META_OK */
+    buflen += sizeof(int);  /* size of header to follow */
 
     for (t = tlv_list; t; t = t->next)
         buflen += sizeof(char) + sizeof(int) + t->length;
@@ -139,3 +139,4 @@ storeSwapMetaPack(tlv * tlv_list, int *length)
     *length = buflen;
     return buf;
 }
+
diff --git a/src/store_swapout.cc b/src/store_swapout.cc
index c5648c69cc..931338b9ac 100644
--- a/src/store_swapout.cc
+++ b/src/store_swapout.cc
@@ -445,3 +445,4 @@ StoreEntry::mayStartSwapOut()
     swapOutDecision(MemObject::SwapOut::swPossible);
     return true;
 }
+
diff --git a/src/swap_log_op.h b/src/swap_log_op.h
index b0a3f64203..4cbae19c5d 100644
--- a/src/swap_log_op.h
+++ b/src/swap_log_op.h
@@ -20,3 +20,4 @@ typedef enum {
 extern const char *swap_log_op_str[];
 
 #endif /* _SQUID_SWAP_LOG_OP_H */
+
diff --git a/src/test_cache_digest.cc b/src/test_cache_digest.cc
index 70667a8dfc..658299bd9c 100644
--- a/src/test_cache_digest.cc
+++ b/src/test_cache_digest.cc
@@ -32,10 +32,10 @@ struct _Cache {
     CacheDigest *digest;
     Cache *peer;
     CacheQueryStats qstats;
-    int count;			/* #currently cached entries */
-    int req_count;		/* #requests to this cache */
-    int bad_add_count;		/* #duplicate adds */
-    int bad_del_count;		/* #dels with no prior add */
+    int count;          /* #currently cached entries */
+    int req_count;      /* #requests to this cache */
+    int bad_add_count;      /* #duplicate adds */
+    int bad_del_count;      /* #dels with no prior add */
 };
 
 typedef struct _CacheEntry {
@@ -51,7 +51,7 @@ typedef struct _CacheEntry {
 typedef struct {
     cache_key key[SQUID_MD5_DIGEST_LENGTH];
     time_t timestamp;
-    short int use_icp;		/* true/false */
+    short int use_icp;      /* true/false */
 } RawAccessLogEntry;
 
 typedef enum {
@@ -64,17 +64,17 @@ typedef fr_result(*FI_READER) (FileIterator * fi);
 struct _FileIterator {
     const char *fname;
     FILE *file;
-    time_t inner_time;		/* timestamp of the current entry */
-    time_t time_offset;		/* to adjust time set by reader */
-    int line_count;		/* number of lines scanned */
-    int bad_line_count;		/* number of parsing errors */
-    int time_warp_count;	/* number of out-of-order entries in the file */
-    FI_READER reader;		/* reads next entry and updates inner_time */
-    void *entry;		/* buffer for the current entry, freed with xfree() */
+    time_t inner_time;      /* timestamp of the current entry */
+    time_t time_offset;     /* to adjust time set by reader */
+    int line_count;     /* number of lines scanned */
+    int bad_line_count;     /* number of parsing errors */
+    int time_warp_count;    /* number of out-of-order entries in the file */
+    FI_READER reader;       /* reads next entry and updates inner_time */
+    void *entry;        /* buffer for the current entry, freed with xfree() */
 };
 
 /* globals */
-static time_t cur_time = -1;	/* timestamp of the current log entry */
+static time_t cur_time = -1;    /* timestamp of the current log entry */
 
 /* copied from url.c */
 static HttpRequestMethod
@@ -396,7 +396,7 @@ accessLogReader(FileIterator * fi)
     entry = (RawAccessLogEntry*)fi->entry;
 
     if (!fgets(buf, sizeof(buf), fi->file))
-        return frEof;		/* eof */
+        return frEof;       /* eof */
 
     entry->timestamp = fi->inner_time = (time_t) atoi(buf);
 
@@ -585,7 +585,7 @@ main(int argc, char *argv[])
     /* digest peer cache content */
     cacheResetDigest(them);
 
-    us->digest = cacheDigestClone(them->digest);	/* @netw@ */
+    us->digest = cacheDigestClone(them->digest);    /* @netw@ */
 
     /* shift the time in access log to match ready_time */
     fileIteratorSetCurTime(fis[0], ready_time);
@@ -639,3 +639,4 @@ main(int argc, char *argv[])
     cacheDestroy(us);
     return 0;
 }
+
diff --git a/src/tests/CapturingStoreEntry.h b/src/tests/CapturingStoreEntry.h
index e95a1c0fc8..0c3a4073f5 100644
--- a/src/tests/CapturingStoreEntry.h
+++ b/src/tests/CapturingStoreEntry.h
@@ -38,3 +38,4 @@ public:
 };
 
 #endif
+
diff --git a/src/tests/SBufFindTest.cc b/src/tests/SBufFindTest.cc
index 0761a96f87..68c42878ce 100644
--- a/src/tests/SBufFindTest.cc
+++ b/src/tests/SBufFindTest.cc
@@ -20,24 +20,24 @@
  */
 
 SBufFindTest::SBufFindTest():
-        caseLimit(std::numeric_limits::max()),
-        errorLimit(std::numeric_limits::max()),
-        randomSeed(1),
-        hushSimilar(true),
-        maxHayLength(40),
-        thePos(0),
-        thePlacement(placeEof),
-        theStringPos(0),
-        theBareNeedlePos(0),
-        theFindString(0),
-        theFindSBuf(0),
-        theReportFunc(),
-        theReportNeedle(),
-        theReportPos(),
-        theReportQuote('"'),
-        caseCount(0),
-        errorCount(0),
-        reportCount(0)
+    caseLimit(std::numeric_limits::max()),
+    errorLimit(std::numeric_limits::max()),
+    randomSeed(1),
+    hushSimilar(true),
+    maxHayLength(40),
+    thePos(0),
+    thePlacement(placeEof),
+    theStringPos(0),
+    theBareNeedlePos(0),
+    theFindString(0),
+    theFindSBuf(0),
+    theReportFunc(),
+    theReportNeedle(),
+    theReportPos(),
+    theReportQuote('"'),
+    caseCount(0),
+    errorCount(0),
+    reportCount(0)
 {
 }
 
@@ -452,3 +452,4 @@ SBufFindTest::placeNeedle(const SBuf &cleanHay)
         break;
     }
 }
+
diff --git a/src/tests/SBufFindTest.h b/src/tests/SBufFindTest.h
index e15ca88485..29c1155484 100644
--- a/src/tests/SBufFindTest.h
+++ b/src/tests/SBufFindTest.h
@@ -91,3 +91,4 @@ private:
 typedef SBufFindTest::Placement Placement;
 
 #endif
+
diff --git a/src/tests/STUB.h b/src/tests/STUB.h
index 9633b8a8fd..4d5489a3d7 100644
--- a/src/tests/STUB.h
+++ b/src/tests/STUB.h
@@ -59,3 +59,4 @@
 #define STUB_RETSTATREF(x) { stub_fatal(STUB_API " required"); static x v; return v; }
 
 #endif /* STUB */
+
diff --git a/src/tests/TestSwapDir.cc b/src/tests/TestSwapDir.cc
index c78c3824ef..10974a084c 100644
--- a/src/tests/TestSwapDir.cc
+++ b/src/tests/TestSwapDir.cc
@@ -75,3 +75,4 @@ TestSwapDir::search(String, HttpRequest *)
 {
     return NULL;
 }
+
diff --git a/src/tests/TestSwapDir.h b/src/tests/TestSwapDir.h
index 3a8aed44d3..2291db337f 100644
--- a/src/tests/TestSwapDir.h
+++ b/src/tests/TestSwapDir.h
@@ -38,3 +38,4 @@ public:
 typedef RefCount TestSwapDirPointer;
 
 #endif  /* TEST_TESTSWAPDIR */
+
diff --git a/src/tests/stub_CollapsedForwarding.cc b/src/tests/stub_CollapsedForwarding.cc
index bfa445d410..33db832f40 100644
--- a/src/tests/stub_CollapsedForwarding.cc
+++ b/src/tests/stub_CollapsedForwarding.cc
@@ -13,3 +13,4 @@
 #include "tests/STUB.h"
 
 void CollapsedForwarding::Broadcast(StoreEntry const&) STUB
+
diff --git a/src/tests/stub_CommIO.cc b/src/tests/stub_CommIO.cc
index 6ed75cb474..2a1f4cb598 100644
--- a/src/tests/stub_CommIO.cc
+++ b/src/tests/stub_CommIO.cc
@@ -22,3 +22,4 @@ void CommIO::Initialise() STUB
 void CommIO::NotifyIOClose() STUB
 void CommIO::NULLFDHandler(int, void *) STUB
 void CommIO::FlushPipe() STUB
+
diff --git a/src/tests/stub_DelayId.cc b/src/tests/stub_DelayId.cc
index 920542e33e..d24a10c80d 100644
--- a/src/tests/stub_DelayId.cc
+++ b/src/tests/stub_DelayId.cc
@@ -22,3 +22,4 @@ DelayId::~DelayId() {}
 void DelayId::delayRead(DeferredRead const&) STUB_NOP
 
 #endif /* USE_DELAY_POOLS */
+
diff --git a/src/tests/stub_DiskIOModule.cc b/src/tests/stub_DiskIOModule.cc
index f75ecb5e98..f9161bbb30 100644
--- a/src/tests/stub_DiskIOModule.cc
+++ b/src/tests/stub_DiskIOModule.cc
@@ -22,3 +22,4 @@ void DiskIOModule::PokeAllModules() STUB
 DiskIOModule *DiskIOModule::Find(char const *) STUB_RETVAL(NULL)
 DiskIOModule *DiskIOModule::FindDefault() STUB_RETVAL(NULL)
 std::vector const &DiskIOModule::Modules() STUB_RETSTATREF(std::vector)
+
diff --git a/src/tests/stub_EventLoop.cc b/src/tests/stub_EventLoop.cc
index da4177ac89..26a2fb3225 100644
--- a/src/tests/stub_EventLoop.cc
+++ b/src/tests/stub_EventLoop.cc
@@ -15,7 +15,8 @@
 EventLoop *EventLoop::Running = NULL;
 
 EventLoop::EventLoop(): errcount(0), last_loop(false), timeService(NULL),
-        primaryEngine(NULL), loop_delay(0), error(false), runOnceResult(false)
-        STUB_NOP
+    primaryEngine(NULL), loop_delay(0), error(false), runOnceResult(false)
+    STUB_NOP
+
+    void EventLoop::registerEngine(AsyncEngine *engine) STUB
 
-        void EventLoop::registerEngine(AsyncEngine *engine) STUB
diff --git a/src/tests/stub_HelperChildConfig.cc b/src/tests/stub_HelperChildConfig.cc
index d1ca3fc315..e979dc0dd5 100644
--- a/src/tests/stub_HelperChildConfig.cc
+++ b/src/tests/stub_HelperChildConfig.cc
@@ -16,25 +16,25 @@
 #include 
 
 Helper::ChildConfig::ChildConfig():
-        n_max(0),
-        n_startup(0),
-        n_idle(1),
-        concurrency(0),
-        n_running(0),
-        n_active(0),
-        queue_size(0),
-        defaultQueueSize(true)
+    n_max(0),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(0),
+    defaultQueueSize(true)
 {}
 
 Helper::ChildConfig::ChildConfig(const unsigned int m):
-        n_max(m),
-        n_startup(0),
-        n_idle(1),
-        concurrency(0),
-        n_running(0),
-        n_active(0),
-        queue_size(2 * m),
-        defaultQueueSize(true)
+    n_max(m),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(2 * m),
+    defaultQueueSize(true)
 {}
 
 int
@@ -51,3 +51,4 @@ Helper::ChildConfig::needNew() const
 }
 
 void Helper::ChildConfig::parseConfig() STUB
+
diff --git a/src/tests/stub_HttpReply.cc b/src/tests/stub_HttpReply.cc
index 31832547f3..d3da32fbc0 100644
--- a/src/tests/stub_HttpReply.cc
+++ b/src/tests/stub_HttpReply.cc
@@ -13,19 +13,20 @@
 #include "tests/STUB.h"
 
 HttpReply::HttpReply() : HttpMsg(hoReply), date (0), last_modified (0),
-        expires (0), surrogate_control (NULL), content_range (NULL), keep_alive (0),
-        protoPrefix("HTTP/"), do_clean(false), bodySizeMax(-2)
-        STUB_NOP
-        HttpReply::~HttpReply() STUB
-        void HttpReply::setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires_) STUB
-        void HttpReply::packHeadersInto(Packer * p) const STUB
-        void HttpReply::reset() STUB
-        void httpBodyPackInto(const HttpBody * body, Packer * p) STUB
-        bool HttpReply::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
-        int HttpReply::httpMsgParseError() STUB_RETVAL(0)
-        bool HttpReply::expectingBody(const HttpRequestMethod&, int64_t&) const STUB_RETVAL(false)
-        bool HttpReply::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
-        void HttpReply::hdrCacheInit() STUB
-        HttpReply * HttpReply::clone() const STUB_RETVAL(NULL)
-        bool HttpReply::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
-        int64_t HttpReply::bodySize(const HttpRequestMethod&) const STUB_RETVAL(0)
+    expires (0), surrogate_control (NULL), content_range (NULL), keep_alive (0),
+    protoPrefix("HTTP/"), do_clean(false), bodySizeMax(-2)
+    STUB_NOP
+    HttpReply::~HttpReply() STUB
+    void HttpReply::setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires_) STUB
+    void HttpReply::packHeadersInto(Packer * p) const STUB
+    void HttpReply::reset() STUB
+    void httpBodyPackInto(const HttpBody * body, Packer * p) STUB
+    bool HttpReply::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
+    int HttpReply::httpMsgParseError() STUB_RETVAL(0)
+    bool HttpReply::expectingBody(const HttpRequestMethod&, int64_t&) const STUB_RETVAL(false)
+    bool HttpReply::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
+    void HttpReply::hdrCacheInit() STUB
+    HttpReply * HttpReply::clone() const STUB_RETVAL(NULL)
+    bool HttpReply::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
+    int64_t HttpReply::bodySize(const HttpRequestMethod&) const STUB_RETVAL(0)
+
diff --git a/src/tests/stub_HttpRequest.cc b/src/tests/stub_HttpRequest.cc
index ce1ec71af2..ae7f3f7d05 100644
--- a/src/tests/stub_HttpRequest.cc
+++ b/src/tests/stub_HttpRequest.cc
@@ -14,16 +14,17 @@
 #include "tests/STUB.h"
 
 HttpRequest::HttpRequest() : HttpMsg(hoRequest) STUB
-        HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath) : HttpMsg(hoRequest) STUB
-        HttpRequest::~HttpRequest() STUB
-        void HttpRequest::packFirstLineInto(Packer * p, bool full_uri) const STUB
-        bool HttpRequest::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
-        void HttpRequest::hdrCacheInit() STUB
-        void HttpRequest::reset() STUB
-        bool HttpRequest::expectingBody(const HttpRequestMethod& unused, int64_t&) const STUB_RETVAL(false)
-        void HttpRequest::initHTTP(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath) STUB
-        bool HttpRequest::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
-        HttpRequest * HttpRequest::clone() const STUB_RETVAL(NULL)
-        bool HttpRequest::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
-        int64_t HttpRequest::getRangeOffsetLimit() STUB_RETVAL(0)
-        const char *HttpRequest::storeId() STUB_RETVAL(".")
+    HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath) : HttpMsg(hoRequest) STUB
+    HttpRequest::~HttpRequest() STUB
+    void HttpRequest::packFirstLineInto(Packer * p, bool full_uri) const STUB
+    bool HttpRequest::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
+    void HttpRequest::hdrCacheInit() STUB
+    void HttpRequest::reset() STUB
+    bool HttpRequest::expectingBody(const HttpRequestMethod& unused, int64_t&) const STUB_RETVAL(false)
+    void HttpRequest::initHTTP(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath) STUB
+    bool HttpRequest::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
+    HttpRequest * HttpRequest::clone() const STUB_RETVAL(NULL)
+    bool HttpRequest::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
+    int64_t HttpRequest::getRangeOffsetLimit() STUB_RETVAL(0)
+    const char *HttpRequest::storeId() STUB_RETVAL(".")
+
diff --git a/src/tests/stub_MemBuf.cc b/src/tests/stub_MemBuf.cc
index 66c8e95d2a..be0f17e21c 100644
--- a/src/tests/stub_MemBuf.cc
+++ b/src/tests/stub_MemBuf.cc
@@ -30,3 +30,4 @@ FREE *MemBuf::freeFunc() STUB_RETVAL(NULL)
 
 void memBufReport(MemBuf * mb) STUB
 void packerToMemInit(Packer * p, MemBuf * mb) STUB
+
diff --git a/src/tests/stub_MemObject.cc b/src/tests/stub_MemObject.cc
index ec69428ea3..c892d24168 100644
--- a/src/tests/stub_MemObject.cc
+++ b/src/tests/stub_MemObject.cc
@@ -30,16 +30,16 @@ void MemObject::trimSwappable() STUB
 void MemObject::trimUnSwappable() STUB
 int64_t MemObject::policyLowestOffsetToKeep(bool swap) const STUB_RETVAL(-1)
 MemObject::MemObject() :
-        inmem_lo(0),
-        nclients(0),
-        request(NULL),
-        ping_reply_callback(NULL),
-        ircb_data(NULL),
-        id(0),
-        object_sz(-1),
-        swap_hdr_sz(0),
-        vary_headers(NULL),
-        _reply(NULL)
+    inmem_lo(0),
+    nclients(0),
+    request(NULL),
+    ping_reply_callback(NULL),
+    ircb_data(NULL),
+    id(0),
+    object_sz(-1),
+    swap_hdr_sz(0),
+    vary_headers(NULL),
+    _reply(NULL)
 {
     memset(&clients, 0, sizeof(clients));
     memset(&start_ping, 0, sizeof(start_ping));
@@ -74,3 +74,4 @@ int64_t MemObject::expectedReplySize() const STUB_RETVAL(0)
 void MemObject::markEndOfReplyHeaders() STUB
 size_t MemObject::inUseCount() STUB_RETVAL(0)
 int64_t MemObject::availableForSwapOut() const STUB_RETVAL(0)
+
diff --git a/src/tests/stub_MemStore.cc b/src/tests/stub_MemStore.cc
index 6ede2718e6..37ad4cc5c7 100644
--- a/src/tests/stub_MemStore.cc
+++ b/src/tests/stub_MemStore.cc
@@ -40,3 +40,4 @@ bool MemStore::dereference(StoreEntry &, bool) STUB_RETVAL(false)
 void MemStore::markForUnlink(StoreEntry&) STUB
 bool MemStore::anchorCollapsed(StoreEntry&, bool&) STUB_RETVAL(false)
 bool MemStore::updateCollapsed(StoreEntry&) STUB_RETVAL(false)
+
diff --git a/src/tests/stub_Port.cc b/src/tests/stub_Port.cc
index 410ad16138..2b7ca7b2ae 100644
--- a/src/tests/stub_Port.cc
+++ b/src/tests/stub_Port.cc
@@ -16,3 +16,4 @@ const char Ipc::strandAddrLabel[] = "-kid";
 
 String Ipc::Port::MakeAddr(char const*, int) STUB_RETVAL("")
 String Ipc::Port::CoordinatorAddr() STUB_RETVAL("")
+
diff --git a/src/tests/stub_SBuf.cc b/src/tests/stub_SBuf.cc
index ea028cd225..6f51964f5d 100644
--- a/src/tests/stub_SBuf.cc
+++ b/src/tests/stub_SBuf.cc
@@ -66,3 +66,4 @@ int SBuf::scanf(const char *format, ...) STUB_RETVAL(-1)
 void SBuf::toLower() STUB
 void SBuf::toUpper() STUB
 String SBuf::toString() const STUB_RETVAL(String(""))
+
diff --git a/src/tests/stub_SBufDetailedStats.cc b/src/tests/stub_SBufDetailedStats.cc
index 92433a15ca..a07bdeec7b 100644
--- a/src/tests/stub_SBufDetailedStats.cc
+++ b/src/tests/stub_SBufDetailedStats.cc
@@ -18,3 +18,4 @@ void recordSBufSizeAtDestruct(SBuf::size_type) {}
 const StatHist * collectSBufDestructTimeStats() STUB_RETVAL(NULL)
 void recordMemBlobSizeAtDestruct(SBuf::size_type) {}
 const StatHist * collectMemBlobDestructTimeStats() STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_UdsOp.cc b/src/tests/stub_UdsOp.cc
index 1702372102..ae3a55c161 100644
--- a/src/tests/stub_UdsOp.cc
+++ b/src/tests/stub_UdsOp.cc
@@ -13,3 +13,4 @@
 #include "tests/STUB.h"
 
 void Ipc::SendMessage(const String& toAddress, const TypedMsgHdr& message) STUB
+
diff --git a/src/tests/stub_access_log.cc b/src/tests/stub_access_log.cc
index 4fb65256fe..83f7924bd9 100644
--- a/src/tests/stub_access_log.cc
+++ b/src/tests/stub_access_log.cc
@@ -15,16 +15,17 @@
 HierarchyLogEntry::HierarchyLogEntry() STUB
 
 ping_data::ping_data() :
-        n_sent(0),
-        n_recv(0),
-        n_replies_expected(0),
-        timeout(0),
-        timedout(0),
-        w_rtt(0),
-        p_rtt(0)
+    n_sent(0),
+    n_recv(0),
+    n_replies_expected(0),
+    timeout(0),
+    timedout(0),
+    w_rtt(0),
+    p_rtt(0)
 {
     start.tv_sec = 0;
     start.tv_usec = 0;
     stop.tv_sec = 0;
     stop.tv_usec = 0;
 }
+
diff --git a/src/tests/stub_acl.cc b/src/tests/stub_acl.cc
index 02a3522a9b..7afab31b72 100644
--- a/src/tests/stub_acl.cc
+++ b/src/tests/stub_acl.cc
@@ -9,3 +9,4 @@
 /* DEBUG: section 28    Access Control */
 
 #include "squid.h"
+
diff --git a/src/tests/stub_cache_cf.cc b/src/tests/stub_cache_cf.cc
index ec9823f0cf..05e4c725ce 100644
--- a/src/tests/stub_cache_cf.cc
+++ b/src/tests/stub_cache_cf.cc
@@ -29,3 +29,4 @@ void ConfigParser::ParseUShort(unsigned short *var) STUB
 void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head) STUB
 void dump_acl_list(StoreEntry*, ACLList*) STUB
 YesNoNone::operator void*() const { STUB_NOP; return NULL; }
+
diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc
index 117387a0a2..b6bdbf3e3e 100644
--- a/src/tests/stub_cache_manager.cc
+++ b/src/tests/stub_cache_manager.cc
@@ -26,3 +26,4 @@ void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {}
 void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {}
 
 Mgr::Action::Pointer CacheManager::createRequestedAction(const Mgr::ActionParams &) STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_cbdata.cc b/src/tests/stub_cbdata.cc
index 04af1a87df..9977fe6d23 100644
--- a/src/tests/stub_cbdata.cc
+++ b/src/tests/stub_cbdata.cc
@@ -28,3 +28,4 @@ int cbdataInternalReferenceDoneValid(void **p, void **tp) STUB_RETVAL(0)
 
 int cbdataReferenceValid(const void *p) STUB_RETVAL(0)
 cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, FREE * free_func) STUB_RETVAL(CBDATA_UNKNOWN)
+
diff --git a/src/tests/stub_client_db.cc b/src/tests/stub_client_db.cc
index dbbf7185fa..6c11bd714c 100644
--- a/src/tests/stub_client_db.cc
+++ b/src/tests/stub_client_db.cc
@@ -26,3 +26,4 @@ ClientInfo *clientdbGetInfo(const Ip::Address &addr) STUB_RETVAL(NULL)
 #endif
 void clientOpenListenSockets(void) STUB
 void clientHttpConnectionsClose(void) STUB
+
diff --git a/src/tests/stub_client_side.cc b/src/tests/stub_client_side.cc
index 1ea4607efd..3267c56209 100644
--- a/src/tests/stub_client_side.cc
+++ b/src/tests/stub_client_side.cc
@@ -88,3 +88,4 @@ int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req) STUB_RETVAL(0)
 void clientOpenListenSockets(void) STUB
 void clientHttpConnectionsClose(void) STUB
 void httpRequestFree(void *) STUB
+
diff --git a/src/tests/stub_client_side_request.cc b/src/tests/stub_client_side_request.cc
index 7a8c298d6f..f4ef64b608 100644
--- a/src/tests/stub_client_side_request.cc
+++ b/src/tests/stub_client_side_request.cc
@@ -13,3 +13,4 @@
 #if !_USE_INLINE_
 #include "client_side_request.cci"
 #endif
+
diff --git a/src/tests/stub_comm.cc b/src/tests/stub_comm.cc
index 51101a83c7..475da4ae37 100644
--- a/src/tests/stub_comm.cc
+++ b/src/tests/stub_comm.cc
@@ -68,3 +68,4 @@ bool comm_has_incomplete_write(int) STUB_RETVAL(false)
 void commStartHalfClosedMonitor(int fd) STUB
 bool commHasHalfClosedMonitor(int fd) STUB_RETVAL(false)
 int CommSelectEngine::checkEvents(int timeout) STUB_RETVAL(0)
+
diff --git a/src/tests/stub_debug.cc b/src/tests/stub_debug.cc
index dea7c3c76e..2855c33090 100644
--- a/src/tests/stub_debug.cc
+++ b/src/tests/stub_debug.cc
@@ -135,7 +135,7 @@ Debug::xassert(const char *msg, const char *file, int line)
 
     if (CurrentDebug) {
         *CurrentDebug << "assertion failed: " << file << ":" << line <<
-        ": \"" << msg << "\"";
+                      ": \"" << msg << "\"";
     }
     abort();
 }
@@ -165,3 +165,4 @@ Raw::print(std::ostream &os) const
 
     return os;
 }
+
diff --git a/src/tests/stub_errorpage.cc b/src/tests/stub_errorpage.cc
index 1f5b1ad4e9..8831b2d1a9 100644
--- a/src/tests/stub_errorpage.cc
+++ b/src/tests/stub_errorpage.cc
@@ -18,3 +18,4 @@ bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &p
 bool TemplateFile::loadDefault() STUB_RETVAL(false)
 TemplateFile::TemplateFile(char const*, err_type) STUB
 bool TemplateFile::loadFor(const HttpRequest *) STUB_RETVAL(false)
+
diff --git a/src/tests/stub_event.cc b/src/tests/stub_event.cc
index ffee9ef82e..ab1e721fc5 100644
--- a/src/tests/stub_event.cc
+++ b/src/tests/stub_event.cc
@@ -33,3 +33,4 @@ bool EventScheduler::find(EVH * func, void * arg) STUB_RETVAL(false)
 void EventScheduler::schedule(const char *name, EVH * func, void *arg, double when, int weight, bool cbdata) STUB
 int EventScheduler::checkEvents(int timeout) STUB_RETVAL(-1)
 EventScheduler *EventScheduler::GetInstance() STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_external_acl.cc b/src/tests/stub_external_acl.cc
index 838b3408a4..4fd05c1539 100644
--- a/src/tests/stub_external_acl.cc
+++ b/src/tests/stub_external_acl.cc
@@ -29,3 +29,4 @@ void externalAclShutdown(void) STUB_NOP
 ExternalACLLookup * ExternalACLLookup::Instance() STUB_RETVAL(NULL)
 void ExternalACLLookup::checkForAsync(ACLChecklist *) const STUB
 void ExternalACLLookup::LookupDone(void *, const ExternalACLEntryPointer &) STUB
+
diff --git a/src/tests/stub_fatal.cc b/src/tests/stub_fatal.cc
index a3a883ef5d..b6a7b8c9c6 100644
--- a/src/tests/stub_fatal.cc
+++ b/src/tests/stub_fatal.cc
@@ -16,3 +16,4 @@ void fatal_common(const char *message) STUB
 void fatalf(const char *fmt,...) STUB
 void fatalvf(const char *fmt, va_list args) STUB
 void fatal_dump(const char *message) STUB
+
diff --git a/src/tests/stub_fd.cc b/src/tests/stub_fd.cc
index 84117524d1..835ae097b3 100644
--- a/src/tests/stub_fd.cc
+++ b/src/tests/stub_fd.cc
@@ -20,3 +20,4 @@ void fd_close(int fd) STUB
 void fd_bytes(int fd, int len, unsigned int type) STUB
 void fd_note(int fd, const char *s) STUB
 void fdAdjustReserved() STUB
+
diff --git a/src/tests/stub_helper.cc b/src/tests/stub_helper.cc
index fe00d3b5a7..81ff58662c 100644
--- a/src/tests/stub_helper.cc
+++ b/src/tests/stub_helper.cc
@@ -27,3 +27,4 @@ void *helperStatefulServerGetData(helper_stateful_server * srv) STUB_RETVAL(NULL
 helper_stateful_server *helperStatefulDefer(statefulhelper * hlp) STUB_RETVAL(NULL)
 void helperStatefulReleaseServer(helper_stateful_server * srv) STUB
 CBDATA_CLASS_INIT(statefulhelper);
+
diff --git a/src/tests/stub_http.cc b/src/tests/stub_http.cc
index 92df64108e..fc3ba95a63 100644
--- a/src/tests/stub_http.cc
+++ b/src/tests/stub_http.cc
@@ -15,3 +15,4 @@
 #include "tests/STUB.h"
 
 const char * httpMakeVaryMark(HttpRequest * request, HttpReply const * reply) STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_icp.cc b/src/tests/stub_icp.cc
index 26e7250d8f..2704883a32 100644
--- a/src/tests/stub_icp.cc
+++ b/src/tests/stub_icp.cc
@@ -42,3 +42,4 @@ void icpConnectionShutdown(void) STUB
 void icpConnectionClose(void) STUB
 int icpSetCacheKey(const cache_key * key) STUB_RETVAL(0)
 const cache_key *icpGetCacheKey(const char *url, int reqnum) STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_internal.cc b/src/tests/stub_internal.cc
index d73a289051..02466bcba6 100644
--- a/src/tests/stub_internal.cc
+++ b/src/tests/stub_internal.cc
@@ -12,3 +12,4 @@
 #include "tests/STUB.h"
 
 char * internalLocalUri(const char *dir, const char *name) STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_ipc.cc b/src/tests/stub_ipc.cc
index 5e8bacc030..c7180ce186 100644
--- a/src/tests/stub_ipc.cc
+++ b/src/tests/stub_ipc.cc
@@ -13,3 +13,4 @@
 #include "tests/STUB.h"
 
 pid_t ipcCreate(int, const char *, const char *const [], const char *, Ip::Address &, int *, int *, void **) STUB_RETVAL(-1)
+
diff --git a/src/tests/stub_ipc_Forwarder.cc b/src/tests/stub_ipc_Forwarder.cc
index 3f494b9019..fddfc241d2 100644
--- a/src/tests/stub_ipc_Forwarder.cc
+++ b/src/tests/stub_ipc_Forwarder.cc
@@ -14,3 +14,4 @@ void foo_stub_ipc_forwarder()
 {
     Ipc::Forwarder foo(NULL,1.0);
 }
+
diff --git a/src/tests/stub_ipc_TypedMsgHdr.cc b/src/tests/stub_ipc_TypedMsgHdr.cc
index fb9d588115..7a59b159b6 100644
--- a/src/tests/stub_ipc_TypedMsgHdr.cc
+++ b/src/tests/stub_ipc_TypedMsgHdr.cc
@@ -20,3 +20,4 @@ void Ipc::TypedMsgHdr::getFixed(void*, size_t) const STUB
 void Ipc::TypedMsgHdr::putFixed(void const*, size_t) STUB
 void Ipc::TypedMsgHdr::getString(String&) const STUB
 void Ipc::TypedMsgHdr::putString(String const&) STUB
+
diff --git a/src/tests/stub_ipcache.cc b/src/tests/stub_ipcache.cc
index e15992b188..f7019afc83 100644
--- a/src/tests/stub_ipcache.cc
+++ b/src/tests/stub_ipcache.cc
@@ -26,3 +26,4 @@ void ipcacheFreeMemory(void) STUB
 ipcache_addrs *ipcacheCheckNumeric(const char *name) STUB_RETVAL(NULL)
 void ipcache_restart(void) STUB
 int ipcacheAddEntryFromHosts(const char *name, const char *ipaddr) STUB_RETVAL(-1)
+
diff --git a/src/tests/stub_libauth.cc b/src/tests/stub_libauth.cc
index 2e6690ec8d..5f1377a3ac 100644
--- a/src/tests/stub_libauth.cc
+++ b/src/tests/stub_libauth.cc
@@ -82,3 +82,4 @@ Auth::Scheme::Pointer Auth::UserRequest::scheme() const STUB_RETVAL(NULL)
 void Auth::Init() STUB_NOP
 
 #endif /* USE_AUTH */
+
diff --git a/src/tests/stub_libauth_acls.cc b/src/tests/stub_libauth_acls.cc
index ddb647fc38..bb6bb8f091 100644
--- a/src/tests/stub_libauth_acls.cc
+++ b/src/tests/stub_libauth_acls.cc
@@ -49,3 +49,4 @@ int ACLProxyAuth::matchForCache(ACLChecklist *) STUB_RETVAL(0)
 int ACLProxyAuth::matchProxyAuth(ACLChecklist *) STUB_RETVAL(0)
 
 #endif /* USE_AUTH */
+
diff --git a/src/tests/stub_libcomm.cc b/src/tests/stub_libcomm.cc
index d55f3aec52..9ae4711ddf 100644
--- a/src/tests/stub_libcomm.cc
+++ b/src/tests/stub_libcomm.cc
@@ -33,19 +33,19 @@ bool Comm::ConnOpener::doneAll() const STUB_RETVAL(false)
 void Comm::ConnOpener::start() STUB
 void Comm::ConnOpener::swanSong() STUB
 Comm::ConnOpener::ConnOpener(Comm::ConnectionPointer &, AsyncCall::Pointer &, time_t) : AsyncJob("STUB Comm::ConnOpener") STUB
-        Comm::ConnOpener::~ConnOpener() STUB
-        void Comm::ConnOpener::setHost(const char *) STUB
-        const char * Comm::ConnOpener::getHost() const STUB_RETVAL(NULL)
+    Comm::ConnOpener::~ConnOpener() STUB
+    void Comm::ConnOpener::setHost(const char *) STUB
+    const char * Comm::ConnOpener::getHost() const STUB_RETVAL(NULL)
 
 #include "comm/forward.h"
-        bool Comm::IsConnOpen(const Comm::ConnectionPointer &) STUB_RETVAL(false)
+    bool Comm::IsConnOpen(const Comm::ConnectionPointer &) STUB_RETVAL(false)
 
 #include "comm/IoCallback.h"
-        void Comm::IoCallback::setCallback(iocb_type, AsyncCall::Pointer &, char *, FREE *, int) STUB
-        void Comm::IoCallback::selectOrQueueWrite() STUB
-        void Comm::IoCallback::cancel(const char *reason) STUB
-        void Comm::IoCallback::finish(Comm::Flag code, int xerrn) STUB
-        Comm::CbEntry *Comm::iocb_table = NULL;
+    void Comm::IoCallback::setCallback(iocb_type, AsyncCall::Pointer &, char *, FREE *, int) STUB
+    void Comm::IoCallback::selectOrQueueWrite() STUB
+    void Comm::IoCallback::cancel(const char *reason) STUB
+    void Comm::IoCallback::finish(Comm::Flag code, int xerrn) STUB
+    Comm::CbEntry *Comm::iocb_table = NULL;
 void Comm::CallbackTableInit() STUB
 void Comm::CallbackTableDestruct() STUB
 
@@ -78,3 +78,4 @@ void Comm::Write(const Comm::ConnectionPointer &, const char *, int, AsyncCall::
 void Comm::Write(const Comm::ConnectionPointer &conn, MemBuf *mb, AsyncCall::Pointer &callback) STUB
 void Comm::WriteCancel(const Comm::ConnectionPointer &conn, const char *reason) STUB
 /*PF*/ void Comm::HandleWrite(int, void*) STUB
+
diff --git a/src/tests/stub_libeui.cc b/src/tests/stub_libeui.cc
index 2e1730f87b..6def40147e 100644
--- a/src/tests/stub_libeui.cc
+++ b/src/tests/stub_libeui.cc
@@ -31,3 +31,4 @@ bool Eui::Eui64::lookup(const Ip::Address &c) STUB_RETVAL(false)
 bool Eui::Eui64::lookupNdp(const Ip::Address &c) STUB_RETVAL(false)
 bool Eui::Eui64::lookupSlaac(const Ip::Address &c) STUB_RETVAL(false)
 #endif
+
diff --git a/src/tests/stub_libformat.cc b/src/tests/stub_libformat.cc
index bbfc1eafac..420c9a77cc 100644
--- a/src/tests/stub_libformat.cc
+++ b/src/tests/stub_libformat.cc
@@ -16,3 +16,4 @@ void Format::Format::assemble(MemBuf &mb, const AccessLogEntryPointer &al, int l
 bool Format::Format::parse(char const*) STUB_RETVAL(false)
 Format::Format::Format(char const*) STUB
 Format::Format::~Format() STUB
+
diff --git a/src/tests/stub_libicmp.cc b/src/tests/stub_libicmp.cc
index 89ffcef8e6..4a65f16e4d 100644
--- a/src/tests/stub_libicmp.cc
+++ b/src/tests/stub_libicmp.cc
@@ -37,3 +37,4 @@ void netdbExchangeStart(void *) STUB
 void netdbExchangeUpdatePeer(Ip::Address &, CachePeer *, double, double) STUB
 CachePeer *netdbClosestParent(HttpRequest *) STUB_RETVAL(NULL)
 void netdbHostData(const char *host, int *samp, int *rtt, int *hops) STUB
+
diff --git a/src/tests/stub_libmem.cc b/src/tests/stub_libmem.cc
index 509dafdbdf..369fb9cee9 100644
--- a/src/tests/stub_libmem.cc
+++ b/src/tests/stub_libmem.cc
@@ -103,3 +103,4 @@ void memPoolIterateDone(MemPoolIterator ** iter) STUB
 int memPoolGetGlobalStats(MemPoolGlobalStats * stats) STUB_RETVAL(0)
 int memPoolInUseCount(MemAllocator *) STUB_RETVAL(0)
 int memPoolsTotalAllocated(void) STUB_RETVAL(0)
+
diff --git a/src/tests/stub_libmgr.cc b/src/tests/stub_libmgr.cc
index 7084750f25..872f09e26b 100644
--- a/src/tests/stub_libmgr.cc
+++ b/src/tests/stub_libmgr.cc
@@ -247,3 +247,4 @@ void Mgr::StringParam::pack(Ipc::TypedMsgHdr& msg) const STUB
 void Mgr::StringParam::unpackValue(const Ipc::TypedMsgHdr& msg) STUB
 static String t;
 const String& Mgr::StringParam::value() const STUB_RETVAL(t)
+
diff --git a/src/tests/stub_libsslsquid.cc b/src/tests/stub_libsslsquid.cc
index 2688b6c9a3..86272776b5 100644
--- a/src/tests/stub_libsslsquid.cc
+++ b/src/tests/stub_libsslsquid.cc
@@ -20,9 +20,9 @@
 #include "ssl/Config.h"
 Ssl::Config::Config():
 #if USE_SSL_CRTD
-        ssl_crtd(NULL),
+    ssl_crtd(NULL),
 #endif
-        ssl_crt_validator(NULL)
+    ssl_crt_validator(NULL)
 {
     ssl_crt_validator_Children.concurrency = 1;
     STUB_NOP
@@ -92,3 +92,4 @@ void destruct_session_cache() STUB
 } //namespace Ssl
 
 #endif
+
diff --git a/src/tests/stub_mem_node.cc b/src/tests/stub_mem_node.cc
index 4bc9ed3dad..8df6a8ee84 100644
--- a/src/tests/stub_mem_node.cc
+++ b/src/tests/stub_mem_node.cc
@@ -13,4 +13,5 @@
 #include "tests/STUB.h"
 
 mem_node::mem_node(int64_t offset):nodeBuffer(0,offset,data) STUB
-        size_t mem_node::InUseCount() STUB_RETVAL(0)
+    size_t mem_node::InUseCount() STUB_RETVAL(0)
+
diff --git a/src/tests/stub_mime.cc b/src/tests/stub_mime.cc
index cc447e8806..45b00f0c2f 100644
--- a/src/tests/stub_mime.cc
+++ b/src/tests/stub_mime.cc
@@ -12,3 +12,4 @@
 #include "tests/STUB.h"
 
 size_t headersEnd(const char *mime, size_t l) STUB_RETVAL(0)
+
diff --git a/src/tests/stub_neighbors.cc b/src/tests/stub_neighbors.cc
index 153bf4483e..7c799e7cd8 100644
--- a/src/tests/stub_neighbors.cc
+++ b/src/tests/stub_neighbors.cc
@@ -15,3 +15,4 @@
 
 void
 peerConnClosed(CachePeer *p) STUB
+
diff --git a/src/tests/stub_pconn.cc b/src/tests/stub_pconn.cc
index 81a9e7a4cb..42b4fad906 100644
--- a/src/tests/stub_pconn.cc
+++ b/src/tests/stub_pconn.cc
@@ -37,3 +37,4 @@ PconnModule::PconnModule() STUB
 void PconnModule::registerWithCacheManager(void) STUB
 void PconnModule::add(PconnPool *) STUB
 void PconnModule::dump(StoreEntry *) STUB
+
diff --git a/src/tests/stub_redirect.cc b/src/tests/stub_redirect.cc
index feef64cb59..f8374567c1 100644
--- a/src/tests/stub_redirect.cc
+++ b/src/tests/stub_redirect.cc
@@ -16,3 +16,4 @@ void redirectInit(void) STUB
 void redirectShutdown(void) STUB
 void redirectStart(ClientHttpRequest *, HLPCB *, void *) STUB
 void storeIdStart(ClientHttpRequest *, HLPCB *, void *) STUB
+
diff --git a/src/tests/stub_stat.cc b/src/tests/stub_stat.cc
index 313a711c81..41623ccfd9 100644
--- a/src/tests/stub_stat.cc
+++ b/src/tests/stub_stat.cc
@@ -15,3 +15,4 @@
 
 class StoreEntry;
 const char *storeEntryFlags(const StoreEntry *) STUB_RETVAL(NULL)
+
diff --git a/src/tests/stub_store.cc b/src/tests/stub_store.cc
index dbc834a7de..cd5020df71 100644
--- a/src/tests/stub_store.cc
+++ b/src/tests/stub_store.cc
@@ -144,3 +144,4 @@ void storeReplAdd(const char *, REMOVALPOLICYCREATE *) STUB
 void destroyStoreEntry(void *) STUB
 // in Packer.cc !? void packerToStoreInit(Packer * p, StoreEntry * e) STUB
 void storeGetMemSpace(int size) STUB
+
diff --git a/src/tests/stub_store_client.cc b/src/tests/stub_store_client.cc
index cc54cbf669..7d902f116f 100644
--- a/src/tests/stub_store_client.cc
+++ b/src/tests/stub_store_client.cc
@@ -37,3 +37,4 @@ void storeReplSetup(void) STUB
 bool store_client::memReaderHasLowerOffset(int64_t anOffset) const STUB_RETVAL(false)
 void store_client::dumpStats(MemBuf * output, int clientNumber) const STUB
 int store_client::getType() const STUB_RETVAL(0)
+
diff --git a/src/tests/stub_store_digest.cc b/src/tests/stub_store_digest.cc
index 1e1d2db114..669d2359da 100644
--- a/src/tests/stub_store_digest.cc
+++ b/src/tests/stub_store_digest.cc
@@ -16,3 +16,4 @@ void storeDigestInit(void) STUB
 void storeDigestNoteStoreReady(void) STUB
 void storeDigestDel(const StoreEntry *) STUB
 void storeDigestReport(StoreEntry *) STUB
+
diff --git a/src/tests/stub_store_rebuild.cc b/src/tests/stub_store_rebuild.cc
index 32d27d20eb..3efdfc21d2 100644
--- a/src/tests/stub_store_rebuild.cc
+++ b/src/tests/stub_store_rebuild.cc
@@ -39,3 +39,4 @@ storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &)
     buf.appended(buf.spaceSize());
     return true;
 }
+
diff --git a/src/tests/stub_store_stats.cc b/src/tests/stub_store_stats.cc
index cc0f0ac872..2f38c34f19 100644
--- a/src/tests/stub_store_stats.cc
+++ b/src/tests/stub_store_stats.cc
@@ -25,3 +25,4 @@ StoreIoStats::StoreIoStats()
     // has a StoreIoStats global
     memset(this, 0, sizeof(*this));
 }
+
diff --git a/src/tests/stub_store_swapout.cc b/src/tests/stub_store_swapout.cc
index 66487e1ac2..9a8f8a0103 100644
--- a/src/tests/stub_store_swapout.cc
+++ b/src/tests/stub_store_swapout.cc
@@ -20,3 +20,4 @@ void storeUnlink(StoreEntry * e) STUB
 char *storeSwapMetaPack(tlv * tlv_list, int *length) STUB_RETVAL(NULL)
 tlv *storeSwapMetaBuild(StoreEntry * e) STUB_RETVAL(NULL)
 void storeSwapTLVFree(tlv * n) STUB
+
diff --git a/src/tests/stub_tools.cc b/src/tests/stub_tools.cc
index 683ea93ae7..a4d9d9cea2 100644
--- a/src/tests/stub_tools.cc
+++ b/src/tests/stub_tools.cc
@@ -76,3 +76,4 @@ void setUmask(mode_t mask) STUB
 void strwordquote(MemBuf * mb, const char *str) STUB
 void keepCapabilities(void) STUB
 void restoreCapabilities(bool keep) STUB
+
diff --git a/src/tests/stub_wccp2.cc b/src/tests/stub_wccp2.cc
index 07eea896dd..84121067f8 100644
--- a/src/tests/stub_wccp2.cc
+++ b/src/tests/stub_wccp2.cc
@@ -34,3 +34,4 @@ void free_wccp2_amethod(int *) STUB
 void parse_wccp2_method(int *) STUB
 
 #endif /* USE_WCCPv2 */
+
diff --git a/src/tests/stub_wordlist.cc b/src/tests/stub_wordlist.cc
index 9ed979576d..ed252043d2 100644
--- a/src/tests/stub_wordlist.cc
+++ b/src/tests/stub_wordlist.cc
@@ -17,3 +17,4 @@ void wordlistAddWl(wordlist **, wordlist *) STUB
 void wordlistJoin(wordlist **, wordlist **) STUB
 wordlist *wordlistDup(const wordlist *) STUB_RETVAL(NULL)
 void wordlistDestroy(wordlist **) STUB
+
diff --git a/src/tests/testACLMaxUserIP.cc b/src/tests/testACLMaxUserIP.cc
index 32510878b3..c0df8af94b 100644
--- a/src/tests/testACLMaxUserIP.cc
+++ b/src/tests/testACLMaxUserIP.cc
@@ -57,3 +57,4 @@ testACLMaxUserIP::testParseLine()
 }
 
 #endif /* USE_AUTH */
+
diff --git a/src/tests/testACLMaxUserIP.h b/src/tests/testACLMaxUserIP.h
index 8f9bd7c2dd..6627ebe90a 100644
--- a/src/tests/testACLMaxUserIP.h
+++ b/src/tests/testACLMaxUserIP.h
@@ -35,3 +35,4 @@ protected:
 
 #endif /* USE_AUTH */
 #endif /* SQUID_SRC_TEST_ACLMAXUSERIP_H */
+
diff --git a/src/tests/testAuth.cc b/src/tests/testAuth.cc
index c92e000356..4c47424535 100644
--- a/src/tests/testAuth.cc
+++ b/src/tests/testAuth.cc
@@ -134,7 +134,7 @@ fake_auth_setup()
         unsigned paramlength;
     }
 
-    params[]={ {"digest", digest_parms, 2},
+    params[]= { {"digest", digest_parms, 2},
         {"basic", basic_parms, 2},
         {"ntlm", ntlm_parms, 1},
         {"negotiate", negotiate_parms, 1}
@@ -287,3 +287,4 @@ testAuthNegotiateUserRequest::username()
 
 #endif /* HAVE_AUTH_MODULE_NEGOTIATE */
 #endif /* USE_AUTH */
+
diff --git a/src/tests/testAuth.h b/src/tests/testAuth.h
index 545a20d12a..5efd43a2fe 100644
--- a/src/tests/testAuth.h
+++ b/src/tests/testAuth.h
@@ -124,3 +124,4 @@ protected:
 
 #endif /* USE_AUTH */
 #endif /* SQUID_SRC_TEST_AUTH_H */
+
diff --git a/src/tests/testBoilerplate.cc b/src/tests/testBoilerplate.cc
index 1d580808a7..87d935af20 100644
--- a/src/tests/testBoilerplate.cc
+++ b/src/tests/testBoilerplate.cc
@@ -18,3 +18,4 @@ testBoilerplate::testDemonstration()
 {
     CPPUNIT_ASSERT_EQUAL(0, 0);
 }
+
diff --git a/src/tests/testCacheManager.cc b/src/tests/testCacheManager.cc
index 7219a3e635..53fcb8c343 100644
--- a/src/tests/testCacheManager.cc
+++ b/src/tests/testCacheManager.cc
@@ -64,3 +64,4 @@ testCacheManager::testRegister()
     action->run(sentry, false);
     CPPUNIT_ASSERT_EQUAL(1,(int)sentry->flags);
 }
+
diff --git a/src/tests/testConfigParser.h b/src/tests/testConfigParser.h
index 9d88f7f8ea..3e27b40482 100644
--- a/src/tests/testConfigParser.h
+++ b/src/tests/testConfigParser.h
@@ -30,3 +30,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/tests/testDiskIO.cc b/src/tests/testDiskIO.cc
index a43d939f4b..cb48eeea61 100644
--- a/src/tests/testDiskIO.cc
+++ b/src/tests/testDiskIO.cc
@@ -40,3 +40,4 @@ testDiskIO::testFindDefault()
     CPPUNIT_ASSERT(module == NULL);
 #endif
 }
+
diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc
index 702e55ba21..c3174c8bfb 100644
--- a/src/tests/testEvent.cc
+++ b/src/tests/testEvent.cc
@@ -155,3 +155,4 @@ testEvent::testSingleton()
     EventScheduler *scheduler = dynamic_cast(EventScheduler::GetInstance());
     CPPUNIT_ASSERT(NULL != scheduler);
 }
+
diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc
index 9d8586de54..ed7b37893e 100644
--- a/src/tests/testEventLoop.cc
+++ b/src/tests/testEventLoop.cc
@@ -278,3 +278,4 @@ testEventLoop::testSetPrimaryEngine()
     CPPUNIT_ASSERT_EQUAL(10, first_engine.lasttimeout);
     CPPUNIT_ASSERT_EQUAL(0, second_engine.lasttimeout);
 }
+
diff --git a/src/tests/testHttp1Parser.cc b/src/tests/testHttp1Parser.cc
index 506d5c2911..70bb087354 100644
--- a/src/tests/testHttp1Parser.cc
+++ b/src/tests/testHttp1Parser.cc
@@ -1449,3 +1449,4 @@ testHttp1Parser::testDripFeed()
     }
 }
 #endif /* __cplusplus >= 201103L */
+
diff --git a/src/tests/testHttp1Parser.h b/src/tests/testHttp1Parser.h
index 02a3174c7f..2d92a798c7 100644
--- a/src/tests/testHttp1Parser.h
+++ b/src/tests/testHttp1Parser.h
@@ -44,3 +44,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/tests/testHttpReply.cc b/src/tests/testHttpReply.cc
index 12a564cea9..f9702ece7e 100644
--- a/src/tests/testHttpReply.cc
+++ b/src/tests/testHttpReply.cc
@@ -200,3 +200,4 @@ testHttpReply::testSanityCheckFirstLine()
     input.reset();
     error = Http::scNone;
 }
+
diff --git a/src/tests/testHttpRequest.cc b/src/tests/testHttpRequest.cc
index 8120609d0c..b760d814f7 100644
--- a/src/tests/testHttpRequest.cc
+++ b/src/tests/testHttpRequest.cc
@@ -207,3 +207,4 @@ testHttpRequest::testSanityCheckStartLine()
     input.reset();
     error = Http::scNone;
 }
+
diff --git a/src/tests/testHttpRequestMethod.cc b/src/tests/testHttpRequestMethod.cc
index 52392f14dc..216f429c8a 100644
--- a/src/tests/testHttpRequestMethod.cc
+++ b/src/tests/testHttpRequestMethod.cc
@@ -168,3 +168,4 @@ testHttpRequestMethod::testStream()
     buffer2 << HttpRequestMethod(SBuf("get"));
     CPPUNIT_ASSERT_EQUAL(String("get"), String(buffer2.str().c_str()));
 }
+
diff --git a/src/tests/testMain.cc b/src/tests/testMain.cc
index 7ad48616fd..e156fcc14d 100644
--- a/src/tests/testMain.cc
+++ b/src/tests/testMain.cc
@@ -43,3 +43,4 @@ main( int argc, char* argv[] )
 
     return result.wasSuccessful() ? 0 : 1;
 }
+
diff --git a/src/tests/testRefCount.cc b/src/tests/testRefCount.cc
index 6be810f6d0..d1e3780827 100644
--- a/src/tests/testRefCount.cc
+++ b/src/tests/testRefCount.cc
@@ -128,3 +128,4 @@ main (int argc, char **argv)
     }
     return _ToRefCount::Instances == 0 ? 0 : 1;
 }
+
diff --git a/src/tests/testRock.cc b/src/tests/testRock.cc
index d66ee55206..38b2175cf9 100644
--- a/src/tests/testRock.cc
+++ b/src/tests/testRock.cc
@@ -139,9 +139,9 @@ testRock::commonInit()
 
     comm_init();
 
-    httpHeaderInitModule();	/* must go before any header processing (e.g. the one in errorInitialize) */
+    httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
 
-    httpReplyInitModule();	/* must go before accepting replies */
+    httpReplyInitModule();  /* must go before accepting replies */
 
     mem_policy = createRemovalPolicy(Config.replPolicy);
 
@@ -322,3 +322,4 @@ testRock::testRockSwapOut()
         CPPUNIT_ASSERT_EQUAL(static_cast(NULL), pe2);
     }
 }
+
diff --git a/src/tests/testRock.h b/src/tests/testRock.h
index cfbc9dda19..f2df916557 100644
--- a/src/tests/testRock.h
+++ b/src/tests/testRock.h
@@ -44,3 +44,4 @@ private:
 };
 
 #endif /* SQUID_SRC_TEST_TESTROCK_H */
+
diff --git a/src/tests/testSBuf.cc b/src/tests/testSBuf.cc
index 945f315823..f1415165cf 100644
--- a/src/tests/testSBuf.cc
+++ b/src/tests/testSBuf.cc
@@ -431,49 +431,49 @@ testSBuf::testChop()
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     SBuf a(alphabet);
     std::string s(alphabet); // TODO
-    { //regular chopping
+    {   //regular chopping
         SBuf b(a);
         b.chop(3,3);
         SBuf ref("def");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // chop at end
+    {   // chop at end
         SBuf b(a);
         b.chop(b.length()-3);
         SBuf ref("xyz");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // chop at beginning
+    {   // chop at beginning
         SBuf b(a);
         b.chop(0,3);
         SBuf ref("abc");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // chop to zero length
+    {   // chop to zero length
         SBuf b(a);
         b.chop(5,0);
         SBuf ref("");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // chop beyond end (at npos)
+    {   // chop beyond end (at npos)
         SBuf b(a);
         b.chop(SBuf::npos,4);
         SBuf ref("");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // chop beyond end
+    {   // chop beyond end
         SBuf b(a);
         b.chop(b.length()+2,4);
         SBuf ref("");
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // null-chop
+    {   // null-chop
         SBuf b(a);
         b.chop(0,b.length());
         SBuf ref(a);
         CPPUNIT_ASSERT_EQUAL(ref,b);
     }
-    { // overflow chopped area
+    {   // overflow chopped area
         SBuf b(a);
         b.chop(b.length()-3,b.length());
         SBuf ref("xyz");
@@ -792,7 +792,7 @@ void
 testSBuf::testStringOps()
 {
     SBuf sng(ToLower(literal)),
-    ref("the quick brown fox jumped over the lazy dog");
+         ref("the quick brown fox jumped over the lazy dog");
     CPPUNIT_ASSERT_EQUAL(ref,sng);
     sng=literal;
     CPPUNIT_ASSERT_EQUAL(0,sng.compare(ref,caseInsensitive));
@@ -913,3 +913,4 @@ testSBuf::testStdStringOps()
     SBuf sb(alphabet);
     CPPUNIT_ASSERT_EQUAL(astr,sb.toStdString());
 }
+
diff --git a/src/tests/testSBuf.h b/src/tests/testSBuf.h
index 6d9dc8954a..2b38993ea1 100644
--- a/src/tests/testSBuf.h
+++ b/src/tests/testSBuf.h
@@ -94,3 +94,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/tests/testSBufList.cc b/src/tests/testSBufList.cc
index e07fd73027..e9e85c28d0 100644
--- a/src/tests/testSBufList.cc
+++ b/src/tests/testSBufList.cc
@@ -15,7 +15,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testSBufList );
 
 SBuf literal("The quick brown fox jumped over the lazy dog");
 static int sbuf_tokens_number=9;
-static SBuf tokens[]={
+static SBuf tokens[]= {
     SBuf("The",3), SBuf("quick",5), SBuf("brown",5), SBuf("fox",3),
     SBuf("jumped",6), SBuf("over",4), SBuf("the",3), SBuf("lazy",4),
     SBuf("dog",3)
@@ -43,3 +43,4 @@ testSBufList::testSBufListJoin()
     SBuf joined=SBufContainerJoin(foo,SBuf(" "));
     CPPUNIT_ASSERT_EQUAL(literal,joined);
 }
+
diff --git a/src/tests/testSBufList.h b/src/tests/testSBufList.h
index d8e83ef625..dd16cd5e44 100644
--- a/src/tests/testSBufList.h
+++ b/src/tests/testSBufList.h
@@ -25,3 +25,4 @@ protected:
 };
 
 #endif
+
diff --git a/src/tests/testStatHist.cc b/src/tests/testStatHist.cc
index 5ed94f8c6e..a81d81b8d2 100644
--- a/src/tests/testStatHist.cc
+++ b/src/tests/testStatHist.cc
@@ -102,3 +102,4 @@ testStatHist::testStatHistSum()
     CPPUNIT_ASSERT(ts3 == ts1);
 
 }
+
diff --git a/src/tests/testStatHist.h b/src/tests/testStatHist.h
index edfe04ba08..608363df21 100644
--- a/src/tests/testStatHist.h
+++ b/src/tests/testStatHist.h
@@ -34,3 +34,4 @@ protected:
 };
 
 #endif /* TESTSTATHIST_H_ */
+
diff --git a/src/tests/testStore.cc b/src/tests/testStore.cc
index e5bb819f7a..3ea9a467de 100644
--- a/src/tests/testStore.cc
+++ b/src/tests/testStore.cc
@@ -119,3 +119,4 @@ testStore::testMaxSize()
     CPPUNIT_ASSERT_EQUAL(static_cast(3), aStore->maxSize());
     Store::Root(NULL);
 }
+
diff --git a/src/tests/testStore.h b/src/tests/testStore.h
index 5f8b594b7c..ef24778867 100644
--- a/src/tests/testStore.h
+++ b/src/tests/testStore.h
@@ -71,7 +71,7 @@ public:
 
     virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
 
-    virtual void reference(StoreEntry &) {}	/* Reference this object */
+    virtual void reference(StoreEntry &) {} /* Reference this object */
 
     virtual bool dereference(StoreEntry &, bool) { return true; }
 
diff --git a/src/tests/testStoreController.cc b/src/tests/testStoreController.cc
index 74a66e633f..3ddfb37602 100644
--- a/src/tests/testStoreController.cc
+++ b/src/tests/testStoreController.cc
@@ -118,7 +118,7 @@ addedEntry(StorePointer hashStore,
     EBIT_CLR(e->flags, KEY_PRIVATE);
     e->ping_status = PING_NONE;
     EBIT_CLR(e->flags, ENTRY_VALIDATED);
-    e->hashInsert((const cache_key *)name.termedBuf());	/* do it after we clear KEY_PRIVATE */
+    e->hashInsert((const cache_key *)name.termedBuf()); /* do it after we clear KEY_PRIVATE */
     return e;
 }
 
@@ -192,3 +192,4 @@ testStoreController::testSearch()
 
     Store::Root(NULL);
 }
+
diff --git a/src/tests/testStoreEntryStream.cc b/src/tests/testStoreEntryStream.cc
index 2be76f5d19..0ebd8dcb9f 100644
--- a/src/tests/testStoreEntryStream.cc
+++ b/src/tests/testStoreEntryStream.cc
@@ -57,3 +57,4 @@ testStoreEntryStream::testGetStream()
     }
     Store::Root(NULL);
 }
+
diff --git a/src/tests/testStoreHashIndex.cc b/src/tests/testStoreHashIndex.cc
index 09c08365ed..20a6418c9f 100644
--- a/src/tests/testStoreHashIndex.cc
+++ b/src/tests/testStoreHashIndex.cc
@@ -99,7 +99,7 @@ addedEntry(StorePointer hashStore,
     EBIT_CLR(e->flags, KEY_PRIVATE);
     e->ping_status = PING_NONE;
     EBIT_CLR(e->flags, ENTRY_VALIDATED);
-    e->hashInsert((const cache_key *)name.termedBuf());	/* do it after we clear KEY_PRIVATE */
+    e->hashInsert((const cache_key *)name.termedBuf()); /* do it after we clear KEY_PRIVATE */
     return e;
 }
 
@@ -189,3 +189,4 @@ testStoreHashIndex::testSearch()
 
     Store::Root(NULL);
 }
+
diff --git a/src/tests/testStoreSupport.cc b/src/tests/testStoreSupport.cc
index 78db12ff11..0df98b9dbc 100644
--- a/src/tests/testStoreSupport.cc
+++ b/src/tests/testStoreSupport.cc
@@ -20,3 +20,4 @@ StockEventLoop::StockEventLoop() : default_time_engine(TimeEngine())
     registerEngine(EventScheduler::GetInstance());
     setTimeService(&default_time_engine);
 }
+
diff --git a/src/tests/testStoreSupport.h b/src/tests/testStoreSupport.h
index b4519e564e..f91d542259 100644
--- a/src/tests/testStoreSupport.h
+++ b/src/tests/testStoreSupport.h
@@ -25,3 +25,4 @@ public:
 };
 
 #endif /* SQUID_TESTSTORESUPPORT_H */
+
diff --git a/src/tests/testString.cc b/src/tests/testString.cc
index b0c31bca81..54599f9a79 100644
--- a/src/tests/testString.cc
+++ b/src/tests/testString.cc
@@ -73,3 +73,4 @@ void testString::testSubstr()
     String ref("34");
     CPPUNIT_ASSERT(check == ref);
 }
+
diff --git a/src/tests/testURL.cc b/src/tests/testURL.cc
index a82a1ea055..68709360ca 100644
--- a/src/tests/testURL.cc
+++ b/src/tests/testURL.cc
@@ -57,3 +57,4 @@ testURL::testDefaultConstructor()
     CPPUNIT_ASSERT(urlPointer != NULL);
     delete urlPointer;
 }
+
diff --git a/src/tests/testUfs.cc b/src/tests/testUfs.cc
index 5ca295338c..7edc612efc 100644
--- a/src/tests/testUfs.cc
+++ b/src/tests/testUfs.cc
@@ -27,7 +27,7 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( testUfs );
 
 typedef RefCount SwapDirPointer;
-extern REMOVALPOLICYCREATE createRemovalPolicy_lru;	/* XXX fails with --enable-removal-policies=heap */
+extern REMOVALPOLICYCREATE createRemovalPolicy_lru; /* XXX fails with --enable-removal-policies=heap */
 
 static void
 addSwapDir(SwapDirPointer aStore)
@@ -71,9 +71,9 @@ testUfs::commonInit()
 
     comm_init();
 
-    httpHeaderInitModule();	/* must go before any header processing (e.g. the one in errorInitialize) */
+    httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
 
-    httpReplyInitModule();	/* must go before accepting replies */
+    httpReplyInitModule();  /* must go before accepting replies */
 
     inited = true;
 }
@@ -145,7 +145,7 @@ testUfs::testUfsSearch()
         RequestFlags flags;
         flags.cachable = true;
         StoreEntry *pe = storeCreateEntry("dummy url", "dummy log url", flags, Http::METHOD_GET);
-        HttpReply *rep = (HttpReply *) pe->getReply();	// bypass const
+        HttpReply *rep = (HttpReply *) pe->getReply();  // bypass const
         rep->setHeaders(Http::scOkay, "dummy test object", "x-squid-internal/test", 0, -1, squid_curtime + 100000);
 
         pe->setPublicKey();
@@ -259,3 +259,4 @@ testUfs::testUfsDefaultEngine()
     if (0 > system ("rm -rf " TESTDIR))
         throw std::runtime_error("Failed to clean test work directory");
 }
+
diff --git a/src/tests/testUriScheme.cc b/src/tests/testUriScheme.cc
index 78a254845b..ee1b62cdbf 100644
--- a/src/tests/testUriScheme.cc
+++ b/src/tests/testUriScheme.cc
@@ -155,3 +155,4 @@ testUriScheme::testStream()
     String from_buf(buffer.str().c_str());
     CPPUNIT_ASSERT_EQUAL(http_str, from_buf);
 }
+
diff --git a/src/tests/test_http_range.cc b/src/tests/test_http_range.cc
index 3dc4105765..652f58e7e5 100644
--- a/src/tests/test_http_range.cc
+++ b/src/tests/test_http_range.cc
@@ -177,3 +177,4 @@ main(int argc, char **argv)
     }
     return 0;
 }
+
diff --git a/src/time.cc b/src/time.cc
index 6b2dc33bcb..545f3da3e0 100644
--- a/src/time.cc
+++ b/src/time.cc
@@ -140,3 +140,4 @@ Time::FormatHttpd(time_t t)
 
     return buf;
 }
+
diff --git a/src/tools.cc b/src/tools.cc
index f560451ea7..a6d1c5ba5d 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -142,7 +142,7 @@ mail_warranty(void)
     fclose(fp);
 
     snprintf(command, 256, "%s %s < %s", Config.EmailProgram, Config.adminEmail, filename);
-    if (system(command)) {}		/* XXX should avoid system(3) */
+    if (system(command)) {}     /* XXX should avoid system(3) */
     unlink(filename);
 #if !HAVE_MKSTEMP
     xfree(filename); // tempnam() requires us to free its allocation
@@ -297,7 +297,7 @@ death(int sig)
 #if PRINT_STACK_TRACE
 #if _SQUID_HPUX_
     {
-        extern void U_STACK_TRACE(void);	/* link with -lcl */
+        extern void U_STACK_TRACE(void);    /* link with -lcl */
         fflush(debug_log);
         dup2(fileno(debug_log), 2);
         U_STACK_TRACE();
@@ -305,8 +305,8 @@ death(int sig)
 
 #endif /* _SQUID_HPUX_ */
 #if _SQUID_SOLARIS_ && HAVE_LIBOPCOM_STACK
-    {				/* get ftp://opcom.sun.ca/pub/tars/opcom_stack.tar.gz and */
-        extern void opcom_stack_trace(void);	/* link with -lopcom_stack */
+    {   /* get ftp://opcom.sun.ca/pub/tars/opcom_stack.tar.gz and */
+        extern void opcom_stack_trace(void);    /* link with -lopcom_stack */
         fflush(debug_log);
         dup2(fileno(debug_log), fileno(stdout));
         opcom_stack_trace();
@@ -383,7 +383,7 @@ sigusr2_handle(int sig)
     }
 
 #if !HAVE_SIGACTION
-    if (signal(sig, sigusr2_handle) == SIG_ERR)	/* reinstall */
+    if (signal(sig, sigusr2_handle) == SIG_ERR) /* reinstall */
         debugs(50, DBG_CRITICAL, "signal: sig=" << sig << " func=sigusr2_handle: " << xstrerror());
 
 #endif
@@ -900,7 +900,7 @@ setSystemLimits(void)
     if (getrlimit(RLIMIT_DATA, &rl) < 0) {
         debugs(50, DBG_CRITICAL, "getrlimit: RLIMIT_DATA: " << xstrerror());
     } else if (rl.rlim_max > rl.rlim_cur) {
-        rl.rlim_cur = rl.rlim_max;	/* set it to the max */
+        rl.rlim_cur = rl.rlim_max;  /* set it to the max */
 
         if (setrlimit(RLIMIT_DATA, &rl) < 0) {
             snprintf(tmp_error_buf, ERROR_BUF_SZ, "setrlimit: RLIMIT_DATA: %s", xstrerror());
@@ -916,7 +916,7 @@ setSystemLimits(void)
     if (getrlimit(RLIMIT_VMEM, &rl) < 0) {
         debugs(50, DBG_CRITICAL, "getrlimit: RLIMIT_VMEM: " << xstrerror());
     } else if (rl.rlim_max > rl.rlim_cur) {
-        rl.rlim_cur = rl.rlim_max;	/* set it to the max */
+        rl.rlim_cur = rl.rlim_max;  /* set it to the max */
 
         if (setrlimit(RLIMIT_VMEM, &rl) < 0) {
             snprintf(tmp_error_buf, ERROR_BUF_SZ, "setrlimit: RLIMIT_VMEM: %s", xstrerror());
@@ -1038,14 +1038,14 @@ parseEtcHosts(void)
     setmode(fileno(fp), O_TEXT);
 #endif
 
-    while (fgets(buf, 1024, fp)) {	/* for each line */
+    while (fgets(buf, 1024, fp)) {  /* for each line */
         wordlist *hosts = NULL;
         char *addr;
 
-        if (buf[0] == '#')	/* MS-windows likes to add comments */
+        if (buf[0] == '#')  /* MS-windows likes to add comments */
             continue;
 
-        strtok(buf, "#");	/* chop everything following a comment marker */
+        strtok(buf, "#");   /* chop everything following a comment marker */
 
         lt = buf;
 
@@ -1055,10 +1055,10 @@ parseEtcHosts(void)
 
         nt = strpbrk(lt, w_space);
 
-        if (nt == NULL)		/* empty line */
+        if (nt == NULL)     /* empty line */
             continue;
 
-        *nt = '\0';		/* null-terminate the address */
+        *nt = '\0';     /* null-terminate the address */
 
         debugs(1, 5, "etc_hosts: address is '" << addr << "'");
 
@@ -1067,7 +1067,7 @@ parseEtcHosts(void)
         while ((nt = strpbrk(lt, w_space))) {
             char *host = NULL;
 
-            if (nt == lt) {	/* multiple spaces */
+            if (nt == lt) { /* multiple spaces */
                 debugs(1, 5, "etc_hosts: multiple spaces, skipping");
                 lt = nt + 1;
                 continue;
@@ -1245,3 +1245,4 @@ restoreCapabilities(bool keep)
     Ip::Interceptor.StopTransparency("Missing needed capability support.");
 #endif /* HAVE_SYS_CAPABILITY_H */
 }
+
diff --git a/src/tools.h b/src/tools.h
index 69d2cedb73..abe516097b 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -86,3 +86,4 @@ void PrintRusage(void);
 void dumpMallocStats(void);
 
 #endif /* SQUID_TOOLS_H_ */
+
diff --git a/src/tunnel.cc b/src/tunnel.cc
index 9f282d4bed..601c945f22 100644
--- a/src/tunnel.cc
+++ b/src/tunnel.cc
@@ -133,7 +133,7 @@ public:
         void dataSent (size_t amount);
         int len;
         char *buf;
-        int64_t *size_ptr;		/* pointer to size in an ConnStateData for logging */
+        int64_t *size_ptr;      /* pointer to size in an ConnStateData for logging */
 
         Comm::ConnectionPointer conn;    ///< The currently connected connection.
 
@@ -165,7 +165,7 @@ private:
         typedef void (TunnelStateData::*Method)(Ssl::PeerConnectorAnswer &);
 
         MyAnswerDialer(Method method, TunnelStateData *tunnel):
-                method_(method), tunnel_(tunnel), answer_() {}
+            method_(method), tunnel_(tunnel), answer_() {}
 
         /* CallDialer API */
         virtual bool canDial(AsyncCall &call) { return tunnel_.valid(); }
@@ -250,13 +250,13 @@ tunnelClientClosed(const CommCloseCbParams ¶ms)
 }
 
 TunnelStateData::TunnelStateData() :
-        url(NULL),
-        http(),
-        request(NULL),
-        status_ptr(NULL),
-        logTag_ptr(NULL),
-        connectRespBuf(NULL),
-        connectReqWriting(false)
+    url(NULL),
+    http(),
+    request(NULL),
+    status_ptr(NULL),
+    logTag_ptr(NULL),
+    connectRespBuf(NULL),
+    connectReqWriting(false)
 {
     debugs(26, 3, "TunnelStateData constructed this=" << this);
 }
@@ -588,7 +588,7 @@ TunnelStateData::writeServerDone(char *buf, size_t len, Comm::Flag flag, int xer
         return;
     }
 
-    const CbcPointer safetyLock(this);	/* ??? should be locked by the caller... */
+    const CbcPointer safetyLock(this); /* ??? should be locked by the caller... */
 
     if (cbdataReferenceValid(this))
         copyRead(client, ReadClient);
@@ -648,7 +648,7 @@ TunnelStateData::writeClientDone(char *buf, size_t len, Comm::Flag flag, int xer
         return;
     }
 
-    CbcPointer safetyLock(this);	/* ??? should be locked by the caller... */
+    CbcPointer safetyLock(this);   /* ??? should be locked by the caller... */
 
     if (cbdataReferenceValid(this))
         copyRead(server, ReadServer);
@@ -1001,10 +1001,10 @@ tunnelRelayConnectRequest(const Comm::ConnectionPointer &srv, void *data)
     mb.init();
     mb.Printf("CONNECT %s HTTP/1.1\r\n", tunnelState->url);
     HttpStateData::httpBuildRequestHeader(tunnelState->request.getRaw(),
-                                          NULL,			/* StoreEntry */
-                                          tunnelState->al,			/* AccessLogEntry */
+                                          NULL,         /* StoreEntry */
+                                          tunnelState->al,          /* AccessLogEntry */
                                           &hdr_out,
-                                          flags);			/* flags */
+                                          flags);           /* flags */
     packerToMemInit(&p, &mb);
     hdr_out.packInto(&p);
     hdr_out.clean();
@@ -1024,7 +1024,7 @@ tunnelRelayConnectRequest(const Comm::ConnectionPointer &srv, void *data)
         // does not see it) and only then start shoveling data to the client
         AsyncCall::Pointer writeCall = commCbCall(5,5, "tunnelConnectReqWriteDone",
                                        CommIoCbPtrFun(tunnelConnectReqWriteDone,
-                                                      tunnelState));
+                                               tunnelState));
         Comm::Write(srv, &mb, writeCall);
         tunnelState->connectReqWriting = true;
 
@@ -1110,7 +1110,7 @@ switchToTunnel(HttpRequest *request, Comm::ConnectionPointer &clientConn, Comm::
     tunnelState->request = request;
     tunnelState->server.size_ptr = NULL; //Set later if ClientSocketContext is available
 
-    // Temporary static variable to store the unneeded for our case status code 
+    // Temporary static variable to store the unneeded for our case status code
     static int status_code = 0;
     tunnelState->status_ptr = &status_code;
     tunnelState->client.conn = clientConn;
@@ -1172,3 +1172,4 @@ switchToTunnel(HttpRequest *request, Comm::ConnectionPointer &clientConn, Comm::
     Comm::Write(tunnelState->client.conn, buf.content(), buf.contentSize(), call, NULL);
 }
 #endif //USE_OPENSSL
+
diff --git a/src/typedefs.h b/src/typedefs.h
index 790b34025b..29bd8c78bd 100644
--- a/src/typedefs.h
+++ b/src/typedefs.h
@@ -38,11 +38,11 @@ typedef void PF(int, void *);
 /* disk.c / diskd.c callback typedefs */
 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
 /* Disk read CB */
-typedef void DWCB(int, int, size_t, void *);	/* disk write CB */
-typedef void DOCB(int, int errflag, void *data);	/* disk open CB */
-typedef void DCCB(int, int errflag, void *data);	/* disk close CB */
-typedef void DUCB(int errflag, void *data);	/* disk unlink CB */
-typedef void DTCB(int errflag, void *data);	/* disk trunc CB */
+typedef void DWCB(int, int, size_t, void *);    /* disk write CB */
+typedef void DOCB(int, int errflag, void *data);    /* disk open CB */
+typedef void DCCB(int, int errflag, void *data);    /* disk close CB */
+typedef void DUCB(int errflag, void *data); /* disk unlink CB */
+typedef void DTCB(int errflag, void *data); /* disk trunc CB */
 
 class DnsLookupDetails;
 typedef void FQDNH(const char *, const DnsLookupDetails &details, void *);
@@ -58,7 +58,7 @@ typedef void UH(void *data, wordlist *);
 typedef int READ_HANDLER(int, char *, int);
 typedef int WRITE_HANDLER(int, const char *, int);
 
-typedef int QS(const void *, const void *);	/* qsort */
+typedef int QS(const void *, const void *); /* qsort */
 typedef void STABH(void *);
 typedef void ERCB(int fd, void *, size_t);
 class StoreEntry;
@@ -81,3 +81,4 @@ typedef int STDIRSELECT(const StoreEntry *);
 /*Use uint64_t to store miliseconds*/
 typedef uint64_t time_msec_t;
 #endif /* SQUID_TYPEDEFS_H */
+
diff --git a/src/ufsdump.cc b/src/ufsdump.cc
index 39da5ec926..f4d5e1d2d0 100644
--- a/src/ufsdump.cc
+++ b/src/ufsdump.cc
@@ -174,3 +174,4 @@ main(int argc, char *argv[])
         return 1;
     }
 }
+
diff --git a/src/unlinkd.cc b/src/unlinkd.cc
index 20d5f99210..e09a8b0e3b 100644
--- a/src/unlinkd.cc
+++ b/src/unlinkd.cc
@@ -251,3 +251,4 @@ unlinkdInit(void)
 
 }
 #endif /* USE_UNLINKD */
+
diff --git a/src/unlinkd.h b/src/unlinkd.h
index d31beca578..a630cf0176 100644
--- a/src/unlinkd.h
+++ b/src/unlinkd.h
@@ -28,3 +28,4 @@ inline void unlinkdUnlink(const char * path) { ::unlink(path); }
 #endif /* USE_UNLINKD */
 
 #endif /* SQUID_UNLINKD_H_ */
+
diff --git a/src/unlinkd_daemon.cc b/src/unlinkd_daemon.cc
index 4e3874ff73..6e662df7e0 100644
--- a/src/unlinkd_daemon.cc
+++ b/src/unlinkd_daemon.cc
@@ -71,3 +71,4 @@ main(int argc, char *argv[])
 
     return 0;
 }
+
diff --git a/src/url.cc b/src/url.cc
index 3f62013b3b..04766695ab 100644
--- a/src/url.cc
+++ b/src/url.cc
@@ -956,3 +956,4 @@ URLHostName::extract(char const *aUrl)
 
     return Host;
 }
+
diff --git a/src/urn.cc b/src/urn.cc
index dc741c82e1..c15a8e4940 100644
--- a/src/urn.cc
+++ b/src/urn.cc
@@ -26,7 +26,7 @@
 #include "URL.h"
 #include "urn.h"
 
-#define	URN_REQBUF_SZ	4096
+#define URN_REQBUF_SZ   4096
 
 class UrnState : public StoreClient
 {
@@ -353,7 +353,7 @@ urnHandleReply(void *data, StoreIOBuffer result)
 
     debugs(53, 3, "urnFindMinRtt: Counted " << i << " URLs");
 
-    if (urls == NULL) {		/* unkown URN error */
+    if (urls == NULL) {     /* unkown URN error */
         debugs(52, 3, "urnTranslateDone: unknown URN " << e->url());
         err = new ErrorState(ERR_URN_RESOLVE, Http::scNotFound, urnState->request.getRaw());
         err->url = xstrdup(e->url());
@@ -474,3 +474,4 @@ urnParseReply(const char *inbuf, const HttpRequestMethod& m)
     debugs(52, 3, "urnParseReply: Found " << i << " URLs");
     return list;
 }
+
diff --git a/src/urn.h b/src/urn.h
index ee3a7c3bb6..adeb5b738a 100644
--- a/src/urn.h
+++ b/src/urn.h
@@ -17,3 +17,4 @@ class StoreEntry;
 void urnStart(HttpRequest *, StoreEntry *);
 
 #endif /* SQUID_URN_H_ */
+
diff --git a/src/wccp.cc b/src/wccp.cc
index 8aefa8a562..9feb9f5ccb 100644
--- a/src/wccp.cc
+++ b/src/wccp.cc
@@ -361,3 +361,4 @@ wccpAssignBuckets(void)
 }
 
 #endif /* USE_WCCP */
+
diff --git a/src/wccp.h b/src/wccp.h
index 342350647e..dbb5915003 100644
--- a/src/wccp.h
+++ b/src/wccp.h
@@ -18,3 +18,4 @@ void wccpConnectionClose(void);
 #endif /* USE_WCCP */
 
 #endif /* SQUID_WCCP_H_ */
+
diff --git a/src/wccp2.cc b/src/wccp2.cc
index c20608ea84..c82cd9b040 100644
--- a/src/wccp2.cc
+++ b/src/wccp2.cc
@@ -41,15 +41,15 @@ static EVH wccp2AssignBuckets;
 
 /* KDW WCCP V2 */
 
-#define WCCP2_HASH_ASSIGNMENT		0x00
-#define WCCP2_MASK_ASSIGNMENT		0x01
+#define WCCP2_HASH_ASSIGNMENT       0x00
+#define WCCP2_MASK_ASSIGNMENT       0x01
 
-#define	WCCP2_NONE_SECURITY_LEN	0
-#define	WCCP2_MD5_SECURITY_LEN	SQUID_MD5_DIGEST_LENGTH // 16
+#define WCCP2_NONE_SECURITY_LEN 0
+#define WCCP2_MD5_SECURITY_LEN  SQUID_MD5_DIGEST_LENGTH // 16
 
 /* Useful defines */
-#define	WCCP2_NUMPORTS	8
-#define	WCCP2_PASSWORD_LEN	8
+#define WCCP2_NUMPORTS  8
+#define WCCP2_PASSWORD_LEN  8
 
 /* WCCPv2 Pakcet format structures */
 /* Defined in draft-wilson-wccp-v2-12-oct-2001.txt */
@@ -63,18 +63,18 @@ struct wccp2_item_header_t {
 };
 
 /* item type values */
-#define WCCP2_SECURITY_INFO		0
-#define WCCP2_SERVICE_INFO		1
-#define WCCP2_ROUTER_ID_INFO		2
-#define WCCP2_WC_ID_INFO		3
-#define WCCP2_RTR_VIEW_INFO		4
-#define WCCP2_WC_VIEW_INFO		5
-#define WCCP2_REDIRECT_ASSIGNMENT	6
-#define WCCP2_QUERY_INFO		7
-#define WCCP2_CAPABILITY_INFO		8
-#define WCCP2_ALT_ASSIGNMENT		13
-#define WCCP2_ASSIGN_MAP		14
-#define WCCP2_COMMAND_EXTENSION		15
+#define WCCP2_SECURITY_INFO     0
+#define WCCP2_SERVICE_INFO      1
+#define WCCP2_ROUTER_ID_INFO        2
+#define WCCP2_WC_ID_INFO        3
+#define WCCP2_RTR_VIEW_INFO     4
+#define WCCP2_WC_VIEW_INFO      5
+#define WCCP2_REDIRECT_ASSIGNMENT   6
+#define WCCP2_QUERY_INFO        7
+#define WCCP2_CAPABILITY_INFO       8
+#define WCCP2_ALT_ASSIGNMENT        13
+#define WCCP2_ASSIGN_MAP        14
+#define WCCP2_COMMAND_EXTENSION     15
 
 /** \interface WCCPv2_Protocol
  * Sect 5.5  WCCP Message Header
@@ -106,8 +106,8 @@ struct wccp2_security_none_t {
 };
 
 /* security options */
-#define WCCP2_NO_SECURITY		0
-#define WCCP2_MD5_SECURITY		1
+#define WCCP2_NO_SECURITY       0
+#define WCCP2_MD5_SECURITY      1
 
 /** \interface WCCPv2_Protocol
  * Sect 5.6.1 Security Info Component
@@ -145,23 +145,23 @@ struct wccp2_service_info_t {
     uint16_t port7;
 };
 /* services */
-#define WCCP2_SERVICE_STANDARD		0
-#define WCCP2_SERVICE_DYNAMIC		1
+#define WCCP2_SERVICE_STANDARD      0
+#define WCCP2_SERVICE_DYNAMIC       1
 
 /* service IDs */
-#define WCCP2_SERVICE_ID_HTTP		0x00
+#define WCCP2_SERVICE_ID_HTTP       0x00
 
 /* service flags */
-#define WCCP2_SERVICE_SRC_IP_HASH	0x1
-#define WCCP2_SERVICE_DST_IP_HASH	0x2
-#define WCCP2_SERVICE_SRC_PORT_HASH	0x4
-#define WCCP2_SERVICE_DST_PORT_HASH	0x8
-#define WCCP2_SERVICE_PORTS_DEFINED	0x10
-#define WCCP2_SERVICE_PORTS_SOURCE	0x20
-#define WCCP2_SERVICE_SRC_IP_ALT_HASH	0x100
-#define WCCP2_SERVICE_DST_IP_ALT_HASH	0x200
-#define WCCP2_SERVICE_SRC_PORT_ALT_HASH	0x400
-#define WCCP2_SERVICE_DST_PORT_ALT_HASH	0x800
+#define WCCP2_SERVICE_SRC_IP_HASH   0x1
+#define WCCP2_SERVICE_DST_IP_HASH   0x2
+#define WCCP2_SERVICE_SRC_PORT_HASH 0x4
+#define WCCP2_SERVICE_DST_PORT_HASH 0x8
+#define WCCP2_SERVICE_PORTS_DEFINED 0x10
+#define WCCP2_SERVICE_PORTS_SOURCE  0x20
+#define WCCP2_SERVICE_SRC_IP_ALT_HASH   0x100
+#define WCCP2_SERVICE_DST_IP_ALT_HASH   0x200
+#define WCCP2_SERVICE_SRC_PORT_ALT_HASH 0x400
+#define WCCP2_SERVICE_DST_PORT_ALT_HASH 0x800
 
 /* TODO the following structures need to be re-defined for correct full operation.
  wccp2_cache_identity_element needs to be merged as a sub-struct of
@@ -300,24 +300,24 @@ struct wccp2_capability_element_t {
 static struct wccp2_capability_element_t wccp2_capability_element;
 
 /* capability types */
-#define WCCP2_CAPABILITY_FORWARDING_METHOD	0x01
-#define WCCP2_CAPABILITY_ASSIGNMENT_METHOD	0x02
-#define WCCP2_CAPABILITY_RETURN_METHOD		0x03
+#define WCCP2_CAPABILITY_FORWARDING_METHOD  0x01
+#define WCCP2_CAPABILITY_ASSIGNMENT_METHOD  0x02
+#define WCCP2_CAPABILITY_RETURN_METHOD      0x03
 // 0x04 ?? - advertised by a 4507 (ios v15.1) Cisco switch
 // 0x05 ?? - advertised by a 4507 (ios v15.1) Cisco switch
 
 /* capability values */
-#define WCCP2_METHOD_GRE		0x00000001
-#define WCCP2_METHOD_L2			0x00000002
+#define WCCP2_METHOD_GRE        0x00000001
+#define WCCP2_METHOD_L2         0x00000002
 /* when type=WCCP2_CAPABILITY_FORWARDING_METHOD */
-#define WCCP2_FORWARDING_METHOD_GRE	WCCP2_METHOD_GRE
-#define WCCP2_FORWARDING_METHOD_L2	WCCP2_METHOD_L2
+#define WCCP2_FORWARDING_METHOD_GRE WCCP2_METHOD_GRE
+#define WCCP2_FORWARDING_METHOD_L2  WCCP2_METHOD_L2
 /* when type=WCCP2_CAPABILITY_ASSIGNMENT_METHOD */
-#define WCCP2_ASSIGNMENT_METHOD_HASH	0x00000001
-#define WCCP2_ASSIGNMENT_METHOD_MASK	0x00000002
+#define WCCP2_ASSIGNMENT_METHOD_HASH    0x00000001
+#define WCCP2_ASSIGNMENT_METHOD_MASK    0x00000002
 /* when type=WCCP2_CAPABILITY_RETURN_METHOD */
-#define WCCP2_PACKET_RETURN_METHOD_GRE	WCCP2_METHOD_GRE
-#define WCCP2_PACKET_RETURN_METHOD_L2	WCCP2_METHOD_L2
+#define WCCP2_PACKET_RETURN_METHOD_GRE  WCCP2_METHOD_GRE
+#define WCCP2_PACKET_RETURN_METHOD_L2   WCCP2_METHOD_L2
 
 /** \interface WCCPv2_Protocol
  * 5.7.8 Value Element
@@ -450,7 +450,7 @@ struct wccp2_service_list_t {
     size_t wccp_packet_size;
 
     struct wccp2_service_list_t *next;
-    char wccp_password[WCCP2_PASSWORD_LEN + 1];		/* hold the trailing C-string NUL */
+    char wccp_password[WCCP2_PASSWORD_LEN + 1];     /* hold the trailing C-string NUL */
     uint32_t wccp2_security_type;
 };
 
@@ -1246,7 +1246,7 @@ wccp2HandleUdp(int sock, void *not_used)
             router_capability_header = (struct wccp2_capability_info_header_t *) &wccp2_i_see_you.data[offset];
             break;
 
-            /* Nothing to do for the types below */
+        /* Nothing to do for the types below */
 
         case WCCP2_ASSIGN_MAP:
         case WCCP2_REDIRECT_ASSIGNMENT:
@@ -2264,7 +2264,7 @@ parse_wccp2_service_info(void *v)
     int service_id = 0;
     int flags = 0;
     int portlist[WCCP2_NUMPORTS];
-    int protocol = -1;		/* IPPROTO_TCP | IPPROTO_UDP */
+    int protocol = -1;      /* IPPROTO_TCP | IPPROTO_UDP */
 
     struct wccp2_service_list_t *srv;
     int priority = -1;
@@ -2513,3 +2513,4 @@ free_wccp2_service_info(void *v)
 {}
 
 #endif /* USE_WCCPv2 */
+
diff --git a/src/wccp2.h b/src/wccp2.h
index e228aceb9d..05dcbb74b9 100644
--- a/src/wccp2.h
+++ b/src/wccp2.h
@@ -39,3 +39,4 @@ void dump_wccp2_service_info(StoreEntry * e, const char *label, void *v);
 #endif /* USE_WCCPv2 */
 
 #endif /* WCCP2_H_ */
+
diff --git a/src/whois.cc b/src/whois.cc
index 7cd4802b16..bebea5be0b 100644
--- a/src/whois.cc
+++ b/src/whois.cc
@@ -35,7 +35,7 @@ public:
     StoreEntry *entry;
     HttpRequest::Pointer request;
     FwdState::Pointer fwd;
-    char buf[BUFSIZ+1];		/* readReply adds terminating NULL */
+    char buf[BUFSIZ+1];     /* readReply adds terminating NULL */
     bool dataWritten;
 };
 
@@ -175,3 +175,4 @@ whoisClose(const CommCloseCbParams ¶ms)
     p->entry->unlock("whoisClose");
     delete p;
 }
+
diff --git a/src/whois.h b/src/whois.h
index 9edbacbc5e..8dcb091026 100644
--- a/src/whois.h
+++ b/src/whois.h
@@ -20,3 +20,4 @@
 void whoisStart(FwdState *);
 
 #endif /* SQUID_WHOIS_H_ */
+
diff --git a/src/win32.cc b/src/win32.cc
index 7d68a2b8ae..d5dccd2643 100644
--- a/src/win32.cc
+++ b/src/win32.cc
@@ -80,3 +80,4 @@ void WIN32_ExceptionHandlerCleanup()
 }
 
 #endif /* SQUID_WINDOWS_ */
+
diff --git a/src/win32.h b/src/win32.h
index 01f22d00fd..66ed6f578e 100644
--- a/src/win32.h
+++ b/src/win32.h
@@ -21,3 +21,4 @@ DWORD WIN32_IpAddrChangeMonitorInit();
 #endif
 
 #endif /* SQUID_WIN32_H_ */
+
diff --git a/src/wordlist.cc b/src/wordlist.cc
index 85bcab1a5f..ccd8fbef54 100644
--- a/src/wordlist.cc
+++ b/src/wordlist.cc
@@ -97,3 +97,4 @@ ToSBufList(wordlist *wl)
     }
     return rv;
 }
+
diff --git a/src/wordlist.h b/src/wordlist.h
index 302d2081c9..730a9799d3 100644
--- a/src/wordlist.h
+++ b/src/wordlist.h
@@ -62,3 +62,4 @@ void wordlistDestroy(wordlist **);
 SBufList ToSBufList(wordlist *);
 
 #endif /* SQUID_WORDLIST_H */
+
diff --git a/test-suite/ESIExpressions.cc b/test-suite/ESIExpressions.cc
index 36979d5ddb..e8129e5049 100644
--- a/test-suite/ESIExpressions.cc
+++ b/test-suite/ESIExpressions.cc
@@ -21,7 +21,7 @@ main ()
         "!('a'<='c')",
         "(1==1)|('abc'=='def')",
         "(4!=5)&(4==5)",
-        "(1==1)|(2==3)&(3==4)",	/* should be true because of precedence */
+        "(1==1)|(2==3)&(3==4)", /* should be true because of precedence */
         "(1 & 4)",
         "(\"abc\" | \"edf\")", "1==1==1",
         "!('')",
@@ -55,3 +55,4 @@ main ()
 
     return 0;
 }
+
diff --git a/test-suite/VirtualDeleteOperator.cc b/test-suite/VirtualDeleteOperator.cc
index ea95a09832..412ed9ca76 100644
--- a/test-suite/VirtualDeleteOperator.cc
+++ b/test-suite/VirtualDeleteOperator.cc
@@ -115,3 +115,4 @@ main(int argc, char **argv)
     assert (ChildVirtual::Calls.deletes() == 1);
     return 0;
 }
+
diff --git a/test-suite/debug.cc b/test-suite/debug.cc
index f934de54f8..bebc277eca 100644
--- a/test-suite/debug.cc
+++ b/test-suite/debug.cc
@@ -63,3 +63,4 @@ main(int argc, char **argv)
     debugs(1, DBG_IMPORTANT,streamPointer->getAnInt() << " " << aStreamObject.getACString());
     return 0;
 }
+
diff --git a/test-suite/hash.c b/test-suite/hash.c
index a9ddfec939..74cb99afd9 100644
--- a/test-suite/hash.c
+++ b/test-suite/hash.c
@@ -76,8 +76,8 @@ hash_string(const void *data, unsigned int size)
  * This came from ejb's hsearch.
  */
 
-#define PRIME1		37
-#define PRIME2		1048583
+#define PRIME1      37
+#define PRIME2      1048583
 
 /* Hash function from Chris Torek. */
 unsigned int
@@ -99,25 +99,25 @@ hash4(const void *data, unsigned int size)
     case 0:
         do {
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 7:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 6:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 5:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 4:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 3:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 2:
             HASH4;
-            /* FALLTHROUGH */
+        /* FALLTHROUGH */
         case 1:
             HASH4;
         } while (--loop);
@@ -240,7 +240,7 @@ hash_next(hash_table * hid)
     if (hid->current_ptr != NULL) {
         hid->current_ptr = hid->current_ptr->next;
         if (hid->current_ptr != NULL)
-            return (hid->current_ptr);	/* next item */
+            return (hid->current_ptr);  /* next item */
     }
     /* find next bucket */
     for (i = hid->current_slot + 1; i < hid->size; i++) {
@@ -248,7 +248,7 @@ hash_next(hash_table * hid)
         if (hid->buckets[i] != NULL)
             return (hid->current_ptr = hid->buckets[i]);
     }
-    return NULL;		/* end of list */
+    return NULL;        /* end of list */
 }
 
 int
@@ -275,10 +275,10 @@ hash_unlink(hash_table * hid, hash_link * hl, int FreeLink)
     for (prev = NULL, walker = hid->buckets[i];
             walker != NULL; prev = walker, walker = walker->next) {
         if (walker == hl) {
-            if (prev == NULL) {	/* it's the head */
+            if (prev == NULL) { /* it's the head */
                 hid->buckets[i] = walker->next;
             } else {
-                prev->next = walker->next;	/* skip it */
+                prev->next = walker->next;  /* skip it */
             }
             /* fix walker state if needed */
             if (walker == hid->current_ptr)
@@ -386,3 +386,4 @@ main(void)
     exit(0);
 }
 #endif
+
diff --git a/test-suite/hash.h b/test-suite/hash.h
index 9a957dc19d..c92aaba846 100644
--- a/test-suite/hash.h
+++ b/test-suite/hash.h
@@ -31,8 +31,8 @@ extern "C" {
 
     extern int hash_links_allocated;
     /* AYJ: defined by globals.h */
-//extern int store_hash_buckets;	/* 0 */
-//extern hash_table *store_table;	/* NULL */
+//extern int store_hash_buckets;    /* 0 */
+//extern hash_table *store_table;   /* NULL */
     extern hash_table *hash_create(HASHCMP *, int, HASHHASH *);
     extern void hash_insert(hash_table *, const char *, void *);
     extern int hash_delete(hash_table *, const char *);
@@ -50,3 +50,4 @@ extern "C" {
     HASHHASH hash4;
 
 }
+
diff --git a/test-suite/mem_hdr_test.cc b/test-suite/mem_hdr_test.cc
index 3635fb4cf2..4fe2817ede 100644
--- a/test-suite/mem_hdr_test.cc
+++ b/test-suite/mem_hdr_test.cc
@@ -110,3 +110,4 @@ main(int argc, char **argv)
     assert (mem_node::InUseCount() == 0);
     return 0;
 }
+
diff --git a/test-suite/mem_node_test.cc b/test-suite/mem_node_test.cc
index 26cc5c6486..f5f1d052c1 100644
--- a/test-suite/mem_node_test.cc
+++ b/test-suite/mem_node_test.cc
@@ -59,3 +59,4 @@ main(int argc, char **argv)
     assert (mem_node::InUseCount() == 0);
     return 0;
 }
+
diff --git a/test-suite/membanger.c b/test-suite/membanger.c
index 8335b683ac..0c29021d82 100644
--- a/test-suite/membanger.c
+++ b/test-suite/membanger.c
@@ -134,14 +134,14 @@ main(int argc, char **argv)
 #ifdef WITH_LIB
     sizeToPoolInit();
 #endif
-    mem_table = hash_create(ptrcmp, 229, hash4);	/* small hash table */
+    mem_table = hash_create(ptrcmp, 229, hash4);    /* small hash table */
     init_stats();
     while (fgets(mbuf, 256, fp) != NULL) {
         if (run_stats > 0 && (++a) % run_stats == 0)
             print_stats();
         p = NULL;
         switch (mbuf[0]) {
-        case 'm':		/* malloc */
+        case 'm':       /* malloc */
             p = strtok(&mbuf[2], ":");
             if (!p)
                 badformat();
@@ -153,12 +153,12 @@ main(int argc, char **argv)
             strcpy(mi->orig_ptr, p);
             mi->size = size;
             size2id(size, mi);
-            mi->my_ptr = xmemAlloc(mi);		/* (void *)xmalloc(size); */
+            mi->my_ptr = xmemAlloc(mi);     /* (void *)xmalloc(size); */
             assert(mi->my_ptr);
             my_hash_insert(mem_table, mi->orig_ptr, mi);
             mstat.mallocs++;
             break;
-        case 'c':		/* calloc */
+        case 'c':       /* calloc */
             p = strtok(&mbuf[2], ":");
             if (!p)
                 badformat();
@@ -174,7 +174,7 @@ main(int argc, char **argv)
             strcpy(mi->orig_ptr, p);
             size2id(size, mi);
             mi->size = amt * size;
-            mi->my_ptr = xmemAlloc(mi);		/*(void *)xmalloc(amt*size); */
+            mi->my_ptr = xmemAlloc(mi);     /*(void *)xmalloc(amt*size); */
             assert(mi->my_ptr);
             my_hash_insert(mem_table, mi->orig_ptr, mi);
             mstat.callocs++;
@@ -195,13 +195,13 @@ main(int argc, char **argv)
             mi = (memitem *) (mem_entry->item);
             assert(mi->pool);
             assert(mi->my_ptr);
-            xmemFree(mi);	/* xfree(mi->my_ptr); */
-            size2id(atoi(p), mi);	/* we don't need it here I guess? */
+            xmemFree(mi);   /* xfree(mi->my_ptr); */
+            size2id(atoi(p), mi);   /* we don't need it here I guess? */
             strcpy(mi->orig_ptr, abuf);
             p = strtok(NULL, "\n");
             if (!p)
                 badformat();
-            mi->my_ptr = xmemAlloc(mi);		/* (char *)xmalloc(atoi(p)); */
+            mi->my_ptr = xmemAlloc(mi);     /* (char *)xmalloc(atoi(p)); */
             assert(mi->my_ptr);
             mstat.reallocs++;
             break;
@@ -216,7 +216,7 @@ main(int argc, char **argv)
             mi = (memitem *) (mem_entry->item);
             assert(mi->pool);
             assert(mi->my_ptr);
-            xmemFree(mi);	/* xfree(mi->my_ptr); */
+            xmemFree(mi);   /* xfree(mi->my_ptr); */
             hash_unlink(mem_table, mem_entry, 1);
             free(mi);
             mstat.frees++;
@@ -295,7 +295,7 @@ badformat()
 const char *
 make_nam(int id, int size)
 {
-    const char *buf = malloc(30);	/* argh */
+    const char *buf = malloc(30);   /* argh */
     snprintf((char *)buf, sizeof(buf)-1, "pl:%d/%d", id, size);
     return buf;
 }
@@ -342,3 +342,4 @@ my_free(char *file, int line, void *ptr)
     fprintf(stderr, "}\n");
 #endif
 }
+
diff --git a/test-suite/pconn-banger.c b/test-suite/pconn-banger.c
index f7d4b82cc5..e0e49f1115 100644
--- a/test-suite/pconn-banger.c
+++ b/test-suite/pconn-banger.c
@@ -360,7 +360,7 @@ handle_read(char *inbuf, int len)
                 memcpy(buf, r->reply_hdrs + r->hdr_length, blen);
                 len += blen;
             }
-            r->reply_hdrs[r->hdr_length] = '\0';	/* Null terminate headers */
+            r->reply_hdrs[r->hdr_length] = '\0';    /* Null terminate headers */
             /* Parse headers */
             r->content_length = get_header_int_value("content-length:", r->reply_hdrs, end);
             /*          fprintf(stderr, "CONTENT_LENGTH = %d\n", r->content_length); */
@@ -384,7 +384,7 @@ handle_read(char *inbuf, int len)
                 assert(bytes_left >= 0);
                 bytes_used = len < bytes_left ? len : bytes_left;
             } else {
-                bytes_left = len + 1;	/* Unknown end... */
+                bytes_left = len + 1;   /* Unknown end... */
                 bytes_used = len;
             }
             if (opt_checksum) {
@@ -599,3 +599,4 @@ char *argv[];
     main_loop();
     return 0;
 }
+
diff --git a/test-suite/splay.cc b/test-suite/splay.cc
index 573946347e..e7c9a5051e 100644
--- a/test-suite/splay.cc
+++ b/test-suite/splay.cc
@@ -282,3 +282,4 @@ main(int argc, char *argv[])
 
     return 0;
 }
+
diff --git a/test-suite/syntheticoperators.cc b/test-suite/syntheticoperators.cc
index fa1f2f91ca..a68d43f8c7 100644
--- a/test-suite/syntheticoperators.cc
+++ b/test-suite/syntheticoperators.cc
@@ -157,3 +157,4 @@ main(int argc, char **argv)
     CheckSyntheticWorks();
     return 0;
 }
+
diff --git a/test-suite/tcp-banger2.c b/test-suite/tcp-banger2.c
index b0373b9b83..0d2853406d 100644
--- a/test-suite/tcp-banger2.c
+++ b/test-suite/tcp-banger2.c
@@ -259,7 +259,7 @@ void
 reply_done(int fd, void *data)
 {
     struct _request *r = data;
-    if (opt_range);		/* skip size checks for now */
+    if (opt_range);     /* skip size checks for now */
     else if (strcmp(r->method, "HEAD") == 0);
     else if (r->bodysize != r->content_length && r->content_length >= 0)
         fprintf(stderr, "ERROR: %s got %d of %d bytes\n",
@@ -342,12 +342,12 @@ request(char *urlin) {
     if (size && strcmp(size, "-") != 0)
         r->validsize = atoi(size);
     else
-        r->validsize = -1;	/* Unknown */
+        r->validsize = -1;  /* Unknown */
     if (checksum && strcmp(checksum, "-") != 0)
         r->validsum = strtoul(checksum, NULL, 0);
     if (status)
         r->validstatus = atoi(status);
-    r->content_length = -1;	/* Unknown */
+    r->content_length = -1; /* Unknown */
     if (opt_accel) {
         host = strchr(url, '/') + 2;
         url = strchr(host, '/');
@@ -595,3 +595,4 @@ char *argv[];
     printf("Exiting normally\n");
     return 0;
 }
+
diff --git a/test-suite/tcp-banger3.c b/test-suite/tcp-banger3.c
index 60069d59b7..094cbb31c4 100644
--- a/test-suite/tcp-banger3.c
+++ b/test-suite/tcp-banger3.c
@@ -227,7 +227,7 @@ create_a_thing(char *argv[])
     pwfd = c2p[1];
     if ((pid = fork()) < 0)
         abort();
-    if (pid > 0) {		/* parent */
+    if (pid > 0) {      /* parent */
         /* close shared socket with child */
         close(crfd);
         close(cwfd);
@@ -384,3 +384,4 @@ main(int argc, char *argv[])
         close(i);
     sleep(1);
 }
+
diff --git a/test-suite/test_tools.cc b/test-suite/test_tools.cc
index 648a32fdfd..f1d9940fcc 100644
--- a/test-suite/test_tools.cc
+++ b/test-suite/test_tools.cc
@@ -102,3 +102,4 @@ dlinkDelete(dlink_node * m, dlink_list * list)
 
     m->next = m->prev = NULL;
 }
+
diff --git a/test-suite/waiter.c b/test-suite/waiter.c
index fcbe6af8a3..564e0ceaef 100644
--- a/test-suite/waiter.c
+++ b/test-suite/waiter.c
@@ -33,3 +33,4 @@ main(int argc, char *argv[])
     select(1, NULL, NULL, NULL, &to);
     return 0;
 }
+
diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc
index c77df831ef..2073d5c0d8 100644
--- a/tools/cachemgr.cc
+++ b/tools/cachemgr.cc
@@ -101,7 +101,7 @@ typedef struct {
 /*
  * Static variables and constants
  */
-static const time_t passwd_ttl = 60 * 60 * 3;	/* in sec */
+static const time_t passwd_ttl = 60 * 60 * 3;   /* in sec */
 static const char *script_name = "/cgi-bin/cachemgr.cgi";
 static const char *progname = NULL;
 static time_t now;
@@ -638,23 +638,23 @@ read_reply(int s, cachemgr_request * req)
 
             if (status == 401 || status == 407) {
                 reset_auth(req);
-                status = 403;	/* Forbiden, see comments in case isForward: */
+                status = 403;   /* Forbiden, see comments in case isForward: */
             }
 
             /* this is a way to pass HTTP status to the Web server */
             if (statusStr)
-                printf("Status: %d %s", status, statusStr);	/* statusStr has '\n' */
+                printf("Status: %d %s", status, statusStr); /* statusStr has '\n' */
 
             break;
 
         case isHeaders:
             /* forward header field */
-            if (!strcmp(buf, "\r\n")) {		/* end of headers */
-                fputs("Content-Type: text/html\r\n", stdout);	/* add our type */
+            if (!strcmp(buf, "\r\n")) {     /* end of headers */
+                fputs("Content-Type: text/html\r\n", stdout);   /* add our type */
                 istate = isBodyStart;
             }
 
-            if (strncasecmp(buf, "Content-Type:", 13))	/* filter out their type */
+            if (strncasecmp(buf, "Content-Type:", 13))  /* filter out their type */
                 fputs(buf, stdout);
 
             break;
@@ -680,7 +680,7 @@ read_reply(int s, cachemgr_request * req)
             }
 
             istate = isActions;
-            /* yes, fall through, we do not want to loose the first line */
+        /* yes, fall through, we do not want to loose the first line */
 
         case isActions:
             if (strncmp(buf, "action:", 7) == 0) {
@@ -696,7 +696,7 @@ read_reply(int s, cachemgr_request * req)
             }
 
             istate = isBody;
-            /* yes, fall through, we do not want to loose the first line */
+        /* yes, fall through, we do not want to loose the first line */
 
         case isBody:
             /* interpret [and reformat] cache response */
@@ -715,7 +715,7 @@ read_reply(int s, cachemgr_request * req)
              * 401 to .cgi because web server filters out all auth info. Thus we
              * disable authentication headers for now.
              */
-            if (!strncasecmp(buf, "WWW-Authenticate:", 17) || !strncasecmp(buf, "Proxy-Authenticate:", 19));	/* skip */
+            if (!strncasecmp(buf, "WWW-Authenticate:", 17) || !strncasecmp(buf, "Proxy-Authenticate:", 19));    /* skip */
             else
                 fputs(buf, stdout);
 
@@ -842,7 +842,7 @@ process_request(cachemgr_request * req)
                  "GET cache_object://%s/%s%s%s HTTP/1.0\r\n"
                  "User-Agent: cachemgr.cgi/%s\r\n"
                  "Accept: */*\r\n"
-                 "%s"			/* Authentication info or nothing */
+                 "%s"           /* Authentication info or nothing */
                  "\r\n",
                  req->hostname,
                  req->action,
@@ -1271,3 +1271,4 @@ check_target_acl(const char *hostname, int port)
     fclose(fp);
     return ret;
 }
+
diff --git a/tools/purge/conffile.cc b/tools/purge/conffile.cc
index ea6d36c9c0..7cb16c57a6 100644
--- a/tools/purge/conffile.cc
+++ b/tools/purge/conffile.cc
@@ -184,3 +184,4 @@ readConfigFile( CacheDirVector& cachedir, const char* fn, FILE* debug )
     regfree(&rexp);
     return cachedir.size();
 }
+
diff --git a/tools/purge/convert.cc b/tools/purge/convert.cc
index d019ae8cca..70064b648f 100644
--- a/tools/purge/convert.cc
+++ b/tools/purge/convert.cc
@@ -156,3 +156,4 @@ convertPortname( const char* port, unsigned short& dst )
     }
     return 0;
 }
+
diff --git a/tools/purge/copyout.cc b/tools/purge/copyout.cc
index 9902ac2ebd..7d792c30c6 100644
--- a/tools/purge/copyout.cc
+++ b/tools/purge/copyout.cc
@@ -278,3 +278,4 @@ copy_out( size_t filesize, size_t metasize, unsigned debug,
 
     BAUTZ(true);
 }
+
diff --git a/tools/purge/purge.cc b/tools/purge/purge.cc
index ff1c8fb3db..e73f9aa10e 100644
--- a/tools/purge/purge.cc
+++ b/tools/purge/purge.cc
@@ -163,7 +163,7 @@ struct REList {
 };
 
 REList::REList( const char* what, bool doCase )
-        :next(0),data(xstrdup(what))
+    :next(0),data(xstrdup(what))
 {
     int result = regcomp( &rexp, what,
                           REG_EXTENDED | REG_NOSUB | (doCase ? 0 : REG_ICASE) );
@@ -312,10 +312,10 @@ action( int fd, size_t metasize,
         const char* fn, const char* url, const SquidMetaList& meta )
 // purpose: if cmdline-requested, send the purge request to the cache
 // paramtr: fd (IN): open FD for the object file
-//	      metasize (IN): offset into data portion of file (meta data size)
+//        metasize (IN): offset into data portion of file (meta data size)
 //          fn (IN): name of the object file
 //          url (IN): URL string stored in the object file
-//	      meta (IN): list containing further meta data
+//        meta (IN): list containing further meta data
 // returns: true for a successful action, false otherwise. The action
 //          may just print the file, send the purge request or even
 //          remove unwanted files.
@@ -994,3 +994,4 @@ main( int argc, char* argv[] )
     delete list;
     return 0;
 }
+
diff --git a/tools/purge/signal.cc b/tools/purge/signal.cc
index 77038639ae..54350f7664 100644
--- a/tools/purge/signal.cc
+++ b/tools/purge/signal.cc
@@ -133,3 +133,4 @@ sigChild( int signo )
     return 0;
 #endif
 }
+
diff --git a/tools/purge/socket.cc b/tools/purge/socket.cc
index 352075a5e8..1ab37a5835 100644
--- a/tools/purge/socket.cc
+++ b/tools/purge/socket.cc
@@ -255,3 +255,4 @@ serverSocket( struct in_addr host, unsigned short port,
 
     return sockfd;
 }
+
diff --git a/tools/purge/squid-tlv.cc b/tools/purge/squid-tlv.cc
index b1953b4720..b0c320fed9 100644
--- a/tools/purge/squid-tlv.cc
+++ b/tools/purge/squid-tlv.cc
@@ -44,7 +44,7 @@
 #include "squid-tlv.hh"
 
 SquidTLV::SquidTLV( SquidMetaType _type, size_t _size, void* _data )
-        :next(0),size(_size)
+    :next(0),size(_size)
 {
     type = _type;
     data = (char*) _data;
@@ -81,3 +81,4 @@ SquidMetaList::search( SquidMetaType type ) const
     while ( temp && temp->type != type ) temp = temp->next;
     return temp;
 }
+
diff --git a/tools/squidclient/Parameters.h b/tools/squidclient/Parameters.h
index e597fb3ae8..35cd336aa3 100644
--- a/tools/squidclient/Parameters.h
+++ b/tools/squidclient/Parameters.h
@@ -35,3 +35,4 @@ public:
 extern Parameters scParams;
 
 #endif /* _SQUID_TOOLS_SQUIDCLIENT_PARAMETERS_H */
+
diff --git a/tools/squidclient/Ping.cc b/tools/squidclient/Ping.cc
index 01f235c6f5..fb9e3aa951 100644
--- a/tools/squidclient/Ping.cc
+++ b/tools/squidclient/Ping.cc
@@ -214,3 +214,4 @@ Ping::TheConfig::parseCommandOpts(int argc, char *argv[], int c, int &optIndex)
     opterr = saved_opterr;
     return false;
 }
+
diff --git a/tools/squidclient/Ping.h b/tools/squidclient/Ping.h
index 7e7ccdf9a3..d853ba4e42 100644
--- a/tools/squidclient/Ping.h
+++ b/tools/squidclient/Ping.h
@@ -60,3 +60,4 @@ void DisplayStats();
 } // namespace Ping
 
 #endif /* _SQUID_TOOLS_CLIENT_PING_H */
+
diff --git a/tools/squidclient/Transport.cc b/tools/squidclient/Transport.cc
index ac18f8fa6b..5b821ac834 100644
--- a/tools/squidclient/Transport.cc
+++ b/tools/squidclient/Transport.cc
@@ -506,3 +506,4 @@ Transport::ShutdownTls()
     Config.tlsEnabled = false;
 #endif
 }
+
diff --git a/tools/squidclient/Transport.h b/tools/squidclient/Transport.h
index 7bc08dc851..33cba7a62b 100644
--- a/tools/squidclient/Transport.h
+++ b/tools/squidclient/Transport.h
@@ -25,11 +25,11 @@ class TheConfig
 {
 public:
     TheConfig() :
-            ioTimeout(120),
-            localHost(NULL),
-            port(CACHE_HTTP_PORT),
-            tlsEnabled(false),
-            tlsAnonymous(false) {
+        ioTimeout(120),
+        localHost(NULL),
+        port(CACHE_HTTP_PORT),
+        tlsEnabled(false),
+        tlsAnonymous(false) {
         params = "NORMAL";
         hostname = "localhost";
     }
@@ -118,3 +118,4 @@ ssize_t Read(void *buf, size_t len);
 } // namespace Transport
 
 #endif /* SQUID_TOOLS_SQUIDCLIENT_TRANSPORT_H */
+
diff --git a/tools/squidclient/gssapi_support.cc b/tools/squidclient/gssapi_support.cc
index 3733f9193e..5498bb7885 100644
--- a/tools/squidclient/gssapi_support.cc
+++ b/tools/squidclient/gssapi_support.cc
@@ -146,3 +146,4 @@ GSSAPI_token(const char *server)
 }
 
 #endif /* HAVE_GSSAPI */
+
diff --git a/tools/squidclient/gssapi_support.h b/tools/squidclient/gssapi_support.h
index 46d65d97cf..2ca803ffbe 100644
--- a/tools/squidclient/gssapi_support.h
+++ b/tools/squidclient/gssapi_support.h
@@ -47,3 +47,4 @@ char *GSSAPI_token(const char *server);
 
 #endif /* HAVE_GSSAPI */
 #endif /* _SQUID_TOOLS_SQUIDCLIENT_GSSAPI_H */
+
diff --git a/tools/squidclient/squidclient.cc b/tools/squidclient/squidclient.cc
index db62555cb6..0f72bd8604 100644
--- a/tools/squidclient/squidclient.cc
+++ b/tools/squidclient/squidclient.cc
@@ -52,13 +52,13 @@ using namespace Squid;
 #endif
 
 #ifndef BUFSIZ
-#define BUFSIZ		8192
+#define BUFSIZ      8192
 #endif
 #ifndef MESSAGELEN
-#define MESSAGELEN	65536
+#define MESSAGELEN  65536
 #endif
 #ifndef HEADERLEN
-#define HEADERLEN	65536
+#define HEADERLEN   65536
 #endif
 
 /* Local functions */
@@ -98,37 +98,37 @@ usage(const char *progname)
               << "Usage: " << progname << " [Basic Options] [HTTP Options]" << std::endl
               << std::endl;
     std::cerr
-        << "    -s | --quiet    Silent.  Do not print response message to stdout." << std::endl
-        << "    -v | --verbose  Verbose debugging. Repeat (-vv) to increase output level." << std::endl
-        << "                    Levels:" << std::endl
-        << "                      1 - Print outgoing request message to stderr." << std::endl
-        << "                      2 - Print action trace to stderr." << std::endl
-        << "    --help          Display this help text." << std::endl
-        << std::endl;
+            << "    -s | --quiet    Silent.  Do not print response message to stdout." << std::endl
+            << "    -v | --verbose  Verbose debugging. Repeat (-vv) to increase output level." << std::endl
+            << "                    Levels:" << std::endl
+            << "                      1 - Print outgoing request message to stderr." << std::endl
+            << "                      2 - Print action trace to stderr." << std::endl
+            << "    --help          Display this help text." << std::endl
+            << std::endl;
     Transport::Config.usage();
     Ping::Config.usage();
     std::cerr
-        << "HTTP Options:" << std::endl
-        << "    -a           Do NOT include Accept: header." << std::endl
-        << "    -A           User-Agent: header. Use \"\" to omit." << std::endl
-        << "    -H 'string'  Extra headers to send. Use '\\n' for new lines." << std::endl
-        << "    -i IMS       If-Modified-Since time (in Epoch seconds)." << std::endl
-        << "    -j hosthdr   Host header content" << std::endl
-        << "    -k           Keep the connection active. Default is to do only one request then close." << std::endl
-        << "    -m method    Request method, default is GET." << std::endl
+            << "HTTP Options:" << std::endl
+            << "    -a           Do NOT include Accept: header." << std::endl
+            << "    -A           User-Agent: header. Use \"\" to omit." << std::endl
+            << "    -H 'string'  Extra headers to send. Use '\\n' for new lines." << std::endl
+            << "    -i IMS       If-Modified-Since time (in Epoch seconds)." << std::endl
+            << "    -j hosthdr   Host header content" << std::endl
+            << "    -k           Keep the connection active. Default is to do only one request then close." << std::endl
+            << "    -m method    Request method, default is GET." << std::endl
 #if HAVE_GSSAPI
-        << "    -n           Proxy Negotiate(Kerberos) authentication" << std::endl
-        << "    -N           WWW Negotiate(Kerberos) authentication" << std::endl
+            << "    -n           Proxy Negotiate(Kerberos) authentication" << std::endl
+            << "    -N           WWW Negotiate(Kerberos) authentication" << std::endl
 #endif
-        << "    -P file      Send content from the named file as request payload" << std::endl
-        << "    -r           Force cache to reload URL" << std::endl
-        << "    -t count     Trace count cache-hops" << std::endl
-        << "    -u user      Proxy authentication username" << std::endl
-        << "    -U user      WWW authentication username" << std::endl
-        << "    -V version   HTTP Version. Use '-' for HTTP/0.9 omitted case" << std::endl
-        << "    -w password  Proxy authentication password" << std::endl
-        << "    -W password  WWW authentication password" << std::endl
-        ;
+            << "    -P file      Send content from the named file as request payload" << std::endl
+            << "    -r           Force cache to reload URL" << std::endl
+            << "    -t count     Trace count cache-hops" << std::endl
+            << "    -u user      Proxy authentication username" << std::endl
+            << "    -U user      WWW authentication username" << std::endl
+            << "    -V version   HTTP Version. Use '-' for HTTP/0.9 omitted case" << std::endl
+            << "    -w password  Proxy authentication password" << std::endl
+            << "    -W password  WWW authentication password" << std::endl
+            ;
     exit(1);
 }
 
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
 
     Ip::ProbeTransport(); // determine IPv4 or IPv6 capabilities before parsing.
     if (argc < 2 || argv[argc-1][0] == '-') {
-        usage(argv[0]);		/* need URL */
+        usage(argv[0]);     /* need URL */
     } else if (argc >= 2) {
         strncpy(url, argv[argc - 1], BUFSIZ);
         url[BUFSIZ - 1] = '\0';
@@ -196,9 +196,9 @@ main(int argc, char *argv[])
                 Ping::Config.parseCommandOpts(argc, argv, c, optIndex);
                 continue;
 
-            case 'h':		/* remote host */
-            case 'l':		/* local host */
-            case 'p':		/* port number */
+            case 'h':       /* remote host */
+            case 'l':       /* local host */
+            case 'p':       /* port number */
                 // rewind and let the Transport::Config parser handle
                 optind -= 2;
 
@@ -231,15 +231,15 @@ main(int argc, char *argv[])
                 version = optarg;
                 break;
 
-            case 's':		/* silent */
+            case 's':       /* silent */
                 to_stdout = false;
                 break;
 
-            case 'k':		/* backward compat */
+            case 'k':       /* backward compat */
                 keep_alive = 1;
                 break;
 
-            case 'r':		/* reload */
+            case 'r':       /* reload */
                 reload = true;
                 break;
 
@@ -247,7 +247,7 @@ main(int argc, char *argv[])
                 put_file = xstrdup(optarg);
                 break;
 
-            case 'i':		/* IMS */
+            case 'i':       /* IMS */
                 ims = (time_t) atoi(optarg);
                 break;
 
@@ -313,7 +313,7 @@ main(int argc, char *argv[])
                 debugVerbose(2, "verbosity level set to " << scParams.verbosityLevel);
                 break;
 
-            case '?':		/* usage */
+            case '?':       /* usage */
 
             default:
                 usage(argv[0]);
@@ -583,3 +583,4 @@ set_our_signal(void)
     signal(SIGPIPE, pipe_handler);
 #endif
 }
+