Update to reflect new 'registrar' keyword.

This commit is contained in:
W. Eric Norum
2003-04-18 13:42:00 +00:00
parent 44a57584b7
commit 40802e621c

View File

@@ -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);
==============================================================================
/*