summaryrefslogtreecommitdiff
path: root/gcc/genattr.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 06:51:23 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 06:51:23 +0000
commit38330f30a2865c1f371c1399622686a9abefaa1d (patch)
treed3da13fb9f076103bbf7f7786f2153feff6380a3 /gcc/genattr.c
parent39e7c74f778f32255a6dc7513ce84f3dc1b02cb1 (diff)
downloadgcc-38330f30a2865c1f371c1399622686a9abefaa1d.tar.gz
Linas Vepstas <linas@linas.org>
* c-common.c: Use ISGRAPH, ISLOWER, toupper. * c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c, genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise. * system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC. * defaults.h (TARGET_ESC): Add default. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattr.c')
-rw-r--r--gcc/genattr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 60dc73aefc2..f9501eda39e 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -87,8 +87,8 @@ write_upcase (str)
char *str;
{
for (; *str; str++)
- if (*str >= 'a' && *str <= 'z')
- printf ("%c", *str - 'a' + 'A');
+ if (ISLOWER(*str))
+ printf ("%c", toupper(*str));
else
printf ("%c", *str);
}
@@ -120,8 +120,8 @@ gen_attr (attr)
write_upcase (XSTR (attr, 0));
printf ("_");
}
- else if (*p >= 'a' && *p <= 'z')
- printf ("%c", *p - 'a' + 'A');
+ else if (ISLOWER(*p))
+ printf ("%c", toupper(*p));
else
printf ("%c", *p);
}