Provide trivial macro implementations of getwc(), getwchar(), putwc() and

putwchar() to reduce function call overhead.
This commit is contained in:
Tim J. Robbins 2004-05-25 10:42:52 +00:00
parent e0efc557e7
commit e7e4715db2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129705
5 changed files with 16 additions and 0 deletions

View File

@ -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);

View File

@ -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.

View File

@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
#undef getwchar
/*
* Synonym for fgetwc(stdin).
*/

View File

@ -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.

View File

@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
#undef putwchar
/*
* Synonym for fputwc(wc, stdout).
*/