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.

100 lines
3.9 KiB

  1. /***
  2. *msdos.h - MS-DOS definitions for C runtime
  3. *
  4. * Copyright (c) 1987-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * The file contains the MS-DOS definitions (function request numbers,
  8. * flags, etc.) used by the C runtime.
  9. *
  10. * [Internal]
  11. *
  12. *Revision History:
  13. * 08-01-89 GJF Fixed copyright
  14. * 10-30-89 GJF Fixed copyright (again)
  15. * 03-01-90 GJF Added #ifndef _INC_MSDOS stuff
  16. * 05-09-90 JCR Added _STACKSLOP (from msdos.inc)
  17. * 11-30-90 GJF Added Win32 support. Also removed constants that
  18. * are not used in Cruiser or Win32 runtimes.
  19. * 12-04-90 SRW Removed Win32 dependencies from this file.
  20. * Put them in internal.h
  21. * 07-01-92 GJF FRDONLY is not set or used for Win32.
  22. * 02-23-93 SKS Update copyright to 1993
  23. * 12-28-94 JCF Merged with mac header.
  24. * 02-14-95 CFW Clean up Mac merge.
  25. * 03-29-95 CFW Add error message to internal headers.
  26. * 12-14-95 JWM Add "#pragma once".
  27. * 05-16-96 GJF Added FNOINHERIT.
  28. * 02-24-97 GJF Replaced defined(_M_MPPC) || defined(_M_M68K) with
  29. * defined(_MAC).
  30. * 05-17-99 PML Remove all Macintosh support.
  31. *
  32. ****/
  33. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  34. #pragma once
  35. #endif
  36. #ifndef _INC_MSDOS
  37. #define _INC_MSDOS
  38. #ifndef _CRTBLD
  39. /*
  40. * This is an internal C runtime header file. It is used when building
  41. * the C runtimes only. It is not to be used as a public header file.
  42. */
  43. #error ERROR: Use of C runtime library internal header file.
  44. #endif /* _CRTBLD */
  45. /* Stack slop for o.s. system call overhead */
  46. #define _STACKSLOP 1024
  47. /* __osfile flag values for DOS file handles */
  48. #define FOPEN 0x01 /* file handle open */
  49. #define FEOFLAG 0x02 /* end of file has been encountered */
  50. #define FCRLF 0x04 /* CR-LF across read buffer (in text mode) */
  51. #define FPIPE 0x08 /* file handle refers to a pipe */
  52. #define FNOINHERIT 0x10 /* file handle opened _O_NOINHERIT */
  53. #define FAPPEND 0x20 /* file handle opened O_APPEND */
  54. #define FDEV 0x40 /* file handle refers to device */
  55. #define FTEXT 0x80 /* file handle is in text mode */
  56. /* DOS errno values for setting __doserrno in C routines */
  57. #define E_ifunc 1 /* invalid function code */
  58. #define E_nofile 2 /* file not found */
  59. #define E_nopath 3 /* path not found */
  60. #define E_toomany 4 /* too many open files */
  61. #define E_access 5 /* access denied */
  62. #define E_ihandle 6 /* invalid handle */
  63. #define E_arena 7 /* arena trashed */
  64. #define E_nomem 8 /* not enough memory */
  65. #define E_iblock 9 /* invalid block */
  66. #define E_badenv 10 /* bad environment */
  67. #define E_badfmt 11 /* bad format */
  68. #define E_iaccess 12 /* invalid access code */
  69. #define E_idata 13 /* invalid data */
  70. #define E_unknown 14 /* ??? unknown error ??? */
  71. #define E_idrive 15 /* invalid drive */
  72. #define E_curdir 16 /* current directory */
  73. #define E_difdev 17 /* not same device */
  74. #define E_nomore 18 /* no more files */
  75. #define E_maxerr2 19 /* unknown error - Version 2.0 */
  76. #define E_sharerr 32 /* sharing violation */
  77. #define E_lockerr 33 /* locking violation */
  78. #define E_maxerr3 34 /* unknown error - Version 3.0 */
  79. /* DOS file attributes */
  80. #define A_RO 0x1 /* read only */
  81. #define A_H 0x2 /* hidden */
  82. #define A_S 0x4 /* system */
  83. #define A_V 0x8 /* volume id */
  84. #define A_D 0x10 /* directory */
  85. #define A_A 0x20 /* archive */
  86. #define A_MOD (A_RO+A_H+A_S+A_A) /* changeable attributes */
  87. #endif /* _INC_MSDOS */