Commit e91eda5f authored by rswindell's avatar rswindell
Browse files

Added uifcapi_t element to indicate that the library was successfully

initialized (or not).
parent 46a67fe1
......@@ -304,6 +304,11 @@ typedef struct {
/****************************************************************************/
uchar hclr,lclr,bclr,cclr,lbclr;
/****************************************************************************/
/* Have we initialized successfully? */
/****************************************************************************/
BOOL initialized;
/****************************************************************************/
/* Exit/uninitialize function. */
/****************************************************************************/
......
......@@ -288,6 +288,8 @@ int uifcini32(uifcapi_t* uifcapi)
uifc_mouse_enable();
}
api->initialized=TRUE;
return(0);
}
......@@ -415,6 +417,7 @@ void uifcbail(void)
FREE_AND_NULL(blk_scrn);
FREE_AND_NULL(tmp_buffer);
FREE_AND_NULL(tmp_buffer2);
api->initialized=FALSE;
}
/****************************************************************************/
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -89,6 +89,7 @@ int uifcinix(uifcapi_t* uifcapi)
setvbuf(stdin,NULL,_IONBF,0);
setvbuf(stdout,NULL,_IONBF,0);
api->scrn_len=24;
api->initialized=TRUE;
return(0);
}
......@@ -98,6 +99,7 @@ int uifcinix(uifcapi_t* uifcapi)
/****************************************************************************/
void uifcbail(void)
{
api->initialized=FALSE;
}
/****************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment