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.

60 lines
1.4 KiB

  1. // iosptrs -- iostream object pointers for Microsoft
  2. #include <iostream>
  3. _STD_BEGIN
  4. #pragma warning(disable: 4074)
  5. #pragma init_seg(compiler)
  6. // OBJECT DECLARATIONS
  7. _CRTIMP2 istream *_Ptr_cin = 0;
  8. _CRTIMP2 ostream *_Ptr_cout = 0;
  9. _CRTIMP2 ostream *_Ptr_cerr = 0;
  10. _CRTIMP2 ostream *_Ptr_clog = 0;
  11. // WIDE OBJECTS
  12. _CRTIMP2 wistream *_Ptr_wcin = 0;
  13. _CRTIMP2 wostream *_Ptr_wcout = 0;
  14. _CRTIMP2 wostream *_Ptr_wcerr = 0;
  15. _CRTIMP2 wostream *_Ptr_wclog = 0;
  16. _STD_END
  17. _C_STD_BEGIN
  18. // FINALIZATION CODE
  19. _EXTERN_C
  20. #define NATS 10 /* fclose, xgetloc, locks, facet free, etc. */
  21. /* static data */
  22. static void (*atfuns[NATS])(void) = {0};
  23. static size_t atcount = {NATS};
  24. _CRTIMP2 void __cdecl _Atexit(void (__cdecl *pf)())
  25. { // add to wrapup list
  26. if (atcount == 0)
  27. abort(); /* stack full, give up */
  28. else
  29. atfuns[--atcount] = pf;
  30. }
  31. _END_EXTERN_C
  32. struct _Init_atexit
  33. { // controller for atexit processing
  34. ~_Init_atexit()
  35. { // process wrapup functions
  36. while (atcount < NATS)
  37. (*atfuns[atcount++])();
  38. }
  39. };
  40. static std::_Init_locks initlocks;
  41. static _Init_atexit init_atexit;
  42. char _PJP_CPP_Copyright[] =
  43. "Copyright (c) 1992-2001 by P.J. Plauger,"
  44. " licensed by Dinkumware, Ltd."
  45. " ALL RIGHTS RESERVED.";
  46. _C_STD_END
  47. /*
  48. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  49. * Consult your license regarding permissions and restrictions.
  50. V3.10:0009 */