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

Comparing ray/src/gen/xform.c (file contents):
Revision 2.23 by greg, Sat Feb 22 02:07:24 2003 UTC vs.
Revision 2.24 by greg, Tue Mar 11 19:29:05 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static const char       RCSid[] = "$Id$";
2 > static const char RCSid[] = "$Id$";
3   #endif
4   /*
5   *  xform.c - program to transform object files.
# Line 34 | Line 34 | char  *newmod;                         /* new modifier for surfaces */
34  
35   char  *idprefix;                        /* prefix for object identifiers */
36  
37 < #define  ALIAS          NUMOTYPE        /* put alias at end of array */
37 > FUN  ofun[NUMOTYPE] = INIT_OTYPE;       /* default types and actions */
38  
39 #define  NUMTYPES       (NUMOTYPE+1)    /* total number of object types */
40
41 FUN  ofun[NUMTYPES] = INIT_OTYPE;       /* default types and actions */
42
39   short  tinvers[NUMOTYPE];               /* inverse types for surfaces */
40  
41   int  nrept = 1;                         /* number of array repetitions */
# Line 492 | Line 488 | FILE  *fin;
488   }
489  
490  
495 int
496 otype(ofname)                   /* get object function number from its name */
497 register char  *ofname;
498 {
499        register int  i;
500
501        for (i = 0; i < NUMTYPES; i++)
502                if (!strcmp(ofun[i].funame, ofname))
503                        return(i);
504
505        return(-1);             /* not found */
506 }
507
508
491   alias(fin)                      /* transfer alias */
492   FILE  *fin;
493   {
# Line 842 | Line 824 | initotypes()                   /* initialize ofun[] array */
824  
825          if (ofun[OBJ_SOURCE].funp == o_source)
826                  return;                 /* done already */
845                                        /* alias is additional */
846        ofun[ALIAS].funame = ALIASID;
847        ofun[ALIAS].flags = 0;
827                                          /* functions get new transform */
828 <        for (i = 0; i < NUMTYPES; i++)
828 >        for (i = 0; i < NUMOTYPE; i++)
829                  if (hasfunc(i))
830                          ofun[i].funp = addxform;
831                                          /* special cases */
# Line 868 | Line 847 | initotypes()                   /* initialize ofun[] array */
847          ofun[PAT_CTEXT].funp =
848          ofun[PAT_BTEXT].funp =
849          ofun[MIX_TEXT].funp = text;
850 <        ofun[ALIAS].funp = alias;
850 >        ofun[MOD_ALIAS].funp = alias;
851                                          /* surface inverses */
852          tinvers[OBJ_FACE] = OBJ_FACE;
853          tinvers[OBJ_SOURCE] = OBJ_SOURCE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines