Support proper %g, %f, and %a float formatting

See #61
See #104
This commit is contained in:
Justine Tunney 2021-03-05 10:31:16 -08:00
parent e26bdbec52
commit f064183646
48 changed files with 1034 additions and 921 deletions

View file

@ -25,8 +25,6 @@
#include "libc/time/time.h"
#include "libc/time/tzfile.internal.h"
STATIC_YOINK("ntoa");
asm(".ident\t\"\\n\\n\
strftime (BSD-3)\\n\
Copyright 1989 The Regents of the University of California\"");
@ -330,13 +328,13 @@ static char *strftime_timefmt(char *p, const char *pe, const char *format,
if (t->tm_isdst == 0)
#ifdef USG_COMPAT
diff = -timezone;
#else /* !defined USG_COMPAT */
#else /* !defined USG_COMPAT */
continue;
#endif /* !defined USG_COMPAT */
else
#ifdef ALTZONE
diff = -altzone;
#else /* !defined ALTZONE */
#else /* !defined ALTZONE */
continue;
#endif /* !defined ALTZONE */
#endif /* !defined TM_GMTOFF */