From 3a6c04927b4136a195b0bc259f50caf8249dfced Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 16 Nov 2009 22:05:28 -0800 Subject: Big round of changes to switch the code base to use the stream abstraction instead of directly using C standard I/O, to eliminate most uses of C formatted I/O, and fix numerous bugs, such variadic argument lists which lack a terminating ``nao'' sentinel. Bug 28033 is addressed by this patch, since streams no longer provide printf-compatible formatting. The native formatter is extended with some additional capabilities to take over. The work on literal objects is expanded and they are now used throughout the code base. Fixed bad realloc in string output stream: reallocating by number of wide chars rather than bytes. --- lib.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 4db6ebf8..47f33e1a 100644 --- a/lib.h +++ b/lib.h @@ -51,7 +51,10 @@ typedef enum functype #define is_chr(obj) (tag(obj) == TAG_CHR) #define is_lit(obj) (tag(obj) == TAG_LIT) #define type(obj) (tag(obj) ? ((type_t) tag(obj)) : (obj)->t.type) -#define lit(strlit) ((obj_t *) ((long) (L ## strlit) | TAG_LIT)) +#define lit_noex(strlit) ((obj_t *) ((long) (L ## strlit) | TAG_LIT)) +#define lit(strlit) lit_noex(strlit) +#define auto_str(str) ((obj_t *) ((long) (str) | TAG_LIT)) +#define static_str(str) ((obj_t *) ((long) (str) | TAG_LIT)) #define litptr(obj) ((wchar_t *) ((long) obj & ~TAG_MASK)) typedef union obj obj_t; -- cgit v1.2.3