windows-nt/Source/XPSP1/NT/com/rpc/tools/yacc/yerror.c
2020-09-26 16:20:57 +08:00

28 lines
483 B
C

// Copyright (c) 1993-1999 Microsoft Corporation
#include <stdlib.h>
#include "y1.h"
#include <stdarg.h>
/*
* 12-Apr-83 (RBD) Add symbolic exit status
*/
void
error(char *s, ...)
{
va_list arg_ptr;
va_start(arg_ptr, s);
/* write out error comment */
++nerrors;
fprintf( stderr, "\n fatal error: ");
vfprintf( stderr, s, arg_ptr);
fprintf( stderr, ", line %d\n", lineno );
va_end(arg_ptr);
if( !fatfl ) return;
summary();
exit(EX_ERR);
}