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"; |
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" |
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'; |