"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "xlab-0.8.3/scope.h" of archive xlab-0.8.3.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 /*
2 * $Id: scope.h,v 1.4 1998/07/24 11:59:18 marc Exp $
3 *
4 * General definitions for xlab X record/replayer
5 *
6 * James Peterson, 1987
7 * (c) Copyright MCC, 1987
8 * (c) Copyright Marc Vertes 1996, 1997, 1998
9 */
10
11 #ifndef _SCOPE_H_
12 #define _SCOPE_H_
13
14 #include <X11/Xos.h>
15 #include <stdio.h>
16
17 #define Boolean short
18 #define true 1
19 #define false 0
20
21 /*----------------------------------------------------------------------*/
22 #define Assert(b) (b)
23 #define debug(n,f) (void)((debuglevel & n) ? (fprintf f,fflush(stderr)) : 0)
24 #define enterprocedure(s) debug(2,(stderr, "-> %s\n", s))
25 #define warn(s) fprintf(stderr, "####### %s\n", s)
26 #define panic(s) {fprintf(stderr, "%s\n", s); exit(1);}
27
28 #define Free(p) {debug(64,(stderr, "%lx = free\n", (long)p)); free(p);}
29
30 extern short debuglevel;
31 extern short Verbose; /* quiet (0) or increasingly verbose ( > 0) */
32 extern int ScopePort;
33 extern char *ScopeHost;
34
35 /*----------------------------------------------------------------------*/
36 /* need to change the MaxFD to allow larger number of fd's */
37 /* #define StaticMaxFD 256 */
38 #define StaticMaxFD 4096
39
40 #include "fd.h"
41
42 #if __STDC__ || defined(__cplusplus)
43 #define P_(s) s
44 #else
45 #define P_(s) ()
46 #endif
47
48 /* scope.c */
49 short GetServerport P_((void));
50 short GetScopePort P_((void));
51 void Usage P_((char *xscript));
52 void ScanArgs P_((int argc, char **argv));
53 int main P_((int argc, char **argv));
54 void ReadStdin P_((FD fd));
55 void SetUpStdin P_((void));
56 void ReportAndExit P_((void));
57 void SetUpPair P_((FD client, FD server));
58 void CloseConnection P_((FD fd));
59 FD FDPair P_((FD fd));
60 FD ClientHalf P_((FD fd));
61 FD ServerHalf P_((FD fd));
62 char *ClientName P_((FD fd));
63 void initFDbynum P_((void));
64 void initwintab P_((void));
65 FD FDClientFromNumber P_((long clientNb));
66 long NumberFD P_((FD fd));
67 void DataFromClient P_((FD fd));
68 void WriteToClient P_((FD fd, unsigned char *buf, int n));
69 void DataFromServer P_((FD fd));
70 void NewConnection P_((FD fd));
71 FD ConnectToClient P_((FD ConnectionSocket));
72 FD ConnectToServer P_((int report));
73 char *OfficialName P_((char *name));
74 void DataOnXDisplay P_((FD fd));
75 void SetUpXDisplay P_((void));
76
77 #undef P_
78
79 #endif /* _SCOPE_H_ */