Progress
External Program
Interfaces
Mapping Routine Identifiers Using PRODSP()
You map routine identifiers to C functions in the
PRODSP()
dispatch routine. Progress provides a prototypePRODSP()
in the C source file,hlprodsp.c
.NOTE: The$DLC/probuild/hlc
directory on UNIX and the%DLC%\probuild\hlc
directory in Windows contain a prototypehlprodsp.c
file. Do not modify this file. To make changes, copy it to a working directory and modify the copy.Because Progress calls the
PRODSP()
dispatch routine, it must have the following declaration:
The hlprodsp.c file shows routine-identifier
hlcroutine
being mapped to the C functionhlcfunc()
inPRODSP()
:
For each routine you add, you must include a call to the
FUNCTEST
macro. For example, to map two routine names, such asHLCROUTINE1
andHLCROUTINE2
, to two corresponding C functions, such ashlcfunc1()
andhlcfunc2()
, you must include the following lines inPRODSP()
:
NOTE: The CALL statement andFUNCTEST
declaration must use the same letter case for the routine identifier.The
FUNCTEST
macro inhlprodsp.c
has the following syntax:
The routine-identifier is the name referenced by a CALL statement that identifies your C function. Enter the routine identifier as a character string surrounded by quotes. Since
FUNCTEST
does not convert case for the routine identifier, the case is significant.The function-name is the name of the C function that the routine-identifier references.
The routine identifier and function name can have the same name:
When you compile
hlprodsp.c
, the C compiler translates theFUNCTEST
macro references to C code. For example:
translates to:
Therefore, when Progress invokes
PRODSP()
with the argumentHLCROUTINE
, it runshlcfunc
.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |