Better error reporting.
This commit is contained in:
parent
813595358c
commit
1dfafe070c
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
* miscellaneous
|
* miscellaneous
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "comm0.h"
|
#include "comm0.h"
|
||||||
#include "comm1.h"
|
#include "comm1.h"
|
||||||
#include "y.tab.h"
|
#include "y.tab.h"
|
||||||
|
|
@ -391,7 +392,7 @@ void emitf(int size, int negative)
|
||||||
void ffreopen(char* s, FILE* f)
|
void ffreopen(char* s, FILE* f)
|
||||||
{
|
{
|
||||||
if (freopen(s, "r", f) == NULL)
|
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)
|
FILE* ffcreat(char* s)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue