/external/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ |
D | ucp_size_ucp.pass.cpp | 24 std::strstreambuf sb(buf, sizeof(buf)); in main() local 25 assert(sb.sgetc() == 'a'); in main() 26 assert(sb.snextc() == 'b'); in main() 27 assert(sb.snextc() == 'c'); in main() 28 assert(sb.snextc() == 'd'); in main() 29 assert(sb.snextc() == 0); in main() 30 assert(sb.snextc() == EOF); in main() 34 std::strstreambuf sb(buf, 0); in main() local 35 assert(sb.sgetc() == 'a'); in main() 36 assert(sb.snextc() == 'b'); in main() [all …]
|
D | scp_size_scp.pass.cpp | 24 std::strstreambuf sb(buf, sizeof(buf)); in main() local 25 assert(sb.sgetc() == 'a'); in main() 26 assert(sb.snextc() == 'b'); in main() 27 assert(sb.snextc() == 'c'); in main() 28 assert(sb.snextc() == 'd'); in main() 29 assert(sb.snextc() == 0); in main() 30 assert(sb.snextc() == EOF); in main() 34 std::strstreambuf sb(buf, 0); in main() local 35 assert(sb.sgetc() == 'a'); in main() 36 assert(sb.snextc() == 'b'); in main() [all …]
|
D | cp_size_cp.pass.cpp | 24 std::strstreambuf sb(buf, sizeof(buf)); in main() local 25 assert(sb.sgetc() == 'a'); in main() 26 assert(sb.snextc() == 'b'); in main() 27 assert(sb.snextc() == 'c'); in main() 28 assert(sb.snextc() == 'd'); in main() 29 assert(sb.snextc() == 0); in main() 30 assert(sb.snextc() == EOF); in main() 34 std::strstreambuf sb(buf, 0); in main() local 35 assert(sb.sgetc() == 'a'); in main() 36 assert(sb.snextc() == 'b'); in main() [all …]
|
/external/llvm-project/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ |
D | cp_size_cp.pass.cpp | 25 std::strstreambuf sb(buf, sizeof(buf)); in main() local 26 assert(sb.sgetc() == 'a'); in main() 27 assert(sb.snextc() == 'b'); in main() 28 assert(sb.snextc() == 'c'); in main() 29 assert(sb.snextc() == 'd'); in main() 30 assert(sb.snextc() == 0); in main() 31 assert(sb.snextc() == EOF); in main() 35 std::strstreambuf sb(buf, 0); in main() local 36 assert(sb.sgetc() == 'a'); in main() 37 assert(sb.snextc() == 'b'); in main() [all …]
|
D | ucp_size_ucp.pass.cpp | 25 std::strstreambuf sb(buf, sizeof(buf)); in main() local 26 assert(sb.sgetc() == 'a'); in main() 27 assert(sb.snextc() == 'b'); in main() 28 assert(sb.snextc() == 'c'); in main() 29 assert(sb.snextc() == 'd'); in main() 30 assert(sb.snextc() == 0); in main() 31 assert(sb.snextc() == EOF); in main() 35 std::strstreambuf sb(buf, 0); in main() local 36 assert(sb.sgetc() == 'a'); in main() 37 assert(sb.snextc() == 'b'); in main() [all …]
|
D | scp_size_scp.pass.cpp | 25 std::strstreambuf sb(buf, sizeof(buf)); in main() local 26 assert(sb.sgetc() == 'a'); in main() 27 assert(sb.snextc() == 'b'); in main() 28 assert(sb.snextc() == 'c'); in main() 29 assert(sb.snextc() == 'd'); in main() 30 assert(sb.snextc() == 0); in main() 31 assert(sb.snextc() == EOF); in main() 35 std::strstreambuf sb(buf, 0); in main() local 36 assert(sb.sgetc() == 'a'); in main() 37 assert(sb.snextc() == 'b'); in main() [all …]
|
/external/webrtc/rtc_base/strings/ |
D | string_builder_unittest.cc | 23 SimpleStringBuilder sb(sb_buf); in TEST() local 24 EXPECT_EQ(0u, strlen(sb.str())); in TEST() 28 sb << "012345678"; // 9 characters + '\0'. in TEST() 29 EXPECT_EQ(0, strcmp(sb.str(), "012345678")); in TEST() 34 SimpleStringBuilder sb(sb_buf); in TEST() local 35 sb << 1 << ':' << 2.1 << ":" << 2.2f << ':' << 78187493520ll << ':' in TEST() 37 EXPECT_EQ(0, strcmp(sb.str(), "1:2.1:2.2:78187493520:78187493520")); in TEST() 42 SimpleStringBuilder sb(sb_buf); in TEST() local 43 sb << "Here we go - "; in TEST() 44 sb.AppendFormat("This is a hex formatted value: 0x%08llx", 3735928559ULL); in TEST() [all …]
|
/external/e2fsprogs/lib/e2p/ |
D | ls.c | 224 void list_super2(struct ext2_super_block * sb, FILE *f) in list_super2() argument 231 inode_blocks_per_group = (((sb->s_inodes_per_group * in list_super2() 232 EXT2_INODE_SIZE(sb)) + in list_super2() 233 EXT2_BLOCK_SIZE(sb) - 1) / in list_super2() 234 EXT2_BLOCK_SIZE(sb)); in list_super2() 235 if (sb->s_volume_name[0]) { in list_super2() 237 strncpy(buf, sb->s_volume_name, sizeof(sb->s_volume_name)); in list_super2() 241 if (sb->s_last_mounted[0]) { in list_super2() 243 strncpy(buf, sb->s_last_mounted, sizeof(sb->s_last_mounted)); in list_super2() 247 fprintf(f, "Filesystem UUID: %s\n", e2p_uuid2str(sb->s_uuid)); in list_super2() [all …]
|
/external/pigweed/pw_string/ |
D | string_builder_test.cc | 60 StringBuilder sb(std::span<char>{}); in TEST() 62 EXPECT_TRUE(sb.empty()); in TEST() 63 EXPECT_EQ(0u, sb.size()); in TEST() 64 EXPECT_EQ(0u, sb.max_size()); in TEST() 75 StringBuilder sb(std::span(buffer, 0)); in TEST() local 77 sb << CustomType() << " is " << 12345; in TEST() 78 EXPECT_EQ(Status::ResourceExhausted(), sb.status()); in TEST() 86 StringBuilder sb(std::span(buffer, 0)); in TEST() local 88 EXPECT_FALSE(sb.append("Hello").ok()); in TEST() 96 StringBuilder sb(std::span(buffer, 0)); in TEST() local [all …]
|
/external/libcups/scheduler/ |
D | statbuf.c | 23 cupsdStatBufDelete(cupsd_statbuf_t *sb) /* I - Status buffer */ in cupsdStatBufDelete() argument 29 if (!sb) in cupsdStatBufDelete() 36 close(sb->fd); in cupsdStatBufDelete() 38 free(sb); in cupsdStatBufDelete() 51 cupsd_statbuf_t *sb; /* New status buffer */ in cupsdStatBufNew() local 66 if ((sb = calloc(1, sizeof(cupsd_statbuf_t))) != NULL) in cupsdStatBufNew() 72 sb->fd = fd; in cupsdStatBufNew() 86 vsnprintf(sb->prefix, sizeof(sb->prefix), prefix, ap); in cupsdStatBufNew() 95 sb->prefix[0] = '\0'; in cupsdStatBufNew() 99 return (sb); in cupsdStatBufNew() [all …]
|
/external/virglrenderer/tests/ |
D | test_virgl_strbuf.c | 32 struct vrend_strbuf sb; in START_TEST() local 34 ret = strbuf_alloc(&sb, 1024); in START_TEST() 36 ck_assert_int_eq(sb.alloc_size, 1024); in START_TEST() 37 strbuf_free(&sb); in START_TEST() 43 struct vrend_strbuf sb; in START_TEST() local 46 ret = strbuf_alloc(&sb, 1024); in START_TEST() 52 strbuf_append(&sb, str); in START_TEST() 53 ck_assert_int_eq(strbuf_get_error(&sb), false); in START_TEST() 54 ck_assert_int_eq(sb.size, strlen(sb.buf)); in START_TEST() 55 strbuf_free(&sb); in START_TEST() [all …]
|
/external/virglrenderer/src/ |
D | vrend_strbuf.h | 47 static inline void strbuf_set_error(struct vrend_strbuf *sb) in strbuf_set_error() argument 49 sb->error_state = true; in strbuf_set_error() 52 static inline bool strbuf_get_error(struct vrend_strbuf *sb) in strbuf_get_error() argument 54 return sb->error_state; in strbuf_get_error() 57 static inline size_t strbuf_get_len(struct vrend_strbuf *sb) in strbuf_get_len() argument 59 return sb->size; in strbuf_get_len() 62 static inline void strbuf_free(struct vrend_strbuf *sb) in strbuf_free() argument 64 free(sb->buf); in strbuf_free() 67 static inline bool strbuf_alloc(struct vrend_strbuf *sb, int initial_size) in strbuf_alloc() argument 69 sb->buf = malloc(initial_size); in strbuf_alloc() [all …]
|
/external/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/ |
D | seekoff.pass.cpp | 24 std::stringbuf sb(std::ios_base::in); in main() local 25 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main() 26 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); in main() 27 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); in main() 28 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); in main() 29 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); in main() 30 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); in main() 31 assert(sb.pubseekoff(0, std::ios_base::beg, std::ios_base::in) == 0); in main() 32 assert(sb.pubseekoff(0, std::ios_base::cur, std::ios_base::in) == 0); in main() 33 assert(sb.pubseekoff(0, std::ios_base::end, std::ios_base::in) == 0); in main() [all …]
|
D | overflow.pass.cpp | 45 testbuf<char> sb("abc"); in main() local 46 assert(sb.sputc('1') == '1'); in main() 47 assert(sb.str() == "1bc"); in main() 48 assert(sb.sputc('2') == '2'); in main() 49 assert(sb.str() == "12c"); in main() 50 assert(sb.sputc('3') == '3'); in main() 51 assert(sb.str() == "123"); in main() 52 assert(sb.sputc('4') == '4'); in main() 53 assert(sb.str() == "1234"); in main() 54 assert(sb.sputc('5') == '5'); in main() [all …]
|
D | seekpos.pass.cpp | 24 std::stringbuf sb("0123456789", std::ios_base::in); in main() local 25 assert(sb.pubseekpos(3, std::ios_base::out) == -1); in main() 26 assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); in main() 27 assert(sb.pubseekpos(3, std::ios_base::in) == 3); in main() 28 assert(sb.sgetc() == '3'); in main() 31 std::stringbuf sb("0123456789", std::ios_base::out); in main() local 32 assert(sb.pubseekpos(3, std::ios_base::in) == -1); in main() 33 assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == -1); in main() 34 assert(sb.pubseekpos(3, std::ios_base::out) == 3); in main() 35 assert(sb.sputc('a') == 'a'); in main() [all …]
|
D | pbackfail.pass.cpp | 43 testbuf<char> sb("123", std::ios_base::in); in main() local 44 assert(sb.sgetc() == '1'); in main() 45 assert(sb.snextc() == '2'); in main() 46 assert(sb.snextc() == '3'); in main() 47 assert(sb.sgetc() == '3'); in main() 48 assert(sb.snextc() == std::char_traits<char>::eof()); in main() 49 assert(sb.pbackfail('3') == '3'); in main() 50 assert(sb.pbackfail('3') == std::char_traits<char>::eof()); in main() 51 assert(sb.pbackfail('2') == '2'); in main() 52 assert(sb.pbackfail(std::char_traits<char>::eof()) != std::char_traits<char>::eof()); in main() [all …]
|
/external/llvm-project/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/ |
D | seekoff.pass.cpp | 25 std::stringbuf sb(std::ios_base::in); in main() local 26 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main() 27 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1); in main() 28 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1); in main() 29 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); in main() 30 assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1); in main() 31 assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1); in main() 32 assert(sb.pubseekoff(0, std::ios_base::beg, std::ios_base::in) == 0); in main() 33 assert(sb.pubseekoff(0, std::ios_base::cur, std::ios_base::in) == 0); in main() 34 assert(sb.pubseekoff(0, std::ios_base::end, std::ios_base::in) == 0); in main() [all …]
|
D | overflow.pass.cpp | 46 testbuf<char> sb("abc"); in main() local 47 assert(sb.sputc('1') == '1'); in main() 48 assert(sb.str() == "1bc"); in main() 49 assert(sb.sputc('2') == '2'); in main() 50 assert(sb.str() == "12c"); in main() 51 assert(sb.sputc('3') == '3'); in main() 52 assert(sb.str() == "123"); in main() 53 assert(sb.sputc('4') == '4'); in main() 54 assert(sb.str() == "1234"); in main() 55 assert(sb.sputc('5') == '5'); in main() [all …]
|
D | seekpos.pass.cpp | 25 std::stringbuf sb("0123456789", std::ios_base::in); in main() local 26 assert(sb.pubseekpos(3, std::ios_base::out) == -1); in main() 27 assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1); in main() 28 assert(sb.pubseekpos(3, std::ios_base::in) == 3); in main() 29 assert(sb.sgetc() == '3'); in main() 32 std::stringbuf sb("0123456789", std::ios_base::out); in main() local 33 assert(sb.pubseekpos(3, std::ios_base::in) == -1); in main() 34 assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == -1); in main() 35 assert(sb.pubseekpos(3, std::ios_base::out) == 3); in main() 36 assert(sb.sputc('a') == 'a'); in main() [all …]
|
D | pbackfail.pass.cpp | 44 testbuf<char> sb("123", std::ios_base::in); in main() local 45 assert(sb.sgetc() == '1'); in main() 46 assert(sb.snextc() == '2'); in main() 47 assert(sb.snextc() == '3'); in main() 48 assert(sb.sgetc() == '3'); in main() 49 assert(sb.snextc() == std::char_traits<char>::eof()); in main() 50 assert(sb.pbackfail('3') == '3'); in main() 51 assert(sb.pbackfail('3') == std::char_traits<char>::eof()); in main() 52 assert(sb.pbackfail('2') == '2'); in main() 53 assert(sb.pbackfail(std::char_traits<char>::eof()) != std::char_traits<char>::eof()); in main() [all …]
|
/external/e2fsprogs/lib/ext2fs/ |
D | swapfs.c | 26 void ext2fs_swap_super(struct ext2_super_block * sb) in ext2fs_swap_super() argument 30 sb->s_inodes_count = ext2fs_swab32(sb->s_inodes_count); in ext2fs_swap_super() 31 sb->s_blocks_count = ext2fs_swab32(sb->s_blocks_count); in ext2fs_swap_super() 32 sb->s_r_blocks_count = ext2fs_swab32(sb->s_r_blocks_count); in ext2fs_swap_super() 33 sb->s_free_blocks_count = ext2fs_swab32(sb->s_free_blocks_count); in ext2fs_swap_super() 34 sb->s_free_inodes_count = ext2fs_swab32(sb->s_free_inodes_count); in ext2fs_swap_super() 35 sb->s_first_data_block = ext2fs_swab32(sb->s_first_data_block); in ext2fs_swap_super() 36 sb->s_log_block_size = ext2fs_swab32(sb->s_log_block_size); in ext2fs_swap_super() 37 sb->s_log_cluster_size = ext2fs_swab32(sb->s_log_cluster_size); in ext2fs_swap_super() 38 sb->s_blocks_per_group = ext2fs_swab32(sb->s_blocks_per_group); in ext2fs_swap_super() [all …]
|
/external/llvm-project/clang/test/Analysis/ |
D | fuchsia_handle.cpp | 49 zx_handle_t sa, sb; in checkInvalidHandle01() local 50 zx_channel_create(0, &sa, &sb); in checkInvalidHandle01() 56 zx_handle_close(sb); in checkInvalidHandle01() 61 zx_handle_t sa, sb; in checkInvalidHandle2() local 62 zx_channel_create(0, &sa, &sb); in checkInvalidHandle2() 63 if (sb != ZX_HANDLE_INVALID) in checkInvalidHandle2() 64 zx_handle_close(sb); in checkInvalidHandle2() 70 zx_handle_t sa, sb; in handleDieBeforeErrorSymbol01() local 71 zx_status_t status = zx_channel_create(0, &sa, &sb); in handleDieBeforeErrorSymbol01() 78 zx_handle_t sa, sb; in handleDieBeforeErrorSymbol02() local [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/slice/ |
D | slice_buffer.cc | 39 static void GPR_ATTRIBUTE_NOINLINE do_embiggen(grpc_slice_buffer* sb, in do_embiggen() argument 44 memmove(sb->base_slices, sb->slices, sb->count * sizeof(grpc_slice)); in do_embiggen() 45 sb->slices = sb->base_slices; in do_embiggen() 48 const size_t new_capacity = GROW(sb->capacity); in do_embiggen() 49 sb->capacity = new_capacity; in do_embiggen() 50 if (sb->base_slices == sb->inlined) { in do_embiggen() 51 sb->base_slices = static_cast<grpc_slice*>( in do_embiggen() 53 memcpy(sb->base_slices, sb->inlined, slice_count * sizeof(grpc_slice)); in do_embiggen() 55 sb->base_slices = static_cast<grpc_slice*>( in do_embiggen() 56 gpr_realloc(sb->base_slices, new_capacity * sizeof(grpc_slice))); in do_embiggen() [all …]
|
/external/grpc-grpc/src/core/lib/slice/ |
D | slice_buffer.cc | 35 static void maybe_embiggen(grpc_slice_buffer* sb) { in maybe_embiggen() argument 37 size_t slice_offset = static_cast<size_t>(sb->slices - sb->base_slices); in maybe_embiggen() 38 size_t slice_count = sb->count + slice_offset; in maybe_embiggen() 40 if (slice_count == sb->capacity) { in maybe_embiggen() 41 if (sb->base_slices != sb->slices) { in maybe_embiggen() 43 memmove(sb->base_slices, sb->slices, sb->count * sizeof(grpc_slice)); in maybe_embiggen() 44 sb->slices = sb->base_slices; in maybe_embiggen() 47 sb->capacity = GROW(sb->capacity); in maybe_embiggen() 48 GPR_ASSERT(sb->capacity > slice_count); in maybe_embiggen() 49 if (sb->base_slices == sb->inlined) { in maybe_embiggen() [all …]
|
/external/auto/value/src/main/java/com/google/auto/value/processor/ |
D | AnnotationOutput.java | 53 protected Void defaultAction(Object value, StringBuilder sb) { in defaultAction() argument 54 sb.append(value); in defaultAction() 59 public Void visitArray(List<? extends AnnotationValue> values, StringBuilder sb) { in visitArray() argument 60 sb.append('{'); in visitArray() 63 sb.append(sep); in visitArray() 64 visit(value, sb); in visitArray() 67 sb.append('}'); in visitArray() 72 public Void visitChar(char c, StringBuilder sb) { in visitChar() argument 73 appendQuoted(sb, c); in visitChar() 78 public Void visitLong(long i, StringBuilder sb) { in visitLong() argument [all …]
|