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

Comparing ray/src/util/wrapBSDF.c (file contents):
Revision 2.4 by greg, Sat Feb 14 00:39:21 2015 UTC vs.
Revision 2.5 by greg, Sat Feb 14 18:33:07 2015 UTC

# Line 221 | Line 221 | mat_assignments(const char *caller, const char *fn, ez
221          for (i = 0; i < nfield_assign; i++) {
222                  const char      *fnext = field_assignment[i];
223                  for ( ; ; ) {
224 +                        int     added = 0;
225                          ezxml_t fld;
226                          char    sbuf[512];
227                          int     j;
# Line 253 | Line 254 | mat_assignments(const char *caller, const char *fn, ez
254                                          fprintf(stderr,
255                                                  "%s: warning - adding tag <%s>\n",
256                                                          fn, sbuf);
257 +                                ezxml_add_txt(wtl, "\t");
258                                  fld = ezxml_add_child_d(wtl, sbuf, strlen(wtl->txt));
259 +                                ++added;
260                          }
261                          if (XMLfieldID[j].has_unit)
262                                  ezxml_set_attr(fld, "unit", attr_unit);
# Line 277 | Line 280 | mat_assignments(const char *caller, const char *fn, ez
280                          }
281                          sbuf[j] = '\0';
282                          ezxml_set_txt_d(fld, sbuf);
283 +                        if (added)
284 +                                ezxml_add_txt(wtl, "\n\t");
285                          fnext += (*fnext == FASEP);
286                  }
287          }
# Line 593 | Line 598 | wrapBSDF(const char *caller)
598                  ezxml_t ab, dd = ezxml_child(wtl, "DataDefinition");
599                  if (dd != NULL) {
600                          offset = dd->off;
601 <                        fprintf(stderr,
601 >                        if (dd->child != NULL)
602 >                                fprintf(stderr,
603                  "%s: warning - replacing existing <DataDefinition> in '%s'\n",
604                                                  caller, xml_path);
605                          ezxml_remove(dd);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines