| /third_party/uapp/dash/src/ |
| A D | arith_yylex.c | 60 value = *buf; in yylex() 65 buf++; in yylex() 134 p = buf; in yylex() 135 while (buf++, is_in_name(*buf)) in yylex() 144 buf++; in yylex() 146 if (*buf != '=') in yylex() 151 switch (*++buf) { in yylex() 164 switch (*++buf) { in yylex() 177 if (*++buf != '|') { in yylex() 236 buf++; in yylex() [all …]
|
| /third_party/uapp/dash/src/bltin/ |
| A D | times.c | 16 struct tms buf; in timescmd() local 19 times(&buf); in timescmd() 21 (int) (buf.tms_utime / clk_tck / 60), in timescmd() 22 ((double) buf.tms_utime) / clk_tck, in timescmd() 23 (int) (buf.tms_stime / clk_tck / 60), in timescmd() 24 ((double) buf.tms_stime) / clk_tck, in timescmd() 25 (int) (buf.tms_cutime / clk_tck / 60), in timescmd() 26 ((double) buf.tms_cutime) / clk_tck, in timescmd() 27 (int) (buf.tms_cstime / clk_tck / 60), in timescmd() 28 ((double) buf.tms_cstime) / clk_tck); in timescmd()
|
| /third_party/ulib/cksum/ |
| A D | adler32.c | 16 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} argument 17 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); argument 18 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); argument 19 #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); argument 20 #define DO16(buf) DO8(buf,0); DO8(buf,8); argument 74 adler += buf[0]; in adler32() 84 if (buf == Z_NULL) in adler32() 90 adler += *buf++; in adler32() 105 buf += 16; in adler32() 115 DO16(buf); in adler32() [all …]
|
| /third_party/ulib/musl/src/network/ |
| A D | inet_ntop.c | 10 char buf[100]; in inet_ntop() local 19 snprintf(buf, sizeof buf, "%x:%x:%x:%x:%x:%x:%x:%x", 256 * a[0] + a[1], in inet_ntop() 23 snprintf(buf, sizeof buf, "%x:%x:%x:%x:%x:%x:%d.%d.%d.%d", 256 * a[0] + a[1], in inet_ntop() 27 for (i = best = 0, max = 2; buf[i]; i++) { in inet_ntop() 28 if (i && buf[i] != ':') in inet_ntop() 30 j = strspn(buf + i, ":0"); in inet_ntop() 35 buf[best] = buf[best + 1] = ':'; in inet_ntop() 36 memmove(buf + best + 2, buf + best + max, i - best - max + 1); in inet_ntop() 38 if (strlen(buf) < l) { in inet_ntop() 39 strcpy(s, buf); in inet_ntop()
|
| A D | lookup_serv.c | 43 buf[0].port = 0; in __lookup_serv() 44 buf[0].proto = proto; in __lookup_serv() 45 buf[0].socktype = socktype; in __lookup_serv() 58 buf[cnt].port = port; in __lookup_serv() 59 buf[cnt].socktype = SOCK_STREAM; in __lookup_serv() 60 buf[cnt++].proto = IPPROTO_TCP; in __lookup_serv() 63 buf[cnt].port = port; in __lookup_serv() 64 buf[cnt].socktype = SOCK_DGRAM; in __lookup_serv() 65 buf[cnt++].proto = IPPROTO_UDP; in __lookup_serv() 112 buf[cnt].port = port; in __lookup_serv() [all …]
|
| A D | gethostbyaddr_r.c | 10 int gethostbyaddr_r(const void* a, socklen_t l, int af, struct hostent* h, char* buf, size_t buflen, in gethostbyaddr_r() argument 32 i = (uintptr_t)buf & (sizeof(char*) - 1); in gethostbyaddr_r() 37 buf += sizeof(char*) - i; in gethostbyaddr_r() 40 h->h_addr_list = (void*)buf; in gethostbyaddr_r() 41 buf += 2 * sizeof(char*); in gethostbyaddr_r() 42 h->h_aliases = (void*)buf; in gethostbyaddr_r() 43 buf += 2 * sizeof(char*); in gethostbyaddr_r() 45 h->h_addr_list[0] = buf; in gethostbyaddr_r() 47 buf += l; in gethostbyaddr_r() 49 h->h_aliases[0] = buf; in gethostbyaddr_r() [all …]
|
| A D | getservbyport_r.c | 9 int getservbyport_r(int port, const char* prots, struct servent* se, char* buf, size_t buflen, in getservbyport_r() argument 17 int r = getservbyport_r(port, "tcp", se, buf, buflen, res); in getservbyport_r() 19 r = getservbyport_r(port, "udp", se, buf, buflen, res); in getservbyport_r() 24 i = (uintptr_t)buf & (sizeof(char*) - 1); in getservbyport_r() 29 buf += sizeof(char*) - i; in getservbyport_r() 37 se->s_aliases = (void*)buf; in getservbyport_r() 38 buf += 2 * sizeof(char*); in getservbyport_r() 41 se->s_aliases[0] = se->s_name = buf; in getservbyport_r() 43 switch (getnameinfo((void*)&sin, sizeof sin, 0, 0, buf, buflen, in getservbyport_r()
|
| A D | gethostbyname2_r.c | 58 memcpy(buf, name, namelen + 1); in gethostbyname2_r() 59 h->h_name = buf; in gethostbyname2_r() 60 buf += roundup(namelen + 1, sizeof(char*)); in gethostbyname2_r() 62 h->h_aliases = (char**)buf; in gethostbyname2_r() 64 buf += sizeof(char*); in gethostbyname2_r() 66 h->h_addr_list = (char**)buf; in gethostbyname2_r() 67 buf += sizeof(char*) * (n_addr + 1); in gethostbyname2_r() 73 memcpy(buf, &sin->sin_addr, h->h_length); in gethostbyname2_r() 76 memcpy(buf, &sin6->sin6_addr, h->h_length); in gethostbyname2_r() 78 h->h_addr_list[n_addr++] = buf; in gethostbyname2_r() [all …]
|
| A D | getnameinfo.c | 60 char buf[256], num[3 * sizeof(int) + 1]; in getnameinfo() local 88 buf[0] = 0; in getnameinfo() 89 if (!*buf && !(flags & NI_NUMERICHOST)) { in getnameinfo() 93 buf[0] = 0; in getnameinfo() 97 if (!*buf) { in getnameinfo() 100 inet_ntop(af, a, buf, sizeof buf); in getnameinfo() 109 strcat(buf, p); in getnameinfo() 112 if (strlen(buf) >= nodelen) in getnameinfo() 114 strcpy(node, buf); in getnameinfo() 118 char* p = buf; in getnameinfo() [all …]
|
| A D | lookup_ipliteral.c | 14 int __lookup_ipliteral(struct address buf[static 1], const char* name, int family) { in __lookup_ipliteral() 20 memcpy(&buf[0].addr, &a4, sizeof a4); in __lookup_ipliteral() 21 buf[0].family = AF_INET; in __lookup_ipliteral() 22 buf[0].scopeid = 0; in __lookup_ipliteral() 40 memcpy(&buf[0].addr, &a6, sizeof a6); in __lookup_ipliteral() 41 buf[0].family = AF_INET6; in __lookup_ipliteral() 57 buf[0].scopeid = scopeid; in __lookup_ipliteral()
|
| /third_party/ulib/musl/src/stdio/ |
| A D | fmemopen.c | 8 unsigned char* buf; member 35 memcpy(buf, c->buf + c->pos, len); in mread() 40 f->rpos = f->buf; in mread() 41 f->rend = f->buf + rem; in mread() 42 memcpy(f->rpos, c->buf + c->pos, rem); in mread() 61 memcpy(c->buf + c->pos, buf, len); in mwrite() 66 c->buf[c->len] = 0; in mwrite() 68 c->buf[c->size - 1] = 0; in mwrite() 100 if (!buf) in fmemopen() 101 buf = f->buf + BUFSIZ; in fmemopen() [all …]
|
| A D | vswscanf.c | 5 static size_t wstring_read(FILE* f, unsigned char* buf, size_t len) { in wstring_read() argument 12 k = wcsrtombs((void*)f->buf, &src, f->buf_size, 0); in wstring_read() 18 f->rpos = f->buf; in wstring_read() 19 f->rend = f->buf + k; in wstring_read() 25 *buf = *f->rpos++; in wstring_read() 30 unsigned char buf[256]; in vswscanf() local 32 .buf = buf, .buf_size = sizeof buf, .cookie = (void*)s, .read = wstring_read, .lock = -1}; in vswscanf()
|
| A D | open_memstream.c | 10 char* buf; member 29 static size_t ms_write(FILE* f, const unsigned char* buf, size_t len) { in ms_write() argument 40 newbuf = realloc(c->buf, len2); in ms_write() 43 *c->bufp = c->buf = newbuf; in ms_write() 44 memset(c->buf + c->space, 0, len2 - c->space); in ms_write() 47 memcpy(c->buf + c->pos, buf, len); in ms_write() 62 char* buf; in open_memstream() local 66 if (!(buf = malloc(sizeof *buf))) { in open_memstream() 76 c->buf = *bufp = buf; in open_memstream() 77 *buf = 0; in open_memstream() [all …]
|
| A D | open_wmemstream.c | 11 wchar_t* buf; member 32 static size_t wms_write(FILE* f, const unsigned char* buf, size_t len) { in wms_write() argument 40 newbuf = realloc(c->buf, len2 * 4); in wms_write() 43 *c->bufp = c->buf = newbuf; in wms_write() 44 memset(c->buf + c->space, 0, 4 * (len2 - c->space)); in wms_write() 48 len2 = mbsnrtowcs(c->buf + c->pos, (void*)&buf, len, c->space - c->pos, &c->mbs); in wms_write() 65 wchar_t* buf; in open_wmemstream() local 69 if (!(buf = malloc(sizeof *buf))) { in open_wmemstream() 79 c->buf = *bufp = buf; in open_wmemstream() 80 *buf = 0; in open_wmemstream() [all …]
|
| A D | __stdio_read.c | 4 size_t __stdio_read(FILE* f, unsigned char* buf, size_t len) { in __stdio_read() argument 5 struct iovec iov[2] = {{.iov_base = buf, .iov_len = len - !!f->buf_size}, in __stdio_read() 6 {.iov_base = f->buf, .iov_len = f->buf_size}}; in __stdio_read() 15 f->rpos = f->buf; in __stdio_read() 16 f->rend = f->buf + cnt; in __stdio_read() 18 buf[len - 1] = *f->rpos++; in __stdio_read()
|
| /third_party/ulib/jemalloc/test/integration/ |
| A D | thread_arena.c | 21 char buf[BUFERROR_BUF]; in thd_start() local 23 buferror(err, buf, sizeof(buf)); in thd_start() 24 test_fail("Error in mallctl(): %s", buf); in thd_start() 30 char buf[BUFERROR_BUF]; in thd_start() local 32 buferror(err, buf, sizeof(buf)); in thd_start() 33 test_fail("Error in mallctl(): %s", buf); in thd_start() 56 char buf[BUFERROR_BUF]; in TEST_BEGIN() local 58 buferror(err, buf, sizeof(buf)); in TEST_BEGIN() 59 test_fail("Error in mallctl(): %s", buf); in TEST_BEGIN()
|
| /third_party/ulib/musl/src/passwd/ |
| A D | getgr_r.c | 3 #define FIX(x) (gr->gr_##x = gr->gr_##x - line + buf) 5 static int getgr_r(const char* name, gid_t gid, struct group* gr, char* buf, size_t size, in getgr_r() argument 20 buf += (16 - (uintptr_t)buf) % 16; in getgr_r() 21 gr->gr_mem = (void*)buf; in getgr_r() 22 buf += (nmem + 1) * sizeof(char*); in getgr_r() 23 memcpy(buf, line, len); in getgr_r() 27 gr->gr_mem[i] = mem[i] - line + buf; in getgr_r() 35 int getgrnam_r(const char* name, struct group* gr, char* buf, size_t size, struct group** res) { in getgrnam_r() argument 36 return getgr_r(name, 0, gr, buf, size, res); in getgrnam_r() 39 int getgrgid_r(gid_t gid, struct group* gr, char* buf, size_t size, struct group** res) { in getgrgid_r() argument [all …]
|
| /third_party/ulib/ngunwind/src/ |
| A D | os-linux.h | 35 char *buf; member 41 ltoa (char *buf, long val) in ltoa() argument 43 char *cp = buf, tmp; in ltoa() 54 len = cp - buf; in ltoa() 58 tmp = buf[i]; in ltoa() 59 buf[i] = cp[-i]; in ltoa() 62 return buf + len; in ltoa() 222 eol = mi->buf + i; in maps_next() 258 cp = mi->buf; in maps_next() 259 mi->buf = eol + 1; in maps_next() [all …]
|
| /third_party/ulib/musl/src/mman/ |
| A D | shm_open.c | 10 char* __shm_mapname(const char* name, char* buf) { in __shm_mapname() argument 23 memcpy(buf, "/dev/shm/", 9); in __shm_mapname() 24 memcpy(buf + 9, name, p - name + 1); in __shm_mapname() 25 return buf; in __shm_mapname() 29 char buf[NAME_MAX + 10]; in shm_open() local 30 if (!(name = __shm_mapname(name, buf))) in shm_open() 36 char buf[NAME_MAX + 10]; in shm_unlink() local 37 if (!(name = __shm_mapname(name, buf))) in shm_unlink()
|
| /third_party/ulib/uboringssl/include/openssl/ |
| A D | rand.h | 29 OPENSSL_EXPORT int RAND_bytes(uint8_t *buf, size_t len); 75 OPENSSL_EXPORT int RAND_pseudo_bytes(uint8_t *buf, size_t len); 79 OPENSSL_EXPORT void RAND_seed(const void *buf, int num); 85 OPENSSL_EXPORT const char *RAND_file_name(char *buf, size_t num); 88 OPENSSL_EXPORT void RAND_add(const void *buf, int num, double entropy); 103 void (*seed) (const void *buf, int num); 104 int (*bytes) (uint8_t *buf, size_t num); 106 void (*add) (const void *buf, int num, double entropy); 107 int (*pseudorand) (uint8_t *buf, size_t num);
|
| /third_party/ulib/linenoise/ |
| A D | linenoise.c | 289 char buf[32]; in getCursorPosition() local 308 buf[i] = '\0'; in getCursorPosition() 311 if (buf[0] != ESC || buf[1] != '[') return -1; in getCursorPosition() 417 ls->buf = saved.buf; 553 char *buf = l->buf; local 567 buf++; 783 memmove(l->buf+l->pos,l->buf+l->pos+1,l->len-l->pos-1); 793 memmove(l->buf+l->pos-1,l->buf+l->pos,l->len-l->pos); 812 memmove(l->buf+l->pos,l->buf+old_pos,l->len-old_pos+1); 833 l.buf = buf; [all …]
|
| /third_party/ulib/musl/src/misc/ |
| A D | syslog.c | 76 char buf[1024]; in _vsyslog() local 94 l = snprintf(buf, sizeof buf, "<%d>%s %n%s%s%.0d%s: ", priority, timebuf, &hlen, log_ident, in _vsyslog() 97 l2 = vsnprintf(buf + l, sizeof buf - l, message, ap); in _vsyslog() 99 if ((size_t)l2 >= sizeof(buf) - l) in _vsyslog() 100 l = sizeof(buf) - 1; in _vsyslog() 103 if (buf[l - 1] != '\n') in _vsyslog() 104 buf[l++] = '\n'; in _vsyslog() 105 if (send(log_fd, buf, l, 0) < 0 && in _vsyslog() 107 send(log_fd, buf, l, 0) < 0) && in _vsyslog() 111 dprintf(fd, "%.*s", l - hlen, buf + hlen); in _vsyslog() [all …]
|
| /third_party/ulib/ngunwind/src/mi/ |
| A D | Gget_proc_name.c | 31 unw_word_t addr, char *buf, size_t buf_len, void *arg) in intern_string() argument 38 if ((ret = fetch8 (as, a, &addr, (int8_t *) buf + i, arg)) < 0) in intern_string() 41 if (buf[i] == '\0') in intern_string() 44 buf[buf_len - 1] = '\0'; /* ensure string is NUL terminated */ in intern_string() 50 char *buf, size_t buf_len, unw_word_t *offp, void *arg) in get_proc_name() argument 56 buf[0] = '\0'; /* always return a valid string, even if it's empty */ in get_proc_name() 69 ret = intern_string (as, a, di->u.pi.name_ptr, buf, buf_len, arg); in get_proc_name() 93 return (*a->get_proc_name) (as, ip, buf, buf_len, offp, arg); in get_proc_name() 99 unw_get_proc_name (unw_cursor_t *cursor, char *buf, size_t buf_len, in unw_get_proc_name() argument 109 error = get_proc_name (tdep_get_as (c), ip, buf, buf_len, offp, in unw_get_proc_name()
|
| /third_party/ulib/musl/src/stdlib/ |
| A D | wcstod.c | 11 static size_t do_read(FILE* f, unsigned char* buf, size_t len) { in do_read() argument 18 f->buf[i] = wcs[i] < 128 ? wcs[i] : '@'; in do_read() 19 f->rpos = f->buf; in do_read() 20 f->rend = f->buf + i; in do_read() 24 *buf = *f->rpos++; in do_read() 32 unsigned char buf[64]; in wcstox() local 36 f.buf = buf + 4; in wcstox() 37 f.buf_size = sizeof buf - 4; in wcstox()
|
| /third_party/ulib/musl/src/stat/ |
| A D | statvfs.c | 6 int __statfs(const char* path, struct statfs* buf) { in __statfs() argument 7 *buf = (struct statfs){}; in __statfs() 12 int __fstatfs(int fd, struct statfs* buf) { in __fstatfs() argument 13 *buf = (struct statfs){}; in __fstatfs() 36 int statvfs(const char* restrict path, struct statvfs* restrict buf) { in statvfs() argument 40 fixup(buf, &kbuf); in statvfs() 44 int fstatvfs(int fd, struct statvfs* buf) { in fstatvfs() argument 48 fixup(buf, &kbuf); in fstatvfs()
|