2000/utils/render/samples/allmats/allmats.cpp
////////////////////////////////////////////////////////////////////////////////
// dofun()
//
// This function calls the function in gGunctionTable that is indexed by
// the ADS function code.
//

dofun()
This function calls the function in gGunctionTable that is indexed by
the ADS function code.
dofun () This function calls the function in gGunctionTable that is indexed by the ADS function code .
static int
dofun()
{
	struct resbuf *rb;
	AvErrorCode retval;
	unsigned short func;
	if (! acrxServiceDictionary->at(RENDER_SERVICES))
	{
		retval = av_loadlib();
        if (retval != AvRetNorm) {
            acdbFail("Library initialization failed.\n");
            return RTERROR;
        }
	}
    func = (unsigned short)ads_getfuncode();
	if (func >= ELEMENTS(gFunctionTable))
	{
		acdbFail("Received nonexistent function code.");
		return RTERROR;
	}
    rb =  acedGetArgs();
    av_initialize();
    retval = (*gFunctionTable[func].fptr)(rb);
	acutRelRb(rb);
	if (retval == AvRetNorm)
		return RTNORM;
	else
		return RTERROR;
}
static int dofun ( ) { struct resbuf * rb ; AvErrorCode retval ; unsigned short func ; if ( ! acrxServiceDictionary -> at ( RENDER_SERVICES ) ) { retval = av_loadlib ( ) ; if ( retval != AvRetNorm ) { acdbFail ( " \n " ) ; return RTERROR ; } } func = ( unsigned short ) ads_getfuncode ( ) ; if ( func >= ELEMENTS ( gFunctionTable ) ) { acdbFail ( " " ) ; return RTERROR ; } rb = acedGetArgs ( ) ; av_initialize ( ) ; retval = ( * gFunctionTable [ func ] . fptr ) ( rb ) ; acutRelRb ( rb ) ; if ( retval == AvRetNorm ) return RTNORM ; else return RTERROR ; }
dofun()
This function calls the function in gGunctionTable that is indexed by
the ADS function code.
dofun () This function calls the function in gGunctionTable that is indexed by the ADS function code .
// Reload Render.arx if it has been unloaded
 //
 // AVLib: here, we call av_initialize, which issues
 // the "renderupdate" command
 //
