Zth (libzth)
util

Functions

void zth_banner ()
 Prints a banner line with version and configuration information. More...
 
void zth_abort (char const *fmt,...)
 Aborts the process after printing the given printf() formatted message. More...
 
void zth_log_color (int color, char const *fmt,...)
 Logs a given printf()-like formatted string using an ANSI color code. More...
 
void zth_log (char const *fmt,...)
 Logs a given printf()-like formatted string. More...
 
char const * zth_version () noexcept
 Returns the version of Zth. More...
 
void zth_logv (char const *fmt, va_list arg)
 Prints the given printf()-like formatted string to stdout. More...
 

Detailed Description

Function Documentation

◆ zth_abort()

void zth_abort ( char const *  fmt,
  ... 
)

Aborts the process after printing the given printf() formatted message.

This is a C-wrapper for zth::abort().

Definition at line 280 of file util.cpp.

◆ zth_banner()

void zth_banner ( )

Prints a banner line with version and configuration information.

This is a C-wrapper for zth::banner().

Definition at line 1395 of file util.h.

◆ zth_log()

void zth_log ( char const *  fmt,
  ... 
)

Logs a given printf()-like formatted string.

zth_logv() is used for the actual logging.

See also
zth::log_color()

This is a C-wrapper for zth::log().

Definition at line 1437 of file util.h.

◆ zth_log_color()

void zth_log_color ( int  color,
char const *  fmt,
  ... 
)

Logs a given printf()-like formatted string using an ANSI color code.

zth_logv() is used for the actual logging.

This is a C-wrapper for zth::log_color().

Definition at line 1418 of file util.h.

◆ zth_logv()

void zth_logv ( char const *  fmt,
va_list  arg 
)

Prints the given printf()-like formatted string to stdout.

This is a weak symbol. Override when required.

Definition at line 20 of file zth_logv.cpp.

◆ zth_version()

char const* zth_version ( )
noexcept

Returns the version of Zth.

This is a C-wrapper for zth::version().

Definition at line 79 of file version.h.