Now that we replace missing libc functions, switch back to err().

This commit is contained in:
Anthony J. Bentley
2014-09-24 02:50:39 -06:00
parent c0be5ddbb2
commit d661b3a532
18 changed files with 331 additions and 296 deletions

View File

@@ -11,18 +11,13 @@
#include <stdlib.h>
#include <string.h>
#ifndef STRL_IN_LIBC
#define strlcpy rgbds_strlcpy
#define strlcat rgbds_strlcat
size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
#endif
#include "asm/symbol.h"
#include "asm/fstack.h"
#include "asm/types.h"
#include "asm/main.h"
#include "asm/lexer.h"
#include "extern/err.h"
#include "extern/strl.h"
/*
* RGBAsm - FSTACK.C (FileStack routines)
@@ -245,10 +240,8 @@ fstk_RunInclude(char *tzFileName)
f = fstk_FindFile(tzFileName);
if (f == NULL) {
fprintf(stderr, "Unable to open included file '%s': ",
err(1, "Unable to open included file '%s'",
tzFileName);
perror(NULL);
exit(1);
}
pushcontext();
@@ -357,10 +350,7 @@ fstk_Init(char *s)
pFileStack = NULL;
pCurrentFile = fopen(tzFileName, "rb");
if (pCurrentFile == NULL) {
fprintf(stderr, "Unable to open file '%s': ",
tzFileName);
perror(NULL);
exit(1);
err(1, "Unable to open file '%s'", tzFileName);
}
nMacroCount = 0;