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.6 by greg, Mon Sep 21 12:15:44 1992 UTC vs.
Revision 2.9 by greg, Fri Oct 27 08:56:18 1995 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1992 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 173 | Line 173 | xform(name, fin)                       /* transform stream by tot.xfm */
173   char  *name;
174   register FILE  *fin;
175   {
176 +        int  nobjs = 0;
177          register int  c;
178  
179          while ((c = getc(fin)) != EOF) {
# Line 188 | Line 189 | register FILE  *fin;
189                  } else if (c == '!') {                  /* command */
190                          ungetc(c, fin);
191                          xfcomm(name, fin);
192 +                        nobjs++;
193                  } else {                                /* object */
194                          ungetc(c, fin);
195                          xfobject(name, fin);
196 +                        nobjs++;
197                  }
198          }
199 +        if (nobjs == 0)
200 +                fprintf(stderr, "%s: (%s): warning - empty file\n",
201 +                                progname, name);
202   }
203  
204  
# Line 401 | Line 407 | FILE  *fin;
407   m_dielectric(fin)               /* transform arguments for dielectric */
408   FILE  *fin;
409   {
404        double  pow();
410          FUNARGS  fa;
411  
412          if (readfargs(&fa, fin) != 1)
# Line 422 | Line 427 | FILE  *fin;
427   m_interface(fin)                /* transform arguments for interface */
428   FILE  *fin;
429   {
425        double  pow();
430          FUNARGS  fa;
431  
432          if (readfargs(&fa, fin) != 1)
# Line 638 | Line 642 | FILE  *fin;
642  
643   initotypes()                    /* initialize ofun[] array */
644   {
641        extern int  o_source();
642        extern int  o_sphere();
643        extern int  o_face();
644        extern int  o_cone();
645        extern int  o_cylinder();
646        extern int  o_ring();
647        extern int  m_glow();
648        extern int  m_spot();
649        extern int  m_dielectric();
650        extern int  m_interface();
651        extern int  text();
652        extern int  alias();
653        extern int  passargs();
654        extern int  addxform();
645          register int  i;
646  
647          if (ofun[OBJ_SOURCE].funp == o_source)
# Line 683 | Line 673 | initotypes()                   /* initialize ofun[] array */
673          ofun[MIX_TEXT].funp = text;
674          ofun[ALIAS].funp = alias;
675                                          /* surface inverses */
676 +        tinvers[OBJ_FACE] = OBJ_FACE;
677          tinvers[OBJ_SOURCE] = OBJ_SOURCE;
678          tinvers[OBJ_CONE] = OBJ_CUP;
679          tinvers[OBJ_CUP] = OBJ_CONE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines