Pull len chars from cursor into dst. */
| 190 | |
| 191 | /* Pull len chars from cursor into dst. */ |
| 192 | static bool pull_chars(char *dst, size_t len, const char **cursor, size_t *max) |
| 193 | { |
| 194 | if (*max < len) |
| 195 | return false; |
| 196 | memcpy(dst, *cursor, len); |
| 197 | *cursor += len; |
| 198 | *max -= len; |
| 199 | return true; |
| 200 | } |
| 201 | |
| 202 | /* Truncate length of *cursor (i.e. trim from end) */ |
| 203 | static bool trim_chars(size_t len, const char **cursor, size_t *max) |