Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

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