author | Niveditha Rau <Niveditha.Rau@Oracle.COM> |
Mon, 06 Mar 2017 15:06:15 -0800 | |
changeset 1698 | 442d649bad81 |
parent 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 |
/* |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
8 |
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
1296
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 |
/* 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
|
33 |
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
|
34 |
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
|
35 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
36 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
37 |
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
|
38 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
39 |
bugtype "unchecked-result-call-X"(val) : "unchecked-result" { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
40 |
name="Unchecked result"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
41 |
priority="error"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
42 |
enabled="true"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
43 |
message="Unchecked return value from call to ", callee_name(), ". Value " , name(val), " must be checked to ensure this function was successful."; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
44 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
45 |
bugtype "pointer-size-mismatch-kernel"(ptr,size) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
46 |
name="Pointer size mismatch in kernel function"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
47 |
priority="error"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
48 |
enabled="true"; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
49 |
message="Incorrect pointer size in call to ", callee_name(), ". Pointer ", name(ptr), " given as size ", size; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
50 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
51 |
|
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
52 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
53 |
/************************************************************************* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
54 |
* 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
|
55 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
56 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
57 |
/** libX11 **/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
58 |
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
|
59 |
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
|
60 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
61 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
62 |
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
|
63 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
64 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
65 |
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
|
66 |
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
|
67 |
"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
|
68 |
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
|
69 |
} |
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 |
/* 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
|
72 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
73 |
/* 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
|
74 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
75 |
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
|
76 |
"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
|
77 |
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
|
78 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
79 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
80 |
escape(data); |
1296
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 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
83 |
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
|
84 |
"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
|
85 |
delete(p); |
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 |
/* 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
|
88 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
89 |
XOpenDisplay(const d) : noescape { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
90 |
"unchecked-result-call-X"(result): is_checked(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
91 |
if (result != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
92 |
result == new(size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
93 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
94 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
95 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
96 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
97 |
XFetchBuffer(d, n, b) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
98 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
99 |
"null-pointer-deref-call-X"(n) : n != 0; |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
100 |
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
|
101 |
*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
|
102 |
result == new(*n); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
103 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
104 |
} |
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 |
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
|
107 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
108 |
XGetAtomName(d, a) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
109 |
"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
|
110 |
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
|
111 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
112 |
may_write(result); |
1296
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 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
143 |
XLoadFont(d, const c) : noescape { |
1296
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 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
149 |
XCreateGC(d, dr, const vm, v) : noescape { |
1296
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) */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
153 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
154 |
} else { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
155 |
@errno != 0; |
1296
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 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
158 |
/* 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
|
159 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
160 |
XCreatePixmap(d, dr, w, h, dp) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
161 |
"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
|
162 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
163 |
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
|
164 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
165 |
XCreateBitmapFromData(d, dr, dt, w, h) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
166 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
167 |
if (result != 0) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
168 |
init<x-resource>(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
169 |
} else { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
170 |
@errno != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
171 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
172 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
173 |
XCreatePixmapFromBitmapData(d, dr, dt, w, h, fg, bg, dp) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
174 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
175 |
if (result != 0) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
176 |
init<x-resource>(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
177 |
} else { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
178 |
@errno != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
179 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
180 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
181 |
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
|
182 |
"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
|
183 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
184 |
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
|
185 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
186 |
/* Todo: XGetSelectionOwner */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
187 |
XCreateWindow(d,p,x,y,w,h,bw,dp,c,v,const vm,a) { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
188 |
"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
|
189 |
result != 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
190 |
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
|
191 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
192 |
/* 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
|
193 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
194 |
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
|
195 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
196 |
"null-pointer-deref-call-X"(n) : n != 0; |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
197 |
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
|
198 |
result == new(undefined); /* n * char* + extension strings */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
199 |
may_write(n); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
200 |
may_write(result); |
1296
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 |
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
|
204 |
"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
|
205 |
if (result != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
206 |
result == new(n * 4); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
207 |
may_write(n); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
208 |
may_write(result); |
1296
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 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
211 |
XListHosts(d, n, enabled) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
212 |
"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
|
213 |
if (result != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
214 |
result == new(undefined); /* n * char* + host strings */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
215 |
may_write(n); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
216 |
may_write(enabled); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
217 |
may_write(result); |
1296
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 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
220 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
221 |
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
|
222 |
"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
|
223 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
224 |
XLookupKeysym(e, const i) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
225 |
"null-pointer-deref-call-X"(e) : e != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
226 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
227 |
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
|
228 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
229 |
"null-pointer-deref-call-X"(ks) : ks != 0; |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
230 |
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
|
231 |
result == new(kc * ks); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
232 |
may_write(ks); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
233 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
234 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
235 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
236 |
XStringToKeysym(const s) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
237 |
"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
|
238 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
239 |
XMaxRequestSize(const d) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
240 |
"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
|
241 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
242 |
XExtendedMaxRequestSize(const d) : XMaxRequestSize(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
243 |
XScreenResourceString(const s) : noescape { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
244 |
"null-pointer-deref-call-X"(s) : s != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
245 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
246 |
XDisplayMotionBufferSize(const d) : XMaxRequestSize(d); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
247 |
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
|
248 |
/* 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
|
249 |
"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
|
250 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
251 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
252 |
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
|
253 |
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
|
254 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
255 |
XAddExtension(d) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
256 |
"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
|
257 |
if (result != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
258 |
result == new(size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
259 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
260 |
escape(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
261 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
262 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
263 |
XInitExtension(d, const n) : XAddExtension(d); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
264 |
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
|
265 |
"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
|
266 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
267 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
268 |
/* these are routines for which there are also macros */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
269 |
XDefaultRootWindow(const d) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
270 |
"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
|
271 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
272 |
XRootWindow(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
273 |
XRootWindowOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
274 |
XDefaultVisual(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
275 |
XDefaultVisualOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
276 |
XDefaultGC(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
277 |
XDefaultGCOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
278 |
XBlackPixel(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
279 |
XWhitePixel(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
280 |
XBlackPixelOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
281 |
XWhitePixelOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
282 |
XNextRequest(const d) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
283 |
XLastKnownRequestProcessed(const d) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
284 |
XServerVendor(const d) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
285 |
XDisplayString(const d) : XDefaultRootWindow(d); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
286 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
287 |
XDefaultColormap(const d, const n) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
288 |
/* 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
|
289 |
"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
|
290 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
291 |
XDefaultColormapOfScreen(const s) : XDefaultColormap(s, 0); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
292 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
293 |
XDisplayOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
294 |
XScreenOfDisplay(const d, const n) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
295 |
XDefaultScreenOfDisplay(const d) : XDefaultRootWindow(d); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
296 |
XEventMaskOfScreen(const s) : XDefaultRootWindow(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
297 |
XScreenNumberOfScreen(const s) : XDefaultRootWindow(s); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
298 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
299 |
/* 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
|
300 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
301 |
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
|
302 |
"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
|
303 |
"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
|
304 |
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
|
305 |
result == new(c * 12); /* sizeof(XPixmapFormatValues) */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
306 |
may_write(c); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
307 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
308 |
} else { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
309 |
@errno != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
310 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
311 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
312 |
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
|
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 |
"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
|
315 |
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
|
316 |
result == new(c * 4); /* sizeof(int) */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
317 |
may_write(c); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
318 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
319 |
} else { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
320 |
@errno != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
321 |
} |
1296
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: 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
|
324 |
XSetTransientForHint */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
325 |
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
|
326 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
327 |
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
|
328 |
"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
|
329 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
330 |
XAddHost(d, const h) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
331 |
"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
|
332 |
"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
|
333 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
334 |
XAddHosts(d, const h, const n) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
335 |
"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
|
336 |
"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
|
337 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
338 |
/* 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
|
339 |
XCloseDisplay(d) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
340 |
"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
|
341 |
delete(d); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
342 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
343 |
/* 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
|
344 |
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
|
345 |
"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
|
346 |
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
|
347 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
348 |
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
|
349 |
/* 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
|
350 |
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
|
351 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
352 |
may_write(min); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
353 |
may_write(max); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
354 |
min >= 8; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
355 |
max <= 255; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
356 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
357 |
/* 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
|
358 |
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
|
359 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
360 |
may_write(name); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
361 |
(result == 0) => (name == 0); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
362 |
if (name != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
363 |
name == new(undefined); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
364 |
may_write(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
365 |
result == 1; |
1296
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 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
368 |
/* 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
|
369 |
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
|
370 |
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
|
371 |
"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
|
372 |
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
|
373 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
374 |
/* Todo: XFreeColors */ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
375 |
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
|
376 |
"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
|
377 |
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
|
378 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
379 |
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
|
380 |
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
|
381 |
"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
|
382 |
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
|
383 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
384 |
XFreeFontInfo(names, info, count) : noescape { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
385 |
/* Todo: free contents of names & info */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
386 |
(names != 0) => delete(names); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
387 |
(info != 0) => delete(info); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
388 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
389 |
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
|
390 |
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
|
391 |
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
|
392 |
"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
|
393 |
destroy<x-resource>(gc); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
394 |
delete(gc); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
395 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
396 |
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
|
397 |
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
|
398 |
"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
|
399 |
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
|
400 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
401 |
/* 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
|
402 |
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
|
403 |
/* 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
|
404 |
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
|
405 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
406 |
"unchecked-result-call-X"(result): is_checked(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
407 |
result == 0 => prop != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
408 |
prop == 0 => result != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
409 |
if (result == 0) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
410 |
may_write(at); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
411 |
may_write(af); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
412 |
may_write(n); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
413 |
may_write(bar); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
414 |
may_write(prop); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
415 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
416 |
if (prop != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
417 |
prop == new(undefined); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
418 |
may_write(prop); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
419 |
result == 0; |
1296
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 |
/* Todo: XGetWindowAttributes...XQueryColors */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
423 |
XQueryExtension(d, const n, op, ev, er) : noescape { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
424 |
"null-pointer-deref-call-X"(d) : d != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
425 |
may_write(op); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
426 |
may_write(ev); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
427 |
may_write(er); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
428 |
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
|
429 |
op >= 128; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
430 |
op <= 255; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
431 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
432 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
433 |
/* 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
|
434 |
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
|
435 |
"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
|
436 |
"null-pointer-deref-call-X"(c) : c != 0; |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
437 |
may_write(r); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
438 |
may_write(p); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
439 |
may_write(c); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
440 |
may_write(nc); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
441 |
if (result != 0) { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
442 |
c == new(nc * size(w)); |
1296
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 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
445 |
/* Todo: XRaiseWindow...XRemoveFromSaveSet */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
446 |
XRemoveHost(d, const h) : XAddHost(d, h); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
447 |
XRemoveHosts(d, const h, const n) : XAddHosts(d, h, n); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
448 |
/* 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
|
449 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
450 |
/* Allocation functions from <X11/Xutil.h> */ |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
451 |
XAllocClassHint() : calloc(1, size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
452 |
XAllocIconSize() : calloc(1, size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
453 |
XAllocSizeHints() : calloc(1, size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
454 |
XAllocStandardColormap() : calloc(1, size(*result)); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
455 |
XAllocWMHints() : calloc(1, size(*result)); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
456 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
457 |
/** libXt |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
458 |
* 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
|
459 |
* 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
|
460 |
*/ |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
461 |
XtAsprintf(p,const fmt,args...) : printf(fmt,args), noescape { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
462 |
*p == new(result + 1); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
463 |
strlen(*p) == result; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
464 |
may_write(*p); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
465 |
} |
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 |
XtMalloc(s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
468 |
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
|
469 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
470 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
471 |
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
|
472 |
delete(p); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
473 |
result == new(s); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
474 |
result[0..(size(PRE p) < s ? size(PRE p) : s)] == PRE p[0..(size(PRE p) < s ? size(PRE p) : s)]; |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
475 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
476 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
477 |
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
|
478 |
result == new(n*s); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
479 |
result[0 .. (n * s)] == bytes(0, (n * s)); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
480 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
481 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
482 |
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
|
483 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
484 |
/* libXcursor private function */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
485 |
XcursorScanTheme(theme, name) : noescape { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
486 |
(theme == 0 || name == 0) => result == 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
487 |
(result != 0 && result != 1) => init<file-ptr>(result); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
488 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
489 |
|
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
490 |
/************************************************************************* |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
491 |
* 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
|
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 |
/* 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
|
495 |
/* 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
|
496 |
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
|
497 |
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
|
498 |
priority="error"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
499 |
enabled="true"; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
500 |
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
|
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 |
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
|
504 |
"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
|
505 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
506 |
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
|
507 |
"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
|
508 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
509 |
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
|
510 |
"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
|
511 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
512 |
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
|
513 |
"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
|
514 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
515 |
|
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
516 |
/* dix/atom.c */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
517 |
MakeAtom(string, len, makeit) : noescape { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
518 |
"null-pointer-deref-call-X"(string): string != 0; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
519 |
"buffer-overflow-call-stdc-str"(string): len <= strlen(string); |
1296
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 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
522 |
/* 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
|
523 |
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
|
524 |
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
|
525 |
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
|
526 |
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
|
527 |
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
|
528 |
AbortServer(): exit; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
529 |
|
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
530 |
/* 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
|
531 |
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
|
532 |
XNFalloc(s) { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
533 |
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
|
534 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
535 |
Xcalloc(s) : calloc(1,s); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
536 |
XNFcalloc(s) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
537 |
result == new(s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
538 |
result[0 .. s] == bytes(0, s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
539 |
} |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
540 |
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
|
541 |
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
|
542 |
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
|
543 |
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
|
544 |
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
|
545 |
result == 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
546 |
} else { |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
547 |
if ( result != 0 ) { |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
548 |
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
|
549 |
strlen(result) == strlen(s); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
550 |
result[0..strlen(result)] == PRE s[0..strlen(s)]; |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
551 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
552 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
553 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
554 |
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
|
555 |
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
|
556 |
result == 0; |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
557 |
} else { |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
558 |
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
|
559 |
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
|
560 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
561 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
562 |
OsAbort() : abort(); |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
563 |
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
|
564 |
Fclose(p) : fclose(p); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
565 |
|
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
566 |
/* 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
|
567 |
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
|
568 |
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
|
569 |
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
|
570 |
*p == new(result); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
571 |
may_write(*p); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
572 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
573 |
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
|
574 |
*p == new(result); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
575 |
may_write(*p); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
576 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
577 |
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
|
578 |
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
|
579 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
580 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
581 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
582 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
583 |
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
|
584 |
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
|
585 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
586 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
587 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
588 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
589 |
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
|
590 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
591 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
592 |
} |
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
593 |
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
|
594 |
result == new(undefined); |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
595 |
may_write(result); |
1296
9f021f447b92
7172112 X builds need to add a layer of parfait on top
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
596 |
} |
1568
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
597 |
|
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
598 |
/************************************************************************* |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
599 |
* Kernel modules |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
600 |
*/ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
601 |
|
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
602 |
@if (file=="kernel/*") { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
603 |
|
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
604 |
include 'onnv.conf'; |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
605 |
|
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
606 |
/* graphics driver porting layer: open-src/kernel/drm/src/drm_memory.c */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
607 |
drm_alloc(s, a) : calloc(1, s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
608 |
drm_calloc(n, s, a) : calloc(n, s); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
609 |
drm_realloc(pp, ps, s, a) : realloc(pp, s) { |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
610 |
"pointer-size-mismatch-kernel"(pp,ps) : ps == size(pp); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
611 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
612 |
drm_free(p, s, a) { /* unlike kmem_free, accepts/ignores NULL pointers */ |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
613 |
"pointer-size-mismatch-kernel"(p,s) : s == size(p); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
614 |
delete(p); |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
615 |
} |
f85b5a8a5c43
21661553 Reduce parfait warnings in X builds
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
1296
diff
changeset
|
616 |
} |