summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/showmsg.c60
-rw-r--r--src/common/showmsg.h20
2 files changed, 30 insertions, 50 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index c4271eda8..609ae3c50 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -824,89 +824,69 @@ int _ShowMessage(enum msg_type flag, const char *string, ...)
}
// direct printf replacement
-int ShowMessage(const char *string, ...) {
- int ret;
+void ShowMessage(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_NONE, string, ap);
+ _vShowMessage(MSG_NONE, string, ap);
va_end(ap);
- return ret;
}
-int ShowStatus(const char *string, ...) {
- int ret;
+void ShowStatus(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_STATUS, string, ap);
+ _vShowMessage(MSG_STATUS, string, ap);
va_end(ap);
- return ret;
}
-int ShowSQL(const char *string, ...) {
- int ret;
+void ShowSQL(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_SQL, string, ap);
+ _vShowMessage(MSG_SQL, string, ap);
va_end(ap);
- return ret;
}
-int ShowInfo(const char *string, ...) {
- int ret;
+void ShowInfo(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_INFORMATION, string, ap);
+ _vShowMessage(MSG_INFORMATION, string, ap);
va_end(ap);
- return ret;
}
-int ShowNotice(const char *string, ...) {
- int ret;
+void ShowNotice(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_NOTICE, string, ap);
+ _vShowMessage(MSG_NOTICE, string, ap);
va_end(ap);
- return ret;
}
-int ShowWarning(const char *string, ...) {
- int ret;
+void ShowWarning(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_WARNING, string, ap);
+ _vShowMessage(MSG_WARNING, string, ap);
va_end(ap);
- return ret;
}
-int ShowConfigWarning(config_setting_t *config, const char *string, ...)
+void ShowConfigWarning(config_setting_t *config, const char *string, ...)
{
StringBuf buf;
- int ret;
va_list ap;
StringBuf_Init(&buf);
StringBuf_AppendStr(&buf, string);
StringBuf_Printf(&buf, " (%s:%d)\n", config_setting_source_file(config), config_setting_source_line(config));
va_start(ap, string);
- ret = _vShowMessage(MSG_WARNING, StringBuf_Value(&buf), ap);
+ _vShowMessage(MSG_WARNING, StringBuf_Value(&buf), ap);
va_end(ap);
StringBuf_Destroy(&buf);
- return ret;
}
-int ShowDebug(const char *string, ...) {
- int ret;
+void ShowDebug(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_DEBUG, string, ap);
+ _vShowMessage(MSG_DEBUG, string, ap);
va_end(ap);
- return ret;
}
-int ShowError(const char *string, ...) {
- int ret;
+void ShowError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_ERROR, string, ap);
+ _vShowMessage(MSG_ERROR, string, ap);
va_end(ap);
- return ret;
}
-int ShowFatalError(const char *string, ...) {
- int ret;
+void ShowFatalError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(MSG_FATALERROR, string, ap);
+ _vShowMessage(MSG_FATALERROR, string, ap);
va_end(ap);
- return ret;
}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 302ba5cd0..0d6cb5c9f 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -85,15 +85,15 @@ enum msg_type {
};
extern void ClearScreen(void);
-extern int ShowMessage(const char *, ...);
-extern int ShowStatus(const char *, ...);
-extern int ShowSQL(const char *, ...);
-extern int ShowInfo(const char *, ...);
-extern int ShowNotice(const char *, ...);
-extern int ShowWarning(const char *, ...);
-extern int ShowDebug(const char *, ...);
-extern int ShowError(const char *, ...);
-extern int ShowFatalError(const char *, ...);
-extern int ShowConfigWarning(config_setting_t *config, const char *string, ...);
+extern void ShowMessage(const char *, ...);
+extern void ShowStatus(const char *, ...);
+extern void ShowSQL(const char *, ...);
+extern void ShowInfo(const char *, ...);
+extern void ShowNotice(const char *, ...);
+extern void ShowWarning(const char *, ...);
+extern void ShowDebug(const char *, ...);
+extern void ShowError(const char *, ...);
+extern void ShowFatalError(const char *, ...);
+extern void ShowConfigWarning(config_setting_t *config, const char *string, ...);
#endif /* _SHOWMSG_H_ */