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.62 by greg, Wed Apr 6 00:39:07 2011 UTC vs.
Revision 1.63 by greg, Sat Apr 9 18:05:18 2011 UTC

# Line 702 | Line 702 | void
702   printheader(FILE *fout, const char *info)
703   {
704          extern char     VersionID[];
705 <        FILE            *fin = fopen(octree, "r");
706 <        
707 <        if (fin == NULL)
708 <                quit(1);
709 <        checkheader(fin, "ignore", fout);       /* copy octree header */
710 <        fclose(fin);
705 >                                                /* copy octree header */
706 >        if (octree[0] == '!') {
707 >                newheader("RADIANCE", fout);
708 >                fputs(octree+1, fout);
709 >                if (octree[strlen(octree)-1] != '\n')
710 >                        fputc('\n', fout);
711 >        } else {
712 >                FILE    *fin = fopen(octree, "r");
713 >                if (fin == NULL)
714 >                        quit(1);
715 >                checkheader(fin, "ignore", fout);
716 >                fclose(fin);
717 >        }
718          printargs(gargc-1, gargv, fout);        /* add our command */
719          fprintf(fout, "SOFTWARE= %s\n", VersionID);
720          fputnow(fout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines