diff --git a/documentation/README.darwin.html b/documentation/README.darwin.html index 0efc7fdce..fa7aabb26 100644 --- a/documentation/README.darwin.html +++ b/documentation/README.darwin.html @@ -75,7 +75,7 @@ AppleScript events to other applications on the OS X machine. * - Add exampleAppleScriptRecord.m to the application SRCS. * - Add -framework Foundation to the application LDFLAGS. * 2) Add the following line to the application database description: - * function(exampleAppleScriptProcess) + * registrar(registerExampleAppleScript) * 3) Add a record to the application database: * record(sub,"setVolume") * { @@ -83,15 +83,17 @@ AppleScript events to other applications on the OS X machine. * } */ #import <Foundation/Foundation.h> +#include <registryFunction.h> #include <subRecord.h> #include <alarm.h> #include <errlog.h> #include <recGbl.h> +#include <epicsExport.h> /* * Shim between EPICS and NSAppleScript class. */ -long +static long exampleAppleScriptProcess(struct subRecord *psub) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -110,6 +112,16 @@ exampleAppleScriptProcess(struct subRecord *psub) return 0; } +static registryFunctionRef subRef[] = { + {"exampleAppleScriptProcess",(REGISTRYFUNCTION)exampleAppleScriptProcess} +}; + +void registerExampleAppleScript(void) +{ + registryFunctionRefAdd(subRef,NELEMENTS(subRef)); +} +epicsExportRegistrar(registerExampleAppleScript); + ============================================================================== /*