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.

144 lines
2.8 KiB

  1. /***
  2. *direct.h - function declarations for directory handling/creation
  3. *
  4. * Copyright (c) 1985-1994, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This include file contains the function declarations for the library
  8. * functions related to directory handling and creation.
  9. *
  10. ****/
  11. #ifndef _INC_DIRECT
  12. #define _INC_DIRECT
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  17. #ifndef _CRTAPI1
  18. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  19. #define _CRTAPI1 __cdecl
  20. #else
  21. #define _CRTAPI1
  22. #endif
  23. #endif
  24. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  25. #ifndef _CRTAPI2
  26. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  27. #define _CRTAPI2 __cdecl
  28. #else
  29. #define _CRTAPI2
  30. #endif
  31. #endif
  32. /* Define _CRTIMP */
  33. #ifndef _CRTIMP
  34. #ifdef _NTSDK
  35. /* definition compatible with NT SDK */
  36. #define _CRTIMP
  37. #else /* ndef _NTSDK */
  38. /* current definition */
  39. #ifdef _DLL
  40. #define _CRTIMP __declspec(dllimport)
  41. #else /* ndef _DLL */
  42. #define _CRTIMP
  43. #endif /* _DLL */
  44. #endif /* _NTSDK */
  45. #endif /* _CRTIMP */
  46. /* Define __cdecl for non-Microsoft compilers */
  47. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  48. #define __cdecl
  49. #endif
  50. #ifndef _WCHAR_T_DEFINED
  51. typedef unsigned short wchar_t;
  52. #define _WCHAR_T_DEFINED
  53. #endif
  54. #ifndef _SIZE_T_DEFINED
  55. typedef unsigned int size_t;
  56. #define _SIZE_T_DEFINED
  57. #endif
  58. /* _getdiskfree structure for _getdiskfree() */
  59. #ifndef _DISKFREE_T_DEFINED
  60. struct _diskfree_t {
  61. unsigned total_clusters;
  62. unsigned avail_clusters;
  63. unsigned sectors_per_cluster;
  64. unsigned bytes_per_sector;
  65. };
  66. #define _DISKFREE_T_DEFINED
  67. #endif
  68. /* function prototypes */
  69. _CRTIMP int __cdecl _chdir(const char *);
  70. _CRTIMP int __cdecl _chdrive(int);
  71. _CRTIMP char * __cdecl _getcwd(char *, int);
  72. _CRTIMP char * __cdecl _getdcwd(int, char *, int);
  73. _CRTIMP int __cdecl _getdrive(void);
  74. _CRTIMP int __cdecl _mkdir(const char *);
  75. _CRTIMP int __cdecl _rmdir(const char *);
  76. _CRTIMP unsigned __cdecl _getdiskfree(unsigned, struct _diskfree_t *);
  77. _CRTIMP unsigned long __cdecl _getdrives(void);
  78. #ifndef _WDIRECT_DEFINED
  79. /* wide function prototypes, also declared in wchar.h */
  80. _CRTIMP int __cdecl _wchdir(const wchar_t *);
  81. _CRTIMP wchar_t * __cdecl _wgetcwd(wchar_t *, int);
  82. _CRTIMP wchar_t * __cdecl _wgetdcwd(int, wchar_t *, int);
  83. _CRTIMP int __cdecl _wmkdir(const wchar_t *);
  84. _CRTIMP int __cdecl _wrmdir(const wchar_t *);
  85. #define _WDIRECT_DEFINED
  86. #endif
  87. #if !__STDC__
  88. /* Non-ANSI names for compatibility */
  89. #ifdef _NTSDK
  90. #define chdir _chdir
  91. #define getcwd _getcwd
  92. #define mkdir _mkdir
  93. #define rmdir _rmdir
  94. #else /* _NTSDK */
  95. _CRTIMP int __cdecl chdir(const char *);
  96. _CRTIMP char * __cdecl getcwd(char *, int);
  97. _CRTIMP int __cdecl mkdir(const char *);
  98. _CRTIMP int __cdecl rmdir(const char *);
  99. #endif /* _NTSDK */
  100. #define diskfree_t _diskfree_t
  101. #endif /* __STDC__ */
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105. #endif /* _INC_DIRECT */