summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
Diffstat (limited to 'comm')
-rw-r--r--comm/TkMultiplexer.cc16
-rw-r--r--comm/TkMultiplexer.h16
2 files changed, 25 insertions, 7 deletions
diff --git a/comm/TkMultiplexer.cc b/comm/TkMultiplexer.cc
index 3272851..28c76d3 100644
--- a/comm/TkMultiplexer.cc
+++ b/comm/TkMultiplexer.cc
@@ -14,7 +14,15 @@
*/
#include "TkMultiplexer.h"
-#include "error.h"
+
+/* these files are included by tk.h, I include them here to avoid
+ them being enclosed in extern "C" */
+#include <X11/Xlib.h>
+#include <stddef.h>
+#include <stdio.h>
+extern "C" {
+#include "tk.h"
+}
#include <memory.h>
@@ -67,7 +75,7 @@ UchTkMultiplexer :: SetMasks (int fd, IOMODE mode)
if (mask) {
Tk_CreateFileHandler (fd, mask, ioHandler, (ClientData) ch);
ReadCount++;
- Active [fd] = TRUE;
+ Active [fd] = true;
}
}
@@ -105,12 +113,12 @@ UchTkMultiplexer :: AddSignalHook ()
MPX_RES
UchTkMultiplexer :: Loop ()
{
- Looping = TRUE;
+ Looping = true;
Tk_MainLoop ();
if (Looping) {
- Looping = FALSE;
+ Looping = false;
return isMpxEmpty;
}
return isMpxTerminated;
diff --git a/comm/TkMultiplexer.h b/comm/TkMultiplexer.h
index c1ecded..08a6adc 100644
--- a/comm/TkMultiplexer.h
+++ b/comm/TkMultiplexer.h
@@ -17,9 +17,19 @@
#define TkMultiplexer_H_
#include "Multiplexer.h"
-extern "C" {
-#include "tk.h"
-}
+#include "error.h"
+
+/* taken from tcl7.0 and tk3.3 */
+typedef struct Tk_TimerToken_ *Tk_TimerToken;
+#ifndef _CLIENTDATA
+# ifdef __STDC__
+ typedef void *ClientData;
+# else
+ typedef int *ClientData;
+# endif /* __STDC__ */
+#define _CLIENTDATA
+#endif
+
class UchTkMultiplexer : public UchBaseMultiplexer {
private: