home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
CBASE09.ZIP
/
CBASE.ZIP
/
CBGETLCK.C
< prev
next >
Wrap
Text File
|
1989-08-31
|
1KB
|
44 lines
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "cbgetlck.c 1.1 - 89/08/31" */
#include "cbase_.h"
/*man---------------------------------------------------------------------------
NAME
cbgetlck - get cbase lock status
SYNOPSIS
#include <cbase.h>
int cbgetlck(cbp)
cbase_t *cbp;
DESCRIPTION
The cbgetlck function reports the lock status of cbase cbp. The
function returns the status of the lock currently held by the calling
process. Locks held by other processes are not reported.
The possible return values are:
CB_RDLCK - cbase locked for reading
CB_WRLCK - cbase locked for reading and writing
CB_UNLCK - cbase not locked
SEE ACBO
cblock.
------------------------------------------------------------------------------*/
int cbgetlck(cbp)
cbase_t *cbp;
{
if (!(cbp->flags & CBLOCKS)) {
return CB_UNLCK;
} else if (cbp->flags & CBWRLCK) {
return CB_WRLCK;
}
return CB_RDLCK;
}