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.

48 lines
1.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996.
  5. //
  6. //--------------------------------------------------------------------------
  7. /***
  8. *w4io.h - fake FILE structure for Win 4 printf/sprintf/debug printf support
  9. *
  10. */
  11. #ifndef NULL
  12. # define NULL 0
  13. #endif
  14. struct w4io
  15. {
  16. union
  17. {
  18. struct
  19. {
  20. wchar_t *_pwcbuf; // wchar_t output buffer
  21. wchar_t *_pwcstart;
  22. } wc;
  23. struct
  24. {
  25. char *_pchbuf; // char output buffer
  26. char *_pchstart;
  27. } ch;
  28. } buf ;
  29. unsigned int cchleft; // output buffer character count
  30. void (_cdecl *writechar)(int ch,
  31. int num,
  32. struct w4io *f,
  33. int *pcchwritten);
  34. };
  35. #define pwcbuf buf.wc._pwcbuf
  36. #define pwcstart buf.wc._pwcstart
  37. #define pchbuf buf.ch._pchbuf
  38. #define pchstart buf.ch._pchstart
  39. #define REG1 register
  40. #define REG2 register
  41. /* prototypes */
  42. int _cdecl w4iooutput(struct w4io *stream, const char *format, va_list argptr);