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

@ -20,9 +20,6 @@
#include "libc/time/struct/tm.h"
#include "libc/time/time.h"
STATIC_YOINK("ntoa");
STATIC_YOINK("stoa");
static unsigned clip(unsigned index, unsigned count) {
return index < count ? index : 0;
}

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 */

View file

@ -27,9 +27,6 @@
#include "libc/time/time.h"
#include "libc/x/x.h"
STATIC_YOINK("stoa");
STATIC_YOINK("ntoa");
/**
* @fileoverview Timestamps in One True Format w/o toil.
*/