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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.57 by greg, Tue Mar 19 10:48:05 2024 UTC vs.
Revision 2.60 by greg, Tue Jun 3 21:31:51 2025 UTC

# Line 22 | Line 22 | static const char RCSid[] = "$Id$";
22   #define MAXRCARG        10000
23   #endif
24  
25 char            *progname;              /* global argv[0] */
26
25   int             verbose = 0;            /* verbose mode (< 0 no warnings) */
26  
27   char            *rcarg[MAXRCARG+1] = {"rcontrib", "-fo+"};
# Line 517 | Line 515 | finish_receiver(void)
515                  sprintf(sbuf, "RHS=%c1", curparams.sign);
516                  params = savqstr(sbuf);
517          }
518 <        if (!uniform & (curparams.slist->styp == ST_SOURCE)) {
518 >        if (!uniform) {
519                  SURF    *sp;
520                  for (sp = curparams.slist; sp != NULL; sp = sp->next)
521 <                        if (fabs(sp->area - PI) > 1e-3) {
521 >                        if (sp->styp == ST_SOURCE && fabs(sp->area - PI) > 1e-3) {
522                                  fprintf(stderr, "%s: source '%s' must be 180-degrees\n",
523                                                  progname, sp->sname);
524                                  exit(1);
# Line 1104 | Line 1102 | add_recv_object(FILE *fp)
1102          }
1103                                          /* is it a new receiver? */
1104          if ((st = surf_type(otype)) != ST_NONE) {
1107                if (curparams.slist != NULL && (st == ST_SOURCE) ^
1108                                (curparams.slist->styp == ST_SOURCE)) {
1109                        fputs(progname, stderr);
1110                        fputs(": cannot mix source/non-source receivers!\n", stderr);
1111                        return(-1);
1112                }
1105                  if (strcmp(thismod, curmod)) {
1106                          if (curmod[0]) {        /* output last receiver? */
1107                                  finish_receiver();
# Line 1245 | Line 1237 | main(int argc, char *argv[])
1237          FILE    *rcfp;
1238          int     nsbins;
1239          int     a, i;
1240 +                                        /* set global progname */
1241 +        fixargv0(argv[0]);
1242                                          /* screen rcontrib options */
1249        progname = argv[0];
1243          for (a = 1; a < argc-2; a++) {
1244                  int     na;
1245                                          /* check for argument expansion */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines