home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / DIR.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  5KB  |  186 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 8.0
  10.  *
  11.  *      Copyright (c) 1987, 1997 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15. /* $Revision:   8.10  $ */
  16.  
  17. #if !defined(__DIR_H)
  18. #define __DIR_H
  19.  
  20. #if !defined(___DEFS_H)
  21. #include <_defs.h>
  22. #endif
  23.  
  24. #if !defined(___TCHAR_H)
  25. #include <tchar.h>
  26. #endif
  27.  
  28.  
  29. #if !defined(RC_INVOKED)
  30.  
  31. #if defined(__STDC__)
  32. #pragma warn -nak
  33. #endif
  34.  
  35. #endif  /* !RC_INVOKED */
  36.  
  37.  
  38. #ifndef __cplusplus
  39. #if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED)
  40. #define _WCHAR_T
  41. #define _WCHAR_T_DEFINED  /* For WINDOWS.H */
  42. typedef unsigned short wchar_t;
  43. #endif
  44. #endif
  45.  
  46. #define WILDCARDS 0x01
  47. #define EXTENSION 0x02
  48. #define FILENAME  0x04
  49. #define DIRECTORY 0x08
  50. #define DRIVE     0x10
  51.  
  52. #define MAXDRIVE  3
  53.  
  54. #if !defined(__FLAT__)
  55.  
  56. #ifndef _FFBLK_DEF
  57. #define _FFBLK_DEF
  58. struct  ffblk   {
  59.     char        ff_reserved[21];
  60.     char        ff_attrib;
  61.     unsigned    ff_ftime;
  62.     unsigned    ff_fdate;
  63.     long        ff_fsize;
  64.     char        ff_name[13];
  65. };
  66. #endif
  67.  
  68. #define MAXPATH   80
  69. #define MAXDIR    66
  70. #define MAXFILE   9
  71. #define MAXEXT    5
  72.  
  73. #else  /* defined __FLAT__ */
  74.  
  75. #if !defined(RC_INVOKED)
  76. #pragma pack(push, 1)
  77. #endif
  78.  
  79. #ifndef _FFBLK_DEF
  80. #define _FFBLK_DEF
  81. struct  ffblk   {
  82.     long            ff_reserved;
  83.     long            ff_fsize;
  84.     unsigned long   ff_attrib;
  85.     unsigned short  ff_ftime;
  86.     unsigned short  ff_fdate;
  87.     char            ff_name[256];
  88. };
  89. struct  _wffblk   {
  90.     long            ff_reserved;
  91.     long            ff_fsize;
  92.     unsigned long   ff_attrib;
  93.     unsigned short  ff_ftime;
  94.     unsigned short  ff_fdate;
  95.     wchar_t         ff_name[256];
  96. };
  97. #endif
  98.  
  99. #define MAXPATH   260
  100. #define MAXDIR    256
  101. #define MAXFILE   256
  102. #define MAXEXT    256
  103.  
  104. #if !defined(RC_INVOKED)
  105. #pragma pack(pop)       /* restore default packing */
  106. #endif
  107.  
  108. #endif  /* __FLAT__  */
  109.  
  110. #ifdef __cplusplus
  111. extern "C" {
  112. #endif
  113.  
  114. int         _RTLENTRYF _EXPFUNC32   chdir( const char _FAR *__path );
  115. int         _RTLENTRYF _EXPFUNC     findfirst( const char _FAR *__path,
  116.                                     struct ffblk _FAR *__ffblk,
  117.                                     int __attrib );
  118. int         _RTLENTRYF _EXPFUNC     findnext( struct ffblk _FAR *__ffblk );
  119.  
  120. void        _RTLENTRYF _EXPFUNC     fnmerge( char _FAR *__path,
  121.                                     const char _FAR *__drive,
  122.                                     const char _FAR *__dir,
  123.                                     const char _FAR *__name,
  124.                                     const char _FAR *__ext );
  125. int         _RTLENTRYF _EXPFUNC     fnsplit(const char _FAR *__path,
  126.                                     char _FAR *__drive,
  127.                                     char _FAR *__dir,
  128.                                     char _FAR *__name,
  129.                                     char _FAR *__ext );
  130. int         _RTLENTRY  _EXPFUNC32   getcurdir( int __drive, char _FAR *__directory );
  131. char _FAR * _RTLENTRY  _EXPFUNC     getcwd( char _FAR *__buf, int __buflen );
  132. int         _RTLENTRY  _EXPFUNC32   getdisk( void );
  133. int         _RTLENTRY  _EXPFUNC32   _mkdir( const char *__path );
  134. char      * _RTLENTRY  _EXPFUNC     _mktemp( char *__template );
  135. int         _RTLENTRY  _EXPFUNC32   _rmdir( const char _FAR *__path );
  136. char _FAR * _RTLENTRYF _EXPFUNC32   searchpath( const char _FAR *__file );
  137. int         _RTLENTRY  _EXPFUNC32   setdisk( int __drive );
  138.  
  139. #if !defined(__STDC__)
  140. int    _RTLENTRY _EXPFUNC   mkdir( const char *__path );
  141. char * _RTLENTRY _EXPFUNC   mktemp( char *__template );
  142. int    _RTLENTRY _EXPFUNC   rmdir( const char *__path );
  143. #endif
  144.  
  145. #ifdef __FLAT__
  146. int         _RTLENTRY  _EXPFUNC32   _wchdir( const wchar_t *__path );
  147. int         _RTLENTRY  _EXPFUNC32   _wmkdir( const wchar_t *__path );
  148. int         _RTLENTRY  _EXPFUNC32   _wrmdir( const wchar_t *__path );
  149. wchar_t   * _RTLENTRY  _EXPFUNC32   wsearchpath( const wchar_t *__file );
  150. wchar_t   * _RTLENTRY  _EXPFUNC     _wmktemp( wchar_t *__template );
  151. int         _RTLENTRY  _EXPFUNC     _wfindfirst( const wchar_t *__path,
  152.                                     struct _wffblk *__ffblk,
  153.                                     int __attrib );
  154. int         _RTLENTRY  _EXPFUNC     _wfindnext( struct _wffblk *__ffblk );
  155. int         _RTLENTRY  _EXPFUNC     _wfnsplit(const wchar_t *__path,
  156.                                     wchar_t *__drive,
  157.                                     wchar_t *__dir,
  158.                                     wchar_t *__name,
  159.                                     wchar_t *__ext );
  160. void        _RTLENTRY  _EXPFUNC     _wfnmerge( wchar_t *__path,
  161.                                     const wchar_t *__drive,
  162.                                     const wchar_t *__dir,
  163.                                     const wchar_t *__name,
  164.                                     const wchar_t *__ext );
  165. wchar_t   * _RTLENTRY  _EXPFUNC     _wgetcwd( wchar_t *__buf, int __buflen );
  166. int         _RTLENTRY  _EXPFUNC     _wgetcurdir( int __drive, wchar_t *__directory );
  167. #endif
  168.  
  169. #ifdef __cplusplus
  170. }
  171. #endif
  172.  
  173.  
  174. #if !defined(RC_INVOKED)
  175.  
  176. #if defined(__STDC__)
  177. #pragma warn .nak
  178. #endif
  179.  
  180. #endif  /* !RC_INVOKED */
  181.  
  182.  
  183. #endif  /* __DIR_H */
  184.  
  185.  
  186.