PEXtSanityCheck(3PEXt)

NAME
PEXtSanityCheck, PEXtError, SAFE_PEX — PHIGS error message convenience functions

SYNOPSIS
#include <PEXt/PEXt.h>

void PEXtSanityCheck (file, line, routine)
    String    file;
    String    line;
    Strinf    routine;

extern Pint PEXtError;

SAFE_PEX (routine)
    String    routine;

  Required PHIGS Operating States
(*, *, *, *)

DESCRIPTION
These convenience procedures allow rudimentary error-detection for PHIGS routines that set an error return parameter. The variable PEX_error is allocated by the PEX toolkit as a location for this error code by application programs. It is used internally by the toolkit to store error codes as well. The routine PEXtSanityCheck examines this variable and prints an error message to standard output if the value is non-zero. The error message indicates an error occuring in the source file on the given line after returning from the named routine.

The macro SAFE_PEX expands into a call to PEXtSanityCheck with __FILE__ and __LINE__ as the file and line arguments.

RETURN VALUE
None

AUTHOR
Rich Thomson <rthomson@dsd.es.com>
Design Systems Division
Evans & Sutherland Computer Corporation