home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************/
- /* Module name: genlib.h */
- /* Date: 27 Dec 87 */
- /* Environment: Turbo C 1.0 */
- /* Author: R. E. Faith */
- /* Notice: Public Domain: The following conditions apply to use: */
- /* 1) No fee shall be charged for distribution. */
- /* 2) Modifications may be made, but authorship information */
- /* for all contributing authors shall be retained. */
- /* 3) This code may not be included as part of a commercial */
- /* package. */
- /* This program is provided AS IS without any warranty, expressed or */
- /* implied, including, but not limited to, fitness for a particular */
- /* purpose. */
- /*********************************************************************/
-
- /* General typedefs */
- typedef unsigned char BYTE;
- typedef unsigned short WORD;
- typedef unsigned long LONGWORD;
-
- /* General definitions */
- #define FA_ALL (FA_HIDDEN | FA_SYSTEM | FA_DIREC)
-
- /* c_break.c */
- extern int c_break( void );
-
- /* chandler.c */
- extern int __CriticalError;
- extern int __CritErrIGNORE;
- extern int chandler( int errval, int ax, int bp, int si );
-
- /* getopt.c */
- extern char *optarg;
- extern int opterr;
- extern int optind;
- extern int optopt;
- extern char SW;
- extern int getopt( int argc, char **argv, char *opts );
-
- /* fnstuff.c */
- extern int isroot( char *path );
- extern int hasdotname( char *path );
- extern char *fnappend( char *path, char *file );
- extern char *fntomsdos( char *path );
- extern char *fntounix( char *path );
-
- /* crcstuff.c */
- extern WORD get_crc_ccitt( WORD crc, char *buf, int size );
- extern WORD get_crc_16( WORD crc, char *buf, int size );
-
- /* undoc.c */
- /* This is an undocumented DOS table. A better format might be more */
- /* correct, but this works well for the current program. */
- typedef struct {
- BYTE name[67];
- WORD data[7];
- } far *MNT_TAB_PTR;
- /* These are undocumented DOS flags for data[0] in the above structure */
- #define IS_USED 0x4000 /* Masks for data[0] */
- #define IS_JOIN 0x2000
- #define IS_SUBST 0x1000
- extern MNT_TAB_PTR get_mnt_tab( void );
- extern char *get_label( int drive );
-
- /* sys.c */
- struct disk_free {
- unsigned long total;
- unsigned long avail;
- unsigned long used;
- };
- #define B_TO_K(x) ((x) / 1024U)
- extern int drive_count( void );
- extern int get_free( int drive, struct disk_free *df );
-
- /* expand.c */
- extern int expand( char *progname, char *path,
- int (*func)(), int mode );
-