summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-05-25 10:42:52 +0000
committertjr <tjr@FreeBSD.org>2004-05-25 10:42:52 +0000
commit32620504ab77b61e84a6dc917988e249f5a8553a (patch)
tree5b5f4c02fb71eb2f4f502e7d05139e9e475ceea5 /include
parent5bfc126ed81efb2c1438e0f54ecf9287c2fe440d (diff)
downloadFreeBSD-src-32620504ab77b61e84a6dc917988e249f5a8553a.zip
FreeBSD-src-32620504ab77b61e84a6dc917988e249f5a8553a.tar.gz
Provide trivial macro implementations of getwc(), getwchar(), putwc() and
putwchar() to reduce function call overhead.
Diffstat (limited to 'include')
-rw-r--r--include/wchar.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/wchar.h b/include/wchar.h
index b8bb90a..ea4bd12 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -171,6 +171,14 @@ wchar_t *wmemset(wchar_t *, wchar_t, size_t);
int wprintf(const wchar_t * __restrict, ...);
int wscanf(const wchar_t * __restrict, ...);
+extern struct __sFILE *__stdinp;
+extern struct __sFILE *__stdoutp;
+
+#define getwc(fp) getwc(fp)
+#define getwchar() fgetwc(__stdinp)
+#define putwc(wc, fp) fputwc(wc, fp)
+#define putwchar(wc) fputwc(wc, __stdoutp)
+
#if __ISO_C_VISIBLE >= 1999
int vfwscanf(struct __sFILE * __restrict, const wchar_t * __restrict,
__va_list);
OpenPOWER on IntegriCloud