summaryrefslogtreecommitdiff
path: root/fd.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-05-06 17:10:31 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-06 17:10:31 -0700
commit0aab8135dae526b090dcb1ffab801023ac4084aa (patch)
tree3aa615a5196bddc76ff23a5e4b3ae6ab04a40588 /fd.h
parenteb05316a471da962eefe82c9b9a16a7590653ba7 (diff)
parentdef948f052a758850cadc022943517742b299441 (diff)
downloadxscope-0aab8135dae526b090dcb1ffab801023ac4084aa.tar.gz
Merge branch 'keithp'
Conflicts: common.c decode11.c fd.c fd.h print11.c prtype.c scope.c scope.h server.c table11.c x11.h xscope.man
Diffstat (limited to 'fd.h')
-rw-r--r--fd.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/fd.h b/fd.h
index 51caf68..1efa4f3 100644
--- a/fd.h
+++ b/fd.h
@@ -53,6 +53,8 @@
*
********************************************** */
+#ifndef XSCOPE_FD_H
+#define XSCOPE_FD_H
/*
the following structure remembers for each file descriptor its
@@ -74,25 +76,33 @@ typedef int FD;
struct FDDescriptor
{
Boolean Busy;
- void (*InputHandler)(int);
+ void (*InputHandler)(int);
+ void (*FlushHandler)(int);
#ifdef USE_XTRANS
XtransConnInfo trans_conn;
#endif
};
-struct FDDescriptor *FDD /* array of FD descriptors */ ;
-int MaxFD /* maximum number of FD's possible */ ;
-int nFDsInUse /* number of FD's actually in use */ ;
-fd_set ReadDescriptors /* bit map of FD's in use -- for select */ ;
-int HighestFD /* highest FD in use -- for select */ ;
+extern struct FDDescriptor *FDD /* array of FD descriptors */ ;
+extern short MaxFD /* maximum number of FD's possible */ ;
+
+extern short nFDsInUse /* number of FD's actually in use */ ;
+
+extern long ReadDescriptors /* bit map of FD's in use -- for select */ ;
+extern long WriteDescriptors /* bit map of write blocked FD's -- for select */;
+extern long BlockedReadDescriptors /* bit map of FD's blocked from reading */;
+extern short HighestFD /* highest FD in use -- for select */ ;
/* need to change the MaxFD to allow larger number of fd's */
#define StaticMaxFD FD_SETSIZE
extern void InitializeFD(void);
-extern void UsingFD(FD fd, void (*Handler)(int), XtransConnInfo trans_conn);
+extern void UsingFD(FD fd, void (*Handler)(int), void (*FlushHandler)(int),
+ XtransConnInfo trans_conn);
extern void NotUsingFD(FD fd);
extern int MainLoop(void);
#ifdef USE_XTRANS
extern XtransConnInfo GetXTransConnInfo(FD fd);
#endif
+
+#endif /* XSCOPE_FD_H */