Lines Matching refs:buf

146 print_buf(const char *prefix, char *buf, uint32_t len)  in print_buf()  argument
153 putchar(buf[i]); in print_buf()
174 uint8_t byte, buf[10], small[5], i; in main() local
183 run_test(NULL, 0, buf, sizeof buf, 0x00); in main()
184 run_test(NULL, 0, buf, sizeof buf, 0xFF); in main()
189 memset(buf, 'x', sizeof buf); in main()
190 run_test(buf, sizeof buf, NULL, 0, 'a'); in main()
198 memset(buf, 'x', sizeof buf); in main()
199 for (i = 0; i <= sizeof buf; ++i) in main()
200 run_test(buf, i, buf, sizeof buf, 'a'); in main()
204 memset(buf, 'b', sizeof buf); in main()
206 run_test(buf, sizeof buf, small, sizeof small, 'a'); in main()
210 memset(buf, 'b', sizeof buf); in main()
212 run_test(small, sizeof small, buf, sizeof buf, 'a'); in main()
216 memcpy(buf, "0123456789", 10); in main()
217 run_test(buf, sizeof buf, buf + 5, 5, 'x'); in main()
221 memcpy(buf, "0123456789", 10); in main()
222 run_test(buf, 5, buf + 4, 3, 'x'); in main()
227 memcpy(buf, "0123456789", 10); in main()
228 run_test(buf + 3, 1, buf, 10, 'x'); // non-destructive in main()
229 memcpy(buf, "0123456789", 10); in main()
230 run_test(buf + 3, 2, buf, 10, 'x'); // non-destructive in main()
231 memcpy(buf, "0123456789", 10); in main()
232 run_test(buf + 3, 3, buf, 10, 'x'); // non-destructive in main()
233 memcpy(buf, "0123456789", 10); in main()
234 run_test(buf + 3, 4, buf, 10, 'x'); // destructive in main()
235 memcpy(buf, "0123456789", 10); in main()
236 run_test(buf + 3, 5, buf, 10, 'x'); // destructive in main()
237 memcpy(buf, "0123456789", 10); in main()
238 run_test(buf + 3, 6, buf, 10, 'x'); // destructive in main()
239 memcpy(buf, "0123456789", 10); in main()
240 run_test(buf + 3, 7, buf, 10, 'x'); // destructive in main()
245 memcpy(buf, "0123456789", 10); in main()
246 run_test(buf + 3, 1, buf, 0, 'x'); // non-destructive in main()
247 memcpy(buf, "0123456789", 10); in main()
248 run_test(buf + 3, 2, buf, 0, 'x'); // non-destructive in main()
249 memcpy(buf, "0123456789", 10); in main()
250 run_test(buf + 3, 3, buf, 0, 'x'); // non-destructive in main()
251 memcpy(buf, "0123456789", 10); in main()
252 run_test(buf + 3, 4, buf, 0, 'x'); // non-destructive in main()
253 memcpy(buf, "0123456789", 10); in main()
254 run_test(buf + 3, 4, buf, 0, 'x'); // non-destructive in main()
255 memcpy(buf, "0123456789", 10); in main()
256 run_test(buf + 3, 5, buf, 0, 'x'); // non-destructive in main()
257 memcpy(buf, "0123456789", 10); in main()
258 run_test(buf + 3, 6, buf, 0, 'x'); // non-destructive in main()
259 memcpy(buf, "0123456789", 10); in main()
260 run_test(buf + 3, 7, buf, 0, 'x'); // non-destructive in main()
264 for (dst_offset = 0; dst_offset < sizeof buf; ++dst_offset) in main()
265 for (dst_len = 0; dst_len <= sizeof buf - dst_offset; ++dst_len) in main()
266 for (src_offset = 0; src_offset < sizeof buf; ++src_offset) in main()
267 for (src_len = 0; src_len <= sizeof buf - src_offset; ++src_len) in main()
268 run_test(buf + dst_offset, dst_len, buf + src_offset, src_len, 'x'); in main()