--- ray/src/common/tonemap.c 1997/04/18 13:59:43 3.4 +++ ray/src/common/tonemap.c 1997/11/12 13:25:48 3.5 @@ -22,12 +22,17 @@ struct tmStruct *tmTop = NULL; /* current tone mappin struct tmPackage *tmPkg[TM_MAXPKG]; int tmNumPkgs = 0; /* number of registered packages */ +int tmLastError; /* last error incurred by library */ +char *tmLastFunction; /* error-generating function name */ + int tmErrorReturn(func, err) /* error return (with message) */ char *func; int err; { + tmLastFunction = func; + tmLastError = err; if (tmTop != NULL && tmTop->flags & TM_F_NOSTDERR) return(err); fputs(func, stderr);