/*Copyright (C) 1992, 1994 by Thomas Glen Smith. All Rights Reserved.*/ /* errstop APL2 V1.0.0 ************************************************* * Checks for error conditions, and frees storage for temporary APL * * variables. Normally called by CAPLIB routines at end of processing. * ***********************************************************************/ #define INCLUDES APLCB+APLDEBUG+ERRNO #include "includes.h" Aplcb errstop(rc,left,rite,out) int rc; Aplcb left,rite,out; { extern int aplerr; #if APL_DEBUG void mem_check(void); mem_check(); #endif if (left != NULL) endoper(left); if (rite != NULL && rite != left) endoper(rite); if (0 != aplerr + rc || errno > 1) { if (aplerr==0) aplerr=rc; if (aplerr==0) aplerr=20; if (out != NULL) endoper(out); return(NULL); } return(out); /* no errors */ }