Zth (libzth)
util.cpp File Reference
#include <libzth/macros.h>
#include <libzth/allocator.h>
#include <libzth/init.h>
#include <libzth/perf.h>
#include <libzth/util.h>
#include <libzth/version.h>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <unistd.h>

Go to the source code of this file.

Namespaces

 zth
 

Functions

char const * zth::banner () noexcept
 Prints a banner line with version and configuration information. More...
 
void zth::abort (char const *fmt,...) noexcept
 Aborts the process after printing the given printf() formatted message. More...
 
void zth::abortv (char const *fmt, va_list args) noexcept
 Aborts the process after printing the given printf() formatted message. More...
 
bool zth::log_supports_ansi_colors () noexcept
 Returns if the system supports ANSI colors. More...
 
void zth::log_colorv (int color, char const *fmt, va_list args)
 Logs a given printf()-like formatted string using an ANSI color code. More...
 
string zth::formatv (char const *fmt, va_list args)
 Format like vsprintf(), but save the result in an zth::string. More...
 
void zth_abort (char const *fmt,...)
 Aborts the process after printing the given printf() formatted message. More...