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.31 by greg, Sun Sep 13 21:09:20 2015 UTC vs.
Revision 2.32 by greg, Fri Dec 4 22:16:18 2015 UTC

# Line 329 | Line 329 | parse_params(PARAMS *p, char *pargs)
329   {
330          char    *cp = pargs;
331          int     nparams = 0;
332 +        int     quot;
333          int     i;
334  
335          for ( ; ; ) {
# Line 365 | Line 366 | parse_params(PARAMS *p, char *pargs)
366                  case 'o':
367                          if (*cp++ != '=')
368                                  break;
369 +                        quot = 0;
370 +                        if ((*cp == '"') | (*cp == '\''))
371 +                                quot = *cp++;
372                          i = 0;
373 <                        while (*cp && !isspace(*cp++))
374 <                                i++;
373 >                        while (*cp && (quot ? (*cp != quot) : !isspace(*cp))) {
374 >                                i++; cp++;
375 >                        }
376                          if (!i)
377                                  break;
378 <                        *--cp = '\0';
378 >                        if (!*cp) {
379 >                                if (quot)
380 >                                        break;
381 >                                cp[1] = '\0';
382 >                        }
383 >                        *cp = '\0';
384                          p->outfn = savqstr(cp-i);
385 <                        *cp++ = ' ';
385 >                        *cp++ = quot ? quot : ' ';
386                          ++nparams;
387                          continue;
388                  case ' ':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines