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.33 by greg, Tue Feb 2 01:43:24 2016 UTC

# Line 201 | Line 201 | convert_commandline(char *cmd, const int len, char *av
201  
202          for (cp = cmd; *av != NULL; av++) {
203                  const int       n = strlen(*av);
204 <                if (cp+n >= cmd+(len-3)) {
205 <                        fputs(progname, stderr);
204 >                if (cp+n >= cmd+(len-3))
205                          return(NULL);
207                }
206                  if (matchany(*av, SPECIALS)) {
207                          const int       quote =
208   #ifdef ALTQUOT
# Line 329 | Line 327 | parse_params(PARAMS *p, char *pargs)
327   {
328          char    *cp = pargs;
329          int     nparams = 0;
330 +        int     quot;
331          int     i;
332  
333          for ( ; ; ) {
# Line 365 | Line 364 | parse_params(PARAMS *p, char *pargs)
364                  case 'o':
365                          if (*cp++ != '=')
366                                  break;
367 +                        quot = 0;
368 +                        if ((*cp == '"') | (*cp == '\''))
369 +                                quot = *cp++;
370                          i = 0;
371 <                        while (*cp && !isspace(*cp++))
372 <                                i++;
371 >                        while (*cp && (quot ? (*cp != quot) : !isspace(*cp))) {
372 >                                i++; cp++;
373 >                        }
374                          if (!i)
375                                  break;
376 <                        *--cp = '\0';
376 >                        if (!*cp) {
377 >                                if (quot)
378 >                                        break;
379 >                                cp[1] = '\0';
380 >                        }
381 >                        *cp = '\0';
382                          p->outfn = savqstr(cp-i);
383 <                        *cp++ = ' ';
383 >                        *cp++ = quot ? quot : ' ';
384                          ++nparams;
385                          continue;
386                  case ' ':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines