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.23 by schorsch, Thu Jul 3 22:41:44 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 + #include  <string.h>
14  
15 < #ifdef MSDOS
18 < #include  <fcntl.h>
19 < #endif
15 > #include "copyright.h"
16  
17 + #include  "platform.h"
18   #include  "color.h"
22
19   #include  "resolu.h"
20  
21   #define  MAXFILE        64
# Line 61 | Line 57 | int  nfile;                    /* number of files */
57   char  ourfmt[LPICFMT+1] = PICFMT;
58   int  wrongformat = 0;
59  
60 < FILE  *popen(), *lblopen();
60 > FILE  *lblopen();
61 > void  quit();
62  
66 extern char  *malloc();
63  
68
64   tabputs(s)                      /* print line preceded by a tab */
65   char  *s;
66   {
# Line 97 | Line 92 | char  *argv[];
92          int  xsgn, ysgn;
93          char  *thislabel;
94          int  an;
95 < #ifdef MSDOS
96 <        extern int  _fmode;
97 <        _fmode = O_BINARY;
103 <        setmode(fileno(stdin), O_BINARY);
104 <        setmode(fileno(stdout), O_BINARY);
105 < #endif
95 >        SET_DEFAULT_BINARY();
96 >        SET_FILE_BINARY(stdin);
97 >        SET_FILE_BINARY(stdout);
98          progname = argv[0];
99  
100          for (an = 1; an < argc && argv[an][0] == '-'; an++)
# Line 151 | Line 143 | char  *argv[];
143                  }
144   dofiles:
145          newheader("RADIANCE", stdout);
146 +        fputnow(stdout);
147          for (nfile = 0; an < argc; nfile++) {
148                  if (nfile >= MAXFILE)
149                          goto toomany;
# Line 228 | Line 221 | getfile:
221                  printf("%s:\n", input[nfile].name);
222                  getheader(input[nfile].fp, tabputs, NULL);
223                  if (wrongformat) {
224 <                        fprintf(stderr, "%s: bad Radiance input file\n",
224 >                        fprintf(stderr, "%s: incompatible input format\n",
225                                          input[nfile].name);
226                          quit(1);
227                  }
# Line 416 | Line 409 | err:
409   }
410  
411  
412 + void
413   quit(code)              /* exit gracefully */
414   int  code;
415   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines