Reduces dependencies and removes one more unnecessary symbol
SQUIDCEXTERN int tvSubUsec(struct timeval, struct timeval);
SQUIDCEXTERN double tvSubDsec(struct timeval, struct timeval);
-SQUIDCEXTERN size_t xcountws(const char *str);
SQUIDCEXTERN void Tolower(char *);
#if defined(__cplusplus)
/*
#define _etext etext
#include "squid.h"
-#include "profiler/Profiler.h"
#include "util.h"
#if HAVE_STDIO_H
(double) (t2.tv_usec - t1.tv_usec) / 1000000.0;
}
-/* returns the number of leading white spaces in str; handy in skipping ws */
-size_t
-xcountws(const char *str)
-{
- size_t count = 0;
- PROF_start(xcountws);
-
- if (str) {
- while (xisspace(*str)) {
- str++;
- count++;
- }
- }
-
- PROF_stop(xcountws);
- return count;
-}
-
/* somewhat safer calculation of %s */
double
xpercent(double part, double whole)
return NULL;
/* skip white space */
- field += xcountws(field);
+ for(; field && xisspace(*field); field++);
if (!*field) /* no authorization cookie */
return NULL;