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 >
Wrap
C/C++ Source or Header
|
1996-02-04
|
2KB
|
103 lines
/*
* port2.h --- LHA OS/2 HPFS version porting library
* Copyright (C) 1991-1996, Satoshi HIRAMATSU.
*
* $Log$
*/
#ifndef __INCLUDEDE_PORT2_H
#define __INCLUDEDE_PORT2_H
#ifdef __cplusplus
extern "C" {
#endif
#include <time.h>
#define INCL_DOS
#include <os2.h>
#ifndef MAXNAMLEN
#define MAXNAMLEN 254
#endif
#ifndef MAXPATHLEN
#define MAXPATHLEN 260
#endif
#define FAT 0
#define HPFS 1
extern int ifs;
#ifdef __API16__
extern USHORT __version__;
#endif
struct find_t
{
#ifdef __API16__
char attrib;
unsigned wr_time;
unsigned wr_date;
long size;
char name[MAXPATHLEN];
HDIR hdir;
USHORT sc;
#else
USHORT attrib;
unsigned short wr_time;
unsigned short wr_date;
long size;
char name[MAXPATHLEN];
HDIR hdir;
ULONG sc;
#ifdef __SUPPORT_EA__
FEA2LIST *ea;
#endif /* __SUPPORT_EA__ */
#endif
};
struct diskfree_t
{
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _A_NORMAL 0x00
#define _A_RDONLY 0x01
#define _A_HIDDEN 0x02
#define _A_SYSTEM 0x04
#define _A_VOLID 0x08
#define _A_SUBDIR 0x10
#define _A_ARCH 0x20
unsigned _dos_findfirst(const char *, unsigned, struct find_t *);
unsigned _dos_findnext(struct find_t*);
unsigned _dos_getdiskfree(unsigned, struct diskfree_t *);
unsigned _dos_getfileattr(const char *, unsigned *);
#ifndef __SUPPORT_CTIME_ATIME__
unsigned _dos_getftime(int, unsigned *, unsigned *);
unsigned _dos_setftime(int, unsigned, unsigned);
#else
unsigned _os2_getftime(int, time_t *, time_t *, time_t *);
unsigned _os2_setftime(int, time_t *, time_t *, time_t *);
#endif
unsigned _dos_getdtime(char *, unsigned *, unsigned *);
unsigned _dos_setfileattr(const char *, unsigned);
time_t getdirectorytime(const char *);
char *stpcpy(char *, const char *);
char *mktemp(char *);
void SetFileSystem(int, const char *);
int GetFileSystem(const char *);
void SetMessage(void);
#ifdef __SUPPORT_EA__
unsigned SetEA(const char *, FEA2LIST *);
#endif /* __SUPPORT_EA__ */
unsigned char *jstrlwr(unsigned char *);
unsigned char *jstrupr(unsigned char *);
#ifdef __cplusplus
}
#endif
#endif /* __INCLUDED_PORT2_H */