Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 25 of 166) sorted by relevance

1234567

/openbsd-src/usr.sbin/unbound/testcode/
H A Dunitdname.c66 dname_test_qdl(sldns_buffer* buff) in dname_test_qdl() argument
69 unit_assert( query_dname_len(buff) == 0); in dname_test_qdl()
70 unit_assert( query_dname_len(dname_to_buf(buff, ".")) == 1 ); in dname_test_qdl()
71 unit_assert( query_dname_len(dname_to_buf(buff, "bla.foo.")) == 9 ); in dname_test_qdl()
72 unit_assert( query_dname_len(dname_to_buf(buff, "x.y.z.example.com." in dname_test_qdl()
78 dname_test_qdtl(sldns_buffer* buff) in dname_test_qdtl() argument
81 sldns_buffer_write_at(buff, 0, "\012abCDeaBCde\003cOm\000", 16); in dname_test_qdtl()
82 query_dname_tolower(sldns_buffer_begin(buff)); in dname_test_qdtl()
83 unit_assert( memcmp(sldns_buffer_begin(buff), in dname_test_qdtl()
86 sldns_buffer_write_at(buff, 0, "\001+\012abC{e-ZYXe\003NET\000", 18); in dname_test_qdtl()
[all …]
H A Dunitanchor.c67 test_anchor_one(sldns_buffer* buff, struct val_anchors* a) in test_anchor_one() argument
71 unit_assert(anchor_store_str(a, buff, in test_anchor_one()
95 test_anchors(sldns_buffer* buff, struct val_anchors* a) in test_anchors() argument
99 unit_assert(anchor_store_str(a, buff, in test_anchors()
127 sldns_buffer* buff = sldns_buffer_new(65800); in anchors_test() local
131 sldns_buffer_flip(buff); in anchors_test()
133 test_anchor_one(buff, a); in anchors_test()
134 test_anchors(buff, a); in anchors_test()
136 sldns_buffer_free(buff); in anchors_test()
/openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_printf.cpp30 static int AppendChar(char **buff, const char *buff_end, char c) { in AppendChar() argument
31 if (*buff < buff_end) { in AppendChar()
32 **buff = c; in AppendChar()
33 (*buff)++; in AppendChar()
41 static int AppendNumber(char **buff, const char *buff_end, u64 absolute_value, in AppendNumber() argument
53 result += AppendChar(buff, buff_end, '-'); in AppendNumber()
71 result += AppendChar(buff, buff_end, c); in AppendNumber()
73 if (negative && !pad_with_zero) result += AppendChar(buff, buff_end, '-'); in AppendNumber()
77 result += AppendChar(buff, buff_end, digit); in AppendNumber()
82 static int AppendUnsigned(char **buff, const char *buff_end, u64 num, u8 base, in AppendUnsigned() argument
[all …]
H A Dsanitizer_file.cpp127 bool ReadFileToBuffer(const char *file_name, char **buff, uptr *buff_size, in ReadFileToBuffer() argument
129 *buff = nullptr; in ReadFileToBuffer()
139 UnmapOrDie(*buff, *buff_size); in ReadFileToBuffer()
140 *buff = (char*)MmapOrDie(size, __func__); in ReadFileToBuffer()
144 UnmapOrDie(*buff, *buff_size); in ReadFileToBuffer()
152 if (!ReadFromFile(fd, *buff + *read_len, size - *read_len, &just_read, in ReadFileToBuffer()
154 UnmapOrDie(*buff, *buff_size); in ReadFileToBuffer()
172 InternalMmapVectorNoCtor<char> *buff, uptr max_len, in ReadFileToVector() argument
174 buff->clear(); in ReadFileToVector()
183 if (read_len >= buff->size()) in ReadFileToVector()
[all …]
H A Dsanitizer_symbolizer_libcdep.cpp43 char *buff = nullptr; in ExtractInt() local
44 const char *ret = ExtractToken(str, delims, &buff); in ExtractInt()
45 if (buff) { in ExtractInt()
46 *result = (int)internal_atoll(buff); in ExtractInt()
48 InternalFree(buff); in ExtractInt()
53 char *buff = nullptr; in ExtractUptr() local
54 const char *ret = ExtractToken(str, delims, &buff); in ExtractUptr()
55 if (buff) { in ExtractUptr()
56 *result = (uptr)internal_atoll(buff); in ExtractUptr()
58 InternalFree(buff); in ExtractUptr()
[all …]
/openbsd-src/gnu/gcc/gcc/config/alpha/
H A Dvms-ld.c260 char *buff, *ptr; in preprocess_args() local
268 buff = xmalloc (out_len + 18); in preprocess_args()
271 strcpy (buff, "/share="); in preprocess_args()
273 strcpy (buff, "/exe="); in preprocess_args()
275 strcat (buff, ptr); in preprocess_args()
276 addarg (buff); in preprocess_args()
351 char *buff, *ptr; in process_args() local
353 buff = xmalloc (strlen (exefilename) + 5); in process_args()
354 strcpy (buff, exefilename); in process_args()
355 ptr = strchr (buff, '.'); in process_args()
[all …]
H A Dvms-cc.c108 char *buff, *ptr; in preprocess_args() local
113 buff = concat ("/obj=", ptr, NULL); in preprocess_args()
114 addarg (buff); in preprocess_args()
238 char buff [256], *ptr; in main() local
244 sprintf (buff, "%s%s", cwdev, ptr); in main()
246 sprintf (buff, "%s", ptr); in main()
248 sprintf (buff, "%s%s", cwd, ptr); in main()
250 ptr = xstrdup (buff); in main()
/openbsd-src/gnu/usr.bin/gcc/gcc/config/alpha/
H A Dvms-ld.c265 char *buff, *ptr; local
273 buff = xmalloc (out_len + 18);
276 strcpy (buff, "/share=");
278 strcpy (buff, "/exe=");
280 strcat (buff, ptr);
281 addarg (buff);
358 char *buff, *ptr; local
360 buff = xmalloc (strlen (exefilename) + 5);
361 strcpy (buff, exefilename);
362 ptr = strchr (buff, '.');
[all …]
H A Dvms-cc.c111 char *buff, *ptr; local
116 buff = concat ("/obj=", ptr, NULL);
117 addarg (buff);
245 char buff [256], *ptr; local
251 sprintf (buff, "%s%s", cwdev, ptr);
253 sprintf (buff, "%s", ptr);
255 sprintf (buff, "%s%s", cwd, ptr);
257 ptr = xstrdup (buff);
/openbsd-src/gnu/usr.bin/perl/cpan/Socket/t/
H A DSocket.t57 my $buff;
58 my $read = sysread(T,$buff,10); # Connection may be granted, then closed!
61 while ($read > 0 && length($buff) < 5) {
64 $read = sysread(T,$buff,10,length($buff));
68 ok(($read == 0 || $buff eq "hello"), "PF_INET echo localhost reply");
97 my $buff;
98 my $read = sysread(S,$buff,10); # Connection may be granted, then closed!
101 while ($read > 0 && length($buff) < 5) {
104 $read = sysread(S,$buff,1
[all...]
/openbsd-src/lib/libedit/
H A Dchartype.c207 static wchar_t *buff = NULL; in ct_visual_string() local
215 if (!buff) { in ct_visual_string()
217 buff = reallocarray(NULL, buffsize, sizeof(*buff)); in ct_visual_string()
219 dst = buff; in ct_visual_string()
221 used = ct_visual_char(dst, buffsize - (dst - buff), *s); in ct_visual_string()
223 used = dst - buff; in ct_visual_string()
225 p = reallocarray(buff, buffsize, sizeof(*buff)); in ct_visual_string()
228 buff = p; in ct_visual_string()
229 dst = buff + used; in ct_visual_string()
236 if (dst >= (buff + buffsize)) { /* sigh */ in ct_visual_string()
[all …]
/openbsd-src/usr.bin/cvs/
H A Ddate.y628 lookup(char *buff) in lookup() argument
636 for (p = buff; *p; p++) in lookup()
640 if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { in lookup()
644 if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { in lookup()
649 len = strlen(buff); in lookup()
653 else if (len == 4 && buff[3] == '.') { in lookup()
655 buff[3] = '\0'; in lookup()
662 if (strncmp(buff, tp->name, 3) == 0) { in lookup()
666 } else if (strcmp(buff, tp->name) == 0) { in lookup()
673 if (strcmp(buff, tp->name) == 0) { in lookup()
[all …]
/openbsd-src/gnu/usr.bin/cvs/lib/
H A Dgetdate.y705 LookupWord(buff) in LookupWord() argument
706 char *buff; in LookupWord()
715 for (p = buff; *p; p++)
719 if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) {
723 if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) {
729 if (strlen(buff) == 3)
731 else if (strlen(buff) == 4 && buff[3] == '.') {
733 buff[3] = '\0';
740 if (strncmp(buff, tp->name, 3) == 0) {
745 else if (strcmp(buff, tp->name) == 0) {
[all …]
H A Dgetdate.c1719 LookupWord(buff) in LookupWord() argument
1720 char *buff; in LookupWord()
1729 for (p = buff; *p; p++)
1733 if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) {
1737 if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) {
1743 if (strlen(buff) == 3)
1745 else if (strlen(buff) == 4 && buff[3] == '.') {
1747 buff[3] = '\0';
1754 if (strncmp(buff, tp->name, 3) == 0) {
1759 else if (strcmp(buff, tp->name) == 0) {
[all …]
/openbsd-src/usr.bin/rcs/
H A Ddate.y633 lookup(char *buff) in lookup() argument
641 for (p = buff; *p; p++) in lookup()
645 if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { in lookup()
649 if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { in lookup()
654 len = strlen(buff); in lookup()
658 else if (len == 4 && buff[3] == '.') { in lookup()
660 buff[3] = '\0'; in lookup()
667 if (strncmp(buff, tp->name, 3) == 0) { in lookup()
671 } else if (strcmp(buff, tp->name) == 0) { in lookup()
678 if (strcmp(buff, tp->name) == 0) { in lookup()
[all …]
/openbsd-src/sys/dev/pci/drm/i915/gt/
H A Dintel_gt_sysfs_pm.c102 struct attribute *attr, char *buff) \
107 return sysfs_emit(buff, "%u\n", val); \
110 struct kobj_attribute *attr, char *buff) \
112 return _name ##_show_common(kobj, &attr->attr, buff); \
115 struct device_attribute *attr, char *buff) \
117 return _name##_show_common(&dev->kobj, &attr->attr, buff); \
123 const char *buff, size_t count) \
128 ret = kstrtou32(buff, 0, &val); \
137 struct kobj_attribute *attr, const char *buff, \
140 return _name##_store_common(kobj, &attr->attr, buff, count); \
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/tests/
H A Dsanitizer_libc_test.cpp200 char *buff; in TEST_P() local
203 EXPECT_TRUE(ReadFileToBuffer(file_name_, &buff, &len, &size)); in TEST_P()
204 EXPECT_EQ(data_, std::vector<char>(buff, buff + size)); in TEST_P()
205 UnmapOrDie(buff, len); in TEST_P()
209 char *buff; in TEST_P() local
213 EXPECT_TRUE(ReadFileToBuffer(file_name_, &buff, &len, &size, data_.size())); in TEST_P()
214 EXPECT_EQ(data_, std::vector<char>(buff, buff + size)); in TEST_P()
215 UnmapOrDie(buff, len); in TEST_P()
219 InternalMmapVector<char> buff; in TEST_P() local
220 EXPECT_TRUE(ReadFileToVector(file_name_, &buff)); in TEST_P()
[all …]
/openbsd-src/gnu/usr.bin/texinfo/info/
H A Dsearch.c91 register char *buff, *end; in search_forward() local
114 buff = binding->buffer + binding->start; in search_forward()
117 while (buff < (end - len)) in search_forward()
121 c = buff[i]; in search_forward()
132 buff += len; in search_forward()
133 return ((long) (buff - binding->buffer)); in search_forward()
136 buff++; in search_forward()
150 register char *buff, *end; in search_backward() local
181 buff = binding->buffer + binding->start - 1; in search_backward()
184 while (buff > (end + len)) in search_backward()
[all …]
/openbsd-src/lib/libcrypto/ui/
H A Dui_util.c
/openbsd-src/sbin/scsi/
H A Dlibscsi.c354 scsireq_buff_decode_visit(u_char *buff, size_t len, char *fmt, in scsireq_buff_decode_visit() argument
360 return do_buff_decode(buff, len, arg_put, puthook, fmt, ap); in scsireq_buff_decode_visit()
561 do_encode(u_char *buff, size_t vec_max, size_t *used, in do_encode() argument
616 buff[ind++] = val; in do_encode()
624 buff[ind++] = val; in do_encode()
633 buff[ind++] = value; in do_encode()
638 buff[ind++] = value >> 8; in do_encode()
639 buff[ind++] = value; in do_encode()
645 buff[ind++] = value >> 16; in do_encode()
646 buff[ind++] = value >> 8; in do_encode()
[all …]
/openbsd-src/usr.bin/vis/
H A Dvis.c134 char buff[5]; in process() local
141 cp = buff; in process()
147 cp = buff; in process()
154 (void) vis(buff, (char)c, eflags, (char)rachar); in process()
156 cp = buff; in process()
/openbsd-src/gnu/usr.bin/perl/cpan/DB_File/
H A Ddbinfo79 my $buff ;
80 read F, $buff, 30 ;
83 my (@info) = unpack("NNNNNNC", $buff) ;
84 my (@info1) = unpack("VVVVVVC", $buff) ;
/openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.brendan/
H A Dcode-gen2.C9 char buff[40] ; in main() local
10 char *tmp = &buff[0]; // also fails for char *tmp = buff; in main()
12 if ((__SIZE_TYPE__) tmp != (__SIZE_TYPE__) &buff[0]) in main()
/openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g77.dg/
H A D7388.f3 character*25 buff(0:10) variable
9 buff(i) = 'tcase0a'
10 write(line,*) buff(i)(m1:m2)
/openbsd-src/gnu/gcc/libcpp/
H A Dlex.c1554 _cpp_release_buff (cpp_reader *pfile, _cpp_buff *buff) in _cpp_release_buff() argument
1556 _cpp_buff *end = buff; in _cpp_release_buff()
1561 pfile->free_buffs = buff; in _cpp_release_buff()
1595 _cpp_append_extend_buff (cpp_reader *pfile, _cpp_buff *buff, size_t min_extra) in _cpp_append_extend_buff() argument
1597 size_t size = EXTENDED_BUFF_SIZE (buff, min_extra); in _cpp_append_extend_buff()
1600 buff->next = new_buff; in _cpp_append_extend_buff()
1601 memcpy (new_buff->base, buff->cur, BUFF_ROOM (buff)); in _cpp_append_extend_buff()
1624 _cpp_free_buff (_cpp_buff *buff) in _cpp_free_buff() argument
1628 for (; buff; buff = next) in _cpp_free_buff()
1630 next = buff->next; in _cpp_free_buff()
[all …]

1234567