diff options
author | rsc <devnull@localhost> | 2005-11-29 05:12:48 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-11-29 05:12:48 +0000 |
commit | 62faed57a5bc13e14ee55aef32c210c713b315da (patch) | |
tree | 3fb0f577c32b00727c5deabbf403f8d4a11924ee /src/cmd/acid/util.c | |
parent | e3de25fea4065d017fc344c3c7d757738a922c17 (diff) | |
download | plan9port-62faed57a5bc13e14ee55aef32c210c713b315da.tar.gz plan9port-62faed57a5bc13e14ee55aef32c210c713b315da.tar.bz2 plan9port-62faed57a5bc13e14ee55aef32c210c713b315da.zip |
handling of C++ names.
Diffstat (limited to 'src/cmd/acid/util.c')
-rw-r--r-- | src/cmd/acid/util.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/cmd/acid/util.c b/src/cmd/acid/util.c index 15859dbb..a0ae47fb 100644 --- a/src/cmd/acid/util.c +++ b/src/cmd/acid/util.c @@ -16,7 +16,7 @@ unique(char *buf, Symbol *s) int i, renamed; renamed = 0; - strcpy(buf, s->name); + strcpy(buf, s->xname); for(;;) { l = look(buf); if(l == 0 || (l->lexval == Tid && l->v->set == 0)) @@ -36,9 +36,10 @@ unique(char *buf, Symbol *s) } } if(renamed && !quiet) - print("\t%s=%s %c/%L\n", s->name, buf, s->type, s->loc); + print("\t%s=%s %c/%L\n", s->xname, buf, s->type, s->loc); if(l == 0) l = enter(buf, Tid); + s->aux = l; return l; } @@ -116,23 +117,31 @@ addvarsym(Fhdr *fp) if(l->v->store.comt == 0) l->v->store.fmt = 'X'; - /* Enter as list of { name, type, value, file } */ + /* Enter as list of { name, type, value, file, xname } */ list = al(TSTRING); tl->store.u.l = list; list->store.u.string = strnode(buf); list->store.fmt = 's'; + list->next = al(TINT); list = list->next; list->store.fmt = 'c'; list->store.u.ival = s.type; + list->next = al(TINT); list = list->next; list->store.fmt = 'X'; list->store.u.ival = v; + list->next = al(TSTRING); list = list->next; list->store.fmt = 's'; list->store.u.string = file; + + list->next = al(TSTRING); + list = list->next; + list->store.fmt = 's'; + list->store.u.string = strnode(s.xname); } } *tail = nil; |