示例#1
0
static NetRecord	*MyGetNetRecord (int pmNetID)
{
    char    myMessage [1024];

    if ((pmNetID < 1) || (pmNetID > 20))
    {
	MDIO_sprintf (myMessage, "%d is not a legal net stream id", pmNetID);
	ABORT_WITH_ERRMSG (E_NET_NOT_AN_ID, myMessage);
    }
    if (stStreams [pmNetID] == NULL)
    {
	MDIO_sprintf (myMessage, "Net stream d is not been opened", pmNetID);
	ABORT_WITH_ERRMSG (E_NET_NEVER_OPENED, myMessage);
    }
    if (stStreams [pmNetID] == NET_STREAM_CLOSED)
    {
	MDIO_sprintf (myMessage, "Net stream id of %d is closed", pmNetID);
	ABORT_WITH_ERRMSG (E_NET_CLOSED, myMessage);
    }
    return stStreams [pmNetID];
} // MyGetNetRecord
extern void	MIOGLGraph_Update ()
{
	if(stGLWinOpen){
		//SDL_Flip(stSDLScreen);
		//SDL_UpdateRect(stSDLScreen, 0, 0, 0, 0);
		SwapBuffers(hDC);
	}
	if(stGLWinClosed){ // check here because doing it in the windows event loop causes problems
		stGLWinClosed = FALSE;
		ABORT_WITH_ERRMSG (E_FONT_BAD_FONT_SELECT_STR, "OpenGl Window Closed By User");
	}
}
示例#3
0
void	MIOText_Locate (OOTint pmRow, OOTint pmCol)
{
    MIOWinInfoPtr	myInfo = MIOWin_GetInfo (MIO_selectedRunWindow);
    char		myMessage [1024];

    MIO_CheckOuputIsToWindow ("Text.Locate");
    MIO_CheckOuputWindowIsInGraphicsMode ("Text.Locate");

    if (pmRow < 1) 
    {
	MDIO_sprintf (myMessage, "Row of %d is less than 1", pmRow);
	ABORT_WITH_ERRMSG (E_TEXT_ROW_TOO_SMALL, myMessage);
    }
    if (pmRow > myInfo -> maxRow) 
    {
	MDIO_sprintf (myMessage, "Row of %d is greater than maxrow (%d)", 
		      pmRow, myInfo -> maxRow);
	ABORT_WITH_ERRMSG (E_TEXT_ROW_TOO_LARGE, myMessage);
    }
    if (pmCol < 1) 
    {
	MDIO_sprintf (myMessage, "Column of %d is less than 1", pmCol);
	ABORT_WITH_ERRMSG (E_TEXT_COL_TOO_SMALL, myMessage);
    }
    if (pmCol > myInfo -> maxCol)
    {
	MDIO_sprintf (myMessage, "Column of %d is greater than maxcol (%d)", 
		      pmCol, myInfo -> maxCol);
	ABORT_WITH_ERRMSG (E_TEXT_COL_TOO_LARGE, myMessage);
    }
    
    myInfo -> row = pmRow - 1;
    myInfo -> col = pmCol - 1;
    myInfo -> actualRow = myInfo -> row;
    myInfo -> actualCol = myInfo -> col;
    
    // Display the caret, if appropriate
    MIOWin_CaretDisplay (MIO_selectedRunWindow);
} // MIOText_Locate