err 2.0.0
Small error-printing library written in C
|
Main source code file. More...
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
void | vwarn (const char *fmt, va_list ap) |
Prints a formatted warning message to stderr. More... | |
void | vewarn (const char *fmt, va_list ap) |
Prints a formatted error message to stderr. More... | |
void | verrc (const int code, const char *fmt, va_list ap) |
Prints a formatted error message to stderr and exits with the given exit code. More... | |
void | verr (const char *fmt, va_list ap) |
Prints a formatted error message to stderr and exits. More... | |
void | warn (const char *fmt,...) |
Prints a formatted warning message to stderr. More... | |
void | ewarn (const char *fmt,...) |
Prints a formatted error message to stderr. More... | |
void | errc (const int code, const char *fmt,...) |
Prints a formatted error message to stderr and exits with the given exit code. More... | |
void | err (const char *fmt,...) |
Prints a formatted error message to stderr and exits. More... | |
Variables | |
char * | program_invocation_name |
Global value for the program's name. More... | |
Main source code file.
This file contains definitions and declarations of globally available functions and variables.
Definition in file err.c.
void err | ( | const char * | fmt, |
... | |||
) |
void errc | ( | const int | code, |
const char * | fmt, | ||
... | |||
) |
Prints a formatted error message to stderr and exits with the given exit code.
Variadic wrapper for verrc().
Definition at line 110 of file err.c.
void ewarn | ( | const char * | fmt, |
... | |||
) |
void verr | ( | const char * | fmt, |
va_list | ap | ||
) |
void verrc | ( | const int | code, |
const char * | fmt, | ||
va_list | ap | ||
) |
void vewarn | ( | const char * | fmt, |
va_list | ap | ||
) |
Prints a formatted error message to stderr.
Calls vwarn(), then prints ": ", strerror(errno), and a newline.
Definition at line 46 of file err.c.
void vwarn | ( | const char * | fmt, |
va_list | ap | ||
) |
Prints a formatted warning message to stderr.
Prints program_invocation_name, ": ", and the printf(3)-like-formatted error message.
Definition at line 36 of file err.c.
void warn | ( | const char * | fmt, |
... | |||
) |