aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/io.c b/io.c
index 58ebf17..1721f7b 100644
--- a/io.c
+++ b/io.c
@@ -818,6 +818,7 @@ static struct file {
vec_of(uint) lineoffs;
bool once;
bool seen;
+ const char *guardmac;
} *fileht[1<<SPANFILEBITS];
static int nfiles;
@@ -913,19 +914,21 @@ getfilepos(int *line, int *col, int id, uint off)
}
bool
-isoncefile(int id)
+isoncefile(int id, const char **guard)
{
assert(id < arraylength(fileht) && fileht[id]);
+ *guard = fileht[id]->guardmac;
return fileht[id]->once;
}
+
void
-markfileonce(int id)
+markfileonce(int id, const char *guard)
{
assert(id < arraylength(fileht) && fileht[id]);
fileht[id]->once = 1;
+ fileht[id]->guardmac = guard;
}
-
void
markfileseen(int id)
{