summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-09 22:50:12 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-09 22:50:12 -0700
commit41b7cf934f8af2a9fb622790bd28e2e8742ba380 (patch)
treeb740872ac2ec8638bb0b2e296c8697ac021dbdda /lib.h
parent4c7f6f212eca77c2aae3d4bbc9b6be7f683cf260 (diff)
downloadtxr-41b7cf934f8af2a9fb622790bd28e2e8742ba380.tar.gz
txr-41b7cf934f8af2a9fb622790bd28e2e8742ba380.tar.bz2
txr-41b7cf934f8af2a9fb622790bd28e2e8742ba380.zip
One more swing at this with the axe.
* lib.h (wini, wref): New macros. * stream.c (string_out_put_char): Rewritten with macros to eliminate preprocessor #if test.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index eb42e96c..235ab169 100644
--- a/lib.h
+++ b/lib.h
@@ -192,8 +192,12 @@ typedef struct wli wchli_t;
#if LIT_ALIGN < 4
#define wli(lit) ((const wchli_t *) L"\0" L ## lit L"\0")
+#define wini(ini) L"\0" L ## ini L"\0"
+#define wref(arr) ((arr) + 1)
#else
#define wli(lit) ((const wchli_t *) L ## lit)
+#define wini(ini) L ## ini
+#define wref(arr) (arr)
#endif
INLINE val auto_str(const wchli_t *str)