summaryrefslogtreecommitdiff
path: root/src/twm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/twm.h')
-rw-r--r--src/twm.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/twm.h b/src/twm.h
index 1fe106d..d39abdb 100644
--- a/src/twm.h
+++ b/src/twm.h
@@ -60,6 +60,7 @@ from The Open Group.
#ifndef _TWM_
#define _TWM_
+/* *INDENT-OFF* */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -73,6 +74,18 @@ from The Open Group.
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
+#ifndef GCC_PRINTFLIKE
+#if defined(GCC_PRINTF) && !defined(printf)
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#endif
+
+#ifndef GCC_NORETURN
+#define GCC_NORETURN _X_NORETURN
+#endif
+
#ifndef WithdrawnState
#define WithdrawnState 0
#endif
@@ -335,8 +348,7 @@ extern void CreateFonts(void);
extern void RestoreWithdrawnLocation(TwmWindow *tmp);
extern void Reborder(Time time);
extern void
-Done(XtPointer, XtSignalId *)
- _X_NORETURN;
+Done(XtPointer, XtSignalId *) _X_NORETURN;
extern void
ComputeCommonTitleOffsets(void);
extern void
@@ -392,6 +404,11 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask);
extern Pixmap
CreateMenuIcon(int height, unsigned int *widthp, unsigned int *heightp);
+extern void twmError(const char *, ...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void twmWarning(const char *, ...) GCC_PRINTFLIKE(1,2);
+extern void twmVerbose(const char *, ...) GCC_PRINTFLIKE(1,2);
+extern void twmMessage(const char *, ...) GCC_PRINTFLIKE(1,2);
+
extern Bool ErrorOccurred;
extern XErrorEvent LastErrorEvent;
@@ -433,4 +450,5 @@ extern int XrandrErrorBase;
#define _XA_WM_CLIENT_LEADER TwmAtoms[9]
#define _XA_WM_WINDOW_ROLE TwmAtoms[10]
+/* *INDENT-ON* */
#endif /* _TWM_ */