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.46 by greg, Mon Oct 1 15:51:48 2018 UTC vs.
Revision 2.50 by greg, Tue Dec 10 19:18:43 2019 UTC

# Line 141 | Line 141 | oconv_command(int ac, char *av[])
141          if (ac-- <= 0)
142                  return(NULL);
143          if (verbose < 0) {      /* turn off warnings */
144 <                strcpy(cp, "-w- ");
145 <                cp += 4;
144 >                strcpy(cp, "-w ");
145 >                cp += 3;
146          }
147 <        while (ac-- > 0) {
148 <                strcpy(cp, *av++);
149 <                while (*cp) cp++;
150 <                *cp++ = ' ';
151 <                if (cp >= oconvbuf+(sizeof(oconvbuf)-32))
147 >        while (ac-- > 0) {      /* copy each argument */
148 >                int     len = strlen(*av);
149 >                if (cp+len+4 >= oconvbuf+sizeof(oconvbuf))
150                          goto overrun;
151 +                if (matchany(*av, SPECIALS)) {
152 +                        *cp++ = QUOTCHAR;
153 +                        strcpy(cp, *av++);
154 +                        cp += len;
155 +                        *cp++ = QUOTCHAR;
156 +                } else {
157 +                        strcpy(cp, *av++);
158 +                        cp += len;
159 +                }
160 +                *cp++ = ' ';
161          }
162                                  /* receiver goes last */
163          if (matchany(recv, SPECIALS)) {
# Line 661 | Line 669 | sample_origin(PARAMS *p, FVECT orig, const FVECT rdir,
669                  projsa[i] = -DOT(sp->snrm, rdir) * sp->area;
670                  tarea += projsa[i] *= (double)(projsa[i] > FTINY);
671          }
672 <        if (tarea <= FTINY) {           /* wrong side of sender? */
672 >        if (tarea < 0) {                /* wrong side of sender? */
673                  fputs(progname, stderr);
674                  fputs(": internal - sample behind all sender elements!\n",
675                                  stderr);
# Line 1236 | Line 1244 | main(int argc, char *argv[])
1244                          na = 0;
1245                          continue;
1246                  case 'w':               /* options without arguments */
1247 <                        if (argv[a][2] != '+') verbose = -1;
1247 >                        if (!argv[a][2] || strchr("+1tTyY", argv[a][2]) == NULL)
1248 >                                verbose = -1;
1249 >                        break;
1250                  case 'V':
1251                  case 'u':
1252                  case 'h':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines