diff options
| author | Tyge Løvset <[email protected]> | 2023-06-07 21:17:41 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-06-07 21:17:41 +0200 |
| commit | 2bac1dff09459ce55f6e6813af96f845a8c981a1 (patch) | |
| tree | 5e813bb23bc32b4dabd9b0fe43875105ec3f1ef7 /include/c11 | |
| parent | d6ddb811365d5dd2cbc9c485f43ed4215d8e0148 (diff) | |
| download | STC-modified-2bac1dff09459ce55f6e6813af96f845a8c981a1.tar.gz STC-modified-2bac1dff09459ce55f6e6813af96f845a8c981a1.zip | |
Minor adjustment in fmt.h
Diffstat (limited to 'include/c11')
| -rw-r--r-- | include/c11/fmt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/c11/fmt.h b/include/c11/fmt.h index 6c1388af..7e85e4dd 100644 --- a/include/c11/fmt.h +++ b/include/c11/fmt.h @@ -95,11 +95,11 @@ typedef struct { _Bool overwrite;
} fmt_stream;
-#define fmt_tm(fmt, tmptr) _fmt_strftime(fmt, tmptr) /* Max 2 usages. Buffer = 64 chars. */
-void fmt_close(fmt_stream* ss);
+struct tm; /* Max 2 usages. Buffer = 64 chars. */
+const char* fmt_tm(const char *fmt, const struct tm *tp);
+void fmt_close(fmt_stream* ss);
int _fmt_parse(char* p, int nargs, const char *fmt, ...);
void _fmt_bprint(fmt_stream*, const char* fmt, ...);
-struct tm; const char* _fmt_strftime(const char *fmt, const struct tm *tp);
#ifndef FMT_MAX
#define FMT_MAX 128
@@ -206,7 +206,7 @@ void fmt_close(fmt_stream* ss) { free(ss->data);
}
-const char* _fmt_strftime(const char *fmt, const struct tm *tp) {
+const char* fmt_tm(const char *fmt, const struct tm *tp) {
static char buf[2][64], i = 0;
i = !i;
strftime(buf[i], 64, fmt, tp);
|
