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

Comparing ray/src/common/fputword.c (file contents):
Revision 3.9 by greg, Wed Jun 22 16:55:35 2011 UTC vs.
Revision 3.10 by greg, Fri Nov 13 01:06:14 2020 UTC

# Line 25 | Line 25 | FILE  *fp;
25          for (cp = s; *cp; cp++)
26                  if (isspace(*cp))
27                          hasspace++;
28 <                else if (*cp == '"')
28 >                else if ((cp > s) & (*cp == '"') && cp[1])
29                          quote = '\'';
30 <                else if (*cp == '\'')
30 >                else if ((cp > s) & (*cp == '\'') && cp[1])
31                          quote = '"';
32  
33          if (hasspace || quote) {        /* output with quotes */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines