Mercurial > hg > index.cgi
diff lwasm/pseudo.c @ 224:3864d96ee8c7
Make unicorns notice referenced files better
Fix bug related to includebin and also make unicorns notice all files opened
through the input subsystem when generating the resource list.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 15 Jul 2012 20:50:18 -0600 |
parents | afd50d6b4113 |
children | 823560a8c251 |
line wrap: on
line diff
--- a/lwasm/pseudo.c Sun Jul 15 20:14:51 2012 -0600 +++ b/lwasm/pseudo.c Sun Jul 15 20:50:18 2012 -0600 @@ -1316,6 +1316,7 @@ int delim = 0; FILE *fp; long flen; + char *rfn; if (!**p) { @@ -1341,7 +1342,7 @@ if (delim && **p) (*p)++; - fp = input_open_standalone(as, fn); + fp = input_open_standalone(as, fn, &rfn); if (!fp) { lwasm_register_error(as, l, "Cannot open file"); @@ -1349,7 +1350,7 @@ return; } - l -> lstr = fn; + l -> lstr = rfn; fseek(fp, 0, SEEK_END); flen = ftell(fp); @@ -1363,7 +1364,7 @@ FILE *fp; int c; - fp = input_open_standalone(as, l -> lstr); + fp = fopen(l -> lstr, "r"); if (!fp) { lwasm_register_error(as, l, "Cannot open file (emit)!");