1.5.7. Process preprocessor requests

[<<<] [>>>]

This function is used by ScriptBasic at certain points of the execution to start the preprocessors. It calls each loaded preprocessor one after the other until there is no more preprocessors or one of them alters the command variable to PreprocessorDone.

This function gets three arguments.

int ipreproc_Process(pPreprocObject pPre,
                     long lCommand,
                     void *pPointer
pRe is the preprocessor object.

lCommand is the command for the preprocessor to execute. For the possible values look at the file prepext.h (created from prepext.c) enum PreprocessorCommands

pPointer is a pointer to a structure. The structure actually depends on the actual value of lCommand. For different commands this pointer points to different structures.

When the preprocessors are called they can alter the long variable lCommand passed to them by reference.

When a preprocessor in this variable returns the value PreprocessorDone the preprocessing in the actual stage is stopped and no further proreprocessor is invoked. However this has no effect on later preprocessor incocation. Returning this value in this variable solely means that the preprocessor has done all work that has to be done at the very point and thus there is no need of further preprocessor handling.

When a preprocessor in this variable returns the value PreprocessorUnload the function unhooks the preprocessor from the list af active preprocessors, releases all memory that the preprocessor used up and frees the library.

The return value of the preprocessor functions should be zero or error code.

The return value of the function ipreproc_Process is zero or the error value of a preprocessor. If a preprocessor returns a non-zero error code no further preprocessors are invoked.

This function can not be used in situation when the preprocessors may return other value in lCommand than PreprocessorDone or PreprocessorContinue.

[<<<] [>>>]