home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 December
/
VPR9712A.ISO
/
OLS
/
OS2
/
LHA2P205
/
LHA2P205.LZH
/
lha2-2.05pre
/
source.lzh
/
src
/
lh.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-25
|
4KB
|
239 lines
/*
* lh.h
* Copyright (C) 1988-1992, Haruyasu YOSHIZAKI
* Copyright (C) 1991-1995, Satoshi HIRAMATSU (OS/2 HPFS version)
*
* $Log$
*/
#ifndef __INCLUDED_LH_H
#define __INCLUDED_LH_H
#ifdef __cplusplus
extern "C" {
#endif
struct pat
{
struct pat *nxt;
char *bdir;
char *fname;
int cnt;
char pname[1];
};
struct ftime
{
uint ft_tsec :5; /* Two second interval */
uint ft_min :6; /* Minutes */
uint ft_hour :5; /* Hours */
uint ft_day :5; /* Days */
uint ft_month :4; /* Months */
uint ft_year :7; /* Year */
};
struct datetime
{
ushort time;
ushort date;
};
typedef union stamp /* time stamp */
{
ulong u;
struct ftime s;
struct datetime t;
} STAMP;
struct fb /* file name buffer */
{
struct fb *nxt;
char *cpos; /* position of effective path name */
char *fpos; /* position of file name */
long time;
char used;
#ifdef __SUPPORT_EA__
FEA2LIST *ea;
#endif
char fname[1];
};
#if 0
struct srchblk
{
char *sb_name;
int sb_attrib;
time_t sb_ftime;
long sb_fsize;
void *sb_buf;
};
#endif
#ifndef iskanji
#define iskanji(c) \
((uchar)(c) >= 0x80 && (uchar)(c) <= 0x9f || \
(uchar)(c) >= 0xe0 && (uchar)(c) <= 0xfd)
#endif
#define DELIM ('/')
#define DELIM2 (0xffu)
#define DELIMSTR "/"
/* from mn.c */
#ifndef MAXPATHLEN
#define MAXPATHLEN 260
#endif
extern char arcname[MAXPATHLEN];
extern char filename1[MAXPATHLEN];
extern char filename2[MAXPATHLEN];
extern char filename3[MAXPATHLEN];
extern FILE *file1, *file2, *file3;
extern int cmdupdate;
extern char workdir[];
#if 0
extern char *pager;
extern char *keyword;
#endif
extern char cmd;
extern char lhtmp1[], lhtmp2[];
extern int errorlevel;
extern int outredir;
extern char work[];
#ifdef __SUPPORT_UID_GID__
#ifdef __OS2__
typedef unsigned short uid_t;
typedef unsigned short gid_t;
#endif /* __OS2__ */
extern uid_t uid;
extern gid_t gid;
#endif /* __SUPPORT_UID_GID__ */
void usage(void);
void update_arcstamp(void);
/* from append.c */
void regext(char *);
void freeze(char *, char *);
int append(void);
int endappend(void);
void deletefiles(void);
int freshen(char *);
/* from extract.c */
void extract(char *);
void extract_internal(FILE *, char *);
/* from list.c */
void initlist(void);
void list(void);
void endlist(time_t);
/* from match.c */
extern struct pat *pbuf;
void initpat(void);
void regpat(char *, char *);
char *regbdir(char *);
char *matchfname(char *, char *);
char *matchpat(char *);
int tstpat(void);
/* from header.c */
extern struct head hpb;
#if 0
ulong inithdr(void);
char *gethdr(int *);
void makehdr(void);
void writehdr(void);
void adjusthdr(void);
void freework(void);
#endif
/* from files.c */
extern struct fb *fbuf;
void mklist(void);
struct fb *searchfile(char *);
/* from getopt.c */
extern char flg_r, flg_p, flg_x, flg_m, flg_a,
flg_c, flg_n, flg_t, flg_u, flg_v,
flg_w, flg_i, flg_h, flg_o, flg_z,
#ifdef __SUPPORT_EA__
flg_l, flg_s, flg_at, flg_d, flg_f, flg_e;
#else
flg_l, flg_s, flg_at, flg_d, flg_f;
#endif /* __SUPPORT_EA__ */
int getopt(char *);
/* from util.c */
extern uchar pathdelim;
extern uchar swchar;
char *convdelim(char *, char);
char *getfilename(char *);
char *backpath(char *);
int getyn(void);
void getswchar(void);
time_t dos2unix(struct ftime *);
struct ftime *unix2dos(time_t);
int ratio(ulong, ulong, int);
hword copyfile(FILE *, FILE *, long, int);
#ifndef __DEBUG__
void *e_malloc(size_t);
void *e_realloc(void *, size_t);
#endif
FILE *myeopen(const char *, const char *, char *);
FILE *mywopen(const char *, char *);
FILE *myropen(const char *);
void eprintf(char *, ...);
/* from dosio.c */
time_t getfiletime(FILE *);
#ifndef __SUPPORT_CTIME_ATIME__
int setfiletime(FILE *, time_t);
#else
int setfiletime(FILE *, time_t *, time_t *, time_t *);
#endif
long diskspace(char *);
/* from error.c */
void error(char *, const char *);
void fileerror(char *, FILE *);
void userbreak(int);
void initbreak(void);
/* from path.c */
void form_path(char *);
/* from self.c */
void initsfx(void);
int copysfx(void);
void makesfx(char *);
#ifdef __cplusplus
}
#endif
#endif /* __INCLUDED_LH_H */