summaryrefslogtreecommitdiff
path: root/src/common/showmsg.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-05-04 06:13:56 +0200
committerHaru <haru@dotalux.com>2014-05-09 08:29:46 +0200
commitb6b3f58795288701d0e162d43fa6f0a47af913b3 (patch)
treea75f686731786ed1746325589d8acb1569409981 /src/common/showmsg.h
parent1c4e3820d5f4ff9870c28104122f6733db4d55a6 (diff)
downloadhercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.gz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.bz2
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.xz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.zip
Fixed order of includes in all source files
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/showmsg.h')
-rw-r--r--src/common/showmsg.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 49fbc34fb..5b32f39ae 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -5,12 +5,14 @@
#ifndef _COMMON_SHOWMSG_H_
#define _COMMON_SHOWMSG_H_
-#ifndef _COMMON_HPMI_H_
- #include "../../3rdparty/libconfig/libconfig.h"
-#endif
-
#include <stdarg.h>
+#ifdef HERCULES_CORE
+# include "../../3rdparty/libconfig/libconfig.h"
+#else
+# include "../common/HPMi.h"
+#endif
+
// for help with the console colors look here:
// http://www.edoceo.com/liberum/?doc=printf-with-color
// some code explanation (used here):
@@ -90,7 +92,7 @@ enum msg_type {
};
extern void ClearScreen(void);
-#ifndef _COMMON_HPMI_H_
+#ifdef HERCULES_CORE
extern void ShowMessage(const char *, ...);
extern void ShowStatus(const char *, ...);
extern void ShowSQL(const char *, ...);
@@ -101,7 +103,18 @@ extern void ClearScreen(void);
extern void ShowError(const char *, ...);
extern void ShowFatalError(const char *, ...);
extern void ShowConfigWarning(config_setting_t *config, const char *string, ...);
+#else
+ HPExport void (*ShowMessage) (const char *, ...);
+ HPExport void (*ShowStatus) (const char *, ...);
+ HPExport void (*ShowSQL) (const char *, ...);
+ HPExport void (*ShowInfo) (const char *, ...);
+ HPExport void (*ShowNotice) (const char *, ...);
+ HPExport void (*ShowWarning) (const char *, ...);
+ HPExport void (*ShowDebug) (const char *, ...);
+ HPExport void (*ShowError) (const char *, ...);
+ HPExport void (*ShowFatalError) (const char *, ...);
#endif
+
extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap);
#endif /* _COMMON_SHOWMSG_H_ */