home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / fgetwchr.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  1KB  |  50 lines

  1. /***
  2. *fgetwchr.c - get a wide character from stdin
  3. *
  4. *       Copyright (c) 1993-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       defines _fgetwchar() and getwchar() - read a wide character from stdin
  8. *
  9. *******************************************************************************/
  10.  
  11.  
  12. #include <cruntime.h>
  13. #include <stdio.h>
  14. #include <tchar.h>
  15.  
  16. /***
  17. *wint_t _fgetwchar(), getwchar() - read a wide character from stdin
  18. *
  19. *Purpose:
  20. *       Reads the next wide character from stdin.  Function version of
  21. *       getwchar() macro.
  22. *
  23. *Entry:
  24. *       None.
  25. *
  26. *Exit:
  27. *       Returns wide character read or WEOF if at end-of-file or an error occured,
  28. *       in which case the appropriate flag is set in the FILE structure.
  29. *
  30. *Exceptions:
  31. *
  32. *******************************************************************************/
  33.  
  34. wint_t __cdecl _fgetwchar (
  35.         void
  36.         )
  37. {
  38.         return(getwc(stdin));
  39. }
  40.  
  41. #undef getwchar
  42.  
  43. wint_t __cdecl getwchar (
  44.         void
  45.         )
  46. {
  47.         return(_fgetwchar());
  48. }
  49.  
  50.