Mercurial > ~dholland > hg > tradcpp > index.cgi
diff place.c @ 160:d6e6b3940780
Fully implement #line.
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Fri, 27 Feb 2015 02:06:49 +0100 (2015-02-27) |
parents | 95fbb216e23f |
children | a2f047301c15 |
line wrap: on
line diff
--- a/place.c Fri Feb 27 00:41:46 2015 +0100 +++ b/place.c Fri Feb 27 02:06:49 2015 +0100 @@ -154,6 +154,17 @@ p->column = 1; } +void +place_setfile(struct place *p, const char *name) +{ + assert(p->type == P_FILE); + if (strcmp(name, p->file->name) == 0) { + return; + } + p->file = placefile_create(&p->file->includedfrom, name, + p->file->fromsystemdir); +} + const char * place_getname(const struct place *p) {