home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / file2.h < prev    next >
C/C++ Source or Header  |  1998-06-17  |  2KB  |  63 lines

  1. /***
  2. *file2.h - auxiliary file structure used internally by file run-time routines
  3. *
  4. *       Copyright (c) 1985-1997, 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. ****/
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif  /* _MSC_VER > 1000 */
  17.  
  18. #ifndef _INC_FILE2
  19. #define _INC_FILE2
  20.  
  21. #ifndef _CRTBLD
  22. /*
  23.  * This is an internal C runtime header file. It is used when building
  24.  * the C runtimes only. It is not to be used as a public header file.
  25.  */
  26. #error ERROR: Use of C runtime library internal header file.
  27. #endif  /* _CRTBLD */
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif  /* __cplusplus */
  32.  
  33. /* Additional _iobuf[]._flag values
  34.  *
  35.  *  _IOSETVBUF - Indicates file was buffered via a setvbuf (or setbuf call).
  36.  *               Currently used ONLY in _filbuf.c, _getbuf.c, fseek.c and
  37.  *               setvbuf.c, to disable buffer resizing on "random access"
  38.  *               files if the buffer was user-installed.
  39.  */
  40.  
  41. #define _IOYOURBUF      0x0100
  42. #define _IOSETVBUF      0x0400
  43. #define _IOFEOF         0x0800
  44. #define _IOFLRTN        0x1000
  45. #define _IOCTRLZ        0x2000
  46. #define _IOCOMMIT       0x4000
  47.  
  48.  
  49. /* General use macros */
  50.  
  51. #define inuse(s)        ((s)->_flag & (_IOREAD|_IOWRT|_IORW))
  52. #define mbuf(s)         ((s)->_flag & _IOMYBUF)
  53. #define nbuf(s)         ((s)->_flag & _IONBF)
  54. #define ybuf(s)         ((s)->_flag & _IOYOURBUF)
  55. #define bigbuf(s)       ((s)->_flag & (_IOMYBUF|_IOYOURBUF))
  56. #define anybuf(s)       ((s)->_flag & (_IOMYBUF|_IONBF|_IOYOURBUF))
  57.  
  58. #ifdef __cplusplus
  59. }
  60. #endif  /* __cplusplus */
  61.  
  62. #endif  /* _INC_FILE2 */
  63.