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

Comparing ray/src/common/image.c (file contents):
Revision 2.18 by schorsch, Thu Jun 26 00:58:09 2003 UTC vs.
Revision 2.26 by schorsch, Fri Jan 2 11:36:26 2004 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "copyright.h"
11  
12 < #include  "standard.h"
13 <
12 > #include  "rtio.h"
13   #include  "view.h"
14  
16 #include  "paths.h"
15  
16   #define  FEQ(x,y)       (fabs((x)-(y)) <= FTINY)
17   #define  VEQ(v,w)       (FEQ((v)[0],(w)[0]) && FEQ((v)[1],(w)[1]) \
# Line 21 | Line 19 | static const char      RCSid[] = "$Id$";
19  
20   VIEW  stdview = STDVIEW;                /* default view parameters */
21  
22 + static gethfunc gethview;
23  
24 +
25   char *
26   setview(v)              /* set hvec and vvec, return message on error */
27   register VIEW  *v;
# Line 394 | Line 394 | register char  *s;
394          int  na;
395          int  nvopts = 0;
396  
397 +        while (*s == ' ')
398 +                s++;
399          if (*s != '-')
400                  s = sskip2(s,1);
401          while (*s) {
402                  ac = 0;
403                  do {
404 <                        av[ac++] = s;
404 >                        if (ac || *s == '-')
405 >                                av[ac++] = s;
406                          while (*s && *s != ' ')
407                                  s++;
408                          while (*s == ' ')
# Line 489 | Line 492 | int
492   isview(s)                               /* is this a view string? */
493   char  *s;
494   {
495 <        static char  *altname[]={NULL,VIEWSTR,"rpict","rview","pinterp",NULL};
495 >        static char  *altname[]={NULL,VIEWSTR,"rpict","rview","rvu","rpiece","pinterp",NULL};
496          extern char  *progname;
497          register char  *cp;
498          register char  **an;
# Line 521 | Line 524 | struct myview {
524  
525  
526   static int
527 < gethview(s, v)                          /* get view from header */
528 < char  *s;
529 < register struct myview  *v;
527 > gethview(                               /* get view from header */
528 >        char  *s,
529 >        void  *v
530 > )
531   {
532 <        if (isview(s) && sscanview(v->hv, s) > 0)
533 <                v->ok++;
532 >        if (isview(s) && sscanview(((struct myview*)v)->hv, s) > 0)
533 >                ((struct myview*)v)->ok++;
534          return(0);
535   }
536  
# Line 548 | Line 552 | RESOLU  *rp;
552          mvs.hv = vp;
553          mvs.ok = 0;
554  
555 <        getheader(fp, (int (*)(char *, char *))&gethview, (char *)&mvs);
555 >        getheader(fp, gethview, &mvs);
556  
557          if (rp != NULL && !fgetsresolu(rp, fp))
558                  mvs.ok = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines