
34 Appendix A2 Exported Function Summary
SetOxExit
void SetOxExit(void (OXCALL * pfnNewOxExit)(int) );
pfnNewOxExit in: new exit handler function
No return value.
Description
Installs a exit handler function for OxExit which is called when a run-time error
or a fatal error occurs. The default OxExit function does nothing.
A run-time error is handled by OxRunErrorMessage as follows:
(1) Report the text of the error message.
(2) If OxRunError is called with iErno > 1, then call OxExit(iErno).
(3) If control is passed on, call OxExit(0).
(4) If control is passed on, and Ox is in run-time mode: the run-time engine
unwinds and exits after cleaning up (or when interpreting: is ready to accept
the next command). If Ox is not in run-time mode: treat as fatal error.
A fatal error is handled as follows:
(1) Call OxExit(1).
(2) If control is passed on, call exit(1).
Fatal errors can occur during compilation when Ox runs out of memory, or any
of the symbol/literal/code tables are full.
SetOxGets
void SetOxGets(
char * (OXCALL * pfnNewOxGets)(char *s, int n) );
pfnNewOxGets in: new OxGets function
s out: read input
n in: allocated size of s
No return value.
Description
Replaces the OxGets function by pfnNewOxGets. Is used together with
SetOxPipe to redirect the output from scan.
pfnNewOxGets should return to s if successful, and NULL if it failed.
Kommentare zu diesen Handbüchern