home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
CBASE09.ZIP
/
BLKIO10.ZIP
/
BEXIT.C
< prev
next >
Wrap
Text File
|
1989-08-30
|
991b
|
47 lines
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "bexit.c 1.1 - 89/07/03" */
#include <errno.h>
/* #include <stdlib.h> */
#include "blkio_.h"
/*man---------------------------------------------------------------------------
NAME
bexit - block file exit
SYNOPSIS
#include <blkio.h>
void bexit(status)
int status;
DESCRIPTION
The bexit function should is for use with the blkio library in place
of exit. It closes all open block files, which writes the contents of
the buffers to the files, then calls exit.
SEE ALSO
bclose.
------------------------------------------------------------------------------*/
void bexit(status)
int status;
{
int rs = 0;
BLKFILE * bp = NULL;
/* close all open block files */
for (bp = biob; bp < (biob + BOPEN_MAX); bp++) {
if (bp->flags & BIOOPEN) {
rs = bclose(bp);
if (rs == -1) {
BEPRINT;
}
}
}
exit(status);
}