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.

53 lines
1.4 KiB

  1. /***
  2. *fgetws.c - get wide string from a file
  3. *
  4. * Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * defines fgetws() - read a wide string from a file
  8. *
  9. *Revision History:
  10. * 04-26-93 CFW Module created.
  11. * 02-07-94 CFW POSIXify.
  12. * 02-22-95 GJF Removed obsolete WPRFLAG.
  13. *
  14. *******************************************************************************/
  15. #ifndef _POSIX_
  16. /***
  17. *wchar_t *fgetws(string, count, stream) - input string from a stream
  18. *
  19. *Purpose:
  20. * get a string, up to count-1 wide chars or L'\n', whichever comes first,
  21. * append L'\0' and put the whole thing into string. the L'\n' IS included
  22. * in the string. if count<=1 no input is requested. if WEOF is found
  23. * immediately, return NULL. if WEOF found after chars read, let WEOF
  24. * finish the string as L'\n' would.
  25. *
  26. *Entry:
  27. * wchar_t *string - pointer to place to store string
  28. * int count - max characters to place at string (include \0)
  29. * FILE *stream - stream to read from
  30. *
  31. *Exit:
  32. * returns wide string with text read from file in it.
  33. * if count <= 0 return NULL
  34. * if count == 1 put null string in string
  35. * returns NULL if error or end-of-file found immediately
  36. *
  37. *Exceptions:
  38. *
  39. *******************************************************************************/
  40. #ifndef _UNICODE /* CRT flag */
  41. #define _UNICODE 1
  42. #endif
  43. #ifndef UNICODE /* NT flag */
  44. #define UNICODE 1
  45. #endif
  46. #include "fgets.c"
  47. #endif /* _POSIX_ */