author | Niveditha Rau <Niveditha.Rau@Oracle.COM> |
Wed, 08 Apr 2015 13:06:55 -0700 | |
changeset 1523 | 078d84a16e65 |
parent 1296 | 9f021f447b92 |
child 1568 | f85b5a8a5c43 |
permissions | -rw-r--r-- |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
1 |
/* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
2 |
* Solaris X consolidation configuration for Parfait static analysis |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
3 |
* This file provides additional information about functions that Parfait |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
4 |
* can use to make more accurate analysis. |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
5 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
6 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
7 |
/* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
8 |
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
9 |
* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
10 |
* Permission is hereby granted, free of charge, to any person obtaining a |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
11 |
* copy of this software and associated documentation files (the "Software"), |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
12 |
* to deal in the Software without restriction, including without limitation |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
13 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
14 |
* and/or sell copies of the Software, and to permit persons to whom the |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
15 |
* Software is furnished to do so, subject to the following conditions: |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
16 |
* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
17 |
* The above copyright notice and this permission notice (including the next |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
18 |
* paragraph) shall be included in all copies or substantial portions of the |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
19 |
* Software. |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
20 |
* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
21 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
22 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
23 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
24 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
25 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
26 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
27 |
* DEALINGS IN THE SOFTWARE. |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
28 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
29 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
30 |
include 'std.conf'; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
31 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
32 |
/* Local copy until added to parfait's std.conf (Bug 14121100) */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
33 |
asprintf(p,const fmt,args...) : printf(fmt,args), noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
34 |
if (result >= 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
35 |
*p == new(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
36 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
37 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
38 |
vasprintf(p,const fmt,va) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
39 |
if (result >= 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
40 |
*p == new(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
41 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
42 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
43 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
44 |
/* Local copy until added to parfait's std.conf (Bug 14121213) */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
45 |
strndup(const s, n) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
46 |
if ( result != 0 ) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
47 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
48 |
strlen(result) == PRE ( strlen(s) < n ? strlen(s) : n); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
49 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
50 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
51 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
52 |
/* Define custom bug types for common precondition assertions */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
53 |
bugtype "null-pointer-deref-call-X"(ptr) : "null-pointer-deref" { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
54 |
name="Null Pointer Dereference in X function"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
55 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
56 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
57 |
message="Null pointer dereference in call to ", callee_name(), ". Pointer ", name(ptr), " may be dereferenced"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
58 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
59 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
60 |
/************************************************************************* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
61 |
* Client side functions |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
62 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
63 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
64 |
/** libX11 **/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
65 |
bugtype "X-resource-leak"(xid) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
66 |
name="X Resource Leak"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
67 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
68 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
69 |
message="Leaked X Resource ", name(xid); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
70 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
71 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
72 |
resource <x-resource> { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
73 |
name="X Resource"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
74 |
"X-resource-leak"(resource): noleak(resource); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
75 |
resource == 0 => !isa(resource); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
76 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
77 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
78 |
/* Listed pretty much in same order as <X11/Xlib.h> */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
79 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
80 |
/* Todo: XLoadQueryFont...XNewModifiermap */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
81 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
82 |
XCreateImage(const display, v, dp, f, o, data, w, h, bp, bpl) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
83 |
"null-pointer-deref-call-X"(display) : display != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
84 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
85 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
86 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
87 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
88 |
XDestroyImage(p) { /* actually in <X11/Xutil.h> */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
89 |
"null-pointer-deref-call-X"(p) : p != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
90 |
delete(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
91 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
92 |
/* Todo: XInitImage, XGetImage, XGetSubImage */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
93 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
94 |
XOpenDisplay(const d) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
95 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
96 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
97 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
98 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
99 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
100 |
XFetchBuffer(d, n, b) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
101 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
102 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
103 |
*n == size(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
104 |
result == new(*n); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
105 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
106 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
107 |
XFetchBytes(d, n) : XFetchBuffer(d, n, 0); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
108 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
109 |
XGetAtomName(d, a) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
110 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
111 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
112 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
113 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
114 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
115 |
/* Todo: XGetAtomNames, XGetDefault, XDisplayName, XKeysymToString, |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
116 |
XInternAtom, XInternAtoms */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
117 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
118 |
XCopyColormapAndFree(d, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
119 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
120 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
121 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
122 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
123 |
XCreateColormap(d, w, v, a) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
124 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
125 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
126 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
127 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
128 |
XCreatePixmapCursor(d, s, m, fg, bg, x, y) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
129 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
130 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
131 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
132 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
133 |
XCreateGlyphCursor(d, sf, mf, sc, mc, fg, bg) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
134 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
135 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
136 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
137 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
138 |
XCreateFontCursor(d, s) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
139 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
140 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
141 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
142 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
143 |
XLoadFont(d, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
144 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
145 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
146 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
147 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
148 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
149 |
XCreateGC(d, dr, vm, v) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
150 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
151 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
152 |
result == new(112); /* sizeof(struct _XGC) */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
153 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
154 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
155 |
/* Todo: XGContextFromGC, XFlushGC */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
156 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
157 |
XCreatePixmap(d, dr, w, h, dp) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
158 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
159 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
160 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
161 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
162 |
XCreateBitmapFromData(d, dr, dt, w, h) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
163 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
164 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
165 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
166 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
167 |
XCreatePixmapFromBitmapData(d, dr, dt, w, h, fg, bg, dp) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
168 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
169 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
170 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
171 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
172 |
XCreateSimpleWindow(d,p,x,y,w,h,bw,b,bg) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
173 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
174 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
175 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
176 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
177 |
/* Todo: XGetSelectionOwner */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
178 |
XCreateWindow(d,p,x,y,w,h,bw,dp,c,v,vm,a) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
179 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
180 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
181 |
init<x-resource>(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
182 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
183 |
/* Todo: XListInstalledColormaps, XListFonts, XListFontsWithInfo, XGetFontPath */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
184 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
185 |
XListExtensions(d, n) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
186 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
187 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
188 |
result == new(undefined); /* n * char* + extension strings */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
189 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
190 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
191 |
XListProperties(d, w, n) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
192 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
193 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
194 |
result == new(n * 4); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
195 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
196 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
197 |
XListHosts(d, n, s) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
198 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
199 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
200 |
result == new(undefined); /* n * char* + extension strings */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
201 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
202 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
203 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
204 |
XKeycodeToKeysym(d, k, i) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
205 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
206 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
207 |
XLookupKeysym(e, i) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
208 |
"null-pointer-deref-call-X"(e) : e != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
209 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
210 |
XGetKeyboardMapping(d, fk, kc, ks) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
211 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
212 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
213 |
result == new(kc * ks); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
214 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
215 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
216 |
XStringToKeysym(s) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
217 |
"null-pointer-deref-call-X"(s) : s != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
218 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
219 |
XMaxRequestSize(d) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
220 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
221 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
222 |
XExtendedMaxRequestSize(d) : XMaxRequestSize(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
223 |
XScreenResourceString(d) : XMaxRequestSize(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
224 |
XDisplayMotionBufferSize(d) : XMaxRequestSize(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
225 |
XVisualIdFromVisual(v) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
226 |
/* Todo: visual resource id? */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
227 |
"null-pointer-deref-call-X"(v) : v != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
228 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
229 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
230 |
XLockDisplay(d) : XMaxRequestSize(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
231 |
XUnlockDisplay(d) : XMaxRequestSize(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
232 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
233 |
XAddExtension(d) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
234 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
235 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
236 |
result == new(128); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
237 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
238 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
239 |
XInitExtension(d, n) : XAddExtension(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
240 |
XFindOnExtensionList(s, n) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
241 |
"null-pointer-deref-call-X"(s) : s != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
242 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
243 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
244 |
/* these are routines for which there are also macros */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
245 |
XDefaultRootWindow(d) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
246 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
247 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
248 |
XRootWindow(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
249 |
XRootWindowOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
250 |
XDefaultVisual(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
251 |
XDefaultVisualOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
252 |
XDefaultGC(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
253 |
XDefaultGCOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
254 |
XBlackPixel(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
255 |
XWhitePixel(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
256 |
XBlackPixelOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
257 |
XWhitePixelOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
258 |
XNextRequest(d) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
259 |
XLastKnownRequestProcessed(d) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
260 |
XServerVendor(d) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
261 |
XDisplayString(d) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
262 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
263 |
XDefaultColormap(d, n) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
264 |
/* Todo: colormap resource id? */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
265 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
266 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
267 |
XDefaultColormapOfScreen(s) : XDefaultColormap(s, 0); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
268 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
269 |
XDisplayOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
270 |
XScreenOfDisplay(d, n) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
271 |
XDefaultScreenOfDisplay(d) : XDefaultRootWindow(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
272 |
XEventMaskOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
273 |
XScreenNumberOfScreen(s) : XDefaultRootWindow(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
274 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
275 |
/* Todo: XSetErrorHandler, XSetIOErrorHandler */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
276 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
277 |
XListPixmapFormats(d, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
278 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
279 |
"null-pointer-deref-call-X"(c) : c != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
280 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
281 |
result == new(c * 12); /* sizeof(XPixmapFormatValues) */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
282 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
283 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
284 |
XListDepths(d, s, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
285 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
286 |
"null-pointer-deref-call-X"(c) : c != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
287 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
288 |
result == new(c * 4); /* sizeof(int) */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
289 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
290 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
291 |
/* Todo: ICCCM routines - XReconfigureWMWindow...XSetWMColormapWindows, |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
292 |
XSetTransientForHint */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
293 |
XFreeStringList(l) : free(l); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
294 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
295 |
XActivateScreenSaver(d) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
296 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
297 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
298 |
XAddHost(d, h) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
299 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
300 |
"null-pointer-deref-call-X"(h) : h != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
301 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
302 |
XAddHosts(d, h, n) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
303 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
304 |
"null-pointer-deref-call-X"(h) : h != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
305 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
306 |
/* Todo: XAddToExtensionList...XClearWindow */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
307 |
XCloseDisplay(d) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
308 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
309 |
delete(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
310 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
311 |
/* Todo: XConfigureWindow...XDeleteProperty */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
312 |
XDestroyWindow(d, w) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
313 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
314 |
destroy<x-resource>(w); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
315 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
316 |
XDestroySubwindows(d, w) : XDestroyWindow(d, w); /* Todo: subwindows? */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
317 |
/* Todo: XDoesBackingStore...XDisplayHeightMM */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
318 |
XDisplayKeycodes(d, min, max) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
319 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
320 |
min >= 8; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
321 |
max <= 255; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
322 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
323 |
/* Todo: XDisplayPlanes...XEventsQueued */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
324 |
XFetchName(d, w, name) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
325 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
326 |
if (name != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
327 |
name == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
328 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
329 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
330 |
/* Todo: XFillArcs...XForceScreenSaver */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
331 |
XFree(p) : free(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
332 |
XFreeColormap(d, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
333 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
334 |
destroy<x-resource>(c); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
335 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
336 |
/* Todo: XFreeColors */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
337 |
XFreeCursor(d, c) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
338 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
339 |
destroy<x-resource>(c); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
340 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
341 |
XFreeExtensionList(l) : free(l); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
342 |
XFreeFont(d, f) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
343 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
344 |
destroy<x-resource>(f); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
345 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
346 |
/* Todo: XFreeFontInfo */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
347 |
XFreeFontNames(l) : free(l); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
348 |
XFreeFontPath(l) : free(l); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
349 |
XFreeGC(d, gc) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
350 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
351 |
destroy<x-resource>(gc); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
352 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
353 |
XFreeModifierMap(m) : free(m); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
354 |
XFreePixmap(d, p) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
355 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
356 |
destroy<x-resource>(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
357 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
358 |
/* Todo: XGeometry...XGetGeometry */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
359 |
XGetIconName(d, w, name) : XFetchName(d, w, name); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
360 |
/* Todo: XGetInputFocus...XGetTransientForHint */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
361 |
XGetWindowProperty(d, w, p, lo, ll, del, rt, at, af, n, bar, prop) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
362 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
363 |
if (prop != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
364 |
prop == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
365 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
366 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
367 |
/* Todo: XGetWindowAttributes...XQueryColors */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
368 |
XQueryExtension(d, n, op, ev, er) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
369 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
370 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
371 |
op >= 128; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
372 |
op <= 255; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
373 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
374 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
375 |
/* Todo: XQueryKeymap...XQueryTextExtents16 */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
376 |
XQueryTree(d, w, r, p, c, nc) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
377 |
"null-pointer-deref-call-X"(d) : d != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
378 |
"null-pointer-deref-call-X"(c) : c != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
379 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
380 |
c == new(nc * 4); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
381 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
382 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
383 |
/* Todo: XRaiseWindow...XRemoveFromSaveSet */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
384 |
XRemoveHost(d, h) : XAddHost(d, h); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
385 |
XRemoveHosts(d, h, n) : XAddHosts(d, h, n); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
386 |
/* Todo: XReparentWindow...XFreeEventData */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
387 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
388 |
/* Allocation functions from <X11/Xutil.h> */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
389 |
XAllocClassHint() : malloc(size(result)); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
390 |
XAllocIconSize() : malloc(size(result)); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
391 |
XAllocSizeHints() : malloc(size(result)); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
392 |
XAllocStandardColormap() : malloc(size(result)); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
393 |
XAllocWMHints() : malloc(size(result)); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
394 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
395 |
/** libXt |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
396 |
* Functions from Xt's Alloc.c - like libc ones, except exit on failure, |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
397 |
* instead of return NULL |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
398 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
399 |
XtAsprintf(p,const fmt,args...) : printf(fmt,args), noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
400 |
*p == new(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
401 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
402 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
403 |
XtMalloc(s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
404 |
result == new(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
405 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
406 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
407 |
XtRealloc(p,s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
408 |
delete(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
409 |
result == new(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
410 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
411 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
412 |
XtCalloc(n,s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
413 |
result == new(n*s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
414 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
415 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
416 |
XtFree(p) : free(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
417 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
418 |
/************************************************************************* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
419 |
* Server side functions |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
420 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
421 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
422 |
/* include/misc.h: byte swapping */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
423 |
/* XXX - does not work! */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
424 |
bugtype "wrong-size-swap"(ptr,funcsize) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
425 |
name="Wrong size Xserver swap function used"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
426 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
427 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
428 |
message="Wrong size swap function used: ", callee_name(), " expects ", funcsize, "-byte variable, got ", size(ptr),"-byte ", name(ptr), " instead."; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
429 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
430 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
431 |
swap_uint32(x) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
432 |
"wrong-size-swap"(x,4): size(*x) == 4; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
433 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
434 |
swap_uint16(x) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
435 |
"wrong-size-swap"(x,2): size(*x) == 4; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
436 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
437 |
SwapLongs(x,count) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
438 |
"wrong-size-swap"(x,4): size(x) == 4; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
439 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
440 |
SwapShorts(x,count) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
441 |
"wrong-size-swap"(x,2): size(x) == 4; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
442 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
443 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
444 |
/* dix/pixmap.c */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
445 |
AllocatePixmap(const pScreen, pixDataSize) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
446 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
447 |
result == new(pixDataSize); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
448 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
449 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
450 |
FreePixmap(p) : free(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
451 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
452 |
/* dix/region.c */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
453 |
RegionCreate(const rect, s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
454 |
result == new(12); /* sizeof struct pixman_region16 */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
455 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
456 |
RegionDestroy(p) : free(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
457 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
458 |
/* fb/fbpixmap.c */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
459 |
fbCreatePixmapBpp(const pS, w, h, d, b, ht) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
460 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
461 |
result == new(w*h); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
462 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
463 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
464 |
fbCreatePixmap(const pS, w, h, d, ht) : fbCreatePixmapBpp(pS, w, h, d, d, ht); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
465 |
fbDestroyPixmap(p) : FreePixmap(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
466 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
467 |
/* os/log.c: logging functions */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
468 |
LogWrite(verb, const fmt, args...) : printf(fmt, args), noescape; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
469 |
LogMessageVerb(type, verb, const fmt, args...) : printf(fmt, args), noescape; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
470 |
LogMessage(type, const fmt, args...) : printf(fmt, args), noescape; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
471 |
FatalError(const fmt, args...) : printf(fmt, args), noescape, exit; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
472 |
ErrorF(const fmt, args...) : printf(fmt, args), noescape; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
473 |
AbortServer(): exit; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
474 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
475 |
/* os/utils.c: allocation & other helpers */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
476 |
Xalloc(s) : malloc(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
477 |
XNFalloc(s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
478 |
result == new(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
479 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
480 |
Xcalloc(s) : calloc(1,s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
481 |
XNFcalloc(s) : XNFalloc(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
482 |
Xrealloc(p, s) : realloc(p, s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
483 |
XNFrealloc(p, s) : realloc(p, s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
484 |
Xfree(p) : free(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
485 |
Xstrdup(const s) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
486 |
if ( s == 0 ) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
487 |
result == 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
488 |
} else { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
489 |
if( result != 0 ) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
490 |
result == new(strlen(s)+1); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
491 |
strlen(result) == strlen(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
492 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
493 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
494 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
495 |
XNFstrdup(const s) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
496 |
if ( s == 0 ) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
497 |
result == 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
498 |
} else { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
499 |
result == new(strlen(s)+1); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
500 |
strlen(result) == strlen(s); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
501 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
502 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
503 |
OsAbort() : abort(); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
504 |
Fopen(f, m) : fopen(f, m); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
505 |
Fclose(p) : fclose(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
506 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
507 |
/* os/xprintf.c: allocating printf wrappers/variants */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
508 |
Xvasprintf(p, fmt, va) : vasprintf(p, fmt, va); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
509 |
Xasprintf(p, fmt, args...) : asprintf(p, fmt, args); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
510 |
XNFvasprintf(p, fmt, va) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
511 |
*p == new(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
512 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
513 |
XNFasprintf(p, fmt, args...) : noescape, printf(fmt, args) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
514 |
*p == new(result); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
515 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
516 |
Xvprintf(fmt, va) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
517 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
518 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
519 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
520 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
521 |
Xprintf(fmt, args...) : noescape, printf(fmt, args) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
522 |
if (result != 0) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
523 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
524 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
525 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
526 |
XNFvprintf(fmt, va) : noescape { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
527 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
528 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
529 |
XNFprintf(fmt, args...) : noescape, printf(fmt, args) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
530 |
result == new(undefined); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
531 |
} |