Lines Matching defs:buffer
302 const char *limit; /* End of delimited region or end of buffer. */
802 /* Writes the given bytes to the buffer, handling reserve/advance. */
1402 * have a null-terminating byte since it may be a raw binary buffer. */
6943 ** handle the fact that values can span buffer seams and we have to be able to
6945 ** sometimes requires keeping a few trailing bytes from the last buffer around
6946 ** in the "residual" buffer.
6971 /* A dummy character we can point to when the user passes us a NULL buffer.
6976 /* Whether an op consumes any of the input buffer. */
7034 /* We operate on one buffer at a time, which is either the user's buffer passed
7035 * to our "decode" callback or some residual bytes from the previous buffer. */
7044 /* How many bytes are available before end-of-buffer. */
7073 /* Calculates the delim_end value, which is affected by both the current buffer
7110 * again. Skipped bytes can pass a NULL buffer and the decoder guarantees they
7120 /* Skipped data is all in current buffer, and more is still available. */
7151 * is allowed to pass a NULL buffer here, which won't allow us to safely
7163 /* We need to pretend that this was the actual buffer param, since some of the
7169 * by this point we know that "skip" doesn't cover the buffer. */
7170 seterr(d, "Passed NULL buffer over non-skippable region.");
7175 /* We have residual bytes from the last buffer. */
7183 /* Handle skips that don't cover the whole buffer (as above). */
7221 * bytes in our residual buffer. This is necessary if we need more user
7225 /* We hit end-of-buffer before we could parse a full value.
7226 * Save any unconsumed bytes (if any) to the residual buffer. */
7256 * Requires that this many bytes are available in the current buffer. */
7265 * available in the current buffer or not. Returns a status code as described
7288 * current buffer or not. Returns a status code as described in decoder.int.h.
7326 /* Slow path for decoding a varint from the current buffer position.
7344 /* Decodes a varint from the current buffer position.
7362 /* Slow case -- varint spans buffer seam. */
7367 /* Decodes a 32-bit varint from the current buffer position.
7386 /* Decodes a fixed32 from the current buffer position.
7393 /* Decodes a fixed64 from the current buffer position.
7988 ** to pre-computed lengths), we have to buffer all submessages before we can
7998 ** 1. buffer all submessage data in a temporary buffer, then copy it exactly
7999 ** once into the output buffer.
8001 ** 2. attempt to buffer data directly into the output buffer, estimating how
8005 ** 3. buffer directly into the output buffer, allocating a max length
8033 ** The strategy is to buffer the segments of data that do *not* depend on
8034 ** unknown lengths in one buffer, and keep a separate buffer of segment pointers
8042 /* The output buffer is divided into segments; a segment is a string of data
8085 /* The output buffer and limit, and our current write position. "buf"
8107 /* Low-level functions for interacting with the output buffer. */
8123 /* Grow buffer. */
8172 /* Writes the given bytes to the buffer, handling reserve/advance. */
8209 /* Grow segment buffer. */
9210 /* The handle for the current buffer. */
9213 /* Accumulate buffer. See details in parser.rl. */
9531 /* Accumulate buffer **********************************************************/
9533 /* Functionality for accumulating a buffer.
9541 * In the common case we can just point to the input buffer to get this
9544 * separate buffer:
9549 * the true value in a contiguous buffer. */
9572 upb_status_seterrmsg(p->status, "Out of memory allocating buffer.");
9581 /* Logically appends the given data to the append buffer.
9582 * If "can_alias" is true, we will try to avoid actually copying, but the buffer
9615 * buffer or a temporary accumulate buffer. */
9627 * sequence. The two segments are processed with different logic. Also buffer
9634 * 2. we need to accumulate all the parts into a contiguous buffer for further
9643 * buffer. */
9692 /* Note: this invalidates the accumulate buffer! Call only after reading its
9704 * handles the case where a buffer seam occurs in the middle of the captured
9723 /* This is called at the end of each input buffer (ie. when we have hit a
9724 * buffer seam). If we are in the middle of capturing the input, this
9731 * that capturing should resume at the beginning of the next buffer.
10027 * the input string, so we need to force a copy into a NULL-terminated buffer. */
10470 /* Clean up buffer */
10501 * the input string, so we need to force a copy into a NULL-terminated buffer. */
10798 * field based on the current contents of the accumulate buffer. */
10820 /* Invoke end_number. The accum buffer has the number's text already. */
10863 * with the map key in the accumulate buffer. It parses the key from that
10864 * buffer, emits the handler calls to start the mapentry submessage (setting up
13245 char buffer[UPB_DURATION_MAX_JSON_LEN];
13250 memset(buffer, 0, UPB_DURATION_MAX_JSON_LEN);
13266 _upb_snprintf(buffer, sizeof(buffer), "%ld", (long)p->seconds);
13267 base_len = strlen(buffer);
13278 strcpy(buffer + base_len, nanos_buffer + 1);
13281 curr = strlen(buffer);
13282 strcpy(buffer + curr, "s");
13288 print_data(p, buffer, strlen(buffer));
13315 char buffer[UPB_TIMESTAMP_MAX_JSON_LEN];
13320 strftime(buffer, UPB_TIMESTAMP_MAX_JSON_LEN, "%Y", gmtime(&time));
13338 buffer[i] = '0';
13341 strftime(buffer + (4 - year_length), UPB_TIMESTAMP_MAX_JSON_LEN,
13352 strcpy(buffer + UPB_TIMESTAMP_BEFORE_NANO_LEN, nanos_buffer + 1);
13355 curr = strlen(buffer);
13356 strcpy(buffer + curr, "Z");
13362 print_data(p, buffer, strlen(buffer));