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

Comparing ray/src/cv/rad2mgf.c (file contents):
Revision 2.11 by greg, Thu Apr 13 15:33:48 1995 UTC vs.
Revision 2.12 by greg, Wed May 10 19:46:05 1995 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1994 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ LBL";
10  
11   #include <stdio.h>
12   #include <math.h>
13 + #include <ctype.h>
14   #include <string.h>
15   #include "fvect.h"
16   #include "object.h"
# Line 263 | Line 264 | char   *id;
264          if (end == NULL)
265                  end = cp;
266                                  /* copy to current object */
267 <        for (cp = id, cp2 = curobj; cp < end; *cp2++ = *cp++)
267 >        cp2 = curobj;
268 >        if (!isalpha(*id)) {    /* start with letter */
269 >                diff = *cp2 != 'O';
270 >                *cp2++ = 'O';
271 >        }
272 >        for (cp = id; cp < end; *cp2++ = *cp++) {
273 >                if (*cp < '!' | *cp > '~')      /* limit to visible chars */
274 >                        *cp = '?';
275                  diff += *cp != *cp2;
276 +        }
277          if (!diff && !*cp2)
278                  return;
279          *cp2 = '\0';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines