* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/log.h"
-#include "ucw/log-internal.h"
-#include "ucw/simple-lists.h"
+#include <ucw/lib.h>
+#include <ucw/log.h>
+#include <ucw/log-internal.h>
+#include <ucw/simple-lists.h>
#include <stdio.h>
#include <stdlib.h>
.types = ~0U,
.msgfmt = LSFMT_DEFAULT,
// an empty clist
- .substreams.head.next = (cnode *) &log_stream_default.substreams.head,
- .substreams.head.prev = (cnode *) &log_stream_default.substreams.head,
+ .substreams.head = {
+ .next = (cnode *) &log_stream_default.substreams.head,
+ .prev = (cnode *) &log_stream_default.substreams.head,
+ },
};
/*** Registry of streams and their identifiers ***/
}
void
-die(const char *fmt, ...)
+vdie(const char *fmt, va_list args)
{
- va_list args;
-
- va_start(args, fmt);
vmsg(L_FATAL, fmt, args);
- va_end(args);
if (log_die_hook)
log_die_hook();
do_die();
}
+void
+die(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vdie(fmt, args);
+}
+
void
assert_failed(const char *assertion, const char *file, int line)
{