Home
last modified time | relevance | path

Searched refs:buf1 (Results 1 – 25 of 135) sorted by relevance

123456

/netbsd-src/sys/external/isc/libsodium/dist/test/default/
H A Dcodecs.c7 unsigned char buf1[1000]; in main() local
37 if (sodium_hex2bin(buf1, 1U, hex, 8U, NULL, &bin_len, &hex_end) != -1) { in main()
43 if (sodium_hex2bin(buf1, 4U, hex, 12U, ":", &bin_len, &hex_end) != -1) { in main()
51 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main()
58 if (sodium_hex2bin(buf1, sizeof buf1, hex, 13U, ":", in main()
65 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main()
71 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main()
78 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main()
128 memset(buf1, '*', sizeof buf1); in main()
129 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), "\n\r ", &bin_len, in main()
[all …]
H A Dsodium_utils.c8 unsigned char buf1[1000]; in main() local
22 randombytes_buf(buf1, sizeof buf1); in main()
23 memcpy(buf2, buf1, sizeof buf2); in main()
24 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main()
25 sodium_memzero(buf1, 0U); in main()
26 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main()
27 sodium_memzero(buf1, sizeof buf1 / 2); in main()
28 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main()
29 printf("%d\n", sodium_memcmp(buf1, buf2, 0U)); in main()
31 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main()
[all …]
/netbsd-src/games/battlestar/
H A Dgetcom.c76 getword(char *buf1, char *buf2, int flag) in getword() argument
81 while (isspace((unsigned char)*buf1)) in getword()
82 buf1++; in getword()
83 if (*buf1 != ',') { in getword()
84 if (!*buf1) { in getword()
88 while (cnt < WORDLEN && *buf1 && in getword()
89 !isspace((unsigned char)*buf1) && *buf1 != ',') in getword()
91 if (isupper((unsigned char)*buf1)) { in getword()
93 tolower((unsigned char)*buf1++); in getword()
96 *buf2++ = *buf1++; in getword()
[all …]
/netbsd-src/tests/lib/libc/string/
H A Dt_strcmp.c27 char buf1[64]; in ATF_TC_BODY() local
81 memcpy(&buf1[a1], tab[t].val1, in ATF_TC_BODY()
84 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY()
92 &buf0[a0], &buf1[a1], ret); in ATF_TC_BODY()
108 char buf1[10] = "xxx"; in ATF_TC_BODY() local
111 ATF_CHECK(strcmp(buf1, buf1) == 0); in ATF_TC_BODY()
118 ATF_CHECK(strcmp(buf1 + 0, buf2 + 0) < 0); in ATF_TC_BODY()
119 ATF_CHECK(strcmp(buf1 + 1, buf2 + 1) < 0); in ATF_TC_BODY()
120 ATF_CHECK(strcmp(buf1 + 2, buf2 + 2) < 0); in ATF_TC_BODY()
121 ATF_CHECK(strcmp(buf1 + 3, buf2 + 3) == 0); in ATF_TC_BODY()
[all …]
H A Dt_strcpy.c27 char buf1[64]; in ATF_TC_BODY() local
90 memcpy(&buf1[a1], tab[t].val, tab[t].len + 1); in ATF_TC_BODY()
91 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY()
107 if (memcmp(&buf0[a0], &buf1[a1], in ATF_TC_BODY()
H A Dt_strcat.c27 char buf1[64]; in ATF_TC_BODY() local
93 memcpy(&buf1[a1], tab[t1].val, in ATF_TC_BODY()
96 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY()
112 &buf1[a1], in ATF_TC_BODY()
/netbsd-src/crypto/external/bsd/openssl.old/dist/test/
H A Dpackettest.c243 char buf1[10], buf2[10]; in test_PACKET_strndup() local
248 memset(buf1, 'x', 10); in test_PACKET_strndup()
252 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_strndup()
255 || !TEST_strn_eq(data, buf1, 10) in test_PACKET_strndup()
270 char buf1[10], buf2[10]; in test_PACKET_contains_zero_byte() local
273 memset(buf1, 'x', 10); in test_PACKET_contains_zero_byte()
277 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_contains_zero_byte()
305 unsigned char buf1[BUF_LEN] = { 0 }; in test_PACKET_buf_init() local
309 if (!TEST_true(PACKET_buf_init(&pkt, buf1, 4)) in test_PACKET_buf_init()
311 || !TEST_true(PACKET_buf_init(&pkt, buf1, BUF_LEN)) in test_PACKET_buf_init()
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/test/
H A Dpackettest.c243 char buf1[10], buf2[10]; in test_PACKET_strndup() local
248 memset(buf1, 'x', 10); in test_PACKET_strndup()
252 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_strndup()
255 || !TEST_strn_eq(data, buf1, 10) in test_PACKET_strndup()
270 char buf1[10], buf2[10]; in test_PACKET_contains_zero_byte() local
273 memset(buf1, 'x', 10); in test_PACKET_contains_zero_byte()
277 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_contains_zero_byte()
305 unsigned char buf1[BUF_LEN] = { 0 }; in test_PACKET_buf_init() local
309 if (!TEST_true(PACKET_buf_init(&pkt, buf1, 4)) in test_PACKET_buf_init()
311 || !TEST_true(PACKET_buf_init(&pkt, buf1, BUF_LEN)) in test_PACKET_buf_init()
[all …]
/netbsd-src/external/mpl/bind/dist/tests/isc/
H A Dsafe_test.c61 char buf1[4] = { 1, 2, 3, 4 }; in ISC_RUN_TEST_IMPL() local
64 isc_safe_memwipe(buf1, sizeof(buf1)); in ISC_RUN_TEST_IMPL()
67 assert_int_equal(memcmp(buf1, buf2, sizeof(buf1)), 0); in ISC_RUN_TEST_IMPL()
74 char buf1[4] = { 1, 2, 3, 4 }; in ISC_RUN_TEST_IMPL() local
81 isc_safe_memwipe(buf1, 3); in ISC_RUN_TEST_IMPL()
84 assert_int_equal(memcmp(buf1, buf2, sizeof(buf1)), 0); in ISC_RUN_TEST_IMPL()
/netbsd-src/external/bsd/libevent/dist/test/
H A Dregress_buffer.c465 struct evbuffer *buf1 = NULL, *buf2 = NULL; in test_evbuffer_remove_buffer_with_empty_front() local
467 buf1 = evbuffer_new(); in test_evbuffer_remove_buffer_with_empty_front()
468 tt_assert(buf1); in test_evbuffer_remove_buffer_with_empty_front()
473 tt_int_op(evbuffer_add_reference(buf1, "foo", 3, NULL, NULL), ==, 0); in test_evbuffer_remove_buffer_with_empty_front()
474 tt_int_op(evbuffer_prepend(buf1, "", 0), ==, 0); in test_evbuffer_remove_buffer_with_empty_front()
475 tt_int_op(evbuffer_remove_buffer(buf1, buf2, 1), ==, 1); in test_evbuffer_remove_buffer_with_empty_front()
476 tt_int_op(evbuffer_add(buf1, "bar", 3), ==, 0); in test_evbuffer_remove_buffer_with_empty_front()
477 tt_mem_op(evbuffer_pullup(buf1, -1), ==, "oobar", 5); in test_evbuffer_remove_buffer_with_empty_front()
479 evbuffer_validate(buf1); in test_evbuffer_remove_buffer_with_empty_front()
483 if (buf1) in test_evbuffer_remove_buffer_with_empty_front()
[all …]
/netbsd-src/lib/libform/
H A Dtype_ipv4.c63 char *buf, *buf1, *keeper, *p, *slash; in ipv4_check_field() local
130 buf1 = NULL; in ipv4_check_field()
137 if (asprintf(&buf1, "%d.%d.%d.%d", vals[0], vals[1], in ipv4_check_field()
146 if (asprintf(&buf1, "%d.%d.%d.%d", vals[0], vals[1], in ipv4_check_field()
154 if (asprintf(&buf1, "%d.%d.%d.%d", vals[0], vals[1], in ipv4_check_field()
168 set_field_buffer(field, 1, buf1); in ipv4_check_field()
172 _formi_dbg_printf("%s: buf1 set to %s\n", __func__, buf1); in ipv4_check_field()
175 free(buf1); in ipv4_check_field()
/netbsd-src/tests/crypto/opencrypto/
H A Dh_comp.c48 unsigned char buf1[10000], buf2[100000]; in main() local
64 co1.dst = buf1; in main()
65 co1.dst_len = sizeof(buf1); in main()
71 buf1[co1.dst_len - 8]++; /* modify CRC */ in main()
73 write(1, buf1, co1.dst_len); in main()
78 co2.src = buf1; in main()
H A Dh_comp_zlib.c47 unsigned char buf1[10000], buf2[10000]; in main() local
64 co1.dst = buf1; in main()
65 co1.dst_len = sizeof(buf1); in main()
72 z.next_in = buf1; in main()
H A Dh_comp_zlib_rnd.c49 unsigned char buf1[10000], buf2[10000]; in main() local
69 co1.dst = buf1; in main()
70 co1.dst_len = sizeof(buf1); in main()
76 z.next_in = buf1; in main()
/netbsd-src/sys/dev/raidframe/
H A Drf_raid1.c274 char *bf, *buf1, *buf2; in rf_VerifyParityRAID1() local
331 buf1 = bf; in rf_VerifyParityRAID1()
345 pda->bufPtr = buf1; in rf_VerifyParityRAID1()
347 blockNode->succedents[i]->params[1].p = buf1; in rf_VerifyParityRAID1()
350 buf1 += nbytes; in rf_VerifyParityRAID1()
366 pda->bufPtr = buf1; in rf_VerifyParityRAID1()
368 blockNode->succedents[i]->params[1].p = buf1; in rf_VerifyParityRAID1()
371 buf1 += nbytes; in rf_VerifyParityRAID1()
408 buf1 = bf; in rf_VerifyParityRAID1()
427 raidPtr->raidid, nbytes, i, (long) buf1, in rf_VerifyParityRAID1()
[all …]
/netbsd-src/external/public-domain/xz/dist/src/liblzma/common/
H A Dmemcmplen.h43 lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, in uint32_t()
64 const uint64_t x = *(const uint64_t *)(buf1 + len) in uint32_t()
98 _mm_loadu_si128((const __m128i *)(buf1 + len)), in uint32_t()
123 uint32_t x = *(const uint32_t *)(buf1 + len) in uint32_t()
146 uint32_t x = *(const uint32_t *)(buf1 + len) in uint32_t()
168 while (len < limit && buf1[len] == buf2[len]) in uint32_t()
/netbsd-src/crypto/external/bsd/heimdal/dist/lib/krb5/
H A Dn-fold.c121 uint8_t *buf1; in _krb5_n_fold() local
128 buf1 = tmp + maxlen; in _krb5_n_fold()
132 memcpy(buf1, str, len); in _krb5_n_fold()
133 memcpy(tmp, buf1, len); in _krb5_n_fold()
143 rr13(tmp + l, buf2, buf1, len * 8); in _krb5_n_fold()
144 tmpbuf = buf1; in _krb5_n_fold()
145 buf1 = buf2; in _krb5_n_fold()
/netbsd-src/bin/stty/
H A Dprint.c62 char buf1[100], buf2[100]; in print() local
170 (void)snprintf(buf1, sizeof(buf1), "%s = %s;", in print()
172 bput(buf1); in print()
181 (void)snprintf(buf1 + cnt * 8, 9, WD, p->name); in print()
185 (void)printf("%s\n", buf1); in print()
190 (void)printf("%s\n", buf1); in print()
/netbsd-src/usr.bin/locate/bigram/
H A Dlocate.bigram.c63 static char buf1[MAXPATHLEN] = " "; variable
97 char *oldpath = buf1, *path = buf2; in main()
121 if (path == buf1) /* swap pointers */ in main()
122 path = buf2, oldpath = buf1; in main()
124 path = buf1, oldpath = buf2; in main()
/netbsd-src/external/bsd/liblzf/dist/
H A Dlzf.c177 u8 buf1[MAX_BLOCKSIZE + MAX_HDR_SIZE + 16]; in compress_fd() local
182 while ((us = rread (from, &buf1[MAX_HDR_SIZE], blocksize)) > 0) in compress_fd()
184 cs = lzf_compress (&buf1[MAX_HDR_SIZE], us, &buf2[MAX_HDR_SIZE], us > 4 ? us - 4 : us); in compress_fd()
199 header = &buf1[MAX_HDR_SIZE - TYPE0_HDR_SIZE]; in compress_fd()
219 u8 buf1[MAX_BLOCKSIZE + MAX_HDR_SIZE + 16]; in uncompress_fd() local
272 memcpy (buf1, p, l); in uncompress_fd()
280 p = &buf1[l]; in uncompress_fd()
288 if (wwrite (to, buf1, us)) in uncompress_fd()
293 if (lzf_decompress (buf1, cs, buf2, us) != us) in uncompress_fd()
/netbsd-src/usr.bin/locate/code/
H A Dlocate.code.c96 static char buf1[MAXPATHLEN] = " "; variable
127 oldpath = buf1; in main()
175 if (path == buf1) { /* swap pointers */ in main()
177 oldpath = buf1; in main()
179 path = buf1; in main()
/netbsd-src/lib/libc/gdtoa/test/
H A Ddt.c190 char buf[2048], buf1[32]; in main() local
237 g_fmt(buf1, dval(&d)); in main()
238 printf("\tg_fmt gives \"%s\"\n", buf1); in main()
262 g_fmt(buf1, dval(&d)); in main()
263 printf("\tg_fmt gives \"%s\"\n", buf1); in main()
281 g_fmt(buf1, dval(&d)); in main()
282 printf("\tg_fmt gives \"%s\"\n", buf1); in main()
/netbsd-src/external/gpl3/gdb.old/dist/readline/readline/examples/
H A Drl-fgets.c225 char buf1[256], buf2[256] ; in my_fgets_lookup() local
247 for ( i = 0 ; _fgets(buf1,255,fp) ; i ++ ) ; in my_fgets_lookup()
252 while ( _fgets(buf1,255,fp) ) { in my_fgets_lookup()
253 buf1[255] = 0 ; in my_fgets_lookup()
254 if ( 1 == sscanf(buf1,"%s",buf2) ) { in my_fgets_lookup()
/netbsd-src/external/gpl3/gdb/dist/readline/readline/examples/
H A Drl-fgets.c225 char buf1[256], buf2[256] ; in my_fgets_lookup() local
247 for ( i = 0 ; _fgets(buf1,255,fp) ; i ++ ) ; in my_fgets_lookup()
252 while ( _fgets(buf1,255,fp) ) { in my_fgets_lookup()
253 buf1[255] = 0 ; in my_fgets_lookup()
254 if ( 1 == sscanf(buf1,"%s",buf2) ) { in my_fgets_lookup()
/netbsd-src/external/gpl2/lvm2/dist/include/
H A Dlvm-file.h52 #define is_same_inode(buf1, buf2) \ argument
53 ((buf1).st_ino == (buf2).st_ino && \
54 (buf1).st_dev == (buf2).st_dev)

123456