Mercurial > ~dholland > hg > tradcpp > index.cgi
diff place.c @ 14:5045b9678bb0
woops
author | David A. Holland |
---|---|
date | Sun, 19 Dec 2010 19:51:36 -0500 |
parents | 120629a5d6bf |
children | 8a955e3dda2c |
line wrap: on
line diff
--- a/place.c Sun Dec 19 19:49:43 2010 -0500 +++ b/place.c Sun Dec 19 19:51:36 2010 -0500 @@ -7,10 +7,6 @@ #include "array.h" #include "place.h" -#define NOWHERE_LINE 0 -#define BUILTIN_LINE 1 -#define COMMANDLINE_LINE 2 - struct placefile { struct place includedfrom; char *name; @@ -81,13 +77,23 @@ } void -place_setcommandline(struct place *p, unsigned column) +place_setcommandline(struct place *p, unsigned line, unsigned column) { + p->type = P_COMMANDLINE; p->file = NULL; - p->line = COMMANDLINE_LINE; + p->line = line; p->column = column; } +void +place_setfilestart(struct place *p, const struct placefile *pf) +{ + p->type = P_COMMANDLINE; + p->file = pf; + p->line = 1; + p->column = 1; +} + static const char * place_getname(const struct place *p)