mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
9fac310d1a
(the current version UNIX-specific) anyway, so it's useless to try splitting it to sysdep and generic part. Instead of this, configure script decides (based on system type and user's wish) what (if any) client should be built and what autoconfiguration it requires. Also, the client provides its own die/bug/... functions.
41 lines
644 B
C
41 lines
644 B
C
/*
|
|
* BIRD Client -- Utility Functions
|
|
*
|
|
* (c) 1999--2000 Martin Mares <mj@ucw.cz>
|
|
*
|
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdarg.h>
|
|
|
|
#include "nest/bird.h"
|
|
#include "client/client.h"
|
|
|
|
/* Client versions of logging functions */
|
|
|
|
void
|
|
bug(char *msg, ...)
|
|
{
|
|
va_list args;
|
|
|
|
va_start(args, msg);
|
|
fputs("Internal error: ", stderr);
|
|
vfprintf(stderr, msg, args);
|
|
fputc('\n', stderr);
|
|
exit(1);
|
|
}
|
|
|
|
void
|
|
die(char *msg, ...)
|
|
{
|
|
va_list args;
|
|
|
|
va_start(args, msg);
|
|
vfprintf(stderr, msg, args);
|
|
fputc('\n', stderr);
|
|
exit(1);
|
|
}
|