--- ray/src/gen/xform.c 1992/09/21 12:15:44 2.6 +++ ray/src/gen/xform.c 1994/01/01 09:19:36 2.8 @@ -1,4 +1,4 @@ -/* Copyright (c) 1992 Regents of the University of California */ +/* Copyright (c) 1994 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -173,6 +173,7 @@ xform(name, fin) /* transform stream by tot.xfm */ char *name; register FILE *fin; { + int nobjs = 0; register int c; while ((c = getc(fin)) != EOF) { @@ -188,11 +189,16 @@ register FILE *fin; } else if (c == '!') { /* command */ ungetc(c, fin); xfcomm(name, fin); + nobjs++; } else { /* object */ ungetc(c, fin); xfobject(name, fin); + nobjs++; } } + if (nobjs == 0) + fprintf(stderr, "%s: (%s): warning - empty file\n", + progname, name); } @@ -401,7 +407,6 @@ FILE *fin; m_dielectric(fin) /* transform arguments for dielectric */ FILE *fin; { - double pow(); FUNARGS fa; if (readfargs(&fa, fin) != 1) @@ -422,7 +427,6 @@ FILE *fin; m_interface(fin) /* transform arguments for interface */ FILE *fin; { - double pow(); FUNARGS fa; if (readfargs(&fa, fin) != 1)