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.

92 lines
3.3 KiB

  1. /***
  2. *file2.h - auxiliary file structure used internally by file run-time routines
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the auxiliary file structure used internally by
  8. * the file run time routines.
  9. *
  10. * [Internal]
  11. *
  12. *Revision History:
  13. * 06-29-87 JCR Removed _OLD_IOLBF/_OLD_IOFBF and associated lbuf macro.
  14. * 09-28-87 JCR Added _iob_index(); modified ybuf() and tmpnum() to use it.
  15. * 06-03-88 JCR Added _iob2_ macro; modified ybuf()/tmpnum()/_iob_index;
  16. * also padded FILE2 definition to be the same size as FILE.
  17. * 06-10-88 JCR Added ybuf2()/bigbuf2()/anybuf2()
  18. * 06-14-88 JCR Added (FILE *) casts to _iob_index() macro
  19. * 06-29-88 JCR Added _IOFLRTN bit (flush stream on per routine basis)
  20. * 08-18-88 GJF Revised to also work with the 386 (small model only).
  21. * 12-05-88 JCR Added _IOCTRLZ bit (^Z encountered by lowio read)
  22. * 04-11-89 JCR Removed _IOUNGETC bit (no longer needed)
  23. * 07-27-89 GJF Cleanup, now specific to the 386. Struct field
  24. * alignment is now protected by pack pragma.
  25. * 10-30-89 GJF Fixed copyright
  26. * 02-16-90 GJF _iob[], _iob2[] merge
  27. * 02-21-90 GJF Restored _iob_index() macro
  28. * 02-28-90 GJF Added #ifndef _INC_FILE2 stuff. Also, removed some
  29. * (now) useless preprocessor directives.
  30. * 07-11-90 SBM Added _IOCOMMIT bit (lowio commit on fflush call)
  31. * 03-11-92 GJF Removed _tmpnum() macro for Win32.
  32. * 06-03-92 KRS Added extern "C" stuff.
  33. * 02-23-93 SKS Update copyright to 1993
  34. * 06-22-93 GJF Added _IOSETVBUF flag.
  35. * 09-06-94 CFW Remove Cruiser support.
  36. * 02-14-95 CFW Clean up Mac merge.
  37. * 03-06-95 GJF Removed _iob_index().
  38. * 03-29-95 CFW Add error message to internal headers.
  39. * 12-14-95 JWM Add "#pragma once".
  40. * 02-24-97 GJF Detab-ed.
  41. *
  42. ****/
  43. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  44. #pragma once
  45. #endif
  46. #ifndef _INC_FILE2
  47. #define _INC_FILE2
  48. #ifndef _CRTBLD
  49. /*
  50. * This is an internal C runtime header file. It is used when building
  51. * the C runtimes only. It is not to be used as a public header file.
  52. */
  53. #error ERROR: Use of C runtime library internal header file.
  54. #endif /* _CRTBLD */
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. /* Additional _iobuf[]._flag values
  59. *
  60. * _IOSETVBUF - Indicates file was buffered via a setvbuf (or setbuf call).
  61. * Currently used ONLY in _filbuf.c, _getbuf.c, fseek.c and
  62. * setvbuf.c, to disable buffer resizing on "random access"
  63. * files if the buffer was user-installed.
  64. */
  65. #define _IOYOURBUF 0x0100
  66. #define _IOSETVBUF 0x0400
  67. #define _IOFEOF 0x0800
  68. #define _IOFLRTN 0x1000
  69. #define _IOCTRLZ 0x2000
  70. #define _IOCOMMIT 0x4000
  71. /* General use macros */
  72. #define inuse(s) ((s)->_flag & (_IOREAD|_IOWRT|_IORW))
  73. #define mbuf(s) ((s)->_flag & _IOMYBUF)
  74. #define nbuf(s) ((s)->_flag & _IONBF)
  75. #define ybuf(s) ((s)->_flag & _IOYOURBUF)
  76. #define bigbuf(s) ((s)->_flag & (_IOMYBUF|_IOYOURBUF))
  77. #define anybuf(s) ((s)->_flag & (_IOMYBUF|_IONBF|_IOYOURBUF))
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif /* _INC_FILE2 */