* Coding to a professional standard
Fail, big time.
1400 lines in a single file, really?
Cryptic variable names, learn to use meaningful variable and function names.
Be careful of mixing typedef with #define, typedef happens at compile time, #define happens at pre-processor time so typedefs are probably not available to #define.
* Strict C89 standards compliance
This is 2017 why are you still stuck in 1990?
* Correct use of the standard library (and no other library/API)
Too much cryptic code for me to even try to see if you're making any mistakes. Did you carefully test each of your functions as you made them to see if they meet your design constraints?
See above.
* Detection and graceful handling of all possible errors
It doesn't seem like you're very consistent. Look at this snippet:
Code:
internal_error(const char *fmt, ...)
{
va_list ap;
(void) fprintf(stderr, "Internal error: ");
va_start(ap, fmt);
(void) vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\nPlease report this to Richard Cavell\n"
"at [email protected]");
Why are you specifically ignoring the return values from the first two print statements by using the cast, but fail to either check the final return value or cast the return value to a void?
IMO, several of your functions have too many parameters, consider using structures to simplify if possible.
Jim