Searched refs:buf (Results 1 - 25 of 89) sorted by relevance

1234

/bionic/tests/
H A Dlibc_logging_test.cpp26 char buf[BUFSIZ]; local
28 __libc_format_buffer(buf, sizeof(buf), "a");
29 EXPECT_STREQ("a", buf);
31 __libc_format_buffer(buf, sizeof(buf), "%%");
32 EXPECT_STREQ("%", buf);
34 __libc_format_buffer(buf, sizeof(buf), "01234");
35 EXPECT_STREQ("01234", buf);
110 char buf[BUFSIZ]; local
116 char buf[BUFSIZ]; local
122 char buf[BUFSIZ]; local
128 char buf[BUFSIZ]; local
134 char buf[BUFSIZ]; local
140 char buf[BUFSIZ]; local
[all...]
H A Dinttypes_test.cpp26 char buf[512]; local
31 snprintf(buf, sizeof(buf), "%08" PRIdPTR, i);
32 snprintf(buf, sizeof(buf), "%08" PRIiPTR, i);
33 snprintf(buf, sizeof(buf), "%08" PRIoPTR, i);
34 snprintf(buf, sizeof(buf), "%08" PRIuPTR, u);
35 snprintf(buf, sizeo
[all...]
H A Dlibgen_test.cpp68 char* buf, size_t buf_size, int expected_errno) {
70 int rc = basename_r(in, buf, buf_size);
72 if (rc != -1 && buf != NULL) {
73 ASSERT_STREQ(expected_out, buf) << in;
79 char* buf, size_t buf_size, int expected_errno) {
81 int rc = dirname_r(in, buf, buf_size);
83 if (rc != -1 && buf != NULL) {
84 ASSERT_STREQ(expected_out, buf) << in;
90 char buf[256]; local
92 TestBasename("", ".", -1, buf,
67 TestBasename(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument
78 TestDirname(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument
105 char buf[256]; local
[all...]
H A Dregex_test.cpp29 char buf[80]; local
30 regerror(REG_NOMATCH, &re, buf, sizeof(buf));
32 ASSERT_STREQ("regexec() failed to match", buf);
34 ASSERT_STREQ("No match", buf);
H A Dfortify_test.cpp301 char buf[10]; local
303 ASSERT_EXIT(strcpy(buf, orig), testing::KilledBySignal(SIGABRT), "");
310 char buf[0]; local
312 ASSERT_EXIT(strcpy(buf, orig), testing::KilledBySignal(SIGABRT), "");
319 char buf[0]; local
321 ASSERT_EXIT(strcpy(buf, orig), testing::KilledBySignal(SIGABRT), "");
328 char buf[1]; local
330 ASSERT_EXIT(strcpy(buf, orig), testing::KilledBySignal(SIGABRT), "");
336 char buf[10]; local
337 memcpy(buf, "012345678
343 char buf[10]; local
350 char buf[10]; local
378 char buf[10]; local
386 char buf[5]; local
391 char buf[10]; local
412 char buf[10]; local
435 char buf[10]; local
443 char buf[10]; local
453 char buf[10]; local
460 char buf[20]; local
495 char buf[10]; local
511 char buf[10]; local
530 char buf[10]; local
549 char buf[10]; local
567 char buf[10]; local
585 char buf[10]; local
604 char buf[10]; local
624 char buf[10]; local
643 char buf[10]; local
662 char buf[10]; local
683 char buf[10]; local
700 char buf[10]; local
[all...]
H A Dstring_test.cpp70 char buf[256]; local
73 ASSERT_EQ(0, strerror_r(0, buf, sizeof(buf)));
74 ASSERT_STREQ("Success", buf);
75 ASSERT_EQ(0, strerror_r(1, buf, sizeof(buf)));
76 ASSERT_STREQ("Operation not permitted", buf);
79 ASSERT_EQ(0, strerror_r(-1, buf, sizeof(buf)));
80 ASSERT_STREQ("Unknown error -1", buf);
215 char buf[1]; local
224 char buf[10]; local
243 char buf[10]; local
261 char buf[10]; local
280 char buf[10]; local
299 char buf[10]; local
318 char buf[10]; local
337 char buf[10]; local
356 char buf[10]; local
375 char buf[10]; local
[all...]
/bionic/libc/bionic/
H A Dgetcwd.cpp32 extern "C" int __getcwd(char* buf, size_t size);
34 char* getcwd(char* buf, size_t size) { argument
36 if (buf != NULL && size == 0) {
44 if (buf == NULL) {
50 buf = allocated_buf = static_cast<char*>(malloc(allocated_size));
51 if (buf == NULL) {
59 int rc = __getcwd(buf, allocated_size);
69 buf = strdup(allocated_buf);
72 buf = allocated_buf;
76 return buf;
[all...]
H A Dether_ntoa.c38 ether_ntoa_r (const struct ether_addr *addr, char * buf) argument
40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
44 return buf;
53 static char buf[18]; local
54 return ether_ntoa_r(addr, buf);
H A Dcpuacct.c39 char buf[80]; local
43 count = snprintf(buf, sizeof(buf), "/acct/uid/%d/tasks", uid);
44 fd = open(buf, O_RDWR | O_CREAT, 0666);
47 buf[count - sizeof("tasks")] = 0;
48 if (mkdir(buf, 0775) < 0)
52 buf[count - sizeof("tasks")] = '/';
53 fd = open(buf, O_RDWR | O_CREAT, 0666);
H A Dpread.c31 ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) argument
33 return pread64(fd, buf, nbytes, (off64_t)offset);
H A Dpwrite.c31 ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset) argument
33 return pwrite64(fd, buf, nbytes, (off64_t)offset);
H A Drecv.c31 ssize_t recv(int socket, void *buf, size_t buflen, unsigned int flags) argument
33 return recvfrom(socket, buf, buflen, flags, NULL, 0);
H A Dsend.c31 ssize_t send(int socket, const void *buf, size_t buflen, unsigned int flags) argument
33 return (ssize_t) sendto(socket, buf, buflen, flags, NULL, 0);
H A Dfdprintf.c36 char *buf=0; local
38 ret = vasprintf(&buf, format, ap);
42 ret = write(fd, buf, ret);
43 free(buf);
H A Dpathconf.c138 struct statfs buf; local
139 int ret = statfs( path, &buf );
146 return __filesizebits(&buf);
149 return __link_max(&buf);
158 return __name_max(&buf);
167 return __2_symlinks(&buf);
206 struct statfs buf; local
207 int ret = fstatfs(fildes, &buf);
214 return __filesizebits(&buf);
217 return __link_max(&buf);
[all...]
H A Dptsname_r.c35 int ptsname_r( int fd, char* buf, size_t buflen) argument
41 if (buf == NULL) {
56 memcpy( buf, buff, len+1 );
H A Dstrerror_r.cpp46 int strerror_r(int error_number, char* buf, size_t buf_len) { argument
52 length = snprintf(buf, buf_len, "%s", error_name);
54 length = snprintf(buf, buf_len, "Unknown error %d", error_number);
64 extern "C" __LIBC_HIDDEN__ const char* __strsignal(int signal_number, char* buf, size_t buf_len) { argument
75 size_t length = snprintf(buf, buf_len, "%s signal %d", prefix, signal_number);
79 return buf;
H A Dtmpfile.cpp60 char buf[PATH_MAX]; local
61 int path_length = snprintf(buf, sizeof(buf), "%s/tmp.XXXXXXXXXX", tmp_dir);
62 if (path_length >= static_cast<int>(sizeof(buf))) {
69 fd = mkstemp(buf);
75 unlink(buf);
/bionic/libc/stdio/
H A Dgets.c41 gets(char *buf) argument
47 for (s = buf; (c = getchar_unlocked()) != '\n';)
49 if (s == buf) {
58 return (buf);
/bionic/libc/upstream-freebsd/lib/libc/stdio/
H A Dsetbuf.c43 setbuf(FILE * __restrict fp, char * __restrict buf) argument
45 (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
H A Dsetbuffer.c42 setbuffer(FILE *fp, char *buf, int size) argument
45 (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
H A Dtmpnam.c53 static char buf[L_tmpnam]; local
56 s = buf;
/bionic/libc/netbsd/nameser/
H A Dns_print.c64 char **buf, size_t *buflen);
67 char **buf, size_t *buflen);
68 static void addlen(size_t len, char **buf, size_t *buflen);
70 char **buf, size_t *buflen);
72 char **buf, size_t *buflen);
86 * ns_sprintrr(handle, rr, name_ctx, origin, buf, buflen)
89 * Number of characters written to buf, or -1 (check errno).
94 char *buf, size_t buflen)
101 name_ctx, origin, buf, buflen);
108 * name_ctx, origin, buf, bufle
92 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
114 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
170 addlen(strlen(buf), &buf, &buflen); local
338 addlen(strlen(buf), &buf, &buflen); local
429 addlen(strlen(buf), &buf, &buflen); local
671 addlen(strlen(buf), &buf, &buflen); local
694 addlen(strlen(buf), &buf, &buflen); local
800 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument
834 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument
878 addlen(size_t len, char **buf, size_t *buflen) argument
885 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument
897 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument
[all...]
/bionic/libc/upstream-netbsd/libc/stdio/
H A Dgetline.c42 getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp)
44 return getdelim(buf, buflen, '\n', fp);
/bionic/libc/netbsd/resolv/
H A D__res_send.c31 res_send(const u_char *buf, int buflen, u_char *ans, int anssiz)
34 return __res_send(buf, buflen, ans, anssiz);

Completed in 256 milliseconds

1234