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

Comparing ray/src/px/pcompos.c (file contents):
Revision 2.20 by gwlarson, Tue Oct 27 09:08:25 1998 UTC vs.
Revision 2.22 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1993 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  pcompos.c - program to composite pictures.
6   *
# Line 11 | Line 8 | static char SCCSid[] = "$SunId$ LBL";
8   */
9  
10   #include  <stdio.h>
14
11   #include  <math.h>
12 + #include  <time.h>
13  
14 < #ifdef MSDOS
18 < #include  <fcntl.h>
19 < #endif
14 > #include "copyright.h"
15  
16 + #include  "platform.h"
17   #include  "color.h"
22
18   #include  "resolu.h"
19  
20   #define  MAXFILE        64
# Line 61 | Line 56 | int  nfile;                    /* number of files */
56   char  ourfmt[LPICFMT+1] = PICFMT;
57   int  wrongformat = 0;
58  
59 < FILE  *popen(), *lblopen();
59 > FILE  *lblopen();
60 > void  quit();
61  
66 extern char  *malloc();
62  
68
63   tabputs(s)                      /* print line preceded by a tab */
64   char  *s;
65   {
# Line 97 | Line 91 | char  *argv[];
91          int  xsgn, ysgn;
92          char  *thislabel;
93          int  an;
94 < #ifdef MSDOS
95 <        extern int  _fmode;
96 <        _fmode = O_BINARY;
103 <        setmode(fileno(stdin), O_BINARY);
104 <        setmode(fileno(stdout), O_BINARY);
105 < #endif
94 >        SET_DEFAULT_BINARY();
95 >        SET_FILE_BINARY(stdin);
96 >        SET_FILE_BINARY(stdout);
97          progname = argv[0];
98  
99          for (an = 1; an < argc && argv[an][0] == '-'; an++)
# Line 151 | Line 142 | char  *argv[];
142                  }
143   dofiles:
144          newheader("RADIANCE", stdout);
145 +        fputnow(stdout);
146          for (nfile = 0; an < argc; nfile++) {
147                  if (nfile >= MAXFILE)
148                          goto toomany;
# Line 228 | Line 220 | getfile:
220                  printf("%s:\n", input[nfile].name);
221                  getheader(input[nfile].fp, tabputs, NULL);
222                  if (wrongformat) {
223 <                        fprintf(stderr, "%s: bad Radiance input file\n",
223 >                        fprintf(stderr, "%s: incompatible input format\n",
224                                          input[nfile].name);
225                          quit(1);
226                  }
# Line 416 | Line 408 | err:
408   }
409  
410  
411 + void
412   quit(code)              /* exit gracefully */
413   int  code;
414   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines