cec2da66fd3d6195f22f162d6e031d62ba595f3e
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)error.c 5.2 (Berkeley) %G%";
#include "tree_ty.h" /* must be included for yy.h */
* Panic is called when impossible
* (supposedly, anyways) situations
* Panic messages should be short
* as they do not go to the message
printf("Snark (%s) line=%d\n", s
, line
);
printf("Snark (%s) line=%d, yyline=%d\n", s
, line
, yyline
);
abort () ; /* die horribly */
Perror( "Snark in pi1", s
);
Perror( "Snark in pi", s
);
error(a1
, a2
, a3
, a4
, a5
)
char errbuf
[256]; /* was extern. why? ...pbk */
if (errpfx
== 'w' && opt('w') != 0) {
geterr((int) a1
, errbuf
);
for (i
= line
; i
>= 10; i
/= 10)
printf(" %c - ", errpfx
);
printf("%c %d - ", errpfx
, line
);
printf(a1
, a2
, a3
, a4
, a5
);
cerror(a1
, a2
, a3
, a4
, a5
)
error(a1
, a2
, a3
, a4
, a5
);
derror(a1
, a2
, a3
, a4
, a5
)
char *a1
, *a2
, *a3
, *a4
, *a5
;
error(a1
, a2
, a3
, a4
, a5
);
char *lastname
, printed
, hadsome
;
* this yysetfile for PI1 only.
* the real yysetfile is in yyput.c
printf("%s %s:\n" , myctime( &tvec
) , name
);