Better error reporting.

This commit is contained in:
David Given 2019-02-10 14:19:18 +01:00
parent 813595358c
commit 1dfafe070c

View file

@ -8,6 +8,7 @@
* miscellaneous
*/
#include <errno.h>
#include "comm0.h"
#include "comm1.h"
#include "y.tab.h"
@ -391,7 +392,7 @@ void emitf(int size, int negative)
void ffreopen(char* s, FILE* f)
{
if (freopen(s, "r", f) == NULL)
fatal("can't reopen %s", s);
fatal("can't reopen %s: %s", s, strerror(errno));
}
FILE* ffcreat(char* s)