home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / DIR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  2.2 KB  |  88 lines

  1. /*  dir.h
  2.  
  3.     Defines structures, macros, and functions for dealing with
  4.     directories and pathnames.
  5.  
  6.     Copyright (c) Borland International 1987,1988,1990,1991
  7.     All Rights Reserved.
  8. */
  9.  
  10. #if !defined( __DIR_H )
  11. #define __DIR_H
  12.  
  13. #ifdef __DLL__
  14. #define _FAR far
  15. #else
  16. #define _FAR
  17. #endif
  18.  
  19. #if __STDC__
  20. #define _Cdecl
  21. #else
  22. #define _Cdecl  cdecl
  23. #endif
  24.  
  25. #ifndef __PAS__
  26. #define _CType _Cdecl
  27. #else
  28. #define _CType pascal
  29. #endif
  30.  
  31. #ifndef _FFBLK_DEF
  32. #define _FFBLK_DEF
  33. struct  ffblk   {
  34.     char        ff_reserved[21];
  35.     char        ff_attrib;
  36.     unsigned    ff_ftime;
  37.     unsigned    ff_fdate;
  38.     long        ff_fsize;
  39.     char        ff_name[13];
  40. };
  41. #endif
  42.  
  43. #define WILDCARDS 0x01
  44. #define EXTENSION 0x02
  45. #define FILENAME  0x04
  46. #define DIRECTORY 0x08
  47. #define DRIVE     0x10
  48.  
  49. #define MAXPATH   80
  50. #define MAXDRIVE  3
  51. #define MAXDIR    66
  52. #define MAXFILE   9
  53. #define MAXEXT    5
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58.  
  59. int         _Cdecl chdir( const char _FAR *__path );
  60. int         _CType findfirst( const char _FAR *__path,
  61.                               struct ffblk _FAR *__ffblk, 
  62.                               int __attrib );
  63. int         _CType findnext( struct ffblk _FAR *__ffblk );
  64. void        _CType fnmerge( char _FAR *__path,
  65.                             const char _FAR *__drive,
  66.                             const char _FAR *__dir,
  67.                             const char _FAR *__name,
  68.                             const char _FAR *__ext );
  69. int         _CType fnsplit( const char _FAR *__path,
  70.                             char _FAR *__drive, 
  71.                             char _FAR *__dir, 
  72.                             char _FAR *__name,
  73.                             char _FAR *__ext );
  74. int         _Cdecl getcurdir( int __drive, char _FAR *__directory );
  75. char _FAR * _Cdecl getcwd( char _FAR *__buf, int __buflen );
  76. int         _Cdecl getdisk( void );
  77. int         _Cdecl mkdir( const char _FAR *__path );
  78. char _FAR * _Cdecl mktemp( char _FAR *__template );
  79. int         _Cdecl rmdir( const char _FAR *__path );
  80. char _FAR * _CType searchpath( const char _FAR *__file );
  81. int         _Cdecl setdisk( int __drive );
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85.  
  86. #endif  /* __DIR_H */
  87.  
  88.