Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 5199) sorted by relevance

12345678910>>...208

/external/libxml2/
Dbuf.c60 #define UPDATE_COMPAT(buf) \ argument
61 if (buf->size < INT_MAX) buf->compat_size = buf->size; \
62 else buf->compat_size = INT_MAX; \
63 if (buf->use < INT_MAX) buf->compat_use = buf->use; \
64 else buf->compat_use = INT_MAX;
71 #define CHECK_COMPAT(buf) \ argument
72 if (buf->size != (size_t) buf->compat_size) \
73 if (buf->compat_size < INT_MAX) \
74 buf->size = buf->compat_size; \
75 if (buf->use != (size_t) buf->compat_use) \
[all …]
/external/libchrome/base/strings/
Dsafe_sprintf_unittest.cc31 char buf[2] = { 'X', 'X' }; in TEST() local
34 EXPECT_EQ(-1, SafeSNPrintf(buf, static_cast<size_t>(-1), "")); in TEST()
35 EXPECT_EQ('X', buf[0]); in TEST()
36 EXPECT_EQ('X', buf[1]); in TEST()
39 EXPECT_EQ(-1, SafeSNPrintf(buf, 0, "")); in TEST()
40 EXPECT_EQ('X', buf[0]); in TEST()
41 EXPECT_EQ('X', buf[1]); in TEST()
44 EXPECT_EQ(0, SafeSNPrintf(buf, 1, "")); in TEST()
45 EXPECT_EQ(0, buf[0]); in TEST()
46 EXPECT_EQ('X', buf[1]); in TEST()
[all …]
/external/libunwind/tests/
DLrs-race.c49 void *buf[20]; in foo_0() local
52 if ((n = unw_backtrace (buf, 20)) < 3) in foo_0()
59 void *buf[20]; in foo_1() local
62 if ((n = unw_backtrace (buf, 20)) < 3) in foo_1()
69 void *buf[20]; in foo_2() local
72 if ((n = unw_backtrace (buf, 20)) < 3) in foo_2()
79 void *buf[20]; in foo_3() local
82 if ((n = unw_backtrace (buf, 20)) < 3) in foo_3()
89 void *buf[20]; in foo_4() local
92 if ((n = unw_backtrace (buf, 20)) < 3) in foo_4()
[all …]
/external/compiler-rt/test/msan/Linux/
Dsyscalls.cc22 char buf[1000] __attribute__((aligned(8))); in main() local
25 memset(buf, 0, sizeof(buf)); in main()
26 __msan_unpoison(buf, sizeof(buf)); in main()
27 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main()
28 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main()
29 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main()
30 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main()
32 __msan_unpoison(buf, sizeof(buf)); in main()
33 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main()
34 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main()
[all …]
/external/flatbuffers/go/
Dencode.go22 func GetByte(buf []byte) byte {
23 return byte(GetUint8(buf))
27 func GetBool(buf []byte) bool {
28 return buf[0] == 1
32 func GetUint8(buf []byte) (n uint8) {
33 n = uint8(buf[0])
38 func GetUint16(buf []byte) (n uint16) {
39 n |= uint16(buf[0])
40 n |= uint16(buf[1]) << 8
45 func GetUint32(buf []byte) (n uint32) {
[all …]
/external/annotation-tools/asmx/test/conform/org/objectweb/asm/commons/
DGASMifierMethodVisitor.java86 buf.setLength(0); in visitAnnotationDefault()
87 buf.append("{\n").append("av0 = mg.visitAnnotationDefault();\n"); in visitAnnotationDefault()
88 text.add(buf.toString()); in visitAnnotationDefault()
100 buf.setLength(0); in visitParameterAnnotation()
101 buf.append("{\n") in visitParameterAnnotation()
105 buf.append(desc); in visitParameterAnnotation()
106 buf.append("\", ").append(visible).append(");\n"); in visitParameterAnnotation()
107 text.add(buf.toString()); in visitParameterAnnotation()
119 buf.setLength(0); in visitInsn()
127 buf.append("mg.returnValue();\n"); in visitInsn()
[all …]
/external/wpa_supplicant_8/src/p2p/
Dp2p_build.c18 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument
20 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr()
21 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr()
23 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr()
24 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr()
29 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument
32 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr()
33 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr()
34 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr()
36 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_public_action_hdr()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/
DBaseDexReader.java55 byte[] buf = dexBuf.buf; in readSleb128()
57 result = buf[end++] & 0xff; in readSleb128()
61 currentByteValue = buf[end++] & 0xff; in readSleb128()
66 currentByteValue = buf[end++] & 0xff; in readSleb128()
71 currentByteValue = buf[end++] & 0xff; in readSleb128()
76 currentByteValue = buf[end++] & 0xff; in readSleb128()
95 byte[] buf = dexBuf.buf; in peekSleb128Size()
97 result = buf[end++] & 0xff; in peekSleb128Size()
99 currentByteValue = buf[end++] & 0xff; in peekSleb128Size()
101 currentByteValue = buf[end++] & 0xff; in peekSleb128Size()
[all …]
DBaseDexBuffer.java39 @Nonnull /* package private */ final byte[] buf; field in BaseDexBuffer
42 public BaseDexBuffer(@Nonnull byte[] buf) { in BaseDexBuffer() argument
43 this(buf, 0); in BaseDexBuffer()
45 public BaseDexBuffer(@Nonnull byte[] buf, int offset) { in BaseDexBuffer() argument
46 this.buf = buf; in BaseDexBuffer()
51 byte[] buf = this.buf; in readSmallUint()
53 int result = (buf[offset] & 0xff) | in readSmallUint()
54 ((buf[offset+1] & 0xff) << 8) | in readSmallUint()
55 ((buf[offset+2] & 0xff) << 16) | in readSmallUint()
56 ((buf[offset+3]) << 24); in readSmallUint()
[all …]
/external/annotation-tools/asmx/src/org/objectweb/asm/util/
DASMifierTypeAnnotationVisitor.java39 buf.setLength(0); in visit()
40 buf.append("xav").append(id).append(".visit("); in visit()
41 ASMifierAbstractVisitor.appendConstant(buf, name); in visit()
42 buf.append(", "); in visit()
43 ASMifierAbstractVisitor.appendConstant(buf, value); in visit()
44 buf.append(");\n"); in visit()
45 text.add(buf.toString()); in visit()
53 buf.setLength(0); in visitEnum()
54 buf.append("xav").append(id).append(".visitEnum("); in visitEnum()
55 ASMifierAbstractVisitor.appendConstant(buf, name); in visitEnum()
[all …]
DASMifierClassVisitor.java237 buf.setLength(0); in visit()
238 buf.append("cw.visit("); in visit()
241 buf.append("V1_1"); in visit()
244 buf.append("V1_2"); in visit()
247 buf.append("V1_3"); in visit()
250 buf.append("V1_4"); in visit()
253 buf.append("V1_5"); in visit()
256 buf.append("V1_6"); in visit()
259 buf.append(version); in visit()
262 buf.append(", "); in visit()
[all …]
/external/adhd/cras/src/common/
Dbyte_buffer.h22 struct byte_buffer *buf; in byte_buffer_create() local
23 buf = (struct byte_buffer *) in byte_buffer_create()
25 if (!buf) in byte_buffer_create()
26 return buf; in byte_buffer_create()
27 buf->max_size = buffer_size_bytes; in byte_buffer_create()
28 buf->used_size = buffer_size_bytes; in byte_buffer_create()
29 return buf; in byte_buffer_create()
32 static inline void byte_buffer_set_used_size(struct byte_buffer *buf, in byte_buffer_set_used_size() argument
35 buf->used_size = MIN(used_size, buf->max_size); in byte_buffer_set_used_size()
39 static inline void byte_buffer_destroy(struct byte_buffer *buf) in byte_buffer_destroy() argument
[all …]
/external/wpa_supplicant_8/src/utils/
Dwpabuf.c22 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf) in wpabuf_get_trace() argument
25 ((const u8 *) buf - sizeof(struct wpabuf_trace)); in wpabuf_get_trace()
30 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument
33 struct wpabuf_trace *trace = wpabuf_get_trace(buf); in wpabuf_overflow()
40 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow()
49 struct wpabuf *buf = *_buf; in wpabuf_resize() local
54 if (buf == NULL) { in wpabuf_resize()
60 trace = wpabuf_get_trace(buf); in wpabuf_resize()
69 if (buf->used + add_len > buf->size) { in wpabuf_resize()
71 if (buf->flags & WPABUF_FLAG_EXT_DATA) { in wpabuf_resize()
[all …]
/external/python/cpython3/Modules/_blake2/impl/
Dblake2s-load-sse2.h19 #define LOAD_MSG_0_1(buf) buf = _mm_set_epi32(m6,m4,m2,m0) argument
20 #define LOAD_MSG_0_2(buf) buf = _mm_set_epi32(m7,m5,m3,m1) argument
21 #define LOAD_MSG_0_3(buf) buf = _mm_set_epi32(m14,m12,m10,m8) argument
22 #define LOAD_MSG_0_4(buf) buf = _mm_set_epi32(m15,m13,m11,m9) argument
23 #define LOAD_MSG_1_1(buf) buf = _mm_set_epi32(m13,m9,m4,m14) argument
24 #define LOAD_MSG_1_2(buf) buf = _mm_set_epi32(m6,m15,m8,m10) argument
25 #define LOAD_MSG_1_3(buf) buf = _mm_set_epi32(m5,m11,m0,m1) argument
26 #define LOAD_MSG_1_4(buf) buf = _mm_set_epi32(m3,m7,m2,m12) argument
27 #define LOAD_MSG_2_1(buf) buf = _mm_set_epi32(m15,m5,m12,m11) argument
28 #define LOAD_MSG_2_2(buf) buf = _mm_set_epi32(m13,m2,m0,m8) argument
[all …]
/external/webrtc/webrtc/base/
Dbyteorder_unittest.cc20 uint8_t buf[8] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; in TEST() local
21 Set8(buf, 0, 0xfb); in TEST()
22 Set8(buf, 1, 0x12); in TEST()
23 EXPECT_EQ(0xfb, buf[0]); in TEST()
24 EXPECT_EQ(0x12, buf[1]); in TEST()
25 SetBE16(buf, 0x1234); in TEST()
26 EXPECT_EQ(0x12, buf[0]); in TEST()
27 EXPECT_EQ(0x34, buf[1]); in TEST()
28 SetLE16(buf, 0x1234); in TEST()
29 EXPECT_EQ(0x34, buf[0]); in TEST()
[all …]
/external/icu/icu4c/source/tools/toolutil/
Ducbuf.cpp163 ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ in ucbuf_fillucbuf() argument
174 pTarget = buf->buffer; in ucbuf_fillucbuf()
176 if(buf->currentPos<buf->bufLimit){ in ucbuf_fillucbuf()
177 offset = (int32_t)(buf->bufLimit-buf->currentPos); in ucbuf_fillucbuf()
178 memmove(buf->buffer,buf->currentPos,offset* sizeof(UChar)); in ucbuf_fillucbuf()
184 if(buf->isBuffered){ in ucbuf_fillucbuf()
187 inputRead=T_FileStream_read(buf->in,cbuf,cbufSize-offset); in ucbuf_fillucbuf()
188 buf->remaining-=inputRead; in ucbuf_fillucbuf()
191 cbufSize = T_FileStream_size(buf->in); in ucbuf_fillucbuf()
197 inputRead= T_FileStream_read(buf->in,cbuf,cbufSize); in ucbuf_fillucbuf()
[all …]
/external/libxkbcommon/xkbcommon/src/xkbcomp/
Dkeymap-dump.c57 struct buf { struct
58 char *buf; argument
64 do_realloc(struct buf *buf, size_t at_least) in do_realloc() argument
68 buf->alloc += BUF_CHUNK_SIZE; in do_realloc()
70 buf->alloc += at_least; in do_realloc()
72 new = realloc(buf->buf, buf->alloc); in do_realloc()
76 buf->buf = new; in do_realloc()
81 check_write_buf(struct buf *buf, const char *fmt, ...) in check_write_buf() argument
87 available = buf->alloc - buf->size; in check_write_buf()
89 printed = vsnprintf(buf->buf + buf->size, available, fmt, args); in check_write_buf()
[all …]
/external/google-breakpad/src/third_party/libdisasm/
Dx86_format.c18 #define STRNCAT( buf, str, len ) do { \ argument
19 int _i = strlen(str), _blen = strlen(buf), _len = len - 1; \
21 strncat( buf, str, _len ); \
23 buf[_blen+_len] = '\0'; \
31 #define STRNCATF( buf, fmt, data, len ) do { \ argument
35 STRNCAT( buf, _tmp, len ); \
42 STRNCATF( buf, "-0x%" PRIX32, -ea->disp, len ); \
44 STRNCATF( buf, "0x%" PRIX32, ea->disp, len ); \
57 static int format_insn_prefix_str( enum x86_insn_prefix prefix, char *buf, in format_insn_prefix_str() argument
63 if ( prefix & 1 ) { STRNCAT( buf, prefix_strings[1], len ); } in format_insn_prefix_str()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_dynarray.h47 util_dynarray_init(struct util_dynarray *buf) in util_dynarray_init() argument
49 memset(buf, 0, sizeof(*buf)); in util_dynarray_init()
53 util_dynarray_fini(struct util_dynarray *buf) in util_dynarray_fini() argument
55 if(buf->data) in util_dynarray_fini()
57 FREE(buf->data); in util_dynarray_fini()
58 util_dynarray_init(buf); in util_dynarray_fini()
64 util_dynarray_resize(struct util_dynarray *buf, unsigned newsize) in util_dynarray_resize() argument
67 if(newsize > buf->capacity) in util_dynarray_resize()
69 unsigned newcap = buf->capacity << 1; in util_dynarray_resize()
72 buf->data = REALLOC(buf->data, buf->capacity, newcap); in util_dynarray_resize()
[all …]
/external/llvm/unittests/ADT/
DSmallPtrSetTest.cpp20 int buf[8]; in TEST() local
22 buf[i] = 0; in TEST()
25 s1.insert(&buf[0]); in TEST()
26 s1.insert(&buf[1]); in TEST()
29 (s2 = s1).insert(&buf[2]); in TEST()
32 (s2 = s2).insert(&buf[3]); in TEST()
38 EXPECT_TRUE(s1.count(&buf[i])); in TEST()
40 EXPECT_FALSE(s1.count(&buf[i])); in TEST()
45 int buf[8]; in TEST() local
46 for(i=0; i<8; ++i) buf[i]=0; in TEST()
[all …]
/external/syslinux/core/lwip/src/api/
Dnetbuf.c58 struct netbuf *buf; in netbuf_new() local
60 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); in netbuf_new()
61 if (buf != NULL) { in netbuf_new()
62 buf->p = NULL; in netbuf_new()
63 buf->ptr = NULL; in netbuf_new()
64 ip_addr_set_any(&buf->addr); in netbuf_new()
65 buf->port = 0; in netbuf_new()
68 buf->flags = 0; in netbuf_new()
70 buf->toport_chksum = 0; in netbuf_new()
72 ip_addr_set_any(&buf->toaddr); in netbuf_new()
[all …]
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
DGrammarReport.java260 StringBuffer buf = new StringBuffer(); in toNotifyString() local
268 if (i>0) buf.append('\t'); in toNotifyString()
269 buf.append(s); in toNotifyString()
276 return buf.toString(); in toNotifyString()
280 StringBuffer buf = new StringBuffer(); in getBacktrackingReport() local
281 buf.append("Backtracking report:"); in getBacktrackingReport()
282 buf.append(newline); in getBacktrackingReport()
283 buf.append("Number of decisions that backtrack: "); in getBacktrackingReport()
284 buf.append(grammar.decisionsWhoseDFAsUsesSynPreds.size()); in getBacktrackingReport()
285 buf.append(newline); in getBacktrackingReport()
[all …]
/external/toybox/toys/pending/
Dipcs.c45 struct semid_ds *buf; member
52 struct msqid_ds buf; in show_msg_id() local
55 if ((ret = msgctl(TT.id, IPC_STAT, &buf)) < 0) { in show_msg_id()
60 #define ipcperm buf.msg_perm in show_msg_id()
66 (long) buf.msg_cbytes, (long) buf.msg_qbytes, in show_msg_id()
67 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid); in show_msg_id()
70 buf.msg_stime ? ctime(&buf.msg_stime) : "Not set", in show_msg_id()
71 buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set", in show_msg_id()
72 buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set"); in show_msg_id()
78 struct semid_ds buf; in show_sem_id() local
[all …]
/external/gemmlowp/internal/
Dsimd_wrappers_common_neon_sse.h32 result.buf.reg[i] = LoadInt32x4(src.data(row, col + i));
46 result.buf.reg[2 * i + 0] = LoadInt32x4(src.data(row + 0, col + i));
47 result.buf.reg[2 * i + 1] = LoadInt32x4(src.data(row + 4, col + i));
60 std::int32_t buf[4];
62 buf[i] = src(row, col + i);
64 result.buf.reg[0] = LoadInt32x4(buf);
76 std::int32_t buf[8];
78 buf[i] = src(row, col + i);
80 result.buf.reg[0] = LoadInt32x4(buf);
81 result.buf.reg[1] = LoadInt32x4(buf + 4);
[all …]
/external/valgrind/none/tests/s390x/
Dmvcl.c146 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()
[all …]

12345678910>>...208