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

Comparing ray/src/util/rtcontrib.c (file contents):
Revision 1.29 by greg, Wed Oct 5 05:20:21 2005 UTC vs.
Revision 1.30 by greg, Wed Oct 5 19:44:17 2005 UTC

# Line 57 | Line 57 | LUTAB  ofiletab = LU_SINIT(free,closefile);    /* output f
57   FILE *getofile(const char *ospec, const char *mname, int bn);
58   int ofname(char *oname, const char *ospec, const char *mname, int bn);
59   void printheader(FILE *fout, const char *info);
60 + void printresolu(FILE *fout);
61  
62   /*
63   * The rcont structure is used to manage i/o with a particular
# Line 598 | Line 599 | printheader(FILE *fout, const char *info)
599                  break;
600          }
601          fputc('\n', fout);
602 + }
603 +
604 + /* write resolution string to given output stream */
605 + void
606 + printresolu(FILE *fout)
607 + {
608          if (xres > 0) {
609                  if (yres > 0)                   /* resolution string */
610                          fprtresolu(xres, yres, fout);
# Line 619 | Line 626 | getofile(const char *ospec, const char *mname, int bn)
626                                  SET_FILE_BINARY(stdout);
627                          if (header)
628                                  printheader(stdout, NULL);
629 +                        printresolu(stdout);
630                  }
631                  using_stdout = 1;
632                  return stdout;
# Line 647 | Line 655 | getofile(const char *ospec, const char *mname, int bn)
655                  if (header) {
656                          char    info[512];
657                          char    *cp = info;
658 <                        sprintf(cp, "MODIFIER=%s\n", mname);
659 <                        while (*cp) ++cp;
658 >                        if (ofl & OF_MODIFIER) {
659 >                                sprintf(cp, "MODIFIER=%s\n", mname);
660 >                                while (*cp) ++cp;
661 >                        }
662                          if (ofl & OF_BIN) {
663                                  sprintf(cp, "BIN=%d\n", bn);
664                                  while (*cp) ++cp;
# Line 656 | Line 666 | getofile(const char *ospec, const char *mname, int bn)
666                          *cp = '\0';
667                          printheader(fp, info);
668                  }
669 +                printresolu(fp);
670                                                  /* play catch-up */
671                  for (i = 0; i < lastdone; i++) {
672                          static const DCOLOR     nocontrib = BLKCOLOR;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines