689a55597aa8486ca5d82919692138c22a8ee3c0 kent Wed Mar 28 11:21:51 2012 -0700 Improving comments. diff --git src/lib/common.c src/lib/common.c index 796a794..5b9daa6 100644 --- src/lib/common.c +++ src/lib/common.c @@ -2018,32 +2018,32 @@ char *skipLeadingSpaces(char *s) /* Return first non-white space. */ { char c; if (s == NULL) return NULL; for (;;) { c = *s; if (!isspace(c)) return s; ++s; } } -/* Return first white space or NULL if none.. */ char *skipToSpaces(char *s) +/* Return first white space or NULL if none.. */ { char c; if (s == NULL) return NULL; for (;;) { c = *s; if (c == 0) return NULL; if (isspace(c)) return s; ++s; } } @@ -3288,31 +3288,30 @@ return s; } char *splitOffNonNumeric(char *s) /* Split off non-numeric part, e.g. mm of mm8. Result should be freed when done */ { return cloneStringZ(s,skipToNumeric(s)-s); } char *splitOffNumber(char *db) /* Split off number part, e.g. 8 of mm8. Result should be freed when done */ { return cloneString(skipToNumeric(db)); } - time_t mktimeFromUtc (struct tm *t) /* Return time_t for tm in UTC (GMT) * Useful for stuff like converting to time_t the * last-modified HTTP response header * which is always GMT. Returns -1 on failure of mktime */ { time_t time; char *tz; char save_tz[100]; tz=getenv("TZ"); if (tz) safecpy(save_tz, sizeof(save_tz), tz); setenv("TZ", "GMT0", 1); tzset(); t->tm_isdst = 0;