| 92 | */ |
| 93 | |
| 94 | YAML_DECLARE(int) |
| 95 | yaml_string_join( |
| 96 | yaml_char_t **a_start, yaml_char_t **a_pointer, yaml_char_t **a_end, |
| 97 | yaml_char_t **b_start, yaml_char_t **b_pointer, SHIM(yaml_char_t **b_end)) |
| 98 | { |
| 99 | UNUSED_PARAM(b_end) |
| 100 | if (*b_start == *b_pointer) |
| 101 | return 1; |
| 102 | |
| 103 | while (*a_end - *a_pointer <= *b_pointer - *b_start) { |
| 104 | if (!yaml_string_extend(a_start, a_pointer, a_end)) |
| 105 | return 0; |
| 106 | } |
| 107 | |
| 108 | memcpy(*a_pointer, *b_start, *b_pointer - *b_start); |
| 109 | *a_pointer += *b_pointer - *b_start; |
| 110 | |
| 111 | return 1; |
| 112 | } |
| 113 | |
| 114 | /* |
| 115 | * Extend a stack. |
no test coverage detected