Source code of Windows XP (NT5)
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.

31 lines
686 B

  1. // wcerr -- initialize standard wide error stream
  2. #include <fstream>
  3. #include <iostream>
  4. #pragma warning(disable: 4074)
  5. #pragma init_seg(compiler)
  6. _STD_BEGIN
  7. // OBJECT DECLARATIONS
  8. static _Init_locks initlocks;
  9. static wfilebuf wferr(_cpp_stderr);
  10. _CRTIMP2 wostream wcerr(&wferr);
  11. // INITIALIZATION CODE
  12. struct _Init_wcerr
  13. { // ensures that wcerr is initialized
  14. _Init_wcerr()
  15. { // initialize wcerr
  16. _Ptr_wcerr = &wcerr;
  17. wcerr.tie(_Ptr_wcout);
  18. wcerr.setf(ios_base::unitbuf);
  19. }
  20. };
  21. static _Init_wcerr init_wcerr;
  22. _STD_END
  23. /*
  24. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  25. * Consult your license regarding permissions and restrictions.
  26. V3.10:0009 */