Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#   		 Crown Copyright (c) 1997
2
#   
3
#   This TenDRA(r) Computer Program is subject to Copyright
4
#   owned by the United Kingdom Secretary of State for Defence
5
#   acting through the Defence Evaluation and Research Agency
6
#   (DERA).  It is made available to Recipients with a
7
#   royalty-free licence for its use, reproduction, transfer
8
#   to other parties and amendment for any purpose not excluding
9
#   product development provided that any such use et cetera
10
#   shall be deemed to be acceptance of the following conditions:-
11
#   
12
#       (1) Its Recipients shall ensure that this Notice is
13
#       reproduced upon any copies or amended versions of it;
14
#   
15
#       (2) Any amended version of it shall be clearly marked to
16
#       show both the nature of and the organisation responsible
17
#       for the relevant amendment or amendments;
18
#   
19
#       (3) Its onward transfer from a recipient to another
20
#       party shall be deemed to be that party's acceptance of
21
#       these conditions;
22
#   
23
#       (4) DERA gives no warranty or assurance as to its
24
#       quality or suitability for any purpose and DERA accepts
25
#       no liability whatsoever in relation to any use to which
26
#       it may be put.
27
#
28
+USE "x5/lib", "X11/Xlibint.h" ;
29
+USE "x5/proto", "X11/Xproto.h" ;
30
 
31
+STATEMENT __MyDisplayFlush ( Display *, int ) ;
32
+MACRO void *__MyDisplayLastRequest ( lvalue Display * ) ;
33
+MACRO void __MyDisplayAddBuffer ( lvalue Display *, int ) ;
34
+MACRO void __MyDisplayNextRequest ( lvalue Display * ) ;
35
 
36
+IFNDEF ~building_libs
37
%%
38
#define __MyGetReq( reqtype, reqno, n, req )\
39
    __MyDisplayFlush ( dpy, sizeof ( reqtype ) + ( n ) ) ;\
40
    ( req ) = ( reqtype * ) __MyDisplayLastRequest ( dpy ) ;\
41
    ( req )->reqType = ( reqno ) ;\
42
    ( req )->length = ( sizeof ( reqtype ) + ( n ) ) >> 2 ;\
43
    __MyDisplayAddBuffer ( dpy, sizeof ( reqtype ) + ( n ) ) ;\
44
    __MyDisplayNextRequest ( dpy )
45
 
46
#define GetReq( name, req )\
47
    __MyGetReq ( x##name##Req, X_##name, 0, req )
48
 
49
#define GetReqExtra( name, n, req )\
50
    __MyGetReq ( x##name##Req, X_##name, n, req )
51
 
52
#define GetResReq( name, rid, req )\
53
    __MyGetReq ( x##name##Req, X_##name, 0, req ) ;\
54
    ( req )->id = ( rid )
55
 
56
#define GetEmptyReq( name, req )\
57
    __MyGetReq ( xReq, X_##name, 0, req )
58
%%
59
+ENDIF