Remove nonstandard <err.h>.

This provides some really nice functions, but does not exist in some
environments (particularly MinGW).
This commit is contained in:
Anthony J. Bentley
2011-12-02 01:23:23 -07:00
parent b1a2c664a9
commit 5d6559f15f
12 changed files with 315 additions and 167 deletions

View File

@@ -1,4 +1,3 @@
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -54,7 +53,8 @@ sym_GetValue(char *tzName)
}
}
errx(5, "Unknown symbol '%s'", tzName);
fprintf(stderr, "Unknown symbol '%s'\n", tzName);
exit(1);
}
}
@@ -72,7 +72,8 @@ sym_GetBank(char *tzName)
}
}
errx(5, "Unknown symbol '%s'", tzName);
fprintf(stderr, "Unknown symbol '%s'\n", tzName);
exit(1);
}
void
@@ -92,9 +93,10 @@ sym_CreateSymbol(char *tzName, SLONG nValue, SBYTE nBank)
if (nBank == -1)
return;
errx(5,
fprintf(stderr,
"Symbol '%s' defined more than once\n",
tzName);
exit(1);
}
}