/******************************************************************************/ /* Start of as.c */ /******************************************************************************/ /* This assertions package is a stripped down version of the one I usually use. It was stripped down for distribution in support of the exceptions package. This file is distributed without warranty and was placed in the public domain by its author Ross Williams on 29 September 1993. */ /******************************************************************************/ #include "style.h" #include "as.h" EXPORT void as_bomb(message) char *message; { fprintf(stderr,"%s\n",message); fprintf(stderr,"An assertion has failed! See the line above.\n"); fprintf(stderr,"Press return to abort the program>\n"); { int ch=getchar(); /* If the user types C, continue the program. */ /* However, catch the end of line too, as this is line-based input. */ if ((ch == 'C') || (ch == 'c')) { while (getchar() != EOL); return; } } exit(EXIT_FAILURE); } EXPORT void as_wr (mess) string mess; { printf("%s",mess); } EXPORT void as_wl (mess) string mess; { printf("%s\n",mess); } /******************************************************************************/ /* End of as.c */ /******************************************************************************/