[Top] [Prev] [Next] [Bottom] [Contents]

SaSetSiteHook

Installs a "hook" function so that the hook functions can examine and control the "playing" of sites. Conditional and loop sites are handled before this function is called. A NULL function pointer removes the "hook". If a hook returns 0, the site will be processed by Sapphire. A non-zero value indicates that the hook has done the processing and no more processing should be done by Sapphire.

Synopsis

#include "SaRnHtml.h"
typedef int (*SaSiteHook) SUTPROTO((char* sitename));
int SaSetSiteHook SUTPROTO((SaSiteHook hook));

Arguments

hook
Pointer to a hook function of type, SaSiteHook.

Return Values

Returns 0.

Description

Installs a "hook" function so that the hook functions can examine and control the "playing" of sites. Conditional and loop sites are handled before this function is called. A NULL function pointer removes the "hook". If a hook returns 0, the site will be processed by Sapphire. A non-zero value indicates that the hook has done the processing and no more processing should be done by Sapphire.

Example

int MyHook(char* sitename)
{
	if(sitename == NULL)
		return 0;
	if(strncmp(sitename, "FOR", strlen("FOR") == 0)
	{
		/** process special site names, beginning with "FOR" 
**/
	}
	else
	{
		/*** let sapphire do it **/
		return 0;
	}
	/** don't let Sapphire have it **/
	return 1;
}

SaSetSiteHook(MyHook);

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.