home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / OLS / Os2 / LHA2P205 / LHA2P205.LZH / lha2-2.05pre / source.lzh / src / port2.h < prev    next >
C/C++ Source or Header  |  1996-02-04  |  2KB  |  103 lines

  1. /*
  2.  * port2.h --- LHA OS/2 HPFS version porting library
  3.  *   Copyright (C) 1991-1996, Satoshi HIRAMATSU.
  4.  *
  5.  * $Log$
  6.  */
  7.  
  8.  
  9. #ifndef __INCLUDEDE_PORT2_H
  10. #define __INCLUDEDE_PORT2_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14.  
  15.  
  16. #include <time.h>
  17. #define INCL_DOS
  18. #include <os2.h>
  19.  
  20. #ifndef MAXNAMLEN
  21. #define MAXNAMLEN 254
  22. #endif
  23. #ifndef MAXPATHLEN
  24. #define MAXPATHLEN 260
  25. #endif
  26.  
  27. #define FAT    0
  28. #define HPFS    1
  29. extern int ifs;
  30. #ifdef __API16__
  31. extern USHORT __version__;
  32. #endif
  33.  
  34. struct find_t
  35. {
  36. #ifdef __API16__
  37.   char attrib;
  38.   unsigned wr_time;
  39.   unsigned wr_date;
  40.   long size;
  41.   char name[MAXPATHLEN];
  42.   HDIR hdir;
  43.   USHORT sc;
  44. #else
  45.   USHORT attrib;
  46.   unsigned short wr_time;
  47.   unsigned short wr_date;
  48.   long size;
  49.   char name[MAXPATHLEN];
  50.   HDIR hdir;
  51.   ULONG sc;
  52. #ifdef __SUPPORT_EA__
  53.   FEA2LIST *ea;
  54. #endif /* __SUPPORT_EA__ */
  55. #endif
  56. };
  57. struct diskfree_t
  58. {
  59.   unsigned total_clusters;
  60.   unsigned avail_clusters;
  61.   unsigned sectors_per_cluster;
  62.   unsigned bytes_per_sector;
  63. };
  64.  
  65. #define _A_NORMAL    0x00
  66. #define _A_RDONLY    0x01
  67. #define _A_HIDDEN    0x02
  68. #define _A_SYSTEM    0x04
  69. #define _A_VOLID    0x08
  70. #define _A_SUBDIR    0x10
  71. #define _A_ARCH     0x20
  72.  
  73. unsigned _dos_findfirst(const char *, unsigned, struct find_t *);
  74. unsigned _dos_findnext(struct find_t*);
  75. unsigned _dos_getdiskfree(unsigned, struct diskfree_t *);
  76. unsigned _dos_getfileattr(const char *, unsigned *);
  77. #ifndef __SUPPORT_CTIME_ATIME__
  78. unsigned _dos_getftime(int, unsigned *, unsigned *);
  79. unsigned _dos_setftime(int, unsigned, unsigned);
  80. #else
  81. unsigned _os2_getftime(int, time_t *, time_t *, time_t *);
  82. unsigned _os2_setftime(int, time_t *, time_t *, time_t *);
  83. #endif
  84. unsigned _dos_getdtime(char *, unsigned *, unsigned *);
  85. unsigned _dos_setfileattr(const char *, unsigned);
  86. time_t getdirectorytime(const char *);
  87. char *stpcpy(char *, const char *);
  88. char *mktemp(char *);
  89. void SetFileSystem(int, const char *);
  90. int GetFileSystem(const char *);
  91. void SetMessage(void);
  92. #ifdef __SUPPORT_EA__
  93. unsigned SetEA(const char *, FEA2LIST *);
  94. #endif /* __SUPPORT_EA__ */
  95. unsigned char *jstrlwr(unsigned char *);
  96. unsigned char *jstrupr(unsigned char *);
  97.  
  98.  
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102. #endif /* __INCLUDED_PORT2_H */
  103.