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.

55 lines
1.2 KiB

  1. /***
  2. *w4io.h - fake FILE structure for Win 4 printf/sprintf/debug printf support
  3. *
  4. */
  5. #ifdef unix
  6. #include <windows.h>
  7. #endif /* unix */
  8. #if defined(M_I386) || defined(WIN32)
  9. # ifndef WIN32
  10. # define WIN32
  11. # endif
  12. #elif !defined(M_I86LM)
  13. # error Must be FLAT or LARGE model.
  14. #endif
  15. #ifndef NULL
  16. # define NULL 0
  17. #endif
  18. struct w4io
  19. {
  20. union
  21. {
  22. struct
  23. {
  24. wchar_t *_pwcbuf; // wchar_t output buffer
  25. wchar_t *_pwcstart;
  26. } wc;
  27. struct
  28. {
  29. char *_pchbuf; // char output buffer
  30. char *_pchstart;
  31. } ch;
  32. } buf ;
  33. unsigned int cchleft; // output buffer character count
  34. void (_cdecl *writechar)(int ch,
  35. int num,
  36. struct w4io *f,
  37. int *pcchwritten);
  38. };
  39. #define pwcbuf buf.wc._pwcbuf
  40. #define pwcstart buf.wc._pwcstart
  41. #define pchbuf buf.ch._pchbuf
  42. #define pchstart buf.ch._pchstart
  43. #define REG1 register
  44. #define REG2 register
  45. /* prototypes */
  46. int _cdecl w4iooutput(struct w4io *stream, const char *format, va_list argptr);