| 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); |