ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bsdf.c
(Generate patch)

Comparing ray/src/common/bsdf.c (file contents):
Revision 2.43 by greg, Sat Oct 13 20:15:43 2012 UTC vs.
Revision 2.44 by greg, Sun Apr 21 21:36:23 2013 UTC

# Line 35 | Line 35 | const char             *SDerrorEnglish[] = {
35                                  "Unknown error"
36                          };
37  
38 + /* Pointer to error list in preferred language */
39 + const char              **SDerrorList = SDerrorEnglish;
40 +
41   /* Additional information on last error (ASCII English) */
42   char                    SDerrorDetail[256];
43  
# Line 47 | Line 50 | struct SDCache_s       *SDcacheList = NULL;
50   /* Retain BSDFs in cache list */
51   int                     SDretainSet = SDretainNone;
52  
53 < /* Report any error to the indicated stream (in English) */
53 > /* Report any error to the indicated stream */
54   SDError
55 < SDreportEnglish(SDError ec, FILE *fp)
55 > SDreportError(SDError ec, FILE *fp)
56   {
57          if (!ec)
58                  return SDEnone;
# Line 59 | Line 62 | SDreportEnglish(SDError ec, FILE *fp)
62          }
63          if (fp == NULL)
64                  return ec;
65 <        fputs(SDerrorEnglish[ec], fp);
65 >        fputs(SDerrorList[ec], fp);
66          if (SDerrorDetail[0]) {
67                  fputs(": ", fp);
68                  fputs(SDerrorDetail, fp);
# Line 420 | Line 423 | SDcacheFile(const char *fname)
423                  return NULL;
424          SDerrorDetail[0] = '\0';
425          if ((sd = SDgetCache(fname)) == NULL) {
426 <                SDreportEnglish(SDEmemory, stderr);
426 >                SDreportError(SDEmemory, stderr);
427                  return NULL;
428          }
429          if (!SDisLoaded(sd) && (ec = SDloadFile(sd, fname))) {
430 <                SDreportEnglish(ec, stderr);
430 >                SDreportError(ec, stderr);
431                  SDfreeCache(sd);
432                  return NULL;
433          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines