do not use sprintf; use sprint instead
This commit is contained in:
parent
c5ee3b6735
commit
b93cdd9aac
1 changed files with 3 additions and 3 deletions
|
@ -69,13 +69,13 @@ init_pp()
|
||||||
tp = localtime(&clock);
|
tp = localtime(&clock);
|
||||||
|
|
||||||
/* __DATE__ */
|
/* __DATE__ */
|
||||||
sprintf(dbuf, "\"%.3s %.2d %d\"", months[tp->tm_mon],
|
sprint(dbuf, "\"%s %2d %d\"", months[tp->tm_mon],
|
||||||
tp->tm_mday, tp->tm_year+1900);
|
tp->tm_mday, tp->tm_year+1900);
|
||||||
if (tp->tm_mday < 10) dbuf[5] = ' '; /* hack */
|
/* if (tp->tm_mday < 10) dbuf[5] = ' '; /* hack */
|
||||||
macro_def(str2idf("__DATE__", 0), dbuf, -1, strlen(dbuf), NOUNDEF);
|
macro_def(str2idf("__DATE__", 0), dbuf, -1, strlen(dbuf), NOUNDEF);
|
||||||
|
|
||||||
/* __TIME__ */
|
/* __TIME__ */
|
||||||
sprintf(tbuf, "\"%.2d:%.2d:%.2d\"", tp->tm_hour, tp->tm_min, tp->tm_sec);
|
sprint(tbuf, "\"%02d:%02d:%02d\"", tp->tm_hour, tp->tm_min, tp->tm_sec);
|
||||||
macro_def(str2idf("__TIME__", 0), tbuf, -1, strlen(tbuf), NOUNDEF);
|
macro_def(str2idf("__TIME__", 0), tbuf, -1, strlen(tbuf), NOUNDEF);
|
||||||
|
|
||||||
/* __LINE__ */
|
/* __LINE__ */
|
||||||
|
|
Loading…
Reference in a new issue