sec = (time_t) (t / USEC_PER_SEC);
- if (strftime(buf, l, "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) <= 0)
+ if (strftime(buf, l, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) <= 0)
return NULL;
return buf;
unsigned columns(void) {
const char *e;
- unsigned c;
+ int c;
if (_likely_(cached_columns > 0))
return cached_columns;
c = 0;
e = getenv("COLUMNS");
if (e)
- safe_atou(e, &c);
+ safe_atoi(e, &c);
if (c <= 0)
c = fd_columns(STDOUT_FILENO);