/*
 * these functions provide an assert-like mechanism for checking the results
 * of system and library calls, except they terminate the program with a
 * message based on the value of errno and possibly a string provided by the
 * caller
 *
 * they require the global variables myname and errno
 */


/*
 * if result is false, prints the string representation of errno and terminates
 * the process
 */
void callcheck (int result);

/*
 * if errno is set, prints the string representation of errno and terminates
 * the process
 */
void ecallcheck ();

/*
 * if result is false, prints the given message and the string representation
 * of errno, then terminates process
 */
void scallcheck (int result, char *message);

/*
 * if result is false, prints the message then terminates the process
 */
void mcallcheck (int result, char *message);

/*
 * if errno is set, prints the message and the string representation of errno,
 * then terminates the process
 */
void escallcheck (char *message);

