39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/* registryFunction.c */
|
|
|
|
/* Author: Marty Kraimer Date: 01MAY2000 */
|
|
|
|
/********************COPYRIGHT NOTIFICATION**********************************
|
|
This software was developed under a United States Government license
|
|
described on the COPYRIGHT_UniversityOfChicago file included as part
|
|
of this distribution.
|
|
****************************************************************************/
|
|
#include <stddef.h>
|
|
#include <stdlib.h>
|
|
#include <stddef.h>
|
|
|
|
#define epicsExportSharedSymbols
|
|
#include "registry.h"
|
|
#include "registryFunction.h"
|
|
|
|
const char *function = "function";
|
|
static void *registryID = (void *)&function;
|
|
|
|
|
|
epicsShareFunc int epicsShareAPI registryFunctionAdd(
|
|
const char *name,REGISTRYFUNCTION func)
|
|
{
|
|
return(registryAdd(registryID,name,(void *)func));
|
|
}
|
|
|
|
epicsShareFunc REGISTRYFUNCTION epicsShareAPI registryFunctionFind(
|
|
const char *name)
|
|
{
|
|
REGISTRYFUNCTION func;
|
|
func = (REGISTRYFUNCTION)registryFind(registryID,name);
|
|
if(!func) {
|
|
func = (REGISTRYFUNCTION)registryFind(0,name);
|
|
if(func)registryFunctionAdd(name,func);
|
|
}
|
|
return(func);
|
|
}
|