home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / comm / yaccunx / yerror.1c < prev    next >
Encoding:
Text File  |  1983-12-23  |  350 b   |  20 lines

  1. #include "y1.h"
  2.  
  3. /*
  4.  * 12-Apr-83 (RBD) Add symbolic exit status
  5.  */
  6. /* VARARGS1 */
  7. error(s,a1) char *s;
  8.  
  9.    {
  10.    /* write out error comment */
  11.  
  12.    ++nerrors;
  13.    fprintf( stderr, "\n fatal error: ");
  14.    fprintf( stderr, s,a1);
  15.    fprintf( stderr, ", line %d\n", lineno );
  16.    if( !fatfl ) return;
  17.    summary();
  18.    exit(EX_ERR);
  19.    }
  20.