Provide trivial macro implementations of getwc(), getwchar(), putwc() and
putwchar() to reduce function call overhead.
This commit is contained in:
parent
e0efc557e7
commit
e7e4715db2
@ -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);
|
||||
|
@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libc_private.h"
|
||||
#include "local.h"
|
||||
|
||||
#undef getwc
|
||||
|
||||
/*
|
||||
* Synonym for fgetwc(). The only difference is that getwc(), if it is a
|
||||
* macro, may evaluate `fp' more than once.
|
||||
|
@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libc_private.h"
|
||||
#include "local.h"
|
||||
|
||||
#undef getwchar
|
||||
|
||||
/*
|
||||
* Synonym for fgetwc(stdin).
|
||||
*/
|
||||
|
@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libc_private.h"
|
||||
#include "local.h"
|
||||
|
||||
#undef putwc
|
||||
|
||||
/*
|
||||
* Synonym for fputwc(). The only difference is that putwc(), if it is a
|
||||
* macro, may evaluate `fp' more than once.
|
||||
|
@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libc_private.h"
|
||||
#include "local.h"
|
||||
|
||||
#undef putwchar
|
||||
|
||||
/*
|
||||
* Synonym for fputwc(wc, stdout).
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user