index 73b48baacf2c1cdf9f5df66118166fc90c6df408..33731e129e72a2250f7b7d1ecbe25922359fc56d 100644 (file)
#ifndef SDB_UTILS_ERROR_H
#define SDB_UTILS_ERROR_H 1
+#include <stddef.h>
+
#ifdef __cplusplus
extern "C" {
#endif
int
sdb_error_append(const char *fmt, ...);
+/*
+ * sdb_error_chomp:
+ * Remove all consecutive newline characters at the end of the error message.
+ */
+int
+sdb_error_chomp(void);
+
/*
* sdb_error_log:
* Log the current error message with the specified priority. See sdb_log for
int
sdb_error_get_prio(void);
+/*
+ * sdb_strerror:
+ * This is a wrapper around the system's strerror function which ensures that
+ * a pointer to the formatted error message is returned.
+ */
+char *
+sdb_strerror(int errnum, char *strerrbuf, size_t buflen);
+
#ifdef __cplusplus
} /* extern "C" */
#endif