home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / dir.h < prev    next >
C/C++ Source or Header  |  2000-02-01  |  7KB  |  222 lines

  1. /*  dir.h
  2.  
  3.     Defines structures, macros, and functions for dealing with
  4.     directories and pathnames.
  5.  
  6. */
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 10.0
  10.  *
  11.  *      Copyright (c) 1987, 2000 by Inprise Corporation
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16. /* $Revision:   9.8  $ */
  17.  
  18. #if !defined(__DIR_H)
  19. #define __DIR_H
  20.  
  21. #ifndef ___STDDEF_H
  22. #include <_stddef.h>
  23. #endif
  24.  
  25. #if !defined(___TCHAR_H)
  26. #include <tchar.h>
  27. #endif
  28.  
  29. #if !defined(RC_INVOKED)
  30.  
  31. #if defined(__STDC__)
  32. #pragma warn -nak
  33. #endif
  34.  
  35. #endif  /* !RC_INVOKED */
  36.  
  37. #ifdef __cplusplus
  38. namespace std {
  39. #endif /* __cplusplus */
  40.  
  41. #define WILDCARDS 0x01
  42. #define EXTENSION 0x02
  43. #define FILENAME  0x04
  44. #define DIRECTORY 0x08
  45. #define DRIVE     0x10
  46.  
  47.  
  48. #if !defined(RC_INVOKED)
  49. #pragma pack(push, 1)
  50. #endif
  51.  
  52. #ifndef MAXPATH
  53. #define MAXPATH   260
  54. #define MAXDIR    256
  55. #define MAXFILE   256
  56. #define MAXEXT    256
  57. #define MAXDRIVE    3
  58. #endif
  59.  
  60. #ifndef _FFBLK_DEF
  61. #define _FFBLK_DEF
  62. struct  ffblk   {
  63.     long            ff_reserved;
  64.     long            ff_fsize;
  65.     unsigned long   ff_attrib;
  66.     unsigned short  ff_ftime;
  67.     unsigned short  ff_fdate;
  68.     char            ff_name[MAXPATH];
  69. };
  70. struct  _wffblk   {
  71.     long            ff_reserved;
  72.     long            ff_fsize;
  73.     unsigned long   ff_attrib;
  74.     unsigned short  ff_ftime;
  75.     unsigned short  ff_fdate;
  76.     wchar_t         ff_name[MAXPATH];
  77. };
  78. #endif
  79.  
  80. #ifndef FA_NORMAL
  81. #define FA_NORMAL   0x00        /* Normal file, no attributes */
  82. #define FA_RDONLY   0x01        /* Read only attribute */
  83. #define FA_HIDDEN   0x02        /* Hidden file */
  84. #define FA_SYSTEM   0x04        /* System file */
  85. #define FA_LABEL    0x08        /* Volume label */
  86. #define FA_DIREC    0x10        /* Directory */
  87. #define FA_ARCH     0x20        /* Archive */
  88. #endif /* FA_NORMAL */
  89.  
  90. #ifndef _A_NORMAL
  91. /* MSC names for file attributes */
  92. #define _A_NORMAL   0x00        /* Normal file, no attributes */
  93. #define _A_RDONLY   0x01        /* Read only attribute */
  94. #define _A_HIDDEN   0x02        /* Hidden file */
  95. #define _A_SYSTEM   0x04        /* System file */
  96. #define _A_VOLID    0x08        /* Volume label */
  97. #define _A_SUBDIR   0x10        /* Directory */
  98. #define _A_ARCH     0x20        /* Archive */
  99. #endif /* _A_NORMAL */
  100.  
  101. #define _getcwd(a,b)            getcwd(a,b)
  102.  
  103. #if !defined(RC_INVOKED)
  104. #pragma pack(pop)       /* restore default packing */
  105. #endif
  106.  
  107. #ifdef __cplusplus
  108. extern "C" {
  109. #endif
  110.  
  111. int         _RTLENTRYF _EXPFUNC32   chdir( const char _FAR *__path );
  112. int         _RTLENTRYF _EXPFUNC     findfirst( const char _FAR *__path,
  113.                                     struct ffblk _FAR *__ffblk,
  114.                                     int __attrib );
  115. int         _RTLENTRYF _EXPFUNC     findnext( struct ffblk _FAR *__ffblk );
  116. int         _RTLENTRYF _EXPFUNC     findclose( struct ffblk _FAR *__ffblk );
  117.  
  118. void        _RTLENTRYF _EXPFUNC     fnmerge( char _FAR *__path,
  119.                                     const char _FAR *__drive,
  120.                                     const char _FAR *__dir,
  121.                                     const char _FAR *__name,
  122.                                     const char _FAR *__ext );
  123. int         _RTLENTRYF _EXPFUNC     fnsplit(const char _FAR *__path,
  124.                                     char _FAR *__drive,
  125.                                     char _FAR *__dir,
  126.                                     char _FAR *__name,
  127.                                     char _FAR *__ext );
  128. int         _RTLENTRY  _EXPFUNC32   getcurdir( int __drive, char _FAR *__directory );
  129. char _FAR * _RTLENTRY  _EXPFUNC     getcwd( char _FAR *__buf, int __buflen );
  130. int         _RTLENTRY  _EXPFUNC32   getdisk( void );
  131. int         _RTLENTRY  _EXPFUNC32   _mkdir( const char *__path );
  132. char      * _RTLENTRY  _EXPFUNC     _mktemp( char *__template );
  133. int         _RTLENTRY  _EXPFUNC32   _rmdir( const char _FAR *__path );
  134. char _FAR * _RTLENTRYF _EXPFUNC32   searchpath( const char _FAR *__file );
  135. int         _RTLENTRY  _EXPFUNC32   setdisk( int __drive );
  136.  
  137. #if !defined(__STDC__)
  138. int    _RTLENTRY _EXPFUNC32 mkdir( const char *__path );
  139. char * _RTLENTRY _EXPFUNC   mktemp( char *__template );
  140. int    _RTLENTRY _EXPFUNC32 rmdir( const char *__path );
  141. #endif
  142.  
  143. int         _RTLENTRY  _EXPFUNC32   _wchdir( const wchar_t *__path );
  144. int         _RTLENTRY  _EXPFUNC32   _wmkdir( const wchar_t *__path );
  145. int         _RTLENTRY  _EXPFUNC32   _wrmdir( const wchar_t *__path );
  146. wchar_t   * _RTLENTRY  _EXPFUNC32   wsearchpath( const wchar_t *__file );
  147. wchar_t   * _RTLENTRY  _EXPFUNC     _wmktemp( wchar_t *__template );
  148. int         _RTLENTRY  _EXPFUNC     _wfindfirst( const wchar_t *__path,
  149.                                     struct _wffblk *__ffblk,
  150.                                     int __attrib );
  151. int         _RTLENTRY  _EXPFUNC     _wfindnext( struct _wffblk *__ffblk );
  152. int         _RTLENTRY  _EXPFUNC     _wfindclose( struct _wffblk *__ffblk );
  153. int         _RTLENTRY  _EXPFUNC     _wfnsplit(const wchar_t *__path,
  154.                                     wchar_t *__drive,
  155.                                     wchar_t *__dir,
  156.                                     wchar_t *__name,
  157.                                     wchar_t *__ext );
  158. void        _RTLENTRY  _EXPFUNC     _wfnmerge( wchar_t *__path,
  159.                                     const wchar_t *__drive,
  160.                                     const wchar_t *__dir,
  161.                                     const wchar_t *__name,
  162.                                     const wchar_t *__ext );
  163. wchar_t   * _RTLENTRY  _EXPFUNC     _wgetcwd( wchar_t *__buf, int __buflen );
  164. int         _RTLENTRY  _EXPFUNC     _wgetcurdir( int __drive, wchar_t *__directory );
  165.  
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169.  
  170.  
  171. #if !defined(RC_INVOKED)
  172.  
  173. #if defined(__STDC__)
  174. #pragma warn .nak
  175. #endif
  176.  
  177. #endif  /* !RC_INVOKED */
  178.  
  179. #ifdef __cplusplus
  180. } // std
  181. #endif /* __cplusplus */
  182.  
  183. #endif  /* __DIR_H */
  184.  
  185. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__DIR_H_USING_LIST)
  186. #define __DIR_H_USING_LIST
  187.     using std::ffblk;
  188.     using std::_wffblk;
  189.     using std::chdir;
  190.     using std::findfirst;
  191.     using std::findnext;
  192.     using std::findclose;
  193.     using std::fnmerge;
  194.     using std::fnsplit;
  195.     using std::getcurdir;
  196.     using std::getcwd;
  197.     using std::getdisk;
  198.     using std::_mkdir;
  199.     using std::_mktemp;
  200.     using std::_rmdir;
  201.     using std::searchpath;
  202.     using std::setdisk;
  203. #if !defined(__STDC__)
  204.     using std::mkdir;
  205.     using std::mktemp;
  206.     using std::rmdir;
  207. #endif
  208.     using std::_wchdir;
  209.     using std::_wmkdir;
  210.     using std::_wrmdir;
  211.     using std::wsearchpath;
  212.     using std::_wmktemp;
  213.     using std::_wfindfirst;
  214.     using std::_wfindnext;
  215.     using std::_wfindclose;
  216.     using std::_wfnsplit;
  217.     using std::_wfnmerge;
  218.     using std::_wgetcwd;
  219.     using std::_wgetcurdir;
  220. #endif /* __USING_CNAME__ */
  221.  
  222.