WindowsXP-SP1/com/rpc/tools/yacc/yerror.c

28 lines
510 B
C
Raw Normal View History

2001-01-01 00:00:00 +01:00
// 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);
}