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

@@ -5,6 +5,7 @@
#include "asmotor.h"
#include "extern/err.h"
#include "link/main.h"
#include "link/mylink.h"
#include "link/assign.h"
@@ -20,9 +21,7 @@ SetMapfileName(char *name)
mf = fopen(name, "w");
if (mf == NULL) {
fprintf(stderr, "Cannot open mapfile '%s': ", name);
perror(NULL);
exit(1);
err(1, "Cannot open mapfile '%s'", name);
}
}
@@ -32,8 +31,7 @@ SetSymfileName(char *name)
sf = fopen(name, "w");
if (sf == NULL) {
fprintf(stderr, "Cannot open symfile '%s'\n", name);
exit(1);
err(1, "Cannot open symfile '%s'", name);
}
fprintf(sf, ";File generated by xLink v" LINK_VERSION "\n\n");