--- ray/src/util/findglare.c 1997/10/20 16:35:30 2.8 +++ ray/src/util/findglare.c 2003/07/21 22:30:19 2.10 @@ -1,9 +1,6 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: findglare.c,v 2.10 2003/07/21 22:30:19 schorsch Exp $"; #endif - /* * Find glare sources in a scene or image. * @@ -56,12 +53,13 @@ char *argv[]; /* process options */ for (i = 1; i < argc && argv[i][0] == '-'; i++) { /* expand arguments */ - while (rval = expandarg(&argc, &argv, i)) - if (rval < 0) { - fprintf(stderr, "%s: cannot expand '%s'", - argv[0], argv[i]); - exit(1); - } + while ((rval = expandarg(&argc, &argv, i)) > 0) + ; + if (rval < 0) { + fprintf(stderr, "%s: cannot expand '%s'", + argv[0], argv[i]); + exit(1); + } rval = getviewopt(&ourview, argc-i, argv+i); if (rval >= 0) { i += rval; @@ -176,7 +174,7 @@ char *argv[]; progname); exit(1); } - copystruct(&ourview, &pictview); + ourview = pictview; } else if (picture != NULL && !VEQ(ourview.vp, pictview.vp)) { fprintf(stderr, "%s: picture must have same viewpoint\n", progname); @@ -271,8 +269,8 @@ init() /* initialize global variables */ if (indirect == NULL) memerr("indirect illuminances"); npixinvw = npixmiss = 0L; - copystruct(&leftview, &ourview); - copystruct(&rightview, &ourview); + leftview = ourview; + rightview = ourview; spinvector(leftview.vdir, ourview.vdir, ourview.vup, maxtheta); spinvector(rightview.vdir, ourview.vdir, ourview.vup, -maxtheta); setview(&leftview);