Statistics
| Branch: | Revision:

iof-bird-daemon / client / util.c @ 9fac310d

History | View | Annotate | Download (644 Bytes)

1
/*
2
 *        BIRD Client -- Utility Functions
3
 *
4
 *        (c) 1999--2000 Martin Mares <mj@ucw.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
#include <stdio.h>
10
#include <string.h>
11
#include <stdlib.h>
12
#include <stdarg.h>
13

    
14
#include "nest/bird.h"
15
#include "client/client.h"
16

    
17
/* Client versions of logging functions */
18

    
19
void
20
bug(char *msg, ...)
21
{
22
  va_list args;
23

    
24
  va_start(args, msg);
25
  fputs("Internal error: ", stderr);
26
  vfprintf(stderr, msg, args);
27
  fputc('\n', stderr);
28
  exit(1);
29
}
30

    
31
void
32
die(char *msg, ...)
33
{
34
  va_list args;
35

    
36
  va_start(args, msg);
37
  vfprintf(stderr, msg, args);
38
  fputc('\n', stderr);
39
  exit(1);
40
}