#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "errlib.h"

#define ERR_QUIT_SKIP 1
#define LOG_QUIT_SKIP 1

int main()
{
	FILE *pe;
	fputs("Testing err_ret()...\n", stdout);
	if ((pe = fopen("foo", "r")) == NULL)
		err_ret("%s %s", "err_ret()", "failed to open foo");
	fputs("Testing log_ret()...\n", stdout);
	if ((pe = fopen("foo", "r"))  == NULL)
		log_ret("errtest.log", "%s %s", "log_ret()", "failed to open foo");
#ifndef ERR_QUIT_SKIP
	fputs("Testing err_quit()...\n", stdout);
	if ((pe = fopen("foo", "r")) == NULL)
		err_ret("%s %s", "err_quit()", "failed to open foo");
#endif
	
#ifndef LOG_QUIT_SKIP
		fputs("Testing log_quit()...\n", stdout);
		if ((pe = fopen("foo", "r"))  == NULL)
			log_ret("errtest.log", "%s %s", "log_quit()", "failed to open foo");	
#endif	
	return 1;
}




