Home
last modified time | relevance | path

Searched refs:snprintf (Results 1 – 25 of 50) sorted by relevance

12

/bionic/tests/
Dstdio_test.cpp287 snprintf(buf, sizeof(buf), "%zd", v); in TEST()
293 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235)); in TEST()
308 EXPECT_EQ(41, snprintf(buf, sizeof(buf), "<%La>", u.v)); in TEST()
313 EXPECT_EQ(41, snprintf(buf, sizeof(buf), "<%La>", u.v)); in TEST()
318 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%La>", u.v)); in TEST()
328 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc)); in TEST()
335 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%C>", wc)); in TEST()
342 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
347 EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
354 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%S>", ws)); in TEST()
[all …]
Dftw_test.cpp34 snprintf(path, sizeof(path), "%s/dir", root); in MakeTree()
36 snprintf(path, sizeof(path), "%s/dir/sub", root); in MakeTree()
38 snprintf(path, sizeof(path), "%s/unreadable-dir", root); in MakeTree()
41 snprintf(path, sizeof(path), "%s/dangler", root); in MakeTree()
43 snprintf(path, sizeof(path), "%s/symlink", root); in MakeTree()
47 snprintf(path, sizeof(path), "%s/regular", root); in MakeTree()
Dinttypes_test.cpp27 snprintf(buf, sizeof(buf), "%" PRId##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
30 snprintf(buf, sizeof(buf), "%" PRIi##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
33 snprintf(buf, sizeof(buf), "%" PRIo##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
36 snprintf(buf, sizeof(buf), "%" PRIu##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
39 snprintf(buf, sizeof(buf), "%" PRIx##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
42 snprintf(buf, sizeof(buf), "%" PRIX##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
Dsys_stat_test.cpp200 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
213 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
214 snprintf(target, sizeof(target), "%s.doesnotexist", tf.path); in TEST()
235 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
257 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
258 snprintf(target, sizeof(target), "%s.doesnotexist", tf.path); in TEST()
Dsystem_properties_test.cpp175 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", count); in TEST()
177 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", count); in TEST()
193 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", i); in TEST()
195 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", i); in TEST()
268 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
270 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
284 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
286 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
Dbug_26110743_test.cpp36 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in ProcSelfReadlinkBody()
82 snprintf(buf, sizeof(buf), "/proc/%d/task/%d/fd/%d", mypid, mytid, fd); in ProcTaskFdReadlinkBody()
Dclang_fortify_tests.cpp393 snprintf(buf, sizeof(buf), "%d", unsigned_value); in testFormatStrings()
395 snprintf(buf, sizeof(buf), unknown_string, unsigned_value); in testFormatStrings()
507 EXPECT_FORTIFY_DEATH(snprintf(small_buffer, sizeof(small_buffer) + 1, "")); in FORTIFY_TEST()
/bionic/libc/dns/nameser/
Dns_print.c152 len = snprintf(tmp, sizeof(tmp), " %s %s", p_class(class), p_type(type)); in ns_sprintrrf()
215 len = snprintf(tmp, sizeof(tmp), "%lu", t); in ns_sprintrrf()
272 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
290 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
356 len = snprintf(t, sizeof(t), "%u %u ", order, preference); in ns_sprintrrf()
398 len = snprintf(t, sizeof(t), "%u %u %u ", priority, weight, port); in ns_sprintrrf()
429 len = snprintf(tmp, sizeof(tmp), " %u ( ", *rdata); in ns_sprintrrf()
446 len = snprintf(tmp, sizeof(tmp), "%d ", n); in ns_sprintrrf()
477 len = snprintf(tmp, sizeof(tmp), "0x%04x %u %u", in ns_sprintrrf()
499 n = snprintf(tmp, sizeof(tmp), " ; key_tag= %u", key_id); in ns_sprintrrf()
[all …]
Dns_name.c1009 i = snprintf(dn, eom - dn, "\\[x"); in decode_bitstring()
1014 i = snprintf(dn, eom - dn, "%02x", *cp & 0xff); in decode_bitstring()
1021 i = snprintf(dn, eom - dn, "%02x", tc & (0xff << (8 - b))); in decode_bitstring()
1027 i = snprintf(dn, eom - dn, "%1x", in decode_bitstring()
1033 i = snprintf(dn, eom - dn, "/%d]", blen); in decode_bitstring()
/bionic/libc/bionic/
Dgrp_pwd.cpp105 snprintf(state->name_buffer_, sizeof(state->name_buffer_), "%s", iinfo->name); in android_iinfo_to_passwd()
106 snprintf(state->dir_buffer_, sizeof(state->dir_buffer_), "/"); in android_iinfo_to_passwd()
107 snprintf(state->sh_buffer_, sizeof(state->sh_buffer_), "/bin/sh"); in android_iinfo_to_passwd()
117 snprintf(state->group_name_buffer_, sizeof(state->group_name_buffer_), "%s", iinfo->name); in android_iinfo_to_group()
357 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
360 snprintf(buffer, bufferlen, "u%u_%s", userid, android_id_info->name); in print_app_name_from_uid()
363 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_uid()
371 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
373 snprintf(buffer, bufferlen, "all_a%u", appid - AID_SHARED_GID_START); in print_app_name_from_gid()
375 snprintf(buffer, bufferlen, "u%u_a%u_ext_cache", userid, appid - AID_EXT_CACHE_GID_START); in print_app_name_from_gid()
[all …]
Djemalloc_wrapper.cpp95 snprintf(buffer, sizeof(buffer), "arena.%d.dirty_decay_ms", i); in je_mallopt()
99 snprintf(buffer, sizeof(buffer), "arena.%d.muzzy_decay_ms", i); in je_mallopt()
119 snprintf(buffer, sizeof(buffer), "arena.%u.purge", narenas); in je_mallopt()
Dether_ntoa.c40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x", in ether_ntoa_r()
Dicu.cpp57 snprintf(versioned_symbol_name, sizeof(versioned_symbol_name), "%s_android", in __find_icu_symbol()
Dstrsignal.cpp58 size_t length = snprintf(buf, buf_len, "%s signal %d", prefix, signal_number); in __strsignal()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dtempnam.c55 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
67 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
78 len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx); in tempnam()
87 len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx); in tempnam()
Dtmpnam.c50 (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXXXXX", P_tmpdir, tmpcount); in tmpnam()
/bionic/libc/dns/resolv/
Dres_debug.c583 snprintf(unname, sizeof(unname), "%d", number); /* XXX nonreentrant */ in sym_ntos()
600 snprintf(unname, sizeof(unname), "%d", number); /* XXX nonreentrant */ in sym_ntop()
620 snprintf(typebuf, sizeof(typebuf), "TYPE%d", type); in p_type()
656 snprintf(classbuf, sizeof(classbuf), "CLASS%d", class); in p_class()
698 default: snprintf(nbuf, sizeof(nbuf), "?0x%lx?", (u_long)option); in p_option()
711 snprintf(nbuf, sizeof(nbuf), "%u", value); in p_time()
740 snprintf(ret, sizeof(ret), "[af%d]", u.sin.sin_family); in p_sockun()
772 (void) snprintf(retbuf, sizeof(retbuf), "%lu.%.2lu", val/100, val%100); in precsize_ntoa()
1050 (void) snprintf(ascii, bufsiz, "; error: unknown LOC RR version"); in loc_ntoa()
1109 snprintf(ascii, bufsiz, in loc_ntoa()
[all …]
/bionic/libc/upstream-netbsd/lib/libc/regex/
Dregerror.c188 (void)snprintf(convbuf, sizeof convbuf, in regerror()
221 (void)snprintf(localbuf, buflen, "%d", r->code); in regatoi()
/bionic/benchmarks/
Dstdio_benchmark.cpp179 snprintf(buf, sizeof(buf), "this is just a literal string with no format specifiers"); in BM_stdio_printf_literal()
187 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %s", in BM_stdio_printf_s()
196 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %d", 123456); in BM_stdio_printf_d()
204 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %1$s", in BM_stdio_printf_1$s()
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_ntop.c77 l = snprintf(tmp, sizeof(tmp), "%u.%u.%u.%u", in inet_ntop4()
175 advance = snprintf(tp, ep - tp, "%x", words[i]); in inet_ntop6()
Dinet_ntoa.c48 (void)snprintf(b, sizeof(b), in inet_ntoa()
/bionic/libc/private/
DFdPath.h22 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in FdPath()
/bionic/libc/dns/net/
Dgetnameinfo.c229 snprintf(numserv, sizeof(numserv), "%u", ntohs(port)); in getnameinfo_inet()
418 n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id); in ip6_sa2str()
436 n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id); in ip6_sa2str()
/bionic/libc/tzcode/
Dasctime.c106 snprintf(result, sizeof(result), /* Android change: use snprintf. */ in asctime_r()
Dstrftime.c363 snprintf(buf, sizeof(buf), "%"PRIdMAX, in _fmt()
365 else snprintf(buf, sizeof(buf), "%"PRIuMAX, in _fmt()
634 snprintf(buf, sizeof(buf), format, n); in _conv()

12