home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / INC.PAK / DIR.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  3KB  |  134 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 6.5
  10.  *
  11.  *      Copyright (c) 1987, 1994 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16. #if !defined(__DIR_H)
  17. #define __DIR_H
  18.  
  19. #if !defined(___DEFS_H)
  20. #include <_defs.h>
  21. #endif
  22.  
  23.  
  24. #if !defined(RC_INVOKED)
  25.  
  26. #if defined(__STDC__)
  27. #pragma warn -nak
  28. #endif
  29.  
  30. #endif  /* !RC_INVOKED */
  31.  
  32.  
  33. #define WILDCARDS 0x01
  34. #define EXTENSION 0x02
  35. #define FILENAME  0x04
  36. #define DIRECTORY 0x08
  37. #define DRIVE     0x10
  38.  
  39. #define MAXDRIVE  3
  40.  
  41. #if !defined(__FLAT__)
  42.  
  43. #ifndef _FFBLK_DEF
  44. #define _FFBLK_DEF
  45. struct  ffblk   {
  46.     char        ff_reserved[21];
  47.     char        ff_attrib;
  48.     unsigned    ff_ftime;
  49.     unsigned    ff_fdate;
  50.     long        ff_fsize;
  51.     char        ff_name[13];
  52. };
  53. #endif
  54.  
  55. #define MAXPATH   80
  56. #define MAXDIR    66
  57. #define MAXFILE   9
  58. #define MAXEXT    5
  59.  
  60. #else  /* defined __FLAT__ */
  61.  
  62. #if !defined(RC_INVOKED)
  63. #pragma option -a-
  64. #endif
  65.  
  66. #ifndef _FFBLK_DEF
  67. #define _FFBLK_DEF
  68. struct  ffblk   {
  69.     long            ff_reserved;
  70.     long            ff_fsize;
  71.     unsigned long   ff_attrib;
  72.     unsigned short  ff_ftime;
  73.     unsigned short  ff_fdate;
  74.     char            ff_name[256];
  75. };
  76. #endif
  77.  
  78. #define MAXPATH   260
  79. #define MAXDIR    256
  80. #define MAXFILE   256
  81. #define MAXEXT    256
  82.  
  83. #if !defined(RC_INVOKED)
  84. #pragma option -a.  /* restore default packing */
  85. #endif
  86.  
  87. #endif  /* __FLAT__  */
  88.  
  89. #ifdef __cplusplus
  90. extern "C" {
  91. #endif
  92.  
  93. int         _RTLENTRYF _EXPFUNC32   chdir( const char _FAR *__path );
  94. int         _RTLENTRYF _EXPFUNC     findfirst( const char _FAR *__path,
  95.                                     struct ffblk _FAR *__ffblk,
  96.                                     int __attrib );
  97. int         _RTLENTRYF _EXPFUNC     findnext( struct ffblk _FAR *__ffblk );
  98. void        _RTLENTRYF _EXPFUNC     fnmerge( char _FAR *__path,
  99.                                     const char _FAR *__drive,
  100.                                     const char _FAR *__dir,
  101.                                     const char _FAR *__name,
  102.                                     const char _FAR *__ext );
  103. int         _RTLENTRYF _EXPFUNC     fnsplit(const char _FAR *__path,
  104.                                     char _FAR *__drive,
  105.                                     char _FAR *__dir,
  106.                                     char _FAR *__name,
  107.                                     char _FAR *__ext );
  108. int         _RTLENTRY  _EXPFUNC32   getcurdir( int __drive, char _FAR *__directory );
  109. char _FAR * _RTLENTRY  _EXPFUNC     getcwd( char _FAR *__buf, int __buflen );
  110. int         _RTLENTRY  _EXPFUNC32   getdisk( void );
  111. int         _RTLENTRYF _EXPFUNC32   mkdir( const char _FAR *__path );
  112. char _FAR * _RTLENTRYF _EXPFUNC     mktemp( char _FAR *__template );
  113. int         _RTLENTRY  _EXPFUNC32   rmdir( const char _FAR *__path );
  114. char _FAR * _RTLENTRYF _EXPFUNC32   searchpath( const char _FAR *__file );
  115. int         _RTLENTRY  _EXPFUNC32   setdisk( int __drive );
  116.  
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120.  
  121.  
  122. #if !defined(RC_INVOKED)
  123.  
  124. #if defined(__STDC__)
  125. #pragma warn .nak
  126. #endif
  127.  
  128. #endif  /* !RC_INVOKED */
  129.  
  130.  
  131. #endif  /* __DIR_H */
  132.  
  133.  
  134.