home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / DIR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  5.9 KB  |  200 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 9.5
  10.  *
  11.  *      Copyright (c) 1987, 1999 by Inprise Corporation
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16. /* $Revision:   9.6  $ */
  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.  
  81. #if !defined(RC_INVOKED)
  82. #pragma pack(pop)       /* restore default packing */
  83. #endif
  84.  
  85. #ifdef __cplusplus
  86. extern "C" {
  87. #endif
  88.  
  89. int         _RTLENTRYF _EXPFUNC32   chdir( const char _FAR *__path );
  90. int         _RTLENTRYF _EXPFUNC     findfirst( const char _FAR *__path,
  91.                                     struct ffblk _FAR *__ffblk,
  92.                                     int __attrib );
  93. int         _RTLENTRYF _EXPFUNC     findnext( struct ffblk _FAR *__ffblk );
  94. int         _RTLENTRYF _EXPFUNC     findclose( struct ffblk _FAR *__ffblk );
  95.  
  96. void        _RTLENTRYF _EXPFUNC     fnmerge( char _FAR *__path,
  97.                                     const char _FAR *__drive,
  98.                                     const char _FAR *__dir,
  99.                                     const char _FAR *__name,
  100.                                     const char _FAR *__ext );
  101. int         _RTLENTRYF _EXPFUNC     fnsplit(const char _FAR *__path,
  102.                                     char _FAR *__drive,
  103.                                     char _FAR *__dir,
  104.                                     char _FAR *__name,
  105.                                     char _FAR *__ext );
  106. int         _RTLENTRY  _EXPFUNC32   getcurdir( int __drive, char _FAR *__directory );
  107. char _FAR * _RTLENTRY  _EXPFUNC     getcwd( char _FAR *__buf, int __buflen );
  108. int         _RTLENTRY  _EXPFUNC32   getdisk( void );
  109. int         _RTLENTRY  _EXPFUNC32   _mkdir( const char *__path );
  110. char      * _RTLENTRY  _EXPFUNC     _mktemp( char *__template );
  111. int         _RTLENTRY  _EXPFUNC32   _rmdir( const char _FAR *__path );
  112. char _FAR * _RTLENTRYF _EXPFUNC32   searchpath( const char _FAR *__file );
  113. int         _RTLENTRY  _EXPFUNC32   setdisk( int __drive );
  114.  
  115. #if !defined(__STDC__)
  116. int    _RTLENTRY _EXPFUNC32 mkdir( const char *__path );
  117. char * _RTLENTRY _EXPFUNC   mktemp( char *__template );
  118. int    _RTLENTRY _EXPFUNC32 rmdir( const char *__path );
  119. #endif
  120.  
  121. int         _RTLENTRY  _EXPFUNC32   _wchdir( const wchar_t *__path );
  122. int         _RTLENTRY  _EXPFUNC32   _wmkdir( const wchar_t *__path );
  123. int         _RTLENTRY  _EXPFUNC32   _wrmdir( const wchar_t *__path );
  124. wchar_t   * _RTLENTRY  _EXPFUNC32   wsearchpath( const wchar_t *__file );
  125. wchar_t   * _RTLENTRY  _EXPFUNC     _wmktemp( wchar_t *__template );
  126. int         _RTLENTRY  _EXPFUNC     _wfindfirst( const wchar_t *__path,
  127.                                     struct _wffblk *__ffblk,
  128.                                     int __attrib );
  129. int         _RTLENTRY  _EXPFUNC     _wfindnext( struct _wffblk *__ffblk );
  130. int         _RTLENTRY  _EXPFUNC     _wfindclose( struct _wffblk *__ffblk );
  131. int         _RTLENTRY  _EXPFUNC     _wfnsplit(const wchar_t *__path,
  132.                                     wchar_t *__drive,
  133.                                     wchar_t *__dir,
  134.                                     wchar_t *__name,
  135.                                     wchar_t *__ext );
  136. void        _RTLENTRY  _EXPFUNC     _wfnmerge( wchar_t *__path,
  137.                                     const wchar_t *__drive,
  138.                                     const wchar_t *__dir,
  139.                                     const wchar_t *__name,
  140.                                     const wchar_t *__ext );
  141. wchar_t   * _RTLENTRY  _EXPFUNC     _wgetcwd( wchar_t *__buf, int __buflen );
  142. int         _RTLENTRY  _EXPFUNC     _wgetcurdir( int __drive, wchar_t *__directory );
  143.  
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147.  
  148.  
  149. #if !defined(RC_INVOKED)
  150.  
  151. #if defined(__STDC__)
  152. #pragma warn .nak
  153. #endif
  154.  
  155. #endif  /* !RC_INVOKED */
  156.  
  157. #ifdef __cplusplus
  158. } // std
  159. #endif /* __cplusplus */
  160.  
  161. #endif  /* __DIR_H */
  162.  
  163. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__DIR_H_USING_LIST)
  164. #define __DIR_H_USING_LIST
  165.     using std::ffblk;
  166.     using std::_wffblk;
  167.     using std::chdir;
  168.     using std::findfirst;
  169.     using std::findnext;
  170.     using std::findclose;
  171.     using std::fnmerge;
  172.     using std::fnsplit;
  173.     using std::getcurdir;
  174.     using std::getcwd;
  175.     using std::getdisk;
  176.     using std::_mkdir;
  177.     using std::_mktemp;
  178.     using std::_rmdir;
  179.     using std::searchpath;
  180.     using std::setdisk;
  181. #if !defined(__STDC__)
  182.     using std::mkdir;
  183.     using std::mktemp;
  184.     using std::rmdir;
  185. #endif
  186.     using std::_wchdir;
  187.     using std::_wmkdir;
  188.     using std::_wrmdir;
  189.     using std::wsearchpath;
  190.     using std::_wmktemp;
  191.     using std::_wfindfirst;
  192.     using std::_wfindnext;
  193.     using std::_wfindclose;
  194.     using std::_wfnsplit;
  195.     using std::_wfnmerge;
  196.     using std::_wgetcwd;
  197.     using std::_wgetcurdir;
  198. #endif /* __USING_CNAME__ */
  199.  
  200.