--- ray/src/common/bsdf.h 2012/10/13 20:15:43 2.20 +++ ray/src/common/bsdf.h 2013/04/21 21:36:23 2.22 @@ -1,4 +1,4 @@ -/* RCSid $Id: bsdf.h,v 2.20 2012/10/13 20:15:43 greg Exp $ */ +/* RCSid $Id: bsdf.h,v 2.22 2013/04/21 21:36:23 greg Exp $ */ /* * bsdf.h * @@ -58,10 +58,13 @@ extern "C" { typedef enum {SDEnone=0, SDEmemory, SDEfile, SDEformat, SDEargument, SDEdata, SDEsupport, SDEinternal, SDEunknown} SDError; -/* English ASCII strings corresponding to ennumerated errors */ +/* English strings corresponding to ennumerated errors */ extern const char *SDerrorEnglish[]; -/* Additional information on last error (ASCII English) */ +/* Pointer to error list in preferred language */ +extern const char **SDerrorList; + +/* Additional information on last error (generally in English) */ extern char SDerrorDetail[]; /* Holder for BSDF value and spectral color */ @@ -152,8 +155,8 @@ extern int SDretainSet; /* =SDretainNone by default * #define SDisLoaded(sd) ((sd)->rLambFront.spec.flags != 0) -/* Report an error to the indicated stream (in English) */ -extern SDError SDreportEnglish(SDError ec, FILE *fp); +/* Report an error to the indicated stream */ +extern SDError SDreportError(SDError ec, FILE *fp); /* Shorten file path to useable BSDF name, removing suffix */ extern void SDclipName(char res[SDnameLn], const char *fname); @@ -190,10 +193,10 @@ extern SDError SDsampComponent(SDValue *sv, FVECT ioV extern void SDmultiSamp(double t[], int n, double randX); /* Map a [0,1]^2 square to a unit radius disk */ -void SDsquare2disk(double ds[2], double seedx, double seedy); +extern void SDsquare2disk(double ds[2], double seedx, double seedy); /* Map point on unit disk to a unit square in [0,1]^2 range */ -void SDdisk2square(double sq[2], double diskx, double disky); +extern void SDdisk2square(double sq[2], double diskx, double disky); /***************************************************************** * The calls below are the ones most applications require. @@ -201,7 +204,7 @@ void SDdisk2square(double sq[2], double diskx, doubl */ /* Get BSDF from cache (or load and cache it on first call) */ -/* Report any problems to stderr (in English), return NULL on failure */ +/* Report any problems to stderr, return NULL on failure */ extern const SDData *SDcacheFile(const char *fname); /* Free a BSDF from our cache (clear all if sd==NULL) */