/src/FreeRDP/winpr/include/winpr/stream.h
Line | Count | Source |
1 | | /* |
2 | | * WinPR: Windows Portable Runtime |
3 | | * Stream Utils |
4 | | * |
5 | | * Copyright 2011 Vic Lee |
6 | | * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com> |
7 | | * Copyright 2017 Armin Novak <armin.novak@thincast.com> |
8 | | * Copyright 2017 Thincast Technologies GmbH |
9 | | * |
10 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
11 | | * you may not use this file except in compliance with the License. |
12 | | * You may obtain a copy of the License at |
13 | | * |
14 | | * http://www.apache.org/licenses/LICENSE-2.0 |
15 | | * |
16 | | * Unless required by applicable law or agreed to in writing, software |
17 | | * distributed under the License is distributed on an "AS IS" BASIS, |
18 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
19 | | * See the License for the specific language governing permissions and |
20 | | * limitations under the License. |
21 | | */ |
22 | | |
23 | | #ifndef WINPR_UTILS_STREAM_H |
24 | | #define WINPR_UTILS_STREAM_H |
25 | | |
26 | | #include <winpr/winpr.h> |
27 | | #include <winpr/wtypes.h> |
28 | | #include <winpr/endian.h> |
29 | | #include <winpr/synch.h> |
30 | | #include <winpr/assert.h> |
31 | | #include <winpr/cast.h> |
32 | | #include <winpr/wlog.h> |
33 | | |
34 | | #ifdef __cplusplus |
35 | | extern "C" |
36 | | { |
37 | | #endif |
38 | | |
39 | | typedef struct s_wStreamPool wStreamPool; |
40 | | |
41 | | typedef struct |
42 | | { |
43 | | BYTE* buffer; |
44 | | BYTE* pointer; |
45 | | size_t length; |
46 | | size_t capacity; |
47 | | |
48 | | DWORD count; |
49 | | wStreamPool* pool; |
50 | | BOOL isAllocatedStream; |
51 | | BOOL isOwner; |
52 | | } wStream; |
53 | | |
54 | | /** @brief helper initializing a \b wStream context |
55 | | * |
56 | | * @return The initialized context |
57 | | * @since version 3.24.0 |
58 | | */ |
59 | | WINPR_ATTR_NODISCARD |
60 | | static inline wStream Stream_Init(void) |
61 | 0 | { |
62 | 0 | const wStream empty = { nullptr, nullptr, 0, 0, 0, nullptr, FALSE, FALSE }; |
63 | 0 | return empty; |
64 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Init Unexecuted instantiation: stream.c:Stream_Init Unexecuted instantiation: BinaryAppender.c:Stream_Init Unexecuted instantiation: event.c:Stream_Init Unexecuted instantiation: wait.c:Stream_Init Unexecuted instantiation: generic.c:Stream_Init Unexecuted instantiation: namedPipeClient.c:Stream_Init Unexecuted instantiation: comm.c:Stream_Init Unexecuted instantiation: comm_ioctl.c:Stream_Init Unexecuted instantiation: comm_serial_sys.c:Stream_Init Unexecuted instantiation: comm_sercx_sys.c:Stream_Init Unexecuted instantiation: comm_sercx2_sys.c:Stream_Init Unexecuted instantiation: pipe.c:Stream_Init Unexecuted instantiation: ArrayList.c:Stream_Init Unexecuted instantiation: PacketMessage.c:Stream_Init Unexecuted instantiation: handle.c:Stream_Init Unexecuted instantiation: thread.c:Stream_Init Unexecuted instantiation: comm_io.c:Stream_Init Unexecuted instantiation: image.c:Stream_Init Unexecuted instantiation: cliprdr_common.c:Stream_Init |
65 | | |
66 | | WINPR_ATTR_NODISCARD static inline size_t Stream_Capacity(const wStream* _s); |
67 | | |
68 | | WINPR_ATTR_NODISCARD |
69 | | WINPR_API size_t Stream_GetRemainingCapacity(const wStream* _s); |
70 | | |
71 | | WINPR_ATTR_NODISCARD |
72 | | WINPR_API size_t Stream_GetRemainingLength(const wStream* _s); |
73 | | |
74 | | WINPR_ATTR_NODISCARD |
75 | | WINPR_API BOOL Stream_EnsureCapacity(wStream* s, size_t size); |
76 | | |
77 | | WINPR_ATTR_NODISCARD |
78 | | WINPR_API BOOL Stream_EnsureRemainingCapacity(wStream* s, size_t size); |
79 | | |
80 | | #define WINPR_STREAM_CAST(t, val) WINPR_PACKED_ALIGN_CAST(t, val) |
81 | | |
82 | | #define Stream_CheckAndLogRequiredCapacityOfSize(tag, s, nmemb, size) \ |
83 | 0 | Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \ |
84 | 0 | __func__, __FILE__, (size_t)__LINE__) |
85 | | #define Stream_CheckAndLogRequiredCapacity(tag, s, len) \ |
86 | | Stream_CheckAndLogRequiredCapacityOfSize((tag), (s), (len), 1) |
87 | | |
88 | | WINPR_ATTR_NODISCARD |
89 | | WINPR_API BOOL Stream_CheckAndLogRequiredCapacityEx(const char* tag, DWORD level, wStream* s, |
90 | | size_t nmemb, size_t size, const char* fmt, |
91 | | ...); |
92 | | |
93 | | WINPR_ATTR_NODISCARD |
94 | | WINPR_API BOOL Stream_CheckAndLogRequiredCapacityExVa(const char* tag, DWORD level, wStream* s, |
95 | | size_t nmemb, size_t size, |
96 | | const char* fmt, va_list args); |
97 | | |
98 | | #define Stream_CheckAndLogRequiredCapacityOfSizeWLog(log, s, nmemb, size) \ |
99 | | Stream_CheckAndLogRequiredCapacityWLogEx(log, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \ |
100 | | __func__, __FILE__, (size_t)__LINE__) |
101 | | |
102 | | #define Stream_CheckAndLogRequiredCapacityWLog(log, s, len) \ |
103 | | Stream_CheckAndLogRequiredCapacityOfSizeWLog((log), (s), (len), 1) |
104 | | |
105 | | WINPR_ATTR_NODISCARD |
106 | | WINPR_API BOOL Stream_CheckAndLogRequiredCapacityWLogEx(wLog* log, DWORD level, wStream* s, |
107 | | size_t nmemb, size_t size, |
108 | | const char* fmt, ...); |
109 | | |
110 | | WINPR_ATTR_NODISCARD |
111 | | WINPR_API BOOL Stream_CheckAndLogRequiredCapacityWLogExVa(wLog* log, DWORD level, wStream* s, |
112 | | size_t nmemb, size_t size, |
113 | | const char* fmt, va_list args); |
114 | | |
115 | | WINPR_API void Stream_Free(wStream* s, BOOL bFreeBuffer); |
116 | | |
117 | | WINPR_ATTR_MALLOC(Stream_Free, 1) |
118 | | WINPR_API wStream* Stream_New(BYTE* buffer, size_t size); |
119 | | |
120 | | WINPR_API wStream* Stream_StaticConstInit(wStream* s, const BYTE* buffer, size_t size); |
121 | | |
122 | | WINPR_API wStream* Stream_StaticInit(wStream* s, BYTE* buffer, size_t size); |
123 | | |
124 | | #define Stream_CheckAndLogRequiredLengthOfSize(tag, s, nmemb, size) \ |
125 | 621 | Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \ |
126 | 621 | __func__, __FILE__, (size_t)__LINE__) |
127 | | #define Stream_CheckAndLogRequiredLength(tag, s, len) \ |
128 | 621 | Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1) |
129 | | |
130 | | WINPR_ATTR_NODISCARD |
131 | | WINPR_API BOOL Stream_CheckAndLogRequiredLengthEx(const char* tag, DWORD level, wStream* s, |
132 | | size_t nmemb, size_t size, const char* fmt, |
133 | | ...); |
134 | | |
135 | | WINPR_ATTR_NODISCARD |
136 | | WINPR_API BOOL Stream_CheckAndLogRequiredLengthExVa(const char* tag, DWORD level, wStream* s, |
137 | | size_t nmemb, size_t size, const char* fmt, |
138 | | va_list args); |
139 | | |
140 | | #define Stream_CheckAndLogRequiredLengthOfSizeWLog(log, s, nmemb, size) \ |
141 | 0 | Stream_CheckAndLogRequiredLengthWLogEx(log, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \ |
142 | 0 | __func__, __FILE__, (size_t)__LINE__) |
143 | | #define Stream_CheckAndLogRequiredLengthWLog(log, s, len) \ |
144 | 0 | Stream_CheckAndLogRequiredLengthOfSizeWLog(log, s, len, 1) |
145 | | |
146 | | WINPR_ATTR_NODISCARD |
147 | | WINPR_API BOOL Stream_CheckAndLogRequiredLengthWLogEx(wLog* log, DWORD level, wStream* s, |
148 | | size_t nmemb, size_t size, |
149 | | const char* fmt, ...); |
150 | | |
151 | | WINPR_ATTR_NODISCARD |
152 | | WINPR_API BOOL Stream_CheckAndLogRequiredLengthWLogExVa(wLog* log, DWORD level, wStream* s, |
153 | | size_t nmemb, size_t size, |
154 | | const char* fmt, va_list args); |
155 | | |
156 | | static inline void Stream_Seek(wStream* s, size_t _offset) |
157 | 5.87M | { |
158 | 5.87M | WINPR_ASSERT(s); |
159 | 5.87M | WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset); |
160 | 5.87M | s->pointer += (_offset); |
161 | 5.87M | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Seek Line | Count | Source | 157 | 4.49M | { | 158 | 4.49M | WINPR_ASSERT(s); | 159 | 4.49M | WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset); | 160 | 4.49M | s->pointer += (_offset); | 161 | 4.49M | } |
Unexecuted instantiation: BinaryAppender.c:Stream_Seek Unexecuted instantiation: event.c:Stream_Seek Unexecuted instantiation: wait.c:Stream_Seek Unexecuted instantiation: generic.c:Stream_Seek Unexecuted instantiation: namedPipeClient.c:Stream_Seek Unexecuted instantiation: comm.c:Stream_Seek Unexecuted instantiation: comm_ioctl.c:Stream_Seek Unexecuted instantiation: comm_serial_sys.c:Stream_Seek Unexecuted instantiation: comm_sercx_sys.c:Stream_Seek Unexecuted instantiation: comm_sercx2_sys.c:Stream_Seek Unexecuted instantiation: pipe.c:Stream_Seek Unexecuted instantiation: ArrayList.c:Stream_Seek Unexecuted instantiation: PacketMessage.c:Stream_Seek Unexecuted instantiation: handle.c:Stream_Seek Unexecuted instantiation: thread.c:Stream_Seek Unexecuted instantiation: comm_io.c:Stream_Seek Unexecuted instantiation: image.c:Stream_Seek cliprdr_common.c:Stream_Seek Line | Count | Source | 157 | 1.38M | { | 158 | 1.38M | WINPR_ASSERT(s); | 159 | 1.38M | WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset); | 160 | 1.38M | s->pointer += (_offset); | 161 | 1.38M | } |
|
162 | | |
163 | | static inline void Stream_Rewind(wStream* s, size_t _offset) |
164 | 0 | { |
165 | 0 | WINPR_ASSERT(s); |
166 | 0 | WINPR_ASSERT(s->buffer <= s->pointer); |
167 | 0 | const size_t cur = WINPR_ASSERTING_INT_CAST(size_t, s->pointer - s->buffer); |
168 | 0 | WINPR_ASSERT(cur >= _offset); |
169 | 0 | if (cur >= _offset) |
170 | 0 | s->pointer -= (_offset); |
171 | 0 | else |
172 | 0 | s->pointer = s->buffer; |
173 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Rewind Unexecuted instantiation: stream.c:Stream_Rewind Unexecuted instantiation: BinaryAppender.c:Stream_Rewind Unexecuted instantiation: event.c:Stream_Rewind Unexecuted instantiation: wait.c:Stream_Rewind Unexecuted instantiation: generic.c:Stream_Rewind Unexecuted instantiation: namedPipeClient.c:Stream_Rewind Unexecuted instantiation: comm.c:Stream_Rewind Unexecuted instantiation: comm_ioctl.c:Stream_Rewind Unexecuted instantiation: comm_serial_sys.c:Stream_Rewind Unexecuted instantiation: comm_sercx_sys.c:Stream_Rewind Unexecuted instantiation: comm_sercx2_sys.c:Stream_Rewind Unexecuted instantiation: pipe.c:Stream_Rewind Unexecuted instantiation: ArrayList.c:Stream_Rewind Unexecuted instantiation: PacketMessage.c:Stream_Rewind Unexecuted instantiation: handle.c:Stream_Rewind Unexecuted instantiation: thread.c:Stream_Rewind Unexecuted instantiation: comm_io.c:Stream_Rewind Unexecuted instantiation: image.c:Stream_Rewind Unexecuted instantiation: cliprdr_common.c:Stream_Rewind |
174 | | |
175 | | WINPR_ATTR_NODISCARD static inline UINT8 stream_read_u8(wStream* _s, BOOL seek) |
176 | 0 | { |
177 | 0 | WINPR_ASSERT(_s); |
178 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= sizeof(UINT8)); |
179 | |
|
180 | 0 | const UINT8 v = winpr_Data_Get_UINT8(_s->pointer); |
181 | 0 | if (seek) |
182 | 0 | Stream_Seek(_s, sizeof(UINT8)); |
183 | 0 | return v; |
184 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u8 Unexecuted instantiation: stream.c:stream_read_u8 Unexecuted instantiation: BinaryAppender.c:stream_read_u8 Unexecuted instantiation: event.c:stream_read_u8 Unexecuted instantiation: wait.c:stream_read_u8 Unexecuted instantiation: generic.c:stream_read_u8 Unexecuted instantiation: namedPipeClient.c:stream_read_u8 Unexecuted instantiation: comm.c:stream_read_u8 Unexecuted instantiation: comm_ioctl.c:stream_read_u8 Unexecuted instantiation: comm_serial_sys.c:stream_read_u8 Unexecuted instantiation: comm_sercx_sys.c:stream_read_u8 Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u8 Unexecuted instantiation: pipe.c:stream_read_u8 Unexecuted instantiation: ArrayList.c:stream_read_u8 Unexecuted instantiation: PacketMessage.c:stream_read_u8 Unexecuted instantiation: handle.c:stream_read_u8 Unexecuted instantiation: thread.c:stream_read_u8 Unexecuted instantiation: comm_io.c:stream_read_u8 Unexecuted instantiation: image.c:stream_read_u8 Unexecuted instantiation: cliprdr_common.c:stream_read_u8 |
185 | | |
186 | | WINPR_ATTR_NODISCARD static inline INT8 stream_read_i8(wStream* _s, BOOL seek) |
187 | 0 | { |
188 | 0 | const INT8 v = winpr_Data_Get_INT8(_s->pointer); |
189 | 0 | if (seek) |
190 | 0 | Stream_Seek(_s, sizeof(INT8)); |
191 | 0 | return v; |
192 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i8 Unexecuted instantiation: stream.c:stream_read_i8 Unexecuted instantiation: BinaryAppender.c:stream_read_i8 Unexecuted instantiation: event.c:stream_read_i8 Unexecuted instantiation: wait.c:stream_read_i8 Unexecuted instantiation: generic.c:stream_read_i8 Unexecuted instantiation: namedPipeClient.c:stream_read_i8 Unexecuted instantiation: comm.c:stream_read_i8 Unexecuted instantiation: comm_ioctl.c:stream_read_i8 Unexecuted instantiation: comm_serial_sys.c:stream_read_i8 Unexecuted instantiation: comm_sercx_sys.c:stream_read_i8 Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i8 Unexecuted instantiation: pipe.c:stream_read_i8 Unexecuted instantiation: ArrayList.c:stream_read_i8 Unexecuted instantiation: PacketMessage.c:stream_read_i8 Unexecuted instantiation: handle.c:stream_read_i8 Unexecuted instantiation: thread.c:stream_read_i8 Unexecuted instantiation: comm_io.c:stream_read_i8 Unexecuted instantiation: image.c:stream_read_i8 Unexecuted instantiation: cliprdr_common.c:stream_read_i8 |
193 | | |
194 | | WINPR_ATTR_NODISCARD static inline UINT16 stream_read_u16_le(wStream* _s, BOOL seek) |
195 | 0 | { |
196 | 0 | const size_t typesize = sizeof(UINT16); |
197 | 0 | WINPR_ASSERT(_s); |
198 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
199 | |
|
200 | 0 | const UINT16 v = winpr_Data_Get_UINT16(_s->pointer); |
201 | 0 | if (seek) |
202 | 0 | Stream_Seek(_s, typesize); |
203 | 0 | return v; |
204 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u16_le Unexecuted instantiation: stream.c:stream_read_u16_le Unexecuted instantiation: BinaryAppender.c:stream_read_u16_le Unexecuted instantiation: event.c:stream_read_u16_le Unexecuted instantiation: wait.c:stream_read_u16_le Unexecuted instantiation: generic.c:stream_read_u16_le Unexecuted instantiation: namedPipeClient.c:stream_read_u16_le Unexecuted instantiation: comm.c:stream_read_u16_le Unexecuted instantiation: comm_ioctl.c:stream_read_u16_le Unexecuted instantiation: comm_serial_sys.c:stream_read_u16_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_u16_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u16_le Unexecuted instantiation: pipe.c:stream_read_u16_le Unexecuted instantiation: ArrayList.c:stream_read_u16_le Unexecuted instantiation: PacketMessage.c:stream_read_u16_le Unexecuted instantiation: handle.c:stream_read_u16_le Unexecuted instantiation: thread.c:stream_read_u16_le Unexecuted instantiation: comm_io.c:stream_read_u16_le Unexecuted instantiation: image.c:stream_read_u16_le Unexecuted instantiation: cliprdr_common.c:stream_read_u16_le |
205 | | |
206 | | WINPR_ATTR_NODISCARD static inline UINT16 stream_read_u16_be(wStream* _s, BOOL seek) |
207 | 0 | { |
208 | 0 | const size_t typesize = sizeof(UINT16); |
209 | 0 | WINPR_ASSERT(_s); |
210 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
211 | 0 |
|
212 | 0 | const UINT16 v = winpr_Data_Get_UINT16_BE(_s->pointer); |
213 | 0 | if (seek) |
214 | 0 | Stream_Seek(_s, typesize); |
215 | 0 | return v; |
216 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u16_be Unexecuted instantiation: stream.c:stream_read_u16_be Unexecuted instantiation: BinaryAppender.c:stream_read_u16_be Unexecuted instantiation: event.c:stream_read_u16_be Unexecuted instantiation: wait.c:stream_read_u16_be Unexecuted instantiation: generic.c:stream_read_u16_be Unexecuted instantiation: namedPipeClient.c:stream_read_u16_be Unexecuted instantiation: comm.c:stream_read_u16_be Unexecuted instantiation: comm_ioctl.c:stream_read_u16_be Unexecuted instantiation: comm_serial_sys.c:stream_read_u16_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_u16_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u16_be Unexecuted instantiation: pipe.c:stream_read_u16_be Unexecuted instantiation: ArrayList.c:stream_read_u16_be Unexecuted instantiation: PacketMessage.c:stream_read_u16_be Unexecuted instantiation: handle.c:stream_read_u16_be Unexecuted instantiation: thread.c:stream_read_u16_be Unexecuted instantiation: comm_io.c:stream_read_u16_be Unexecuted instantiation: image.c:stream_read_u16_be Unexecuted instantiation: cliprdr_common.c:stream_read_u16_be |
217 | | |
218 | | WINPR_ATTR_NODISCARD static inline INT16 stream_read_i16_le(wStream* _s, BOOL seek) |
219 | 0 | { |
220 | 0 | const size_t typesize = sizeof(INT16); |
221 | 0 | WINPR_ASSERT(_s); |
222 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
223 | 0 |
|
224 | 0 | const INT16 v = winpr_Data_Get_INT16(_s->pointer); |
225 | 0 | if (seek) |
226 | 0 | Stream_Seek(_s, typesize); |
227 | 0 | return v; |
228 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i16_le Unexecuted instantiation: stream.c:stream_read_i16_le Unexecuted instantiation: BinaryAppender.c:stream_read_i16_le Unexecuted instantiation: event.c:stream_read_i16_le Unexecuted instantiation: wait.c:stream_read_i16_le Unexecuted instantiation: generic.c:stream_read_i16_le Unexecuted instantiation: namedPipeClient.c:stream_read_i16_le Unexecuted instantiation: comm.c:stream_read_i16_le Unexecuted instantiation: comm_ioctl.c:stream_read_i16_le Unexecuted instantiation: comm_serial_sys.c:stream_read_i16_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_i16_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i16_le Unexecuted instantiation: pipe.c:stream_read_i16_le Unexecuted instantiation: ArrayList.c:stream_read_i16_le Unexecuted instantiation: PacketMessage.c:stream_read_i16_le Unexecuted instantiation: handle.c:stream_read_i16_le Unexecuted instantiation: thread.c:stream_read_i16_le Unexecuted instantiation: comm_io.c:stream_read_i16_le Unexecuted instantiation: image.c:stream_read_i16_le Unexecuted instantiation: cliprdr_common.c:stream_read_i16_le |
229 | | |
230 | | WINPR_ATTR_NODISCARD static inline INT16 stream_read_i16_be(wStream* _s, BOOL seek) |
231 | 0 | { |
232 | 0 | const size_t typesize = sizeof(INT16); |
233 | 0 | WINPR_ASSERT(_s); |
234 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
235 | 0 |
|
236 | 0 | const INT16 v = winpr_Data_Get_INT16_BE(_s->pointer); |
237 | 0 | if (seek) |
238 | 0 | Stream_Seek(_s, typesize); |
239 | 0 | return v; |
240 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i16_be Unexecuted instantiation: stream.c:stream_read_i16_be Unexecuted instantiation: BinaryAppender.c:stream_read_i16_be Unexecuted instantiation: event.c:stream_read_i16_be Unexecuted instantiation: wait.c:stream_read_i16_be Unexecuted instantiation: generic.c:stream_read_i16_be Unexecuted instantiation: namedPipeClient.c:stream_read_i16_be Unexecuted instantiation: comm.c:stream_read_i16_be Unexecuted instantiation: comm_ioctl.c:stream_read_i16_be Unexecuted instantiation: comm_serial_sys.c:stream_read_i16_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_i16_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i16_be Unexecuted instantiation: pipe.c:stream_read_i16_be Unexecuted instantiation: ArrayList.c:stream_read_i16_be Unexecuted instantiation: PacketMessage.c:stream_read_i16_be Unexecuted instantiation: handle.c:stream_read_i16_be Unexecuted instantiation: thread.c:stream_read_i16_be Unexecuted instantiation: comm_io.c:stream_read_i16_be Unexecuted instantiation: image.c:stream_read_i16_be Unexecuted instantiation: cliprdr_common.c:stream_read_i16_be |
241 | | |
242 | | WINPR_ATTR_NODISCARD static inline UINT32 stream_read_u32_le(wStream* _s, BOOL seek) |
243 | 1.38M | { |
244 | 1.38M | const size_t typesize = sizeof(UINT32); |
245 | 1.38M | WINPR_ASSERT(_s); |
246 | 1.38M | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
247 | | |
248 | 1.38M | const UINT32 v = winpr_Data_Get_UINT32(_s->pointer); |
249 | 1.38M | if (seek) |
250 | 1.38M | Stream_Seek(_s, typesize); |
251 | 1.38M | return v; |
252 | 1.38M | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u32_le Unexecuted instantiation: stream.c:stream_read_u32_le Unexecuted instantiation: BinaryAppender.c:stream_read_u32_le Unexecuted instantiation: event.c:stream_read_u32_le Unexecuted instantiation: wait.c:stream_read_u32_le Unexecuted instantiation: generic.c:stream_read_u32_le Unexecuted instantiation: namedPipeClient.c:stream_read_u32_le Unexecuted instantiation: comm.c:stream_read_u32_le Unexecuted instantiation: comm_ioctl.c:stream_read_u32_le Unexecuted instantiation: comm_serial_sys.c:stream_read_u32_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_u32_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u32_le Unexecuted instantiation: pipe.c:stream_read_u32_le Unexecuted instantiation: ArrayList.c:stream_read_u32_le Unexecuted instantiation: PacketMessage.c:stream_read_u32_le Unexecuted instantiation: handle.c:stream_read_u32_le Unexecuted instantiation: thread.c:stream_read_u32_le Unexecuted instantiation: comm_io.c:stream_read_u32_le Unexecuted instantiation: image.c:stream_read_u32_le cliprdr_common.c:stream_read_u32_le Line | Count | Source | 243 | 1.38M | { | 244 | 1.38M | const size_t typesize = sizeof(UINT32); | 245 | 1.38M | WINPR_ASSERT(_s); | 246 | 1.38M | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); | 247 | | | 248 | 1.38M | const UINT32 v = winpr_Data_Get_UINT32(_s->pointer); | 249 | 1.38M | if (seek) | 250 | 1.38M | Stream_Seek(_s, typesize); | 251 | 1.38M | return v; | 252 | 1.38M | } |
|
253 | | |
254 | | WINPR_ATTR_NODISCARD static inline UINT32 stream_read_u32_be(wStream* _s, BOOL seek) |
255 | 0 | { |
256 | 0 | const size_t typesize = sizeof(UINT32); |
257 | 0 | WINPR_ASSERT(_s); |
258 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
259 | 0 |
|
260 | 0 | const UINT32 v = winpr_Data_Get_UINT32_BE(_s->pointer); |
261 | 0 | if (seek) |
262 | 0 | Stream_Seek(_s, typesize); |
263 | 0 | return v; |
264 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u32_be Unexecuted instantiation: stream.c:stream_read_u32_be Unexecuted instantiation: BinaryAppender.c:stream_read_u32_be Unexecuted instantiation: event.c:stream_read_u32_be Unexecuted instantiation: wait.c:stream_read_u32_be Unexecuted instantiation: generic.c:stream_read_u32_be Unexecuted instantiation: namedPipeClient.c:stream_read_u32_be Unexecuted instantiation: comm.c:stream_read_u32_be Unexecuted instantiation: comm_ioctl.c:stream_read_u32_be Unexecuted instantiation: comm_serial_sys.c:stream_read_u32_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_u32_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u32_be Unexecuted instantiation: pipe.c:stream_read_u32_be Unexecuted instantiation: ArrayList.c:stream_read_u32_be Unexecuted instantiation: PacketMessage.c:stream_read_u32_be Unexecuted instantiation: handle.c:stream_read_u32_be Unexecuted instantiation: thread.c:stream_read_u32_be Unexecuted instantiation: comm_io.c:stream_read_u32_be Unexecuted instantiation: image.c:stream_read_u32_be Unexecuted instantiation: cliprdr_common.c:stream_read_u32_be |
265 | | |
266 | | WINPR_ATTR_NODISCARD static inline INT32 stream_read_i32_le(wStream* _s, BOOL seek) |
267 | 0 | { |
268 | 0 | const size_t typesize = sizeof(INT32); |
269 | 0 | WINPR_ASSERT(_s); |
270 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
271 | |
|
272 | 0 | const INT32 v = winpr_Data_Get_INT32(_s->pointer); |
273 | 0 | if (seek) |
274 | 0 | Stream_Seek(_s, typesize); |
275 | 0 | return v; |
276 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i32_le Unexecuted instantiation: stream.c:stream_read_i32_le Unexecuted instantiation: BinaryAppender.c:stream_read_i32_le Unexecuted instantiation: event.c:stream_read_i32_le Unexecuted instantiation: wait.c:stream_read_i32_le Unexecuted instantiation: generic.c:stream_read_i32_le Unexecuted instantiation: namedPipeClient.c:stream_read_i32_le Unexecuted instantiation: comm.c:stream_read_i32_le Unexecuted instantiation: comm_ioctl.c:stream_read_i32_le Unexecuted instantiation: comm_serial_sys.c:stream_read_i32_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_i32_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i32_le Unexecuted instantiation: pipe.c:stream_read_i32_le Unexecuted instantiation: ArrayList.c:stream_read_i32_le Unexecuted instantiation: PacketMessage.c:stream_read_i32_le Unexecuted instantiation: handle.c:stream_read_i32_le Unexecuted instantiation: thread.c:stream_read_i32_le Unexecuted instantiation: comm_io.c:stream_read_i32_le Unexecuted instantiation: image.c:stream_read_i32_le Unexecuted instantiation: cliprdr_common.c:stream_read_i32_le |
277 | | |
278 | | WINPR_ATTR_NODISCARD static inline INT32 stream_read_i32_be(wStream* _s, BOOL seek) |
279 | 0 | { |
280 | 0 | const size_t typesize = sizeof(INT32); |
281 | 0 | WINPR_ASSERT(_s); |
282 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
283 | 0 |
|
284 | 0 | const INT32 v = winpr_Data_Get_INT32_BE(_s->pointer); |
285 | 0 | if (seek) |
286 | 0 | Stream_Seek(_s, typesize); |
287 | 0 | return v; |
288 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i32_be Unexecuted instantiation: stream.c:stream_read_i32_be Unexecuted instantiation: BinaryAppender.c:stream_read_i32_be Unexecuted instantiation: event.c:stream_read_i32_be Unexecuted instantiation: wait.c:stream_read_i32_be Unexecuted instantiation: generic.c:stream_read_i32_be Unexecuted instantiation: namedPipeClient.c:stream_read_i32_be Unexecuted instantiation: comm.c:stream_read_i32_be Unexecuted instantiation: comm_ioctl.c:stream_read_i32_be Unexecuted instantiation: comm_serial_sys.c:stream_read_i32_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_i32_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i32_be Unexecuted instantiation: pipe.c:stream_read_i32_be Unexecuted instantiation: ArrayList.c:stream_read_i32_be Unexecuted instantiation: PacketMessage.c:stream_read_i32_be Unexecuted instantiation: handle.c:stream_read_i32_be Unexecuted instantiation: thread.c:stream_read_i32_be Unexecuted instantiation: comm_io.c:stream_read_i32_be Unexecuted instantiation: image.c:stream_read_i32_be Unexecuted instantiation: cliprdr_common.c:stream_read_i32_be |
289 | | |
290 | | WINPR_ATTR_NODISCARD static inline UINT64 stream_read_u64_le(wStream* _s, BOOL seek) |
291 | 0 | { |
292 | 0 | const size_t typesize = sizeof(UINT64); |
293 | 0 | WINPR_ASSERT(_s); |
294 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
295 | 0 |
|
296 | 0 | const UINT64 v = winpr_Data_Get_UINT64(_s->pointer); |
297 | 0 | if (seek) |
298 | 0 | Stream_Seek(_s, typesize); |
299 | 0 | return v; |
300 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u64_le Unexecuted instantiation: stream.c:stream_read_u64_le Unexecuted instantiation: BinaryAppender.c:stream_read_u64_le Unexecuted instantiation: event.c:stream_read_u64_le Unexecuted instantiation: wait.c:stream_read_u64_le Unexecuted instantiation: generic.c:stream_read_u64_le Unexecuted instantiation: namedPipeClient.c:stream_read_u64_le Unexecuted instantiation: comm.c:stream_read_u64_le Unexecuted instantiation: comm_ioctl.c:stream_read_u64_le Unexecuted instantiation: comm_serial_sys.c:stream_read_u64_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_u64_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u64_le Unexecuted instantiation: pipe.c:stream_read_u64_le Unexecuted instantiation: ArrayList.c:stream_read_u64_le Unexecuted instantiation: PacketMessage.c:stream_read_u64_le Unexecuted instantiation: handle.c:stream_read_u64_le Unexecuted instantiation: thread.c:stream_read_u64_le Unexecuted instantiation: comm_io.c:stream_read_u64_le Unexecuted instantiation: image.c:stream_read_u64_le Unexecuted instantiation: cliprdr_common.c:stream_read_u64_le |
301 | | |
302 | | WINPR_ATTR_NODISCARD static inline UINT64 stream_read_u64_be(wStream* _s, BOOL seek) |
303 | 0 | { |
304 | 0 | const size_t typesize = sizeof(UINT64); |
305 | 0 | WINPR_ASSERT(_s); |
306 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
307 | 0 |
|
308 | 0 | const UINT64 v = winpr_Data_Get_UINT64_BE(_s->pointer); |
309 | 0 | if (seek) |
310 | 0 | Stream_Seek(_s, typesize); |
311 | 0 | return v; |
312 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_u64_be Unexecuted instantiation: stream.c:stream_read_u64_be Unexecuted instantiation: BinaryAppender.c:stream_read_u64_be Unexecuted instantiation: event.c:stream_read_u64_be Unexecuted instantiation: wait.c:stream_read_u64_be Unexecuted instantiation: generic.c:stream_read_u64_be Unexecuted instantiation: namedPipeClient.c:stream_read_u64_be Unexecuted instantiation: comm.c:stream_read_u64_be Unexecuted instantiation: comm_ioctl.c:stream_read_u64_be Unexecuted instantiation: comm_serial_sys.c:stream_read_u64_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_u64_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_u64_be Unexecuted instantiation: pipe.c:stream_read_u64_be Unexecuted instantiation: ArrayList.c:stream_read_u64_be Unexecuted instantiation: PacketMessage.c:stream_read_u64_be Unexecuted instantiation: handle.c:stream_read_u64_be Unexecuted instantiation: thread.c:stream_read_u64_be Unexecuted instantiation: comm_io.c:stream_read_u64_be Unexecuted instantiation: image.c:stream_read_u64_be Unexecuted instantiation: cliprdr_common.c:stream_read_u64_be |
313 | | |
314 | | WINPR_ATTR_NODISCARD static inline INT64 stream_read_i64_le(wStream* _s, BOOL seek) |
315 | 0 | { |
316 | 0 | const size_t typesize = sizeof(INT64); |
317 | 0 | WINPR_ASSERT(_s); |
318 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
319 | 0 |
|
320 | 0 | const INT64 v = winpr_Data_Get_INT64(_s->pointer); |
321 | 0 | if (seek) |
322 | 0 | Stream_Seek(_s, typesize); |
323 | 0 | return v; |
324 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i64_le Unexecuted instantiation: stream.c:stream_read_i64_le Unexecuted instantiation: BinaryAppender.c:stream_read_i64_le Unexecuted instantiation: event.c:stream_read_i64_le Unexecuted instantiation: wait.c:stream_read_i64_le Unexecuted instantiation: generic.c:stream_read_i64_le Unexecuted instantiation: namedPipeClient.c:stream_read_i64_le Unexecuted instantiation: comm.c:stream_read_i64_le Unexecuted instantiation: comm_ioctl.c:stream_read_i64_le Unexecuted instantiation: comm_serial_sys.c:stream_read_i64_le Unexecuted instantiation: comm_sercx_sys.c:stream_read_i64_le Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i64_le Unexecuted instantiation: pipe.c:stream_read_i64_le Unexecuted instantiation: ArrayList.c:stream_read_i64_le Unexecuted instantiation: PacketMessage.c:stream_read_i64_le Unexecuted instantiation: handle.c:stream_read_i64_le Unexecuted instantiation: thread.c:stream_read_i64_le Unexecuted instantiation: comm_io.c:stream_read_i64_le Unexecuted instantiation: image.c:stream_read_i64_le Unexecuted instantiation: cliprdr_common.c:stream_read_i64_le |
325 | | |
326 | | WINPR_ATTR_NODISCARD static inline INT64 stream_read_i64_be(wStream* _s, BOOL seek) |
327 | 0 | { |
328 | 0 | const size_t typesize = sizeof(INT64); |
329 | 0 | WINPR_ASSERT(_s); |
330 | 0 | WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize); |
331 | 0 |
|
332 | 0 | const INT64 v = winpr_Data_Get_INT64_BE(_s->pointer); |
333 | 0 | if (seek) |
334 | 0 | Stream_Seek(_s, typesize); |
335 | 0 | return v; |
336 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:stream_read_i64_be Unexecuted instantiation: stream.c:stream_read_i64_be Unexecuted instantiation: BinaryAppender.c:stream_read_i64_be Unexecuted instantiation: event.c:stream_read_i64_be Unexecuted instantiation: wait.c:stream_read_i64_be Unexecuted instantiation: generic.c:stream_read_i64_be Unexecuted instantiation: namedPipeClient.c:stream_read_i64_be Unexecuted instantiation: comm.c:stream_read_i64_be Unexecuted instantiation: comm_ioctl.c:stream_read_i64_be Unexecuted instantiation: comm_serial_sys.c:stream_read_i64_be Unexecuted instantiation: comm_sercx_sys.c:stream_read_i64_be Unexecuted instantiation: comm_sercx2_sys.c:stream_read_i64_be Unexecuted instantiation: pipe.c:stream_read_i64_be Unexecuted instantiation: ArrayList.c:stream_read_i64_be Unexecuted instantiation: PacketMessage.c:stream_read_i64_be Unexecuted instantiation: handle.c:stream_read_i64_be Unexecuted instantiation: thread.c:stream_read_i64_be Unexecuted instantiation: comm_io.c:stream_read_i64_be Unexecuted instantiation: image.c:stream_read_i64_be Unexecuted instantiation: cliprdr_common.c:stream_read_i64_be |
337 | | |
338 | | /** |
339 | | * @brief Stream_Get_UINT8 |
340 | | * @param _s The stream to read from |
341 | | * @return an integer |
342 | | * @since version 3.9.0 |
343 | | */ |
344 | | WINPR_ATTR_NODISCARD static inline UINT8 Stream_Get_UINT8(wStream* _s) |
345 | 0 | { |
346 | 0 | return stream_read_u8(_s, TRUE); |
347 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT8 Unexecuted instantiation: stream.c:Stream_Get_UINT8 Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT8 Unexecuted instantiation: event.c:Stream_Get_UINT8 Unexecuted instantiation: wait.c:Stream_Get_UINT8 Unexecuted instantiation: generic.c:Stream_Get_UINT8 Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT8 Unexecuted instantiation: comm.c:Stream_Get_UINT8 Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT8 Unexecuted instantiation: pipe.c:Stream_Get_UINT8 Unexecuted instantiation: ArrayList.c:Stream_Get_UINT8 Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT8 Unexecuted instantiation: handle.c:Stream_Get_UINT8 Unexecuted instantiation: thread.c:Stream_Get_UINT8 Unexecuted instantiation: comm_io.c:Stream_Get_UINT8 Unexecuted instantiation: image.c:Stream_Get_UINT8 Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT8 |
348 | | |
349 | | /** |
350 | | * @brief Stream_Get_INT8 |
351 | | * @param _s The stream to read from |
352 | | * @return an integer |
353 | | * @since version 3.9.0 |
354 | | */ |
355 | | WINPR_ATTR_NODISCARD static inline INT8 Stream_Get_INT8(wStream* _s) |
356 | 0 | { |
357 | 0 | return stream_read_i8(_s, TRUE); |
358 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT8 Unexecuted instantiation: stream.c:Stream_Get_INT8 Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT8 Unexecuted instantiation: event.c:Stream_Get_INT8 Unexecuted instantiation: wait.c:Stream_Get_INT8 Unexecuted instantiation: generic.c:Stream_Get_INT8 Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT8 Unexecuted instantiation: comm.c:Stream_Get_INT8 Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT8 Unexecuted instantiation: pipe.c:Stream_Get_INT8 Unexecuted instantiation: ArrayList.c:Stream_Get_INT8 Unexecuted instantiation: PacketMessage.c:Stream_Get_INT8 Unexecuted instantiation: handle.c:Stream_Get_INT8 Unexecuted instantiation: thread.c:Stream_Get_INT8 Unexecuted instantiation: comm_io.c:Stream_Get_INT8 Unexecuted instantiation: image.c:Stream_Get_INT8 Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT8 |
359 | | |
360 | | /** |
361 | | * @brief Stream_Get_UINT16 |
362 | | * @param _s The stream to read from |
363 | | * @return an integer |
364 | | * @since version 3.9.0 |
365 | | */ |
366 | | WINPR_ATTR_NODISCARD static inline UINT16 Stream_Get_UINT16(wStream* _s) |
367 | 0 | { |
368 | 0 | return stream_read_u16_le(_s, TRUE); |
369 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT16 Unexecuted instantiation: stream.c:Stream_Get_UINT16 Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT16 Unexecuted instantiation: event.c:Stream_Get_UINT16 Unexecuted instantiation: wait.c:Stream_Get_UINT16 Unexecuted instantiation: generic.c:Stream_Get_UINT16 Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT16 Unexecuted instantiation: comm.c:Stream_Get_UINT16 Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT16 Unexecuted instantiation: pipe.c:Stream_Get_UINT16 Unexecuted instantiation: ArrayList.c:Stream_Get_UINT16 Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT16 Unexecuted instantiation: handle.c:Stream_Get_UINT16 Unexecuted instantiation: thread.c:Stream_Get_UINT16 Unexecuted instantiation: comm_io.c:Stream_Get_UINT16 Unexecuted instantiation: image.c:Stream_Get_UINT16 Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT16 |
370 | | |
371 | | /** |
372 | | * @brief Stream_Get_INT16 |
373 | | * @param _s The stream to read from |
374 | | * @return an integer |
375 | | * @since version 3.9.0 |
376 | | */ |
377 | | WINPR_ATTR_NODISCARD static inline INT16 Stream_Get_INT16(wStream* _s) |
378 | 0 | { |
379 | 0 | return stream_read_i16_le(_s, TRUE); |
380 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT16 Unexecuted instantiation: stream.c:Stream_Get_INT16 Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT16 Unexecuted instantiation: event.c:Stream_Get_INT16 Unexecuted instantiation: wait.c:Stream_Get_INT16 Unexecuted instantiation: generic.c:Stream_Get_INT16 Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT16 Unexecuted instantiation: comm.c:Stream_Get_INT16 Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT16 Unexecuted instantiation: pipe.c:Stream_Get_INT16 Unexecuted instantiation: ArrayList.c:Stream_Get_INT16 Unexecuted instantiation: PacketMessage.c:Stream_Get_INT16 Unexecuted instantiation: handle.c:Stream_Get_INT16 Unexecuted instantiation: thread.c:Stream_Get_INT16 Unexecuted instantiation: comm_io.c:Stream_Get_INT16 Unexecuted instantiation: image.c:Stream_Get_INT16 Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT16 |
381 | | |
382 | | /** |
383 | | * @brief Stream_Get_UINT16 big endian |
384 | | * @param _s The stream to read from |
385 | | * @return an integer |
386 | | * @since version 3.9.0 |
387 | | */ |
388 | | WINPR_ATTR_NODISCARD static inline UINT16 Stream_Get_UINT16_BE(wStream* _s) |
389 | 0 | { |
390 | 0 | return stream_read_u16_be(_s, TRUE); |
391 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT16_BE Unexecuted instantiation: stream.c:Stream_Get_UINT16_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT16_BE Unexecuted instantiation: event.c:Stream_Get_UINT16_BE Unexecuted instantiation: wait.c:Stream_Get_UINT16_BE Unexecuted instantiation: generic.c:Stream_Get_UINT16_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT16_BE Unexecuted instantiation: pipe.c:Stream_Get_UINT16_BE Unexecuted instantiation: ArrayList.c:Stream_Get_UINT16_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT16_BE Unexecuted instantiation: handle.c:Stream_Get_UINT16_BE Unexecuted instantiation: thread.c:Stream_Get_UINT16_BE Unexecuted instantiation: comm_io.c:Stream_Get_UINT16_BE Unexecuted instantiation: image.c:Stream_Get_UINT16_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT16_BE |
392 | | |
393 | | /** |
394 | | * @brief Stream_Get_INT16 big endian |
395 | | * @param _s The stream to read from |
396 | | * @return an integer |
397 | | * @since version 3.9.0 |
398 | | */ |
399 | | WINPR_ATTR_NODISCARD static inline INT16 Stream_Get_INT16_BE(wStream* _s) |
400 | 0 | { |
401 | 0 | return stream_read_i16_be(_s, TRUE); |
402 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT16_BE Unexecuted instantiation: stream.c:Stream_Get_INT16_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT16_BE Unexecuted instantiation: event.c:Stream_Get_INT16_BE Unexecuted instantiation: wait.c:Stream_Get_INT16_BE Unexecuted instantiation: generic.c:Stream_Get_INT16_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT16_BE Unexecuted instantiation: comm.c:Stream_Get_INT16_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT16_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT16_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT16_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT16_BE Unexecuted instantiation: pipe.c:Stream_Get_INT16_BE Unexecuted instantiation: ArrayList.c:Stream_Get_INT16_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_INT16_BE Unexecuted instantiation: handle.c:Stream_Get_INT16_BE Unexecuted instantiation: thread.c:Stream_Get_INT16_BE Unexecuted instantiation: comm_io.c:Stream_Get_INT16_BE Unexecuted instantiation: image.c:Stream_Get_INT16_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT16_BE |
403 | | |
404 | | /** |
405 | | * @brief Stream_Get_UINT32 |
406 | | * @param _s The stream to read from |
407 | | * @return an integer |
408 | | * @since version 3.9.0 |
409 | | */ |
410 | | WINPR_ATTR_NODISCARD static inline UINT32 Stream_Get_UINT32(wStream* _s) |
411 | 0 | { |
412 | 0 | return stream_read_u32_le(_s, TRUE); |
413 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT32 Unexecuted instantiation: stream.c:Stream_Get_UINT32 Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT32 Unexecuted instantiation: event.c:Stream_Get_UINT32 Unexecuted instantiation: wait.c:Stream_Get_UINT32 Unexecuted instantiation: generic.c:Stream_Get_UINT32 Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT32 Unexecuted instantiation: comm.c:Stream_Get_UINT32 Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT32 Unexecuted instantiation: pipe.c:Stream_Get_UINT32 Unexecuted instantiation: ArrayList.c:Stream_Get_UINT32 Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT32 Unexecuted instantiation: handle.c:Stream_Get_UINT32 Unexecuted instantiation: thread.c:Stream_Get_UINT32 Unexecuted instantiation: comm_io.c:Stream_Get_UINT32 Unexecuted instantiation: image.c:Stream_Get_UINT32 Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT32 |
414 | | |
415 | | /** |
416 | | * @brief Stream_Get_INT32 |
417 | | * @param _s The stream to read from |
418 | | * @return an integer |
419 | | * @since version 3.9.0 |
420 | | */ |
421 | | WINPR_ATTR_NODISCARD static inline INT32 Stream_Get_INT32(wStream* _s) |
422 | 0 | { |
423 | 0 | return stream_read_i32_le(_s, TRUE); |
424 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT32 Unexecuted instantiation: stream.c:Stream_Get_INT32 Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT32 Unexecuted instantiation: event.c:Stream_Get_INT32 Unexecuted instantiation: wait.c:Stream_Get_INT32 Unexecuted instantiation: generic.c:Stream_Get_INT32 Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT32 Unexecuted instantiation: comm.c:Stream_Get_INT32 Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT32 Unexecuted instantiation: pipe.c:Stream_Get_INT32 Unexecuted instantiation: ArrayList.c:Stream_Get_INT32 Unexecuted instantiation: PacketMessage.c:Stream_Get_INT32 Unexecuted instantiation: handle.c:Stream_Get_INT32 Unexecuted instantiation: thread.c:Stream_Get_INT32 Unexecuted instantiation: comm_io.c:Stream_Get_INT32 Unexecuted instantiation: image.c:Stream_Get_INT32 Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT32 |
425 | | |
426 | | /** |
427 | | * @brief Stream_Get_UINT32 big endian |
428 | | * @param _s The stream to read from |
429 | | * @return an integer |
430 | | * @since version 3.9.0 |
431 | | */ |
432 | | WINPR_ATTR_NODISCARD static inline UINT32 Stream_Get_UINT32_BE(wStream* _s) |
433 | 0 | { |
434 | 0 | return stream_read_u32_be(_s, TRUE); |
435 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT32_BE Unexecuted instantiation: stream.c:Stream_Get_UINT32_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT32_BE Unexecuted instantiation: event.c:Stream_Get_UINT32_BE Unexecuted instantiation: wait.c:Stream_Get_UINT32_BE Unexecuted instantiation: generic.c:Stream_Get_UINT32_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT32_BE Unexecuted instantiation: pipe.c:Stream_Get_UINT32_BE Unexecuted instantiation: ArrayList.c:Stream_Get_UINT32_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT32_BE Unexecuted instantiation: handle.c:Stream_Get_UINT32_BE Unexecuted instantiation: thread.c:Stream_Get_UINT32_BE Unexecuted instantiation: comm_io.c:Stream_Get_UINT32_BE Unexecuted instantiation: image.c:Stream_Get_UINT32_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT32_BE |
436 | | |
437 | | /** |
438 | | * @brief Stream_Get_INT32 big endian |
439 | | * @param _s The stream to read from |
440 | | * @return an integer |
441 | | * @since version 3.9.0 |
442 | | */ |
443 | | WINPR_ATTR_NODISCARD static inline INT32 Stream_Get_INT32_BE(wStream* _s) |
444 | 0 | { |
445 | 0 | return stream_read_i32_be(_s, TRUE); |
446 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT32_BE Unexecuted instantiation: stream.c:Stream_Get_INT32_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT32_BE Unexecuted instantiation: event.c:Stream_Get_INT32_BE Unexecuted instantiation: wait.c:Stream_Get_INT32_BE Unexecuted instantiation: generic.c:Stream_Get_INT32_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT32_BE Unexecuted instantiation: comm.c:Stream_Get_INT32_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT32_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT32_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT32_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT32_BE Unexecuted instantiation: pipe.c:Stream_Get_INT32_BE Unexecuted instantiation: ArrayList.c:Stream_Get_INT32_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_INT32_BE Unexecuted instantiation: handle.c:Stream_Get_INT32_BE Unexecuted instantiation: thread.c:Stream_Get_INT32_BE Unexecuted instantiation: comm_io.c:Stream_Get_INT32_BE Unexecuted instantiation: image.c:Stream_Get_INT32_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT32_BE |
447 | | |
448 | | /** |
449 | | * @brief Stream_Get_UINT64 |
450 | | * @param _s The stream to read from |
451 | | * @return an integer |
452 | | * @since version 3.9.0 |
453 | | */ |
454 | | WINPR_ATTR_NODISCARD static inline UINT64 Stream_Get_UINT64(wStream* _s) |
455 | 0 | { |
456 | 0 | return stream_read_u64_le(_s, TRUE); |
457 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT64 Unexecuted instantiation: stream.c:Stream_Get_UINT64 Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT64 Unexecuted instantiation: event.c:Stream_Get_UINT64 Unexecuted instantiation: wait.c:Stream_Get_UINT64 Unexecuted instantiation: generic.c:Stream_Get_UINT64 Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT64 Unexecuted instantiation: comm.c:Stream_Get_UINT64 Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT64 Unexecuted instantiation: pipe.c:Stream_Get_UINT64 Unexecuted instantiation: ArrayList.c:Stream_Get_UINT64 Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT64 Unexecuted instantiation: handle.c:Stream_Get_UINT64 Unexecuted instantiation: thread.c:Stream_Get_UINT64 Unexecuted instantiation: comm_io.c:Stream_Get_UINT64 Unexecuted instantiation: image.c:Stream_Get_UINT64 Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT64 |
458 | | |
459 | | /** |
460 | | * @brief Stream_Get_INT64 |
461 | | * @param _s The stream to read from |
462 | | * @return an integer |
463 | | * @since version 3.9.0 |
464 | | */ |
465 | | WINPR_ATTR_NODISCARD static inline INT64 Stream_Get_INT64(wStream* _s) |
466 | 0 | { |
467 | 0 | return stream_read_i64_le(_s, TRUE); |
468 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT64 Unexecuted instantiation: stream.c:Stream_Get_INT64 Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT64 Unexecuted instantiation: event.c:Stream_Get_INT64 Unexecuted instantiation: wait.c:Stream_Get_INT64 Unexecuted instantiation: generic.c:Stream_Get_INT64 Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT64 Unexecuted instantiation: comm.c:Stream_Get_INT64 Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT64 Unexecuted instantiation: pipe.c:Stream_Get_INT64 Unexecuted instantiation: ArrayList.c:Stream_Get_INT64 Unexecuted instantiation: PacketMessage.c:Stream_Get_INT64 Unexecuted instantiation: handle.c:Stream_Get_INT64 Unexecuted instantiation: thread.c:Stream_Get_INT64 Unexecuted instantiation: comm_io.c:Stream_Get_INT64 Unexecuted instantiation: image.c:Stream_Get_INT64 Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT64 |
469 | | |
470 | | /** |
471 | | * @brief Stream_Get_UINT64 big endian |
472 | | * @param _s The stream to read from |
473 | | * @return an integer |
474 | | * @since version 3.9.0 |
475 | | */ |
476 | | WINPR_ATTR_NODISCARD static inline UINT64 Stream_Get_UINT64_BE(wStream* _s) |
477 | 0 | { |
478 | 0 | return stream_read_u64_be(_s, TRUE); |
479 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_UINT64_BE Unexecuted instantiation: stream.c:Stream_Get_UINT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_UINT64_BE Unexecuted instantiation: event.c:Stream_Get_UINT64_BE Unexecuted instantiation: wait.c:Stream_Get_UINT64_BE Unexecuted instantiation: generic.c:Stream_Get_UINT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_UINT64_BE Unexecuted instantiation: pipe.c:Stream_Get_UINT64_BE Unexecuted instantiation: ArrayList.c:Stream_Get_UINT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_UINT64_BE Unexecuted instantiation: handle.c:Stream_Get_UINT64_BE Unexecuted instantiation: thread.c:Stream_Get_UINT64_BE Unexecuted instantiation: comm_io.c:Stream_Get_UINT64_BE Unexecuted instantiation: image.c:Stream_Get_UINT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_UINT64_BE |
480 | | |
481 | | /** |
482 | | * @brief Stream_Get_INT64 big endian |
483 | | * @param _s The stream to read from |
484 | | * @return an integer |
485 | | * @since version 3.9.0 |
486 | | */ |
487 | | WINPR_ATTR_NODISCARD static inline INT64 Stream_Get_INT64_BE(wStream* _s) |
488 | 0 | { |
489 | 0 | return stream_read_i64_be(_s, TRUE); |
490 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Get_INT64_BE Unexecuted instantiation: stream.c:Stream_Get_INT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Get_INT64_BE Unexecuted instantiation: event.c:Stream_Get_INT64_BE Unexecuted instantiation: wait.c:Stream_Get_INT64_BE Unexecuted instantiation: generic.c:Stream_Get_INT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Get_INT64_BE Unexecuted instantiation: comm.c:Stream_Get_INT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Get_INT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Get_INT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Get_INT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Get_INT64_BE Unexecuted instantiation: pipe.c:Stream_Get_INT64_BE Unexecuted instantiation: ArrayList.c:Stream_Get_INT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Get_INT64_BE Unexecuted instantiation: handle.c:Stream_Get_INT64_BE Unexecuted instantiation: thread.c:Stream_Get_INT64_BE Unexecuted instantiation: comm_io.c:Stream_Get_INT64_BE Unexecuted instantiation: image.c:Stream_Get_INT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Get_INT64_BE |
491 | | |
492 | | /** |
493 | | * @brief Read a UINT8 from the stream, do not increment stream position |
494 | | * @param _s The stream to read from |
495 | | * @return an integer |
496 | | * @since version 3.9.0 |
497 | | */ |
498 | | WINPR_ATTR_NODISCARD static inline UINT8 Stream_Peek_Get_UINT8(wStream* _s) |
499 | 0 | { |
500 | 0 | return stream_read_u8(_s, FALSE); |
501 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: event.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: image.c:Stream_Peek_Get_UINT8 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT8 |
502 | | |
503 | | /** |
504 | | * @brief Read a INT8 from the stream, do not increment stream position |
505 | | * @param _s The stream to read from |
506 | | * @return an integer |
507 | | * @since version 3.9.0 |
508 | | */ |
509 | | WINPR_ATTR_NODISCARD static inline INT8 Stream_Peek_Get_INT8(wStream* _s) |
510 | 0 | { |
511 | 0 | return stream_read_i8(_s, FALSE); |
512 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT8 Unexecuted instantiation: stream.c:Stream_Peek_Get_INT8 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT8 Unexecuted instantiation: event.c:Stream_Peek_Get_INT8 Unexecuted instantiation: wait.c:Stream_Peek_Get_INT8 Unexecuted instantiation: generic.c:Stream_Peek_Get_INT8 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT8 Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT8 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT8 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT8 Unexecuted instantiation: handle.c:Stream_Peek_Get_INT8 Unexecuted instantiation: thread.c:Stream_Peek_Get_INT8 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT8 Unexecuted instantiation: image.c:Stream_Peek_Get_INT8 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT8 |
513 | | |
514 | | /** |
515 | | * @brief Read a UINT16 from the stream, do not increment stream position |
516 | | * @param _s The stream to read from |
517 | | * @return an integer |
518 | | * @since version 3.9.0 |
519 | | */ |
520 | | WINPR_ATTR_NODISCARD static inline UINT16 Stream_Peek_Get_UINT16(wStream* _s) |
521 | 0 | { |
522 | 0 | return stream_read_u16_le(_s, FALSE); |
523 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: event.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: image.c:Stream_Peek_Get_UINT16 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT16 |
524 | | |
525 | | /** |
526 | | * @brief Read a INT16 from the stream, do not increment stream position |
527 | | * @param _s The stream to read from |
528 | | * @return an integer |
529 | | * @since version 3.9.0 |
530 | | */ |
531 | | WINPR_ATTR_NODISCARD static inline INT16 Stream_Peek_Get_INT16(wStream* _s) |
532 | 0 | { |
533 | 0 | return stream_read_i16_le(_s, FALSE); |
534 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT16 Unexecuted instantiation: stream.c:Stream_Peek_Get_INT16 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT16 Unexecuted instantiation: event.c:Stream_Peek_Get_INT16 Unexecuted instantiation: wait.c:Stream_Peek_Get_INT16 Unexecuted instantiation: generic.c:Stream_Peek_Get_INT16 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT16 Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT16 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT16 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT16 Unexecuted instantiation: handle.c:Stream_Peek_Get_INT16 Unexecuted instantiation: thread.c:Stream_Peek_Get_INT16 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT16 Unexecuted instantiation: image.c:Stream_Peek_Get_INT16 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT16 |
535 | | |
536 | | /** |
537 | | * @brief Read a UINT16 big endian from the stream, do not increment stream position |
538 | | * @param _s The stream to read from |
539 | | * @return an integer |
540 | | * @since version 3.9.0 |
541 | | */ |
542 | | WINPR_ATTR_NODISCARD static inline UINT16 Stream_Peek_Get_UINT16_BE(wStream* _s) |
543 | 0 | { |
544 | 0 | return stream_read_u16_be(_s, FALSE); |
545 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: event.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: image.c:Stream_Peek_Get_UINT16_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT16_BE |
546 | | |
547 | | /** |
548 | | * @brief Read a INT16 big endian from the stream, do not increment stream position |
549 | | * @param _s The stream to read from |
550 | | * @return an integer |
551 | | * @since version 3.9.0 |
552 | | */ |
553 | | WINPR_ATTR_NODISCARD static inline INT16 Stream_Peek_Get_INT16_BE(wStream* _s) |
554 | 0 | { |
555 | 0 | return stream_read_i16_be(_s, FALSE); |
556 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: event.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: image.c:Stream_Peek_Get_INT16_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT16_BE |
557 | | |
558 | | /** |
559 | | * @brief Read a UINT32 from the stream, do not increment stream position |
560 | | * @param _s The stream to read from |
561 | | * @return an integer |
562 | | * @since version 3.9.0 |
563 | | */ |
564 | | WINPR_ATTR_NODISCARD static inline UINT32 Stream_Peek_Get_UINT32(wStream* _s) |
565 | 0 | { |
566 | 0 | return stream_read_u32_le(_s, FALSE); |
567 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: event.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: image.c:Stream_Peek_Get_UINT32 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT32 |
568 | | |
569 | | /** |
570 | | * @brief Read a INT32 from the stream, do not increment stream position |
571 | | * @param _s The stream to read from |
572 | | * @return an integer |
573 | | * @since version 3.9.0 |
574 | | */ |
575 | | WINPR_ATTR_NODISCARD static inline INT32 Stream_Peek_Get_INT32(wStream* _s) |
576 | 0 | { |
577 | 0 | return stream_read_i32_le(_s, FALSE); |
578 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT32 Unexecuted instantiation: stream.c:Stream_Peek_Get_INT32 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT32 Unexecuted instantiation: event.c:Stream_Peek_Get_INT32 Unexecuted instantiation: wait.c:Stream_Peek_Get_INT32 Unexecuted instantiation: generic.c:Stream_Peek_Get_INT32 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT32 Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT32 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT32 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT32 Unexecuted instantiation: handle.c:Stream_Peek_Get_INT32 Unexecuted instantiation: thread.c:Stream_Peek_Get_INT32 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT32 Unexecuted instantiation: image.c:Stream_Peek_Get_INT32 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT32 |
579 | | |
580 | | /** |
581 | | * @brief Read a UINT32 big endian from the stream, do not increment stream position |
582 | | * @param _s The stream to read from |
583 | | * @return an integer |
584 | | * @since version 3.9.0 |
585 | | */ |
586 | | WINPR_ATTR_NODISCARD static inline UINT32 Stream_Peek_Get_UINT32_BE(wStream* _s) |
587 | 0 | { |
588 | 0 | return stream_read_u32_be(_s, FALSE); |
589 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: event.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: image.c:Stream_Peek_Get_UINT32_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT32_BE |
590 | | |
591 | | /** |
592 | | * @brief Read a INT32 big endian from the stream, do not increment stream position |
593 | | * @param _s The stream to read from |
594 | | * @return an integer |
595 | | * @since version 3.9.0 |
596 | | */ |
597 | | WINPR_ATTR_NODISCARD static inline INT32 Stream_Peek_Get_INT32_BE(wStream* _s) |
598 | 0 | { |
599 | 0 | return stream_read_i32_be(_s, FALSE); |
600 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: event.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: image.c:Stream_Peek_Get_INT32_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT32_BE |
601 | | |
602 | | /** |
603 | | * @brief Read a UINT64 from the stream, do not increment stream position |
604 | | * @param _s The stream to read from |
605 | | * @return an integer |
606 | | * @since version 3.9.0 |
607 | | */ |
608 | | WINPR_ATTR_NODISCARD static inline UINT64 Stream_Peek_Get_UINT64(wStream* _s) |
609 | 0 | { |
610 | 0 | return stream_read_u64_le(_s, FALSE); |
611 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: event.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: image.c:Stream_Peek_Get_UINT64 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT64 |
612 | | |
613 | | /** |
614 | | * @brief Read a INT64 from the stream, do not increment stream position |
615 | | * @param _s The stream to read from |
616 | | * @return an integer |
617 | | * @since version 3.9.0 |
618 | | */ |
619 | | WINPR_ATTR_NODISCARD static inline INT64 Stream_Peek_Get_INT64(wStream* _s) |
620 | 0 | { |
621 | 0 | return stream_read_i64_le(_s, FALSE); |
622 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT64 Unexecuted instantiation: stream.c:Stream_Peek_Get_INT64 Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT64 Unexecuted instantiation: event.c:Stream_Peek_Get_INT64 Unexecuted instantiation: wait.c:Stream_Peek_Get_INT64 Unexecuted instantiation: generic.c:Stream_Peek_Get_INT64 Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT64 Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT64 Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT64 Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT64 Unexecuted instantiation: handle.c:Stream_Peek_Get_INT64 Unexecuted instantiation: thread.c:Stream_Peek_Get_INT64 Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT64 Unexecuted instantiation: image.c:Stream_Peek_Get_INT64 Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT64 |
623 | | |
624 | | /** |
625 | | * @brief Read a UINT64 big endian from the stream, do not increment stream position |
626 | | * @param _s The stream to read from |
627 | | * @return an integer |
628 | | * @since version 3.9.0 |
629 | | */ |
630 | | WINPR_ATTR_NODISCARD static inline UINT64 Stream_Peek_Get_UINT64_BE(wStream* _s) |
631 | 0 | { |
632 | 0 | return stream_read_u64_be(_s, FALSE); |
633 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: event.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: image.c:Stream_Peek_Get_UINT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_UINT64_BE |
634 | | |
635 | | /** |
636 | | * @brief Read a INT64 big endian from the stream, do not increment stream position |
637 | | * @param _s The stream to read from |
638 | | * @return an integer |
639 | | * @since version 3.9.0 |
640 | | */ |
641 | | WINPR_ATTR_NODISCARD static inline INT64 Stream_Peek_Get_INT64_BE(wStream* _s) |
642 | 0 | { |
643 | 0 | return stream_read_i64_be(_s, FALSE); |
644 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: stream.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: event.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: wait.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: generic.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: pipe.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: ArrayList.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: handle.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: thread.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: comm_io.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: image.c:Stream_Peek_Get_INT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Peek_Get_INT64_BE |
645 | | |
646 | | #define Stream_Read_UINT8(_s, _v) \ |
647 | 0 | do \ |
648 | 0 | { \ |
649 | 0 | _v = stream_read_u8(_s, TRUE); \ |
650 | 0 | } while (0) |
651 | | |
652 | | #define Stream_Read_INT8(_s, _v) \ |
653 | | do \ |
654 | | { \ |
655 | | _v = stream_read_i8(_s, TRUE); \ |
656 | | } while (0) |
657 | | |
658 | | #define Stream_Read_UINT16(_s, _v) \ |
659 | 0 | do \ |
660 | 0 | { \ |
661 | 0 | _v = stream_read_u16_le(_s, TRUE); \ |
662 | 0 | } while (0) |
663 | | |
664 | | #define Stream_Read_INT16(_s, _v) \ |
665 | | do \ |
666 | | { \ |
667 | | _v = stream_read_i16_le(_s, TRUE); \ |
668 | | } while (0) |
669 | | |
670 | | #define Stream_Read_UINT16_BE(_s, _v) \ |
671 | | do \ |
672 | | { \ |
673 | | _v = stream_read_u16_be(_s, TRUE); \ |
674 | | } while (0) |
675 | | |
676 | | #define Stream_Read_INT16_BE(_s, _v) \ |
677 | | do \ |
678 | | { \ |
679 | | _v = stream_read_i16_be(_s, TRUE); \ |
680 | | } while (0) |
681 | | |
682 | | #define Stream_Read_UINT32(_s, _v) \ |
683 | 1.38M | do \ |
684 | 1.38M | { \ |
685 | 1.38M | _v = stream_read_u32_le(_s, TRUE); \ |
686 | 1.38M | } while (0) |
687 | | |
688 | | #define Stream_Read_INT32(_s, _v) \ |
689 | 0 | do \ |
690 | 0 | { \ |
691 | 0 | _v = stream_read_i32_le(_s, TRUE); \ |
692 | 0 | } while (0) |
693 | | |
694 | | #define Stream_Read_UINT32_BE(_s, _v) \ |
695 | | do \ |
696 | | { \ |
697 | | _v = stream_read_u32_be(_s, TRUE); \ |
698 | | } while (0) |
699 | | |
700 | | #define Stream_Read_INT32_BE(_s, _v) \ |
701 | | do \ |
702 | | { \ |
703 | | _v = stream_read_i32_be(_s, TRUE); \ |
704 | | } while (0) |
705 | | |
706 | | #define Stream_Read_UINT64(_s, _v) \ |
707 | | do \ |
708 | | { \ |
709 | | _v = stream_read_u64_le(_s, TRUE); \ |
710 | | } while (0) |
711 | | |
712 | | #define Stream_Read_INT64(_s, _v) \ |
713 | | do \ |
714 | | { \ |
715 | | _v = stream_read_i64_le(_s, TRUE); \ |
716 | | } while (0) |
717 | | |
718 | | #define Stream_Read_UINT64_BE(_s, _v) \ |
719 | | do \ |
720 | | { \ |
721 | | _v = stream_read_u64_be(_s, TRUE); \ |
722 | | } while (0) |
723 | | |
724 | | #define Stream_Read_INT64_BE(_s, _v) \ |
725 | | do \ |
726 | | { \ |
727 | | _v = stream_read_i64_be(_s, TRUE); \ |
728 | | } while (0) |
729 | | |
730 | | static inline void Stream_Read(wStream* _s, void* _b, size_t _n) |
731 | 0 | { |
732 | 0 | WINPR_ASSERT(_s); |
733 | 0 | WINPR_ASSERT(_b || (_n == 0)); |
734 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n); |
735 | 0 | memcpy(_b, (_s->pointer), (_n)); |
736 | 0 | Stream_Seek(_s, _n); |
737 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Read Unexecuted instantiation: stream.c:Stream_Read Unexecuted instantiation: BinaryAppender.c:Stream_Read Unexecuted instantiation: event.c:Stream_Read Unexecuted instantiation: wait.c:Stream_Read Unexecuted instantiation: generic.c:Stream_Read Unexecuted instantiation: namedPipeClient.c:Stream_Read Unexecuted instantiation: comm.c:Stream_Read Unexecuted instantiation: comm_ioctl.c:Stream_Read Unexecuted instantiation: comm_serial_sys.c:Stream_Read Unexecuted instantiation: comm_sercx_sys.c:Stream_Read Unexecuted instantiation: comm_sercx2_sys.c:Stream_Read Unexecuted instantiation: pipe.c:Stream_Read Unexecuted instantiation: ArrayList.c:Stream_Read Unexecuted instantiation: PacketMessage.c:Stream_Read Unexecuted instantiation: handle.c:Stream_Read Unexecuted instantiation: thread.c:Stream_Read Unexecuted instantiation: comm_io.c:Stream_Read Unexecuted instantiation: image.c:Stream_Read Unexecuted instantiation: cliprdr_common.c:Stream_Read |
738 | | |
739 | | #define Stream_Peek_UINT8(_s, _v) \ |
740 | | do \ |
741 | | { \ |
742 | | _v = stream_read_u8(_s, FALSE); \ |
743 | | } while (0) |
744 | | |
745 | | #define Stream_Peek_INT8(_s, _v) \ |
746 | | do \ |
747 | | { \ |
748 | | _v = stream_read_i8(_s, FALSE); \ |
749 | | } while (0) |
750 | | |
751 | | #define Stream_Peek_UINT16(_s, _v) \ |
752 | | do \ |
753 | | { \ |
754 | | _v = stream_read_u16_le(_s, FALSE); \ |
755 | | } while (0) |
756 | | |
757 | | #define Stream_Peek_INT16(_s, _v) \ |
758 | | do \ |
759 | | { \ |
760 | | _v = stream_read_i16_le(_s, FALSE); \ |
761 | | } while (0) |
762 | | |
763 | | #define Stream_Peek_UINT16_BE(_s, _v) \ |
764 | | do \ |
765 | | { \ |
766 | | _v = stream_read_u16_be(_s, FALSE); \ |
767 | | } while (0) |
768 | | |
769 | | #define Stream_Peek_INT16_BE(_s, _v) \ |
770 | | do \ |
771 | | { \ |
772 | | _v = stream_read_i16_be(_s, FALSE); \ |
773 | | } while (0) |
774 | | |
775 | | #define Stream_Peek_UINT32(_s, _v) \ |
776 | | do \ |
777 | | { \ |
778 | | _v = stream_read_u32_le(_s, FALSE); \ |
779 | | } while (0) |
780 | | |
781 | | #define Stream_Peek_INT32(_s, _v) \ |
782 | | do \ |
783 | | { \ |
784 | | _v = stream_read_i32_le(_s, FALSE); \ |
785 | | } while (0) |
786 | | |
787 | | #define Stream_Peek_UINT32_BE(_s, _v) \ |
788 | | do \ |
789 | | { \ |
790 | | _v = stream_read_u32_be(_s, FALSE); \ |
791 | | } while (0) |
792 | | |
793 | | #define Stream_Peek_INT32_BE(_s, _v) \ |
794 | | do \ |
795 | | { \ |
796 | | _v = stream_read_i32_be(_s, FALSE); \ |
797 | | } while (0) |
798 | | |
799 | | #define Stream_Peek_UINT64(_s, _v) \ |
800 | | do \ |
801 | | { \ |
802 | | _v = stream_read_u64_le(_s, FALSE); \ |
803 | | } while (0) |
804 | | |
805 | | #define Stream_Peek_INT64(_s, _v) \ |
806 | | do \ |
807 | | { \ |
808 | | _v = stream_read_i64_le(_s, FALSE); \ |
809 | | } while (0) |
810 | | |
811 | | #define Stream_Peek_UINT64_BE(_s, _v) \ |
812 | | do \ |
813 | | { \ |
814 | | _v = stream_read_u64_be(_s, FALSE); \ |
815 | | } while (0) |
816 | | |
817 | | #define Stream_Peek_INT64_BE(_s, _v) \ |
818 | | do \ |
819 | | { \ |
820 | | _v = stream_read_i64_be(_s, FALSE); \ |
821 | | } while (0) |
822 | | |
823 | | static inline void Stream_Peek(const wStream* _s, void* _b, size_t _n) |
824 | 0 | { |
825 | 0 | WINPR_ASSERT(_s); |
826 | 0 | WINPR_ASSERT(_b || (_n == 0)); |
827 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n); |
828 | 0 | memcpy(_b, (_s->pointer), (_n)); |
829 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Peek Unexecuted instantiation: stream.c:Stream_Peek Unexecuted instantiation: BinaryAppender.c:Stream_Peek Unexecuted instantiation: event.c:Stream_Peek Unexecuted instantiation: wait.c:Stream_Peek Unexecuted instantiation: generic.c:Stream_Peek Unexecuted instantiation: namedPipeClient.c:Stream_Peek Unexecuted instantiation: comm.c:Stream_Peek Unexecuted instantiation: comm_ioctl.c:Stream_Peek Unexecuted instantiation: comm_serial_sys.c:Stream_Peek Unexecuted instantiation: comm_sercx_sys.c:Stream_Peek Unexecuted instantiation: comm_sercx2_sys.c:Stream_Peek Unexecuted instantiation: pipe.c:Stream_Peek Unexecuted instantiation: ArrayList.c:Stream_Peek Unexecuted instantiation: PacketMessage.c:Stream_Peek Unexecuted instantiation: handle.c:Stream_Peek Unexecuted instantiation: thread.c:Stream_Peek Unexecuted instantiation: comm_io.c:Stream_Peek Unexecuted instantiation: image.c:Stream_Peek Unexecuted instantiation: cliprdr_common.c:Stream_Peek |
830 | | |
831 | | #define Stream_Write_INT8(s, v) \ |
832 | | do \ |
833 | | { \ |
834 | | WINPR_ASSERT((v) <= INT8_MAX); \ |
835 | | WINPR_ASSERT((v) >= INT8_MIN); \ |
836 | | Stream_Write_INT8_unchecked((s), (v)); \ |
837 | | } while (0) |
838 | | |
839 | | /** @brief writes a \b INT8 to a \b wStream. The stream must be large enough to hold the data. |
840 | | * |
841 | | * Do not use directly, use the define @ref Stream_Write_INT8 instead |
842 | | * |
843 | | * \param _s The stream to write to, must not be \b nullptr |
844 | | * \param _v The value to write |
845 | | */ |
846 | | static inline void Stream_Write_INT8_unchecked(wStream* _s, INT8 _v) |
847 | 0 | { |
848 | 0 | WINPR_ASSERT(_s); |
849 | 0 | WINPR_ASSERT(_s->pointer); |
850 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 1); |
851 | 0 |
|
852 | 0 | winpr_Data_Write_INT8(_s->pointer, _v); |
853 | 0 | _s->pointer += 1; |
854 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT8_unchecked Unexecuted instantiation: stream.c:Stream_Write_INT8_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT8_unchecked Unexecuted instantiation: event.c:Stream_Write_INT8_unchecked Unexecuted instantiation: wait.c:Stream_Write_INT8_unchecked Unexecuted instantiation: generic.c:Stream_Write_INT8_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT8_unchecked Unexecuted instantiation: pipe.c:Stream_Write_INT8_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_INT8_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_INT8_unchecked Unexecuted instantiation: handle.c:Stream_Write_INT8_unchecked Unexecuted instantiation: thread.c:Stream_Write_INT8_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_INT8_unchecked Unexecuted instantiation: image.c:Stream_Write_INT8_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT8_unchecked |
855 | | |
856 | | #define Stream_Write_UINT8(s, v) \ |
857 | 0 | do \ |
858 | 0 | { \ |
859 | 0 | WINPR_ASSERT((v) <= UINT8_MAX); \ |
860 | 0 | WINPR_ASSERT((v) >= 0); \ |
861 | 0 | Stream_Write_UINT8_unchecked((s), (v)); \ |
862 | 0 | } while (0) |
863 | | |
864 | | /** @brief writes a \b UINT8 to a \b wStream. The stream must be large enough to hold the data. |
865 | | * |
866 | | * Do not use directly, use the define @ref Stream_Write_UINT8 instead |
867 | | * |
868 | | * \param _s The stream to write to, must not be \b nullptr |
869 | | * \param _v The value to write |
870 | | */ |
871 | | static inline void Stream_Write_UINT8_unchecked(wStream* _s, UINT8 _v) |
872 | 0 | { |
873 | 0 | WINPR_ASSERT(_s); |
874 | 0 | WINPR_ASSERT(_s->pointer); |
875 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 1); |
876 | |
|
877 | 0 | winpr_Data_Write_UINT8(_s->pointer, _v); |
878 | 0 | _s->pointer += 1; |
879 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT8_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT8_unchecked |
880 | | |
881 | | #define Stream_Write_INT16(s, v) \ |
882 | | do \ |
883 | | { \ |
884 | | WINPR_ASSERT((v) >= INT16_MIN); \ |
885 | | WINPR_ASSERT((v) <= INT16_MAX); \ |
886 | | Stream_Write_INT16_unchecked((s), (v)); \ |
887 | | } while (0) |
888 | | |
889 | | /** @brief writes a \b INT16 as \b little endian to a \b wStream. The stream must be large |
890 | | * enough to hold the data. |
891 | | * |
892 | | * Do not use directly, use the define @ref Stream_Write_INT16 instead |
893 | | * |
894 | | * \param _s The stream to write to, must not be \b nullptr |
895 | | * \param _v The value to write |
896 | | */ |
897 | | static inline void Stream_Write_INT16_unchecked(wStream* _s, INT16 _v) |
898 | 0 | { |
899 | 0 | WINPR_ASSERT(_s); |
900 | 0 | WINPR_ASSERT(_s->pointer); |
901 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2); |
902 | 0 |
|
903 | 0 | winpr_Data_Write_INT16(_s->pointer, _v); |
904 | 0 | _s->pointer += 2; |
905 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT16_unchecked Unexecuted instantiation: stream.c:Stream_Write_INT16_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT16_unchecked Unexecuted instantiation: event.c:Stream_Write_INT16_unchecked Unexecuted instantiation: wait.c:Stream_Write_INT16_unchecked Unexecuted instantiation: generic.c:Stream_Write_INT16_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT16_unchecked Unexecuted instantiation: pipe.c:Stream_Write_INT16_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_INT16_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_INT16_unchecked Unexecuted instantiation: handle.c:Stream_Write_INT16_unchecked Unexecuted instantiation: thread.c:Stream_Write_INT16_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_INT16_unchecked Unexecuted instantiation: image.c:Stream_Write_INT16_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT16_unchecked |
906 | | |
907 | | #define Stream_Write_UINT16(s, v) \ |
908 | 0 | do \ |
909 | 0 | { \ |
910 | 0 | WINPR_ASSERT((v) <= UINT16_MAX); \ |
911 | 0 | WINPR_ASSERT((v) >= 0); \ |
912 | 0 | Stream_Write_UINT16_unchecked((s), (v)); \ |
913 | 0 | } while (0) |
914 | | |
915 | | /** @brief writes a \b UINT16 as \b little endian to a \b wStream. The stream must be large |
916 | | * enough to hold the data. |
917 | | * |
918 | | * Do not use directly, use the define @ref Stream_Write_UINT16 instead |
919 | | * |
920 | | * \param _s The stream to write to, must not be \b nullptr |
921 | | * \param _v The value to write |
922 | | */ |
923 | | static inline void Stream_Write_UINT16_unchecked(wStream* _s, UINT16 _v) |
924 | 0 | { |
925 | 0 | WINPR_ASSERT(_s); |
926 | 0 | WINPR_ASSERT(_s->pointer); |
927 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2); |
928 | |
|
929 | 0 | winpr_Data_Write_UINT16(_s->pointer, _v); |
930 | 0 | _s->pointer += 2; |
931 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT16_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT16_unchecked |
932 | | |
933 | | #define Stream_Write_UINT16_BE(s, v) \ |
934 | 0 | do \ |
935 | 0 | { \ |
936 | 0 | WINPR_ASSERT((v) <= UINT16_MAX); \ |
937 | 0 | WINPR_ASSERT((v) >= 0); \ |
938 | 0 | Stream_Write_UINT16_BE_unchecked((s), (v)); \ |
939 | 0 | } while (0) |
940 | | |
941 | | /** @brief writes a \b UINT16 as \b big endian to a \b wStream. The stream must be large enough |
942 | | * to hold the data. |
943 | | * |
944 | | * Do not use directly, use the define @ref Stream_Write_UINT16_BE instead |
945 | | * |
946 | | * \param _s The stream to write to, must not be \b nullptr |
947 | | * \param _v The value to write |
948 | | */ |
949 | | static inline void Stream_Write_UINT16_BE_unchecked(wStream* _s, UINT16 _v) |
950 | 0 | { |
951 | 0 | WINPR_ASSERT(_s); |
952 | 0 | WINPR_ASSERT(_s->pointer); |
953 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2); |
954 | |
|
955 | 0 | winpr_Data_Write_UINT16_BE(_s->pointer, _v); |
956 | 0 | _s->pointer += 2; |
957 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT16_BE_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT16_BE_unchecked |
958 | | |
959 | | #define Stream_Write_INT16_BE(s, v) \ |
960 | | do \ |
961 | | { \ |
962 | | WINPR_ASSERT((v) <= INT16_MAX); \ |
963 | | WINPR_ASSERT((v) >= INT16_MIN); \ |
964 | | Stream_Write_INT16_BE_unchecked((s), (v)); \ |
965 | | } while (0) |
966 | | |
967 | | /** @brief writes a \b UINT16 as \b big endian to a \b wStream. The stream must be large enough |
968 | | * to hold the data. |
969 | | * |
970 | | * Do not use directly, use the define @ref Stream_Write_UINT16_BE instead |
971 | | * |
972 | | * \param _s The stream to write to, must not be \b nullptr |
973 | | * \param _v The value to write |
974 | | * |
975 | | * @since version 3.10.0 |
976 | | */ |
977 | | static inline void Stream_Write_INT16_BE_unchecked(wStream* _s, INT16 _v) |
978 | 0 | { |
979 | 0 | WINPR_ASSERT(_s); |
980 | 0 | WINPR_ASSERT(_s->pointer); |
981 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2); |
982 | 0 |
|
983 | 0 | winpr_Data_Write_INT16_BE(_s->pointer, _v); |
984 | 0 | _s->pointer += 2; |
985 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: stream.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: event.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: wait.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: generic.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: pipe.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: handle.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: thread.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: image.c:Stream_Write_INT16_BE_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT16_BE_unchecked |
986 | | |
987 | | #define Stream_Write_UINT24_BE(s, v) \ |
988 | | do \ |
989 | | { \ |
990 | | WINPR_ASSERT((v) <= 0xFFFFFF); \ |
991 | | WINPR_ASSERT((v) >= 0); \ |
992 | | Stream_Write_UINT24_BE_unchecked((s), (v)); \ |
993 | | } while (0) |
994 | | |
995 | | /** @brief writes a \b UINT24 as \b big endian to a \b wStream. The stream must be large enough |
996 | | * to hold the data. |
997 | | * |
998 | | * Do not use directly, use the define @ref Stream_Write_UINT24_BE instead |
999 | | * |
1000 | | * \param _s The stream to write to, must not be \b nullptr |
1001 | | * \param _v The value to write |
1002 | | */ |
1003 | | static inline void Stream_Write_UINT24_BE_unchecked(wStream* _s, UINT32 _v) |
1004 | 0 | { |
1005 | 0 | WINPR_ASSERT(_s); |
1006 | 0 | WINPR_ASSERT(_s->pointer); |
1007 | 0 | WINPR_ASSERT(_v <= 0x00FFFFFF); |
1008 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 3); |
1009 | 0 |
|
1010 | 0 | *_s->pointer++ = ((_v) >> 16) & 0xFF; |
1011 | 0 | *_s->pointer++ = ((_v) >> 8) & 0xFF; |
1012 | 0 | *_s->pointer++ = (_v) & 0xFF; |
1013 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT24_BE_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT24_BE_unchecked |
1014 | | |
1015 | | #define Stream_Write_INT32(s, v) \ |
1016 | 0 | do \ |
1017 | 0 | { \ |
1018 | 0 | WINPR_ASSERT((v) <= INT32_MAX); \ |
1019 | 0 | WINPR_ASSERT((v) >= INT32_MIN); \ |
1020 | 0 | Stream_Write_INT32_unchecked((s), (v)); \ |
1021 | 0 | } while (0) |
1022 | | |
1023 | | /** @brief writes a \b INT32 as \b little endian to a \b wStream. The stream must be large |
1024 | | * enough to hold the data. |
1025 | | * |
1026 | | * Do not use directly, use the define @ref Stream_Write_INT32 instead |
1027 | | * |
1028 | | * \param _s The stream to write to, must not be \b nullptr |
1029 | | * \param _v The value to write |
1030 | | */ |
1031 | | static inline void Stream_Write_INT32_unchecked(wStream* _s, INT32 _v) |
1032 | 0 | { |
1033 | 0 | WINPR_ASSERT(_s); |
1034 | 0 | WINPR_ASSERT(_s->pointer); |
1035 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4); |
1036 | |
|
1037 | 0 | winpr_Data_Write_INT32(_s->pointer, _v); |
1038 | 0 | _s->pointer += 4; |
1039 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT32_unchecked Unexecuted instantiation: stream.c:Stream_Write_INT32_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT32_unchecked Unexecuted instantiation: event.c:Stream_Write_INT32_unchecked Unexecuted instantiation: wait.c:Stream_Write_INT32_unchecked Unexecuted instantiation: generic.c:Stream_Write_INT32_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT32_unchecked Unexecuted instantiation: pipe.c:Stream_Write_INT32_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_INT32_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_INT32_unchecked Unexecuted instantiation: handle.c:Stream_Write_INT32_unchecked Unexecuted instantiation: thread.c:Stream_Write_INT32_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_INT32_unchecked Unexecuted instantiation: image.c:Stream_Write_INT32_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT32_unchecked |
1040 | | |
1041 | | #define Stream_Write_INT32_BE(s, v) \ |
1042 | | do \ |
1043 | | { \ |
1044 | | WINPR_ASSERT((v) <= INT32_MAX); \ |
1045 | | WINPR_ASSERT((v) >= INT32_MIN); \ |
1046 | | Stream_Write_INT32_BE_unchecked((s), (v)); \ |
1047 | | } while (0) |
1048 | | |
1049 | | /** @brief writes a \b INT32 as \b little endian to a \b wStream. The stream must be large |
1050 | | * enough to hold the data. |
1051 | | * |
1052 | | * Do not use directly, use the define @ref Stream_Write_INT32 instead |
1053 | | * |
1054 | | * \param _s The stream to write to, must not be \b nullptr |
1055 | | * \param _v The value to write |
1056 | | * |
1057 | | * @since version 3.10.0 |
1058 | | */ |
1059 | | static inline void Stream_Write_INT32_BE_unchecked(wStream* _s, INT32 _v) |
1060 | 0 | { |
1061 | 0 | WINPR_ASSERT(_s); |
1062 | 0 | WINPR_ASSERT(_s->pointer); |
1063 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4); |
1064 | 0 |
|
1065 | 0 | winpr_Data_Write_INT32_BE(_s->pointer, _v); |
1066 | 0 | _s->pointer += 4; |
1067 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: stream.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: event.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: wait.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: generic.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: pipe.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: handle.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: thread.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: image.c:Stream_Write_INT32_BE_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT32_BE_unchecked |
1068 | | |
1069 | | #define Stream_Write_UINT32(s, v) \ |
1070 | 0 | do \ |
1071 | 0 | { \ |
1072 | 0 | WINPR_ASSERT((v) <= UINT32_MAX); \ |
1073 | 0 | WINPR_ASSERT((v) >= 0); \ |
1074 | 0 | Stream_Write_UINT32_unchecked((s), (v)); \ |
1075 | 0 | } while (0) |
1076 | | |
1077 | | /** @brief writes a \b UINT32 as \b little endian to a \b wStream. The stream must be large |
1078 | | * enough to hold the data. |
1079 | | * |
1080 | | * Do not use directly, use the define @ref Stream_Write_UINT32 instead |
1081 | | * |
1082 | | * \param _s The stream to write to, must not be \b nullptr |
1083 | | * \param _v The value to write |
1084 | | */ |
1085 | | static inline void Stream_Write_UINT32_unchecked(wStream* _s, UINT32 _v) |
1086 | 0 | { |
1087 | 0 | WINPR_ASSERT(_s); |
1088 | 0 | WINPR_ASSERT(_s->pointer); |
1089 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4); |
1090 | |
|
1091 | 0 | winpr_Data_Write_UINT32(_s->pointer, _v); |
1092 | 0 | _s->pointer += 4; |
1093 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT32_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT32_unchecked |
1094 | | |
1095 | | #define Stream_Write_UINT32_BE(s, v) \ |
1096 | 0 | do \ |
1097 | 0 | { \ |
1098 | 0 | WINPR_ASSERT((v) <= UINT32_MAX); \ |
1099 | 0 | WINPR_ASSERT((v) >= 0); \ |
1100 | 0 | Stream_Write_UINT32_BE_unchecked((s), (v)); \ |
1101 | 0 | } while (0) |
1102 | | |
1103 | | /** @brief writes a \b UINT32 as \b big endian to a \b wStream. The stream must be large enough |
1104 | | * to hold the data. |
1105 | | * |
1106 | | * Do not use directly, use the define @ref Stream_Write_UINT32_BE instead |
1107 | | * |
1108 | | * \param _s The stream to write to, must not be \b nullptr |
1109 | | * \param _v The value to write |
1110 | | */ |
1111 | | static inline void Stream_Write_UINT32_BE_unchecked(wStream* _s, UINT32 _v) |
1112 | 0 | { |
1113 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4); |
1114 | |
|
1115 | 0 | winpr_Data_Write_UINT32_BE(_s->pointer, _v); |
1116 | 0 | _s->pointer += 4; |
1117 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: stream.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: event.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: wait.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: generic.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: pipe.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: ArrayList.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: handle.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: thread.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: comm_io.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: image.c:Stream_Write_UINT32_BE_unchecked Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT32_BE_unchecked |
1118 | | |
1119 | | /** @brief writes a \b UINT64 as \b little endian to a \b wStream. The stream must be large |
1120 | | * enough to hold the data. |
1121 | | * |
1122 | | * \param _s The stream to write to, must not be \b nullptr |
1123 | | * \param _v The value to write |
1124 | | */ |
1125 | | static inline void Stream_Write_UINT64(wStream* _s, UINT64 _v) |
1126 | 0 | { |
1127 | 0 | WINPR_ASSERT(_s); |
1128 | 0 | WINPR_ASSERT(_s->pointer); |
1129 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 8); |
1130 | 0 |
|
1131 | 0 | winpr_Data_Write_UINT64(_s->pointer, _v); |
1132 | 0 | _s->pointer += 8; |
1133 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT64 Unexecuted instantiation: stream.c:Stream_Write_UINT64 Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT64 Unexecuted instantiation: event.c:Stream_Write_UINT64 Unexecuted instantiation: wait.c:Stream_Write_UINT64 Unexecuted instantiation: generic.c:Stream_Write_UINT64 Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT64 Unexecuted instantiation: comm.c:Stream_Write_UINT64 Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT64 Unexecuted instantiation: pipe.c:Stream_Write_UINT64 Unexecuted instantiation: ArrayList.c:Stream_Write_UINT64 Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT64 Unexecuted instantiation: handle.c:Stream_Write_UINT64 Unexecuted instantiation: thread.c:Stream_Write_UINT64 Unexecuted instantiation: comm_io.c:Stream_Write_UINT64 Unexecuted instantiation: image.c:Stream_Write_UINT64 Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT64 |
1134 | | |
1135 | | /** @brief writes a \b UINT64 as \b big endian to a \b wStream. The stream must be large enough |
1136 | | * to hold the data. |
1137 | | * |
1138 | | * \param _s The stream to write to, must not be \b nullptr |
1139 | | * \param _v The value to write |
1140 | | */ |
1141 | | static inline void Stream_Write_UINT64_BE(wStream* _s, UINT64 _v) |
1142 | 0 | { |
1143 | 0 | WINPR_ASSERT(_s); |
1144 | 0 | WINPR_ASSERT(_s->pointer); |
1145 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 8); |
1146 | 0 |
|
1147 | 0 | winpr_Data_Write_UINT64_BE(_s->pointer, _v); |
1148 | 0 | _s->pointer += 8; |
1149 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_UINT64_BE Unexecuted instantiation: stream.c:Stream_Write_UINT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Write_UINT64_BE Unexecuted instantiation: event.c:Stream_Write_UINT64_BE Unexecuted instantiation: wait.c:Stream_Write_UINT64_BE Unexecuted instantiation: generic.c:Stream_Write_UINT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_UINT64_BE Unexecuted instantiation: pipe.c:Stream_Write_UINT64_BE Unexecuted instantiation: ArrayList.c:Stream_Write_UINT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Write_UINT64_BE Unexecuted instantiation: handle.c:Stream_Write_UINT64_BE Unexecuted instantiation: thread.c:Stream_Write_UINT64_BE Unexecuted instantiation: comm_io.c:Stream_Write_UINT64_BE Unexecuted instantiation: image.c:Stream_Write_UINT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Write_UINT64_BE |
1150 | | |
1151 | | /** @brief writes a \b INT64 as \b little endian to a \b wStream. The stream must be large |
1152 | | * enough to hold the data. |
1153 | | * |
1154 | | * \param _s The stream to write to, must not be \b nullptr |
1155 | | * \param _v The value to write |
1156 | | * \since version 3.10.0 |
1157 | | */ |
1158 | | static inline void Stream_Write_INT64(wStream* _s, INT64 _v) |
1159 | 0 | { |
1160 | 0 | WINPR_ASSERT(_s); |
1161 | 0 | WINPR_ASSERT(_s->pointer); |
1162 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 8); |
1163 | 0 |
|
1164 | 0 | winpr_Data_Write_INT64(_s->pointer, _v); |
1165 | 0 | _s->pointer += 8; |
1166 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT64 Unexecuted instantiation: stream.c:Stream_Write_INT64 Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT64 Unexecuted instantiation: event.c:Stream_Write_INT64 Unexecuted instantiation: wait.c:Stream_Write_INT64 Unexecuted instantiation: generic.c:Stream_Write_INT64 Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT64 Unexecuted instantiation: comm.c:Stream_Write_INT64 Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT64 Unexecuted instantiation: pipe.c:Stream_Write_INT64 Unexecuted instantiation: ArrayList.c:Stream_Write_INT64 Unexecuted instantiation: PacketMessage.c:Stream_Write_INT64 Unexecuted instantiation: handle.c:Stream_Write_INT64 Unexecuted instantiation: thread.c:Stream_Write_INT64 Unexecuted instantiation: comm_io.c:Stream_Write_INT64 Unexecuted instantiation: image.c:Stream_Write_INT64 Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT64 |
1167 | | |
1168 | | /** @brief writes a \b INT64 as \b big endian to a \b wStream. The stream must be large enough |
1169 | | * to hold the data. |
1170 | | * |
1171 | | * \param _s The stream to write to, must not be \b nullptr |
1172 | | * \param _v The value to write |
1173 | | * \since version 3.10.0 |
1174 | | */ |
1175 | | static inline void Stream_Write_INT64_BE(wStream* _s, INT64 _v) |
1176 | 0 | { |
1177 | 0 | WINPR_ASSERT(_s); |
1178 | 0 | WINPR_ASSERT(_s->pointer); |
1179 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 8); |
1180 | 0 |
|
1181 | 0 | winpr_Data_Write_INT64_BE(_s->pointer, _v); |
1182 | 0 | _s->pointer += 8; |
1183 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write_INT64_BE Unexecuted instantiation: stream.c:Stream_Write_INT64_BE Unexecuted instantiation: BinaryAppender.c:Stream_Write_INT64_BE Unexecuted instantiation: event.c:Stream_Write_INT64_BE Unexecuted instantiation: wait.c:Stream_Write_INT64_BE Unexecuted instantiation: generic.c:Stream_Write_INT64_BE Unexecuted instantiation: namedPipeClient.c:Stream_Write_INT64_BE Unexecuted instantiation: comm.c:Stream_Write_INT64_BE Unexecuted instantiation: comm_ioctl.c:Stream_Write_INT64_BE Unexecuted instantiation: comm_serial_sys.c:Stream_Write_INT64_BE Unexecuted instantiation: comm_sercx_sys.c:Stream_Write_INT64_BE Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write_INT64_BE Unexecuted instantiation: pipe.c:Stream_Write_INT64_BE Unexecuted instantiation: ArrayList.c:Stream_Write_INT64_BE Unexecuted instantiation: PacketMessage.c:Stream_Write_INT64_BE Unexecuted instantiation: handle.c:Stream_Write_INT64_BE Unexecuted instantiation: thread.c:Stream_Write_INT64_BE Unexecuted instantiation: comm_io.c:Stream_Write_INT64_BE Unexecuted instantiation: image.c:Stream_Write_INT64_BE Unexecuted instantiation: cliprdr_common.c:Stream_Write_INT64_BE |
1184 | | |
1185 | | static inline void Stream_Write(wStream* _s, const void* _b, size_t _n) |
1186 | 0 | { |
1187 | 0 | if (_n > 0) |
1188 | 0 | { |
1189 | 0 | WINPR_ASSERT(_s); |
1190 | 0 | WINPR_ASSERT(_b); |
1191 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n); |
1192 | 0 | memcpy(_s->pointer, (_b), (_n)); |
1193 | 0 | Stream_Seek(_s, _n); |
1194 | 0 | } |
1195 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Write Unexecuted instantiation: stream.c:Stream_Write Unexecuted instantiation: BinaryAppender.c:Stream_Write Unexecuted instantiation: event.c:Stream_Write Unexecuted instantiation: wait.c:Stream_Write Unexecuted instantiation: generic.c:Stream_Write Unexecuted instantiation: namedPipeClient.c:Stream_Write Unexecuted instantiation: comm.c:Stream_Write Unexecuted instantiation: comm_ioctl.c:Stream_Write Unexecuted instantiation: comm_serial_sys.c:Stream_Write Unexecuted instantiation: comm_sercx_sys.c:Stream_Write Unexecuted instantiation: comm_sercx2_sys.c:Stream_Write Unexecuted instantiation: pipe.c:Stream_Write Unexecuted instantiation: ArrayList.c:Stream_Write Unexecuted instantiation: PacketMessage.c:Stream_Write Unexecuted instantiation: handle.c:Stream_Write Unexecuted instantiation: thread.c:Stream_Write Unexecuted instantiation: comm_io.c:Stream_Write Unexecuted instantiation: image.c:Stream_Write Unexecuted instantiation: cliprdr_common.c:Stream_Write |
1196 | | |
1197 | | static inline void Stream_Seek_UINT8(wStream* _s) |
1198 | 0 | { |
1199 | 0 | Stream_Seek(_s, sizeof(UINT8)); |
1200 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Seek_UINT8 Unexecuted instantiation: stream.c:Stream_Seek_UINT8 Unexecuted instantiation: BinaryAppender.c:Stream_Seek_UINT8 Unexecuted instantiation: event.c:Stream_Seek_UINT8 Unexecuted instantiation: wait.c:Stream_Seek_UINT8 Unexecuted instantiation: generic.c:Stream_Seek_UINT8 Unexecuted instantiation: namedPipeClient.c:Stream_Seek_UINT8 Unexecuted instantiation: comm.c:Stream_Seek_UINT8 Unexecuted instantiation: comm_ioctl.c:Stream_Seek_UINT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Seek_UINT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Seek_UINT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Seek_UINT8 Unexecuted instantiation: pipe.c:Stream_Seek_UINT8 Unexecuted instantiation: ArrayList.c:Stream_Seek_UINT8 Unexecuted instantiation: PacketMessage.c:Stream_Seek_UINT8 Unexecuted instantiation: handle.c:Stream_Seek_UINT8 Unexecuted instantiation: thread.c:Stream_Seek_UINT8 Unexecuted instantiation: comm_io.c:Stream_Seek_UINT8 Unexecuted instantiation: image.c:Stream_Seek_UINT8 Unexecuted instantiation: cliprdr_common.c:Stream_Seek_UINT8 |
1201 | | static inline void Stream_Seek_UINT16(wStream* _s) |
1202 | 0 | { |
1203 | 0 | Stream_Seek(_s, sizeof(UINT16)); |
1204 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Seek_UINT16 Unexecuted instantiation: stream.c:Stream_Seek_UINT16 Unexecuted instantiation: BinaryAppender.c:Stream_Seek_UINT16 Unexecuted instantiation: event.c:Stream_Seek_UINT16 Unexecuted instantiation: wait.c:Stream_Seek_UINT16 Unexecuted instantiation: generic.c:Stream_Seek_UINT16 Unexecuted instantiation: namedPipeClient.c:Stream_Seek_UINT16 Unexecuted instantiation: comm.c:Stream_Seek_UINT16 Unexecuted instantiation: comm_ioctl.c:Stream_Seek_UINT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Seek_UINT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Seek_UINT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Seek_UINT16 Unexecuted instantiation: pipe.c:Stream_Seek_UINT16 Unexecuted instantiation: ArrayList.c:Stream_Seek_UINT16 Unexecuted instantiation: PacketMessage.c:Stream_Seek_UINT16 Unexecuted instantiation: handle.c:Stream_Seek_UINT16 Unexecuted instantiation: thread.c:Stream_Seek_UINT16 Unexecuted instantiation: comm_io.c:Stream_Seek_UINT16 Unexecuted instantiation: image.c:Stream_Seek_UINT16 Unexecuted instantiation: cliprdr_common.c:Stream_Seek_UINT16 |
1205 | | static inline void Stream_Seek_UINT32(wStream* _s) |
1206 | 0 | { |
1207 | 0 | Stream_Seek(_s, sizeof(UINT32)); |
1208 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Seek_UINT32 Unexecuted instantiation: stream.c:Stream_Seek_UINT32 Unexecuted instantiation: BinaryAppender.c:Stream_Seek_UINT32 Unexecuted instantiation: event.c:Stream_Seek_UINT32 Unexecuted instantiation: wait.c:Stream_Seek_UINT32 Unexecuted instantiation: generic.c:Stream_Seek_UINT32 Unexecuted instantiation: namedPipeClient.c:Stream_Seek_UINT32 Unexecuted instantiation: comm.c:Stream_Seek_UINT32 Unexecuted instantiation: comm_ioctl.c:Stream_Seek_UINT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Seek_UINT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Seek_UINT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Seek_UINT32 Unexecuted instantiation: pipe.c:Stream_Seek_UINT32 Unexecuted instantiation: ArrayList.c:Stream_Seek_UINT32 Unexecuted instantiation: PacketMessage.c:Stream_Seek_UINT32 Unexecuted instantiation: handle.c:Stream_Seek_UINT32 Unexecuted instantiation: thread.c:Stream_Seek_UINT32 Unexecuted instantiation: comm_io.c:Stream_Seek_UINT32 Unexecuted instantiation: image.c:Stream_Seek_UINT32 Unexecuted instantiation: cliprdr_common.c:Stream_Seek_UINT32 |
1209 | | static inline void Stream_Seek_UINT64(wStream* _s) |
1210 | 0 | { |
1211 | 0 | Stream_Seek(_s, sizeof(UINT64)); |
1212 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Seek_UINT64 Unexecuted instantiation: stream.c:Stream_Seek_UINT64 Unexecuted instantiation: BinaryAppender.c:Stream_Seek_UINT64 Unexecuted instantiation: event.c:Stream_Seek_UINT64 Unexecuted instantiation: wait.c:Stream_Seek_UINT64 Unexecuted instantiation: generic.c:Stream_Seek_UINT64 Unexecuted instantiation: namedPipeClient.c:Stream_Seek_UINT64 Unexecuted instantiation: comm.c:Stream_Seek_UINT64 Unexecuted instantiation: comm_ioctl.c:Stream_Seek_UINT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Seek_UINT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Seek_UINT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Seek_UINT64 Unexecuted instantiation: pipe.c:Stream_Seek_UINT64 Unexecuted instantiation: ArrayList.c:Stream_Seek_UINT64 Unexecuted instantiation: PacketMessage.c:Stream_Seek_UINT64 Unexecuted instantiation: handle.c:Stream_Seek_UINT64 Unexecuted instantiation: thread.c:Stream_Seek_UINT64 Unexecuted instantiation: comm_io.c:Stream_Seek_UINT64 Unexecuted instantiation: image.c:Stream_Seek_UINT64 Unexecuted instantiation: cliprdr_common.c:Stream_Seek_UINT64 |
1213 | | |
1214 | | static inline void Stream_Rewind_UINT8(wStream* _s) |
1215 | 0 | { |
1216 | 0 | Stream_Rewind(_s, sizeof(UINT8)); |
1217 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Rewind_UINT8 Unexecuted instantiation: stream.c:Stream_Rewind_UINT8 Unexecuted instantiation: BinaryAppender.c:Stream_Rewind_UINT8 Unexecuted instantiation: event.c:Stream_Rewind_UINT8 Unexecuted instantiation: wait.c:Stream_Rewind_UINT8 Unexecuted instantiation: generic.c:Stream_Rewind_UINT8 Unexecuted instantiation: namedPipeClient.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm_ioctl.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm_serial_sys.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm_sercx_sys.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Rewind_UINT8 Unexecuted instantiation: pipe.c:Stream_Rewind_UINT8 Unexecuted instantiation: ArrayList.c:Stream_Rewind_UINT8 Unexecuted instantiation: PacketMessage.c:Stream_Rewind_UINT8 Unexecuted instantiation: handle.c:Stream_Rewind_UINT8 Unexecuted instantiation: thread.c:Stream_Rewind_UINT8 Unexecuted instantiation: comm_io.c:Stream_Rewind_UINT8 Unexecuted instantiation: image.c:Stream_Rewind_UINT8 Unexecuted instantiation: cliprdr_common.c:Stream_Rewind_UINT8 |
1218 | | static inline void Stream_Rewind_UINT16(wStream* _s) |
1219 | 0 | { |
1220 | 0 | Stream_Rewind(_s, sizeof(UINT16)); |
1221 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Rewind_UINT16 Unexecuted instantiation: stream.c:Stream_Rewind_UINT16 Unexecuted instantiation: BinaryAppender.c:Stream_Rewind_UINT16 Unexecuted instantiation: event.c:Stream_Rewind_UINT16 Unexecuted instantiation: wait.c:Stream_Rewind_UINT16 Unexecuted instantiation: generic.c:Stream_Rewind_UINT16 Unexecuted instantiation: namedPipeClient.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm_ioctl.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm_serial_sys.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm_sercx_sys.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Rewind_UINT16 Unexecuted instantiation: pipe.c:Stream_Rewind_UINT16 Unexecuted instantiation: ArrayList.c:Stream_Rewind_UINT16 Unexecuted instantiation: PacketMessage.c:Stream_Rewind_UINT16 Unexecuted instantiation: handle.c:Stream_Rewind_UINT16 Unexecuted instantiation: thread.c:Stream_Rewind_UINT16 Unexecuted instantiation: comm_io.c:Stream_Rewind_UINT16 Unexecuted instantiation: image.c:Stream_Rewind_UINT16 Unexecuted instantiation: cliprdr_common.c:Stream_Rewind_UINT16 |
1222 | | static inline void Stream_Rewind_UINT32(wStream* _s) |
1223 | 0 | { |
1224 | 0 | Stream_Rewind(_s, sizeof(UINT32)); |
1225 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Rewind_UINT32 Unexecuted instantiation: stream.c:Stream_Rewind_UINT32 Unexecuted instantiation: BinaryAppender.c:Stream_Rewind_UINT32 Unexecuted instantiation: event.c:Stream_Rewind_UINT32 Unexecuted instantiation: wait.c:Stream_Rewind_UINT32 Unexecuted instantiation: generic.c:Stream_Rewind_UINT32 Unexecuted instantiation: namedPipeClient.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm_ioctl.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm_serial_sys.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm_sercx_sys.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Rewind_UINT32 Unexecuted instantiation: pipe.c:Stream_Rewind_UINT32 Unexecuted instantiation: ArrayList.c:Stream_Rewind_UINT32 Unexecuted instantiation: PacketMessage.c:Stream_Rewind_UINT32 Unexecuted instantiation: handle.c:Stream_Rewind_UINT32 Unexecuted instantiation: thread.c:Stream_Rewind_UINT32 Unexecuted instantiation: comm_io.c:Stream_Rewind_UINT32 Unexecuted instantiation: image.c:Stream_Rewind_UINT32 Unexecuted instantiation: cliprdr_common.c:Stream_Rewind_UINT32 |
1226 | | static inline void Stream_Rewind_UINT64(wStream* _s) |
1227 | 0 | { |
1228 | 0 | Stream_Rewind(_s, sizeof(UINT64)); |
1229 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Rewind_UINT64 Unexecuted instantiation: stream.c:Stream_Rewind_UINT64 Unexecuted instantiation: BinaryAppender.c:Stream_Rewind_UINT64 Unexecuted instantiation: event.c:Stream_Rewind_UINT64 Unexecuted instantiation: wait.c:Stream_Rewind_UINT64 Unexecuted instantiation: generic.c:Stream_Rewind_UINT64 Unexecuted instantiation: namedPipeClient.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm_ioctl.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm_serial_sys.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm_sercx_sys.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm_sercx2_sys.c:Stream_Rewind_UINT64 Unexecuted instantiation: pipe.c:Stream_Rewind_UINT64 Unexecuted instantiation: ArrayList.c:Stream_Rewind_UINT64 Unexecuted instantiation: PacketMessage.c:Stream_Rewind_UINT64 Unexecuted instantiation: handle.c:Stream_Rewind_UINT64 Unexecuted instantiation: thread.c:Stream_Rewind_UINT64 Unexecuted instantiation: comm_io.c:Stream_Rewind_UINT64 Unexecuted instantiation: image.c:Stream_Rewind_UINT64 Unexecuted instantiation: cliprdr_common.c:Stream_Rewind_UINT64 |
1230 | | |
1231 | | static inline void Stream_Fill(wStream* _s, int _v, size_t _n) |
1232 | 0 | { |
1233 | 0 | WINPR_ASSERT(_s); |
1234 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= (_n)); |
1235 | 0 | memset(_s->pointer, _v, (_n)); |
1236 | 0 | Stream_Seek(_s, _n); |
1237 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Fill Unexecuted instantiation: stream.c:Stream_Fill Unexecuted instantiation: BinaryAppender.c:Stream_Fill Unexecuted instantiation: event.c:Stream_Fill Unexecuted instantiation: wait.c:Stream_Fill Unexecuted instantiation: generic.c:Stream_Fill Unexecuted instantiation: namedPipeClient.c:Stream_Fill Unexecuted instantiation: comm.c:Stream_Fill Unexecuted instantiation: comm_ioctl.c:Stream_Fill Unexecuted instantiation: comm_serial_sys.c:Stream_Fill Unexecuted instantiation: comm_sercx_sys.c:Stream_Fill Unexecuted instantiation: comm_sercx2_sys.c:Stream_Fill Unexecuted instantiation: pipe.c:Stream_Fill Unexecuted instantiation: ArrayList.c:Stream_Fill Unexecuted instantiation: PacketMessage.c:Stream_Fill Unexecuted instantiation: handle.c:Stream_Fill Unexecuted instantiation: thread.c:Stream_Fill Unexecuted instantiation: comm_io.c:Stream_Fill Unexecuted instantiation: image.c:Stream_Fill Unexecuted instantiation: cliprdr_common.c:Stream_Fill |
1238 | | |
1239 | | static inline void Stream_Zero(wStream* _s, size_t _n) |
1240 | 0 | { |
1241 | 0 | Stream_Fill(_s, '\0', _n); |
1242 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Zero Unexecuted instantiation: stream.c:Stream_Zero Unexecuted instantiation: BinaryAppender.c:Stream_Zero Unexecuted instantiation: event.c:Stream_Zero Unexecuted instantiation: wait.c:Stream_Zero Unexecuted instantiation: generic.c:Stream_Zero Unexecuted instantiation: namedPipeClient.c:Stream_Zero Unexecuted instantiation: comm.c:Stream_Zero Unexecuted instantiation: comm_ioctl.c:Stream_Zero Unexecuted instantiation: comm_serial_sys.c:Stream_Zero Unexecuted instantiation: comm_sercx_sys.c:Stream_Zero Unexecuted instantiation: comm_sercx2_sys.c:Stream_Zero Unexecuted instantiation: pipe.c:Stream_Zero Unexecuted instantiation: ArrayList.c:Stream_Zero Unexecuted instantiation: PacketMessage.c:Stream_Zero Unexecuted instantiation: handle.c:Stream_Zero Unexecuted instantiation: thread.c:Stream_Zero Unexecuted instantiation: comm_io.c:Stream_Zero Unexecuted instantiation: image.c:Stream_Zero Unexecuted instantiation: cliprdr_common.c:Stream_Zero |
1243 | | |
1244 | | #define Stream_SafeZero(s, size) Stream_SafeZeroEx(s, size, __FILE__, __LINE__, __func__) |
1245 | | |
1246 | | /** @brief Writes '\0' to the stream but aborts if there is not enough capacity available. |
1247 | | * |
1248 | | * Prefer to use the macro \ref Stream_SafeZero which already fills out the caller location. |
1249 | | * |
1250 | | * @param s The stream to write to. |
1251 | | * @param size The number of bytes to write to the stream |
1252 | | * @param file The name of the file this is called from |
1253 | | * @param line The file line number this is called from |
1254 | | * @param fkt The function this is called from |
1255 | | * |
1256 | | * @return \b TRUE if writing was successful, \b FALSE if there was an error with the stream |
1257 | | * reallocation |
1258 | | * |
1259 | | * @since version 3.31.0 |
1260 | | */ |
1261 | | WINPR_ATTR_NODISCARD |
1262 | | WINPR_API BOOL Stream_SafeZeroEx(wStream* s, size_t size, const char* file, size_t line, |
1263 | | const char* fkt); |
1264 | | |
1265 | | static inline void Stream_Copy(wStream* _src, wStream* _dst, size_t _n) |
1266 | 0 | { |
1267 | 0 | WINPR_ASSERT(_src); |
1268 | 0 | WINPR_ASSERT(_dst); |
1269 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_src) >= (_n)); |
1270 | 0 | WINPR_ASSERT(Stream_GetRemainingCapacity(_dst) >= (_n)); |
1271 | 0 |
|
1272 | 0 | memcpy(_dst->pointer, _src->pointer, _n); |
1273 | 0 | Stream_Seek(_dst, _n); |
1274 | 0 | Stream_Seek(_src, _n); |
1275 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Copy Unexecuted instantiation: stream.c:Stream_Copy Unexecuted instantiation: BinaryAppender.c:Stream_Copy Unexecuted instantiation: event.c:Stream_Copy Unexecuted instantiation: wait.c:Stream_Copy Unexecuted instantiation: generic.c:Stream_Copy Unexecuted instantiation: namedPipeClient.c:Stream_Copy Unexecuted instantiation: comm.c:Stream_Copy Unexecuted instantiation: comm_ioctl.c:Stream_Copy Unexecuted instantiation: comm_serial_sys.c:Stream_Copy Unexecuted instantiation: comm_sercx_sys.c:Stream_Copy Unexecuted instantiation: comm_sercx2_sys.c:Stream_Copy Unexecuted instantiation: pipe.c:Stream_Copy Unexecuted instantiation: ArrayList.c:Stream_Copy Unexecuted instantiation: PacketMessage.c:Stream_Copy Unexecuted instantiation: handle.c:Stream_Copy Unexecuted instantiation: thread.c:Stream_Copy Unexecuted instantiation: comm_io.c:Stream_Copy Unexecuted instantiation: image.c:Stream_Copy Unexecuted instantiation: cliprdr_common.c:Stream_Copy |
1276 | | |
1277 | | /** @brief Convenience macro to get a pointer to the stream buffer casted to a specific type |
1278 | | * |
1279 | | * @since version 3.9.0 |
1280 | | */ |
1281 | | #define Stream_BufferAs(s, type) WINPR_STREAM_CAST(type*, Stream_Buffer(s)) |
1282 | | |
1283 | | WINPR_ATTR_NODISCARD static inline BYTE* Stream_Buffer(wStream* _s) |
1284 | 0 | { |
1285 | 0 | WINPR_ASSERT(_s); |
1286 | 0 | return _s->buffer; |
1287 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Buffer Unexecuted instantiation: stream.c:Stream_Buffer Unexecuted instantiation: BinaryAppender.c:Stream_Buffer Unexecuted instantiation: event.c:Stream_Buffer Unexecuted instantiation: wait.c:Stream_Buffer Unexecuted instantiation: generic.c:Stream_Buffer Unexecuted instantiation: namedPipeClient.c:Stream_Buffer Unexecuted instantiation: comm.c:Stream_Buffer Unexecuted instantiation: comm_ioctl.c:Stream_Buffer Unexecuted instantiation: comm_serial_sys.c:Stream_Buffer Unexecuted instantiation: comm_sercx_sys.c:Stream_Buffer Unexecuted instantiation: comm_sercx2_sys.c:Stream_Buffer Unexecuted instantiation: pipe.c:Stream_Buffer Unexecuted instantiation: ArrayList.c:Stream_Buffer Unexecuted instantiation: PacketMessage.c:Stream_Buffer Unexecuted instantiation: handle.c:Stream_Buffer Unexecuted instantiation: thread.c:Stream_Buffer Unexecuted instantiation: comm_io.c:Stream_Buffer Unexecuted instantiation: image.c:Stream_Buffer Unexecuted instantiation: cliprdr_common.c:Stream_Buffer |
1288 | | |
1289 | | /** @brief Convenience macro to get a const pointer to the stream buffer casted to a specific type |
1290 | | * |
1291 | | * @since version 3.9.0 |
1292 | | */ |
1293 | | #define Stream_ConstBufferAs(s, type) WINPR_STREAM_CAST(type*, Stream_ConstBuffer(s)) |
1294 | | WINPR_ATTR_NODISCARD static inline const BYTE* Stream_ConstBuffer(const wStream* _s) |
1295 | 0 | { |
1296 | 0 | WINPR_ASSERT(_s); |
1297 | 0 | return _s->buffer; |
1298 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_ConstBuffer Unexecuted instantiation: stream.c:Stream_ConstBuffer Unexecuted instantiation: BinaryAppender.c:Stream_ConstBuffer Unexecuted instantiation: event.c:Stream_ConstBuffer Unexecuted instantiation: wait.c:Stream_ConstBuffer Unexecuted instantiation: generic.c:Stream_ConstBuffer Unexecuted instantiation: namedPipeClient.c:Stream_ConstBuffer Unexecuted instantiation: comm.c:Stream_ConstBuffer Unexecuted instantiation: comm_ioctl.c:Stream_ConstBuffer Unexecuted instantiation: comm_serial_sys.c:Stream_ConstBuffer Unexecuted instantiation: comm_sercx_sys.c:Stream_ConstBuffer Unexecuted instantiation: comm_sercx2_sys.c:Stream_ConstBuffer Unexecuted instantiation: pipe.c:Stream_ConstBuffer Unexecuted instantiation: ArrayList.c:Stream_ConstBuffer Unexecuted instantiation: PacketMessage.c:Stream_ConstBuffer Unexecuted instantiation: handle.c:Stream_ConstBuffer Unexecuted instantiation: thread.c:Stream_ConstBuffer Unexecuted instantiation: comm_io.c:Stream_ConstBuffer Unexecuted instantiation: image.c:Stream_ConstBuffer Unexecuted instantiation: cliprdr_common.c:Stream_ConstBuffer |
1299 | | |
1300 | | #define Stream_GetBuffer(_s, _b) _b = Stream_Buffer(_s) |
1301 | | |
1302 | | /** @brief Convenience macro to get a pointer to the stream buffer casted to a specific type |
1303 | | * |
1304 | | * @since version 3.9.0 |
1305 | | */ |
1306 | | #define Stream_GetBufferAs(_s, _b) _b = Stream_BufferAs(_s, __typeof(_b)) |
1307 | | |
1308 | | #define Stream_PointerAs(s, type) WINPR_STREAM_CAST(type*, Stream_Pointer(s)) |
1309 | | |
1310 | | WINPR_ATTR_NODISCARD static inline void* Stream_Pointer(wStream* _s) |
1311 | 0 | { |
1312 | 0 | WINPR_ASSERT(_s); |
1313 | 0 | return _s->pointer; |
1314 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Pointer Unexecuted instantiation: stream.c:Stream_Pointer Unexecuted instantiation: BinaryAppender.c:Stream_Pointer Unexecuted instantiation: event.c:Stream_Pointer Unexecuted instantiation: wait.c:Stream_Pointer Unexecuted instantiation: generic.c:Stream_Pointer Unexecuted instantiation: namedPipeClient.c:Stream_Pointer Unexecuted instantiation: comm.c:Stream_Pointer Unexecuted instantiation: comm_ioctl.c:Stream_Pointer Unexecuted instantiation: comm_serial_sys.c:Stream_Pointer Unexecuted instantiation: comm_sercx_sys.c:Stream_Pointer Unexecuted instantiation: comm_sercx2_sys.c:Stream_Pointer Unexecuted instantiation: pipe.c:Stream_Pointer Unexecuted instantiation: ArrayList.c:Stream_Pointer Unexecuted instantiation: PacketMessage.c:Stream_Pointer Unexecuted instantiation: handle.c:Stream_Pointer Unexecuted instantiation: thread.c:Stream_Pointer Unexecuted instantiation: comm_io.c:Stream_Pointer Unexecuted instantiation: image.c:Stream_Pointer Unexecuted instantiation: cliprdr_common.c:Stream_Pointer |
1315 | | |
1316 | | WINPR_ATTR_NODISCARD static inline const void* Stream_ConstPointer(const wStream* _s) |
1317 | 3.06M | { |
1318 | 3.06M | WINPR_ASSERT(_s); |
1319 | 3.06M | return _s->pointer; |
1320 | 3.06M | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_ConstPointer Unexecuted instantiation: stream.c:Stream_ConstPointer Unexecuted instantiation: BinaryAppender.c:Stream_ConstPointer Unexecuted instantiation: event.c:Stream_ConstPointer Unexecuted instantiation: wait.c:Stream_ConstPointer Unexecuted instantiation: generic.c:Stream_ConstPointer Unexecuted instantiation: namedPipeClient.c:Stream_ConstPointer Unexecuted instantiation: comm.c:Stream_ConstPointer Unexecuted instantiation: comm_ioctl.c:Stream_ConstPointer Unexecuted instantiation: comm_serial_sys.c:Stream_ConstPointer Unexecuted instantiation: comm_sercx_sys.c:Stream_ConstPointer Unexecuted instantiation: comm_sercx2_sys.c:Stream_ConstPointer Unexecuted instantiation: pipe.c:Stream_ConstPointer Unexecuted instantiation: ArrayList.c:Stream_ConstPointer Unexecuted instantiation: PacketMessage.c:Stream_ConstPointer Unexecuted instantiation: handle.c:Stream_ConstPointer Unexecuted instantiation: thread.c:Stream_ConstPointer Unexecuted instantiation: comm_io.c:Stream_ConstPointer Unexecuted instantiation: image.c:Stream_ConstPointer cliprdr_common.c:Stream_ConstPointer Line | Count | Source | 1317 | 3.06M | { | 1318 | 3.06M | WINPR_ASSERT(_s); | 1319 | 3.06M | return _s->pointer; | 1320 | 3.06M | } |
|
1321 | | |
1322 | | #define Stream_GetPointer(_s, _p) _p = Stream_Pointer(_s) |
1323 | | |
1324 | | /** @brief Convenience macro to get a pointer to the stream pointer casted to a specific type |
1325 | | * |
1326 | | * @since version 3.9.0 |
1327 | | */ |
1328 | | #define Stream_GetPointerAs(_s, _p) _p = Stream_PointerAs(_s, __typeof(_p)) |
1329 | | |
1330 | | #if defined(WITH_WINPR_DEPRECATED) |
1331 | | WINPR_DEPRECATED_VAR("Use Stream_SetPosition instead", |
1332 | | WINPR_ATTR_NODISCARD WINPR_API BOOL Stream_SetPointer(wStream* _s, |
1333 | | BYTE* _p)); |
1334 | | |
1335 | | WINPR_DEPRECATED_VAR("Use Stream_New(buffer, capacity) instead", |
1336 | | WINPR_ATTR_NODISCARD WINPR_API BOOL Stream_SetBuffer(wStream* _s, |
1337 | | BYTE* _b)); |
1338 | | |
1339 | | WINPR_DEPRECATED_VAR("Use Stream_New(buffer, capacity) instead", |
1340 | | WINPR_API void Stream_SetCapacity(wStream* _s, size_t capacity)); |
1341 | | #endif |
1342 | | |
1343 | | WINPR_ATTR_NODISCARD static inline size_t Stream_Length(const wStream* _s) |
1344 | 0 | { |
1345 | 0 | WINPR_ASSERT(_s); |
1346 | 0 | return _s->length; |
1347 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Length Unexecuted instantiation: stream.c:Stream_Length Unexecuted instantiation: BinaryAppender.c:Stream_Length Unexecuted instantiation: event.c:Stream_Length Unexecuted instantiation: wait.c:Stream_Length Unexecuted instantiation: generic.c:Stream_Length Unexecuted instantiation: namedPipeClient.c:Stream_Length Unexecuted instantiation: comm.c:Stream_Length Unexecuted instantiation: comm_ioctl.c:Stream_Length Unexecuted instantiation: comm_serial_sys.c:Stream_Length Unexecuted instantiation: comm_sercx_sys.c:Stream_Length Unexecuted instantiation: comm_sercx2_sys.c:Stream_Length Unexecuted instantiation: pipe.c:Stream_Length Unexecuted instantiation: ArrayList.c:Stream_Length Unexecuted instantiation: PacketMessage.c:Stream_Length Unexecuted instantiation: handle.c:Stream_Length Unexecuted instantiation: thread.c:Stream_Length Unexecuted instantiation: comm_io.c:Stream_Length Unexecuted instantiation: image.c:Stream_Length Unexecuted instantiation: cliprdr_common.c:Stream_Length |
1348 | | |
1349 | | #define Stream_GetLength(_s, _l) _l = Stream_Length(_s) |
1350 | | WINPR_ATTR_NODISCARD |
1351 | | WINPR_API BOOL Stream_SetLength(wStream* _s, size_t _l); |
1352 | | |
1353 | | WINPR_ATTR_NODISCARD static inline size_t Stream_Capacity(const wStream* _s) |
1354 | 137 | { |
1355 | 137 | WINPR_ASSERT(_s); |
1356 | 137 | return _s->capacity; |
1357 | 137 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Capacity Unexecuted instantiation: stream.c:Stream_Capacity Unexecuted instantiation: BinaryAppender.c:Stream_Capacity Unexecuted instantiation: event.c:Stream_Capacity Unexecuted instantiation: wait.c:Stream_Capacity Unexecuted instantiation: generic.c:Stream_Capacity Unexecuted instantiation: namedPipeClient.c:Stream_Capacity Unexecuted instantiation: comm.c:Stream_Capacity Unexecuted instantiation: comm_ioctl.c:Stream_Capacity Unexecuted instantiation: comm_serial_sys.c:Stream_Capacity Unexecuted instantiation: comm_sercx_sys.c:Stream_Capacity Unexecuted instantiation: comm_sercx2_sys.c:Stream_Capacity Unexecuted instantiation: pipe.c:Stream_Capacity Unexecuted instantiation: ArrayList.c:Stream_Capacity Unexecuted instantiation: PacketMessage.c:Stream_Capacity Unexecuted instantiation: handle.c:Stream_Capacity Unexecuted instantiation: thread.c:Stream_Capacity Unexecuted instantiation: comm_io.c:Stream_Capacity Unexecuted instantiation: image.c:Stream_Capacity cliprdr_common.c:Stream_Capacity Line | Count | Source | 1354 | 137 | { | 1355 | 137 | WINPR_ASSERT(_s); | 1356 | 137 | return _s->capacity; | 1357 | 137 | } |
|
1358 | | |
1359 | | #define Stream_GetCapacity(_s, _c) _c = Stream_Capacity(_s); |
1360 | | |
1361 | | WINPR_ATTR_NODISCARD static inline size_t Stream_GetPosition(const wStream* _s) |
1362 | 0 | { |
1363 | 0 | WINPR_ASSERT(_s); |
1364 | 0 | WINPR_ASSERT(_s->buffer <= _s->pointer); |
1365 | 0 | return WINPR_ASSERTING_INT_CAST(size_t, (_s->pointer - _s->buffer)); |
1366 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_GetPosition Unexecuted instantiation: stream.c:Stream_GetPosition Unexecuted instantiation: BinaryAppender.c:Stream_GetPosition Unexecuted instantiation: event.c:Stream_GetPosition Unexecuted instantiation: wait.c:Stream_GetPosition Unexecuted instantiation: generic.c:Stream_GetPosition Unexecuted instantiation: namedPipeClient.c:Stream_GetPosition Unexecuted instantiation: comm.c:Stream_GetPosition Unexecuted instantiation: comm_ioctl.c:Stream_GetPosition Unexecuted instantiation: comm_serial_sys.c:Stream_GetPosition Unexecuted instantiation: comm_sercx_sys.c:Stream_GetPosition Unexecuted instantiation: comm_sercx2_sys.c:Stream_GetPosition Unexecuted instantiation: pipe.c:Stream_GetPosition Unexecuted instantiation: ArrayList.c:Stream_GetPosition Unexecuted instantiation: PacketMessage.c:Stream_GetPosition Unexecuted instantiation: handle.c:Stream_GetPosition Unexecuted instantiation: thread.c:Stream_GetPosition Unexecuted instantiation: comm_io.c:Stream_GetPosition Unexecuted instantiation: image.c:Stream_GetPosition Unexecuted instantiation: cliprdr_common.c:Stream_GetPosition |
1367 | | |
1368 | | /** @brief helper to reset stream read/write position to beginning of stream. |
1369 | | * |
1370 | | * Same as \ref Stream_SetPosition(s, 0) but does not need bounds checks. |
1371 | | * |
1372 | | * @param _s A stream to reset the position on. Must not be \b nullptr |
1373 | | * |
1374 | | * @since version 3.24.0 |
1375 | | */ |
1376 | | static inline void Stream_ResetPosition(wStream* _s) |
1377 | 0 | { |
1378 | 0 | WINPR_ASSERT(_s); |
1379 | 0 | _s->pointer = _s->buffer; |
1380 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_ResetPosition Unexecuted instantiation: stream.c:Stream_ResetPosition Unexecuted instantiation: BinaryAppender.c:Stream_ResetPosition Unexecuted instantiation: event.c:Stream_ResetPosition Unexecuted instantiation: wait.c:Stream_ResetPosition Unexecuted instantiation: generic.c:Stream_ResetPosition Unexecuted instantiation: namedPipeClient.c:Stream_ResetPosition Unexecuted instantiation: comm.c:Stream_ResetPosition Unexecuted instantiation: comm_ioctl.c:Stream_ResetPosition Unexecuted instantiation: comm_serial_sys.c:Stream_ResetPosition Unexecuted instantiation: comm_sercx_sys.c:Stream_ResetPosition Unexecuted instantiation: comm_sercx2_sys.c:Stream_ResetPosition Unexecuted instantiation: pipe.c:Stream_ResetPosition Unexecuted instantiation: ArrayList.c:Stream_ResetPosition Unexecuted instantiation: PacketMessage.c:Stream_ResetPosition Unexecuted instantiation: handle.c:Stream_ResetPosition Unexecuted instantiation: thread.c:Stream_ResetPosition Unexecuted instantiation: comm_io.c:Stream_ResetPosition Unexecuted instantiation: image.c:Stream_ResetPosition Unexecuted instantiation: cliprdr_common.c:Stream_ResetPosition |
1381 | | |
1382 | | WINPR_ATTR_NODISCARD |
1383 | | WINPR_API BOOL Stream_SetPosition(wStream* _s, size_t _p); |
1384 | | |
1385 | | WINPR_API void Stream_SealLength(wStream* _s); |
1386 | | |
1387 | | static inline void Stream_Clear(wStream* _s) |
1388 | 0 | { |
1389 | 0 | WINPR_ASSERT(_s); |
1390 | 0 | memset(_s->buffer, 0, _s->capacity); |
1391 | 0 | } Unexecuted instantiation: TestFuzzChannelCliprdr.c:Stream_Clear Unexecuted instantiation: stream.c:Stream_Clear Unexecuted instantiation: BinaryAppender.c:Stream_Clear Unexecuted instantiation: event.c:Stream_Clear Unexecuted instantiation: wait.c:Stream_Clear Unexecuted instantiation: generic.c:Stream_Clear Unexecuted instantiation: namedPipeClient.c:Stream_Clear Unexecuted instantiation: comm.c:Stream_Clear Unexecuted instantiation: comm_ioctl.c:Stream_Clear Unexecuted instantiation: comm_serial_sys.c:Stream_Clear Unexecuted instantiation: comm_sercx_sys.c:Stream_Clear Unexecuted instantiation: comm_sercx2_sys.c:Stream_Clear Unexecuted instantiation: pipe.c:Stream_Clear Unexecuted instantiation: ArrayList.c:Stream_Clear Unexecuted instantiation: PacketMessage.c:Stream_Clear Unexecuted instantiation: handle.c:Stream_Clear Unexecuted instantiation: thread.c:Stream_Clear Unexecuted instantiation: comm_io.c:Stream_Clear Unexecuted instantiation: image.c:Stream_Clear Unexecuted instantiation: cliprdr_common.c:Stream_Clear |
1392 | | |
1393 | 4.49M | #define Stream_SafeSeek(s, size) Stream_SafeSeekEx(s, size, __FILE__, __LINE__, __func__) |
1394 | | WINPR_ATTR_NODISCARD |
1395 | | WINPR_API BOOL Stream_SafeSeekEx(wStream* s, size_t size, const char* file, size_t line, |
1396 | | const char* fkt); |
1397 | | |
1398 | | WINPR_ATTR_NODISCARD |
1399 | | WINPR_API BOOL Stream_Read_UTF16_String(wStream* s, WCHAR* dst, size_t charLength); |
1400 | | |
1401 | | WINPR_ATTR_NODISCARD |
1402 | | WINPR_API BOOL Stream_Write_UTF16_String(wStream* s, const WCHAR* src, size_t charLength); |
1403 | | |
1404 | | /** \brief Reads a WCHAR string from a stream and converts it to UTF-8 and returns a newly |
1405 | | * allocated string |
1406 | | * |
1407 | | * \param s The stream to read data from |
1408 | | * \param wcharLength The number of WCHAR characters to read (NOT the size in bytes!) |
1409 | | * \param pUtfCharLength Ignored if \b nullptr, otherwise will be set to the number of |
1410 | | * characters in the resulting UTF-8 string |
1411 | | * \return A '\0' terminated UTF-8 encoded string or nullptr for any failure. |
1412 | | */ |
1413 | | WINPR_ATTR_MALLOC(free, 1) |
1414 | | WINPR_API char* Stream_Read_UTF16_String_As_UTF8(wStream* s, size_t wcharLength, |
1415 | | size_t* pUtfCharLength); |
1416 | | |
1417 | | /** \brief Reads a WCHAR string from a stream and converts it to UTF-8 and |
1418 | | * writes it to the supplied buffer |
1419 | | * |
1420 | | * \param s The stream to read data from |
1421 | | * \param wcharLength The number of WCHAR characters to read (NOT the size in bytes!) |
1422 | | * \param utfBuffer A pointer to a buffer holding the result string |
1423 | | * \param utfBufferCharLength The size of the result buffer |
1424 | | * \return The char length (strlen) of the result string or -1 for failure |
1425 | | */ |
1426 | | WINPR_ATTR_NODISCARD |
1427 | | WINPR_API SSIZE_T Stream_Read_UTF16_String_As_UTF8_Buffer(wStream* s, size_t wcharLength, |
1428 | | char* utfBuffer, |
1429 | | size_t utfBufferCharLength); |
1430 | | |
1431 | | /** \brief Writes a UTF-8 string UTF16 encoded to the stream. If the UTF-8 |
1432 | | * string is short, the remaining characters are filled up with '\0' |
1433 | | * |
1434 | | * \warning This function does not ensure '\0' termination in the resulting WCHAR string. |
1435 | | * |
1436 | | * \param s The stream to write to |
1437 | | * \param wcharLength the length (in WCHAR characters) to write |
1438 | | * \param src The source data buffer with the UTF-8 data |
1439 | | * \param length The length in bytes of the UTF-8 buffer |
1440 | | * \param fill If \b TRUE fill the unused parts of the wcharLength with 0 |
1441 | | * |
1442 | | * \return number of used characters for success, /b -1 for failure |
1443 | | * \since version 3.0.0 |
1444 | | */ |
1445 | | WINPR_ATTR_NODISCARD |
1446 | | WINPR_API SSIZE_T Stream_Write_UTF16_String_From_UTF8(wStream* s, size_t wcharLength, |
1447 | | const char* src, size_t length, |
1448 | | BOOL fill); |
1449 | | |
1450 | | /* StreamPool */ |
1451 | | |
1452 | | WINPR_API void StreamPool_Return(wStreamPool* pool, wStream* s); |
1453 | | |
1454 | | /** @brief increment reference count of stream |
1455 | | * |
1456 | | * @param s The stream to reference |
1457 | | * @bug versions < 3.13.0 did only handle streams returned by StreamPool_Take |
1458 | | */ |
1459 | | WINPR_API void Stream_AddRef(wStream* s); |
1460 | | |
1461 | | /** @brief Release a reference to a stream. |
1462 | | * If the reference count reaches \b 0 it is returned to the StreamPool it was taken from or \b |
1463 | | * Stream_Free is called. |
1464 | | * |
1465 | | * @param s The stream to release |
1466 | | * @bug versions < 3.13.0 did only handle streams returned by StreamPool_Take |
1467 | | */ |
1468 | | WINPR_API void Stream_Release(wStream* s); |
1469 | | |
1470 | | WINPR_ATTR_MALLOC(Stream_Release, 1) |
1471 | | WINPR_ATTR_NODISCARD |
1472 | | WINPR_API wStream* StreamPool_Take(wStreamPool* pool, size_t size); |
1473 | | |
1474 | | WINPR_ATTR_NODISCARD |
1475 | | WINPR_API wStream* StreamPool_Find(wStreamPool* pool, const BYTE* ptr); |
1476 | | |
1477 | | /** Return the number of streams still not returned to the pool |
1478 | | * |
1479 | | * @param pool The pool to query, must not be \b nullptr |
1480 | | * |
1481 | | * @return the number of streams still in use |
1482 | | * |
1483 | | * @since version 3.10.0 |
1484 | | */ |
1485 | | WINPR_ATTR_NODISCARD |
1486 | | WINPR_API size_t StreamPool_UsedCount(wStreamPool* pool); |
1487 | | |
1488 | | /** Wait up to \b timeoutMS milliseconds for streams to be returned to the pool. |
1489 | | * Use \b INFINITE for an infinite timeout |
1490 | | * |
1491 | | * @param pool The pool to query, must not be \b nullptr |
1492 | | * @param timeoutMS Milliseconds to wait at most, use \b INFINITE for no timeout. |
1493 | | * |
1494 | | * @return \b TRUE in case all streams were returned, \b FALSE otherwise. |
1495 | | * |
1496 | | * @since version 3.10.0 |
1497 | | */ |
1498 | | WINPR_API BOOL StreamPool_WaitForReturn(wStreamPool* pool, UINT32 timeoutMS); |
1499 | | |
1500 | | WINPR_API void StreamPool_Clear(wStreamPool* pool); |
1501 | | |
1502 | | WINPR_API void StreamPool_Free(wStreamPool* pool); |
1503 | | |
1504 | | WINPR_ATTR_MALLOC(StreamPool_Free, 1) |
1505 | | WINPR_API wStreamPool* StreamPool_New(BOOL synchronized, size_t defaultSize); |
1506 | | |
1507 | | WINPR_API char* StreamPool_GetStatistics(wStreamPool* pool, char* buffer, size_t size); |
1508 | | |
1509 | | #ifdef __cplusplus |
1510 | | } |
1511 | | #endif |
1512 | | |
1513 | | #endif /* WINPR_UTILS_STREAM_H */ |