File: iflib_misc.c

package info (click to toggle)
tcng 10b-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,636 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (27 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * iflib_misc.c - Miscellaneous functions
 *
 * Written 2001 by Werner Almesberger
 * Copyright 2001 EPFL-ICA, Network Robots
 */


#include <stdlib.h>
#include <stdio.h>

#include "config.h"
#include "op.h"
#include "iflib.h"


void __dump_failed(DATA d,const char *reason,const char *file,int line)
{
    putchar('\n'); /* we're probably in the middle of a line */
    fflush(stdout);
    fprintf(stderr,"can't dump subexpression (%s",file);
    if (reason) fprintf(stderr,", %s",reason);
    else fprintf(stderr,":%d",line);
    fprintf(stderr,")\n");
    if (!quiet) print_expr(stderr,d);
    exit(1);
}