versionable header for sim65

load and run address now configured from header
fix error codes not to conflict with test
fix test/misc/endless.c which is supposed to fail if an endless loop does not occur
This commit is contained in:
bbbradsmith
2019-05-29 16:04:54 -04:00
committed by Oliver Schmidt
parent 07ca772932
commit fb7d4acd5c
12 changed files with 129 additions and 39 deletions

View File

@@ -69,7 +69,21 @@ void Error (const char* Format, ...)
vfprintf (stderr, Format, ap);
putc ('\n', stderr);
va_end (ap);
exit (EXIT_FAILURE);
exit (SIM65_ERROR);
}
void ErrorCode (int Code, const char* Format, ...)
/* Print an error message and die with the given exit code */
{
va_list ap;
va_start (ap, Format);
fprintf (stderr, "Error: ");
vfprintf (stderr, Format, ap);
putc ('\n', stderr);
va_end (ap);
exit (Code);
}
@@ -83,5 +97,5 @@ void Internal (const char* Format, ...)
vfprintf (stderr, Format, ap);
putc ('\n', stderr);
va_end (ap);
exit (EXIT_FAILURE);
exit (SIM65_ERROR);
}