Searched refs:pos (Results 1 - 25 of 51) sorted by relevance

123

/fuchsia/zircon/third_party/ulib/musl/src/stdio/
H A Dfsetpos.c3 int fsetpos(FILE* f, const fpos_t* pos) { argument
4 return __fseeko(f, *(const off_t*)pos, SEEK_SET);
H A Dfgetpos.c3 int fgetpos(FILE* restrict f, fpos_t* restrict pos) { argument
7 *(off_t*)pos = off;
H A Dftell.c6 off_t pos = f->seek(f, 0, (f->flags & F_APP) && f->wpos > f->wbase ? SEEK_END : SEEK_CUR); local
7 if (pos < 0)
8 return pos;
11 return pos - (f->rend - f->rpos) + (f->wpos - f->wbase);
15 off_t pos; local
17 pos = __ftello_unlocked(f);
19 return pos;
23 off_t pos = __ftello(f); local
24 if (pos > LONG_MAX) {
28 return pos;
[all...]
H A Dopen_wmemstream.c10 size_t pos; member in struct:cookie
25 base = (size_t[3]){0, c->pos, c->len}[whence];
29 return c->pos = base + off;
36 if (len + c->pos >= c->space) {
37 len2 = (2 * c->space + 1) | (c->pos + len + 1);
48 len2 = mbsnrtowcs(c->buf + c->pos, (void*)&buf, len, c->space - c->pos, &c->mbs);
51 c->pos += len2;
52 if (c->pos >= c->len)
53 c->len = c->pos;
[all...]
H A Dfmemopen.c7 size_t pos, len, size; member in struct:cookie
20 base = (size_t[3]){0, c->pos, c->len}[whence];
23 return c->pos = base + off;
28 size_t rem = c->len - c->pos;
29 if (c->pos > c->len)
35 memcpy(buf, c->buf + c->pos, len);
36 c->pos += len;
42 memcpy(f->rpos, c->buf + c->pos, rem);
43 c->pos += rem;
57 c->pos
[all...]
H A Dopen_memstream.c9 size_t pos; member in struct:cookie
23 base = (size_t[3]){0, c->pos, c->len}[whence];
26 return c->pos = base + off;
38 if (len + c->pos >= c->space) {
39 len2 = (2 * c->space + 1) | (c->pos + len + 1);
47 memcpy(c->buf + c->pos, buf, len);
48 c->pos += len;
49 if (c->pos >= c->len)
50 c->len = c->pos;
51 *c->sizep = c->pos;
[all...]
/fuchsia/zircon/system/host/fidl/lib/
H A Dsource_location.cpp15 SourceFile::Position pos; local
16 SourceLine(&pos);
18 position.append(std::to_string(pos.line));
20 position.append(std::to_string(pos.column));
/fuchsia/zircon/kernel/lib/io/
H A Dconsole.cpp74 size_t pos = t->linebuffer_pos; local
77 if (unlikely(!is_kernel_address((uintptr_t)buf) || pos >= THREAD_LINEBUFFER_LENGTH)) {
85 buf[pos++] = c;
87 __kernel_stdout_write(buf, pos);
88 pos = 0;
91 if (pos == (THREAD_LINEBUFFER_LENGTH - 1)) {
92 buf[pos++] = '\n';
93 __kernel_stdout_write(buf, pos);
94 pos = 0;
98 t->linebuffer_pos = pos;
[all...]
/fuchsia/zircon/system/host/fidl/formatter/
H A Dmain.cpp73 int pos = 1; local
75 while (pos < args.size() && args[pos] != "--" && args[pos].find("-") == 0) {
76 if (args[pos] == "-i" || args[pos] == "--in-place") {
78 } else if (args[pos] == "-h" || args[pos] == "--help") {
82 FailWithUsage(args[0], "Unknown argument: %s\n", args[pos].c_str());
84 pos
[all...]
/fuchsia/zircon/third_party/ulib/jemalloc/test/unit/
H A Dstats_print.c24 size_t pos; member in struct:__anon1595
34 size_t pos; member in struct:parser_s
42 size_t pos, size_t len, size_t line, size_t col)
46 token->pos = pos;
70 write(STDERR_FILENO, &token->parser->buf[token->pos], token->len);
80 parser->pos = 0;
140 assert_zu_le(parser->pos, parser->len,
144 char c = parser->buf[parser->pos];
148 token_pos = parser->pos;
41 token_init(token_t *token, parser_t *parser, token_type_t token_type, size_t pos, size_t len, size_t line, size_t col) argument
[all...]
/fuchsia/zircon/kernel/object/
H A Dmbuf.cpp48 size_t pos = 0; local
49 while (pos < len && !tail_.is_empty()) {
52 size_t copy_len = MIN(cur.len_, len - pos);
53 if (dst.byte_offset(pos).copy_array_to_user(src, copy_len) != ZX_OK)
54 return pos;
55 pos += copy_len;
76 return pos;
100 size_t pos = 0; local
102 size_t copy_len = fbl::min(MBuf::kPayloadSize, len - pos);
103 if (src.byte_offset(pos)
138 size_t pos = 0; local
[all...]
/fuchsia/zircon/system/dev/clk/amlogic-clk/
H A Daml-g12a-blocks.h12 #define BIT(pos) (1U << (pos))
/fuchsia/zircon/third_party/lib/cortex-strings/src/aarch64/
H A Dstrcpy.S61 #define pos x15 define
164 clz pos, has_nul2
166 add dst, dstin, pos, lsr #3 /* Bits to bytes. */
167 sub pos, tmp2, pos
169 lsr data2, data2, pos
171 lsl data2, data2, pos
182 clz pos, has_nul1
183 add dst, dstin, pos, lsr #3 /* Bits to bytes. */
184 subs tmp2, pos, #2
[all...]
H A Dstrcmp.S61 #define pos x11 define
93 clz pos, syndrome
95 lsl data1, data1, pos
96 lsl data2, data2, pos
122 clz pos, syndrome
127 lsl data1, data1, pos
128 lsl data2, data2, pos
/fuchsia/zircon/third_party/ulib/linenoise/
H A Dlinenoise.c156 size_t pos; /* Current cursor position. */ member in struct:linenoiseState
205 (int)l->len,(int)l->pos,(int)l->oldpos,plen,rows,rpos, \
412 ls->len = ls->pos = strlen(lc.cvec[i]);
416 ls->pos = saved.pos;
442 ls->len = ls->pos = nwritten;
555 size_t pos = l->pos; local
566 while ((plen+pos) >= l->cols && len > 0) {
569 pos
[all...]
/fuchsia/zircon/system/ulib/syslog/
H A Dfx_logger.cpp68 size_t pos = 0; local
72 packet.data[pos++] = static_cast<char>(len);
73 memcpy(packet.data + pos, tags_[i].c_str(), len);
74 pos += len;
82 packet.data[pos++] = static_cast<char>(write_len);
83 memcpy(packet.data + pos, tag, write_len);
84 pos += write_len;
87 packet.data[pos++] = 0;
88 ZX_DEBUG_ASSERT(pos < kDataSize);
90 int n = static_cast<int>(kDataSize - pos);
81 ZX_DEBUG_ASSERT(write_len < 128); packet.data[pos++] = static_cast<char>(write_len); memcpy(packet.data + pos, tag, write_len); pos += write_len; } } packet.data[pos++] = 0; ZX_DEBUG_ASSERT(pos < kDataSize); int n = static_cast<int>(kDataSize - pos); int count = 0; size_t msg_pos = pos; if (!perform_format) { size_t write_len = fbl::min(strlen(msg), static_cast<size_t>(n - 1)); memcpy(packet.data + pos, msg, write_len); pos += write_len; packet.data[pos] = 0; count = static_cast<int>(write_len + 1); } else { count = vsnprintf(packet.data + pos, n, msg, args); if (count < 0) { return ZX_ERR_INVALID_ARGS; } } if (count >= n) { constexpr char kEllipsis[] = �; constexpr size_t kEllipsisSize = sizeof(kEllipsis) - 1; memcpy(packet.data + kDataSize - 1 - kEllipsisSize, kEllipsis, kEllipsisSize); count = n - 1; } auto size = sizeof(packet.metadata) + msg_pos + count + 1; ZX_DEBUG_ASSERT(size <= sizeof(packet)); auto status = socket_.write(0, &packet, size, nullptr); if (status == ZX_ERR_BAD_STATE || status == ZX_ERR_PEER_CLOSED) { ActivateFallback(-1); return VLogWriteToFd(logger_fd_.load(fbl::memory_order_relaxed), severity, tag, packet.data + msg_pos, args, false); } if (status != ZX_OK) { dropped_logs_.fetch_add(1); } return status; } zx_status_t fx_logger::VLogWriteToFd(int fd, fx_log_severity_t severity, const char* tag, const char* msg, va_list args, bool perform_format) { zx_time_t time = zx_clock_get_monotonic(); constexpr char kEllipsis[] = �; constexpr size_t kEllipsisSize = sizeof(kEllipsis) - 1; constexpr size_t kMaxMessageSize = 2043; fbl::StringBuffer<kMaxMessageSize + kEllipsisSize + 1 > buf; buf.AppendPrintf(�, time / 1000000000UL, (time / 1000UL) % 1000000UL); buf.AppendPrintf(�, pid_); buf.AppendPrintf(�, GetCurrentThreadKoid()); buf.Append(�); if (!tagstr_.empty()) { buf.Append(tagstr_); } if (tag != NULL) { size_t len = strlen(tag); if (len > 0) { if (!tagstr_.empty()) { buf.Append(�); } buf.Append(tag, fbl::min(len, static_cast<size_t>(FX_LOG_MAX_TAG_LEN - 1))); } } buf.Append(�); switch (severity) { case FX_LOG_INFO: buf.Append(�); break; case FX_LOG_WARNING: buf.Append(�); break; case FX_LOG_ERROR: buf.Append(�); break; case FX_LOG_FATAL: buf.Append(�); break; default: buf.AppendPrintf(�, -severity); } buf.Append(�); if (!perform_format) { buf.Append(msg); } else { buf.AppendVPrintf(msg, args); } if (buf.size() > kMaxMessageSize) { buf.Resize(kMaxMessageSize); buf.Append(kEllipsis); } buf.Append(�); ssize_t status = write(fd, buf.data(), buf.size()); if (status < 0) { return ZX_ERR_IO; } return ZX_OK; } zx_status_t fx_logger::VLogWrite(fx_log_severity_t severity, const char* tag, const char* msg, va_list args, bool perform_format) { if (msg == NULL || severity > FX_LOG_FATAL) { return ZX_ERR_INVALID_ARGS; } if (GetSeverity() > severity) argument
[all...]
/fuchsia/zircon/third_party/uapp/dash/src/
H A Dmksyntax.c108 int pos; local
134 for (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
143 for (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
/fuchsia/zircon/kernel/lib/libc/
H A Dprintf.c22 size_t pos; member in struct:_output_args
31 if (args->pos < args->len) {
32 args->outstr[args->pos++] = *str;
49 args.pos = 0;
53 if (args.pos >= len)
90 size_t pos = len; local
98 buf[--pos] = 0;
106 buf[--pos] = (char)(digit + '0');
108 buf[--pos] = (char)(n + '0');
119 return &buf[pos];
127 size_t pos = len; local
[all...]
/fuchsia/zircon/kernel/lib/console/
H A Dconsole.cpp203 size_t pos = 0; local
231 if (pos > 0) {
232 pos--;
242 buffer[pos++] = c;
257 buffer[pos++] = ' ';
262 if (pos > 0) {
263 pos--;
273 while (pos > 0) {
274 pos--;
284 pos
635 int pos; member in struct:line_read_struct
748 size_t pos = 0; local
[all...]
/fuchsia/zircon/bootloader/lib/
H A Dprintf.c56 size_t pos = len; local
64 buf[--pos] = 0;
72 buf[--pos] = digit + '0';
74 buf[--pos] = n + '0';
85 return &buf[pos];
93 size_t pos = len; local
96 buf[--pos] = 0;
101 buf[--pos] = table[digit];
104 return &buf[pos];
115 size_t pos; member in struct:_output_args
[all...]
/fuchsia/zircon/third_party/ulib/musl/third_party/tre/
H A Dregexec.c54 pos += pos_add_next; \
68 (((assertions & ASSERT_AT_BOL) && (pos > 0 || reg_notbol) && \
75 (pos != 0 && next_c != L'\0' && IS_WORD_CHAR(prev_c) == IS_WORD_CHAR(next_c))) || \
77 (pos == 0 || next_c == L'\0' || IS_WORD_CHAR(prev_c) != IS_WORD_CHAR(next_c))))
146 int pos; member in struct:__anon1869
155 int pos = -1; local
229 reach_pos[i].pos = -1;
232 pos = 0;
240 if (reach_pos[trans_i->state_id].pos < pos) {
424 int pos; member in struct:__anon1870
518 int pos = 0; local
[all...]
/fuchsia/zircon/system/ulib/logger/
H A Dlogger.cpp46 size_t pos = 0; local
48 unsigned int tag_len = packet->data[pos];
57 pos = pos + 1;
58 buf.Append(packet->data + pos, tag_len);
59 pos = pos + tag_len;
60 tag_len = packet->data[pos];
83 pos++; //point to log msg
84 buf.Append(packet->data + pos);
[all...]
/fuchsia/zircon/system/utest/fs-host/
H A Dtest-rw-workers.cpp33 uint32_t pos; member in struct:worker
71 if (w->pos == w->size) {
76 uint32_t off = w->pos % FBUFSIZE;
89 if (xfer > (w->size - w->pos)) {
90 xfer = w->size - w->pos;
102 w->name, w->pos, errno);
108 w->name, w->pos);
114 w->name, w->pos, errno);
120 w->pos += r;
142 w->pos
[all...]
/fuchsia/zircon/system/dev/sample/fifo/
H A Ddemo-fifo.c39 uint32_t pos = fifo->head & FIFOMASK; local
40 size_t space = FIFOSIZE - pos;
47 memcpy(fifo->data + pos, buf, count);
54 uint32_t pos = fifo->tail & FIFOMASK; local
55 size_t space = FIFOSIZE - pos;
62 memcpy(buf, fifo->data + pos, count);
/fuchsia/zircon/third_party/ulib/ngunwind/src/mi/
H A Dmempool.c49 size_t pos; local
57 pos = fetch_and_add (&sos_memory_freepos, size);
71 pos = sos_memory_freepos;
77 assert (((uintptr_t) &sos_memory[pos] & (MAX_ALIGN-1)) == 0);
78 assert ((pos+size) <= SOS_MEMORY_SIZE);
80 return &sos_memory[pos];

Completed in 147 milliseconds

123