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
665 B

  1. // cerr -- initialize standard 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 filebuf ferr(_cpp_stderr);
  10. _CRTIMP2 ostream cerr(&ferr);
  11. // INITIALIZATION CODE
  12. struct _Init_cerr
  13. { // ensures that cerr is initialized
  14. _Init_cerr()
  15. { // initialize cerr
  16. _Ptr_cerr = &cerr;
  17. cerr.tie(_Ptr_cout);
  18. cerr.setf(ios_base::unitbuf);
  19. }
  20. };
  21. static _Init_cerr init_cerr;
  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 */