\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{rciErrorStack}{3}
\manSection{NAME}
{\tt \manName{rciErrorMsg}}, 
{\tt \manName{rciGetErrorMsg}}, 
{\tt \manName{rciGetErrorCode}}, 
{\tt \manName{rciSetErrorCode}},
{\tt \manName{rciNumErrors}}, 
{\tt \manName{rciPopError}}, 
{\tt \manName{rciClearErrors}}, 
{\tt \manName{rciDumpErrorMsgs}}, 
{\tt \manName{rciPrintErrors}} --
Error stack management routines for RCI tasks.

\manSection{USAGE}
\cverbatim
#include <rci.h>

rciErrorMsg(td, code, format [arg,] ...)
   RCI_DESC *td;
   int code;
   char *format;

char *rciGetErrorMsg(td, level)
   RCI_DESC *td;
   int level;

rciGetErrorCode(td, level)
   RCI_DESC *td;
   int level;

rciSetErrorCode(td, level, code)
   RCI_DESC *td;
   int level;
   int code;

rciNumErrors(td)
   RCI_DESC *td;

rciPopError(td)
   RCI_DESC *td;

rciClearErrors(td)
   RCI_DESC *td;

rciDumpErrorMsgs(td, buf, size)
   RCI_DESC *td;
   char *buf;
   int size;

rciPrintErrors(td)
   RCI_DESC *td; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt td} --}
Pointer to RCI task descriptor.
\manItem{{\tt code} --}
Error code.
\manItem{{\tt format} --}
{\tt printf} style format string.
\manItem{{\tt level} --}
Indicates a level on the error stack, with {\tt 0} denoting the most recently
added information.
\manItem{{\tt buf} --}
Buffer for receiving error messages.
\manItem{{\tt size} --}
Size of the buffer, in bytes.

\manSection{DESCRIPTION}
These routines are identical in function to the routines
described in {\tt errorStack(3)}, except that instead of referencing 
the current error stack, they reference the error stack of
a particular RCI task. 
This task is indicated by a descriptor
which is passed to each routine as an additional (first) argument.

All routines can be called from any part of the RCI program.

The output from {\tt rciPrintErrors()} goes to the
same place as the output for {\tt rciPrintf()}.

If any of the routines are called with {\tt td} given as
{\tt NULL}, then the current error stack is referenced
(as if the corresponding {\tt errorStack(3)} routine
was called instead).

\manSection{CAVEATS}
No interlocking protection is provided against having different
tasks use these routines to access the same error stack at the
same time.

\manSection{SEE ALSO}
\raggedright
{\tt errorStack(3)}, {\tt rciAbortErrors(3)}.

\manEnd
