progressive patching

This commit is contained in:
Douglas Clowes
2012-11-28 13:13:20 +11:00
parent e91fdd1808
commit 2f391302b1
9 changed files with 52 additions and 27 deletions

16
costa.c
View File

@ -108,10 +108,6 @@ int CostaTop(pCosta self, char *pCommand)
assert(self);
/* check for lock */
if (self->iLock) {
return 0;
}
/* check Size */
if (self->iCount >= self->iMaxSize) {
return 0;
@ -138,11 +134,6 @@ int CostaBottom(pCosta self, char *pCommand)
int iRet, iRes = 1;
assert(self);
/* check for lock */
if (self->iLock) {
return 0;
}
/* do not want 0 commands */
if (strlen(pCommand) < 1) {
return 1;
@ -187,3 +178,10 @@ void CostaUnlock(pCosta self)
{
self->iLock = 0;
}
/*--------------------------------------------------------------------------*/
int CostaLocked(pCosta self)
{
return self->iLock;
}