From: Geoff Keating <geoffk@geoffk.org>
To: cgen@sources.redhat.com
Cc: fche@redhat.com
Subject: Re: Urgent build problem with Re: patch to allow any character in keyword
Date: Tue, 19 Jun 2001 01:03:00 -0000 [thread overview]
Message-ID: <200106190817.BAA21376@geoffk.org> (raw)
In-Reply-To: <3B2E68F9.EFC1C958@cygnus.com>
Does this patch fix the problem? I've checked that it still works
with my port.
--
- Geoffrey Keating <geoffk@geoffk.org>
===File ~/patches/cygnus/cgen-keywordfirstspecial.patch=====
2001-06-19 Geoffrey Keating <geoffk@redhat.com>
* cgen-asm.c (cgen_parse_keyword): Allow any first character.
* cgen-opc.c (cgen_keyword_add): Ignore special first
character when building nonalpha_chars field.
Index: opcodes/cgen-asm.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/cgen-asm.c,v
retrieving revision 1.21
diff -p -u -p -r1.21 cgen-asm.c
--- cgen-asm.c 2001/06/14 21:00:28 1.21
+++ cgen-asm.c 2001/06/19 07:55:33
@@ -212,6 +212,12 @@ cgen_parse_keyword (cd, strp, keyword_ta
p = start = *strp;
+ /* Allow any first character. This is to make life easier for
+ the fairly common case of suffixes, eg. 'ld.b.w', where the first
+ character of the suffix ('.') is special. */
+ if (*p)
+ ++p;
+
/* Allow letters, digits, and any special characters. */
while (((p - start) < (int) sizeof (buf))
&& *p
Index: opcodes/cgen-opc.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/cgen-opc.c,v
retrieving revision 1.28
diff -p -u -p -r1.28 cgen-opc.c
--- cgen-opc.c 2001/06/14 21:11:59 1.28
+++ cgen-opc.c 2001/06/19 07:55:33
@@ -134,7 +134,7 @@ cgen_keyword_add (kt, ke)
if (ke->name[0] == 0)
kt->null_entry = ke;
- for (i = 0; i < strlen (ke->name); i++)
+ for (i = 1; i < strlen (ke->name); i++)
if (! isalnum ((unsigned char) ke->name[i])
&& ! strchr (kt->nonalpha_chars, ke->name[i]))
{
============================================================
next prev parent reply other threads:[~2001-06-19 1:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200106140125.f5E1Pof07706.cygnus.local.cgen@thief.cygnus.com>
2001-06-15 10:16 ` Frank Ch. Eigler
2001-06-15 13:30 ` Geoff Keating
2001-06-18 13:48 ` J. Johnston
2001-06-18 14:13 ` Geoff Keating
2001-06-19 1:03 ` Geoff Keating [this message]
2001-06-19 16:58 ` J. Johnston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200106190817.BAA21376@geoffk.org \
--to=geoffk@geoffk.org \
--cc=cgen@sources.redhat.com \
--cc=fche@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).