/**********************************************************************/ /* /* $Date: 91/10/26 00:27:34 $ /* $Revision: 1.3.33.1 $ /* /**********************************************************************/ #include #include #include #define CGETS(x,y) UxCatGets(MC_LIBUIMX,(x),(y)) extern char *UxCopyString(); static char *Instances,*MallocFailed,*ReallocFailed,*Undefined; void UxErrorHandler(error,type,where) int error,type; char *where; { switch(error){ case INSTANCES_EXCEEDED: printf(Instances,where); break; case MALLOC_FAILED: printf(MallocFailed,where); break; case REALLOC_FAILED: printf(ReallocFailed,where); break; default: printf(Undefined,where); break; } if(type == FATAL) exit(error); } UxInitErrorHandler() { Instances = UxCopyString(CGETS(MS_LU_INSTEXCEEDED,DS_MS_LU_INSTEXCEEDED)); MallocFailed = UxCopyString(CGETS(MS_LU_MALLOCFAILED,DS_MS_LU_MALLOCFAILED)); ReallocFailed = UxCopyString(CGETS(MS_LU_REALLOCFAILED,DS_MS_LU_REALLOCFAILED)); Undefined = UxCopyString(CGETS(MS_LU_UNDEFERROR,DS_MS_LU_UNDEFERROR)); }