/* -*-c,save-*- */ /* * LUDEF.H - LU common defs * Robert Heller. Created: Fri Nov 7, 1986 23:28:30.45 * Last Mod: * * (c) Copyright 1986 by Robert Heller * All Rights Reserved * * */ #define CPM68K /* CP/M-68K Compilation */ #define CRCCHECK /* do CRC checking */ #define ACTIVE 0 /* active, non-deleted file, */ #define UNUSED 0xff /* never used slot, */ #define DELETED 0xfe /* deleted file slot, */ #define MAXFILES 256 /* max files per LBR file, */ #define SECTSIZE 128 /* sector size */ /* This is the structure of the LBR file directory. One per slot. */ typedef struct { char lu_stat; /* file status, */ char lu_name[11]; /* FCB type filename, */ unsigned short int lu_off; /* offset to data, (sectors) */ unsigned short int lu_len; /* length (sectors) of data, */ unsigned short int lu_crc; /* CRC value */ char lu_fill[14]; /* fill out to 32 bytes */ } LUDIR; /* allocation class defs */ #define GLOBAL extern /* universally global vars */ #define LOCAL static /* module-wide global vars */ #define FAST register /* fast access vars */ #define VOID /* typeless functions */ /* other defs needed: function types (long and pointer results), I/O weirdnesses, etc. */ #ifdef CPM68K #undef CRCCHECK /* disable CRC check with CP/M-68K */ /* file related functions */ long lseek(), tell(); /* file positioning functions */ #define OPEN_RO 0 /* open for Read-Only */ #define OPEN_WO 1 /* open for Write-Only */ #define OPEN_RW 2 /* open for Read-Write */ /* use openb and creatb for files - skip UNIXish stream lf file hackery */ #define lopen openb /* library file open */ #define lcreat creatb /* library file creat */ #define xopen openb /* other file open */ #define xcreat creatb /* other file creat */ /* assorted char functions */ char *strchr(), *strrchr(); char *malloc(), *calloc(); char *mktemp(); char *getname(); /* BDOS itself */ long int __BDOS(); #endif