[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The handler-proc
attribute is required. It is used to name the
procedure to call. That procedure is presumed to be external, but if
you provide the code for it, then the procedure is emitted as a static
procedure in the generated code.
This procedure should return 0 on success, a cumulative error code on warning and exit without returning on an unrecoverable error. As the cumulative warning codes are or-ed together, the codes should be some sort of bit mask in order to be ultimately decipherable (if you need to do that).
If the called procedure needs to cause a fail-exit, it is expected to call
exit(3)
directly. If you want to cause a warning exit code, then this
handler function should return a non-zero status. That value will be
OR-ed into a result integer for computing the final exit code. E.g.,
here is part of the emitted code:
int res = 0; if (argc > 0) { do { res |= my_handler( *(argv++) ); } while (--argc > 0); } else { ... |
This document was generated by Bruce Korb on August 21, 2015 using texi2html 1.82.