July 22, 2004
3:21 a.m.
** The format used in the (2004) standard is ** "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n" ** Use "%02d", as it is a bit more portable than "%.2d". ** Drop each .3 since they're superfluous given how we set wn and mn. */ (void) sprintf(buf, "%s %s%3d %02d:%02d:%02d %ld\n", wn, mn,
It's not correct to drop the two .3's here, since wn and mn might not be null terminated: they usually point to arrays of 3 characters that are not null-terminated.
might there not also be locale issues here? -- |-----< "CODE WARRIOR" >-----| codewarrior@daemon.org * "ah! i see you have the internet twofsonet@graffiti.com (Andrew Brown) that goes *ping*!" werdna@squooshy.com * "information is power -- share the wealth."