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.22 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.28 by greg, Mon Mar 15 21:16:54 2004 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include  <stdio.h>
11   #include  <math.h>
12   #include  <time.h>
13 + #include  <string.h>
14  
15   #include "copyright.h"
16  
17   #include  "platform.h"
18 + #include  "rtprocess.h"
19   #include  "color.h"
20   #include  "resolu.h"
21  
# Line 37 | Line 39 | int  labelht = 24;                     /* label height */
39  
40   int  checkthresh = 0;                   /* check threshold value */
41  
42 + char  StandardInput[] = "<stdin>";
43   char  Command[] = "<Command>";
44   char  Label[] = "<Label>";
45  
# Line 59 | Line 62 | int  wrongformat = 0;
62   FILE  *lblopen();
63   void  quit();
64  
65 + static gethfunc tabputs;
66  
67 < tabputs(s)                      /* print line preceded by a tab */
68 < char  *s;
67 >
68 > static int
69 > tabputs(                        /* print line preceded by a tab */
70 >        char    *s,
71 >        void    *p
72 > )
73   {
74          char  fmt[32];
75  
# Line 200 | Line 208 | getfile:
208                  if (autolabel && thislabel == NULL)
209                          thislabel = argv[an];
210                  if (!strcmp(argv[an], "-")) {
211 <                        input[nfile].name = "<stdin>";
211 >                        input[nfile].name = StandardInput;
212                          input[nfile].fp = stdin;
213                  } else {
214                          if (argv[an][0] == '!') {
# Line 365 | Line 373 | compos()                               /* composite pictures */
373                          quit(1);
374                  }
375          }
376 +                                        /* read remainders from streams */
377 +        for (i = 0; i < nfile; i++)
378 +                if (input[i].name[0] == '<')
379 +                        while (getc(input[i].fp) != EOF)
380 +                                ;
381          return;
382   memerr:
383          perror(progname);
# Line 380 | Line 393 | register COLR  c1, c2;
393  
394          j = 4;                          /* check exponents first! */
395          while (j--)
396 <                if (i = c1[j] - c2[j])
396 >                if ( (i = c1[j] - c2[j]) )
397                          return(i);
398          return(0);
399   }
# Line 391 | Line 404 | lblopen(s, xp, yp)             /* open pipe to label generator */
404   char  *s;
405   int  *xp, *yp;
406   {
407 <        char  com[128];
407 >        char  com[PATH_MAX];
408          FILE  *fp;
409  
410          sprintf(com, "psign -s -.15 -a 2 -x %d -y %d '%.90s'", *xp, *yp, s);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines