diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:58:39 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:58:39 -0500 |
| commit | 178bc0e627d6fa3be9d18d40ba8828604ce71134 (patch) | |
| tree | e96dcbaa6500450c6c7b0d2ac43d043060ab2346 /src/time/asctime.c | |
| parent | bafccb2f57ac1a1852be2d6aafe33cf02d1630c1 (diff) | |
update standards and safety checks
Diffstat (limited to 'src/time/asctime.c')
| -rw-r--r-- | src/time/asctime.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/time/asctime.c b/src/time/asctime.c index a67cb603..44ce130c 100644 --- a/src/time/asctime.c +++ b/src/time/asctime.c @@ -1,7 +1,6 @@ -#if 0 - #include <stdio.h> #include <time.h> +#include "_safety.h" /** convert broken down time to string **/ @@ -16,6 +15,8 @@ char * asctime(const struct tm * timeptr) }; static char result[26]; + SIGNAL_SAFE(0); + sprintf(result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", days[timeptr->tm_wday], months[timeptr->tm_mon], timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, @@ -37,6 +38,3 @@ hour of the day (in the range (0,23)), LITERAL(mm) is the minute of the hour RETURN_ALWAYS(a pointer to the string) STDC(1) */ - - -#endif |
