home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
CBASE09.ZIP
/
BLKIO10.ZIP
/
BLKIO_.H
< prev
next >
Wrap
Text File
|
1989-08-30
|
2KB
|
57 lines
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "blkio_.h 1.1 - 89/07/03" */
#ifndef BLKIO_H_ /* prevent multiple includes */
#define BLKIO_H_
#define DEBUG /* switch to enable debugging for blkio package */
/* The HOST macro specifies the host operating system. Currently supported */
/* systems are: */
#define UNIX (1) /* UNIX */
#define MSDOS (2) /* MS-DOS */
#define HOST MSDOS
/* The MSDOSC macro specifies the MS-DOS C compiler being used. Currently */
/* supported compilers are: */
#define TURBOC (1) /* Borland Turbo C */
#define MSC (2) /* Microsoft C */
#define MSDOSC TURBOC
#include <bool.h>
#include "blkio.h"
int b_alloc(/* BLKFILE *bp */);
#define b_blkbuf(BP, N) ((void *)((char *)(BP)->blkbuf + \
(((N) == 0) ? 0 : ((BP)->hdrsize + ((N) - 1) * (BP)->blksize))))
#define b_block_p(BP, N) ((block_t *)((char *)(BP)->block_p \
+ (N) * sizeof(block_t)))
void b_free(/* BLKFILE *bp */);
int b_get(/* BLKFILE *bp, size_t i */);
int b_init(/* BLKFILE *bp */);
int b_mkmru(/* BLKFILE *bp, size_t i */);
int b_put(/* BLKFILE *bp, size_t i */);
bool b_valid(/* BLKFILE *bp */);
int b_uclose(/* BLKFILE *bp */);
int b_uendblk(/* BLKFILE *bp, bpos_t *endblk_p */);
int b_ugetf(/* BLKFILE *bp, bpos_t bn, size_t offset, void *buf, size_t bufsize */);
int b_uopen(/* BLKFILE *bp, char *filename, char *type */);
int b_uputf(/* BLKFILE *bp, bpos_t bn, size_t offset, void *buf, size_t bufsize */);
/* block file open types */
#define BF_READ ("r")
#define BF_RDWR ("r+")
#define BF_CRTR ("w+")
#define BF_CREATE ("c")
#ifdef DEBUG
#define BEPRINT {fprintf(stderr, "blkio error line %d of %s. errno = %d.\n", __LINE__, __FILE__, errno);}
#else
#define BEPRINT
#endif
#endif /* #ifndef BLKIO_H_ */