Lines Matching refs:string
43 #define WRITE(emitter,string) \ argument
45 && (COPY(emitter->buffer,string), \
53 #define WRITE_BREAK(emitter,string) \ argument
55 && (CHECK(string,'\n') ? \
57 string.pointer ++, \
59 (COPY(emitter->buffer,string), \
253 yaml_string_t string);
1404 yaml_string_t string; in yaml_emitter_analyze_anchor() local
1407 STRING_ASSIGN(string, anchor, anchor_length); in yaml_emitter_analyze_anchor()
1409 if (string.start == string.end) { in yaml_emitter_analyze_anchor()
1415 while (string.pointer != string.end) { in yaml_emitter_analyze_anchor()
1416 if (!IS_ALPHA(string)) { in yaml_emitter_analyze_anchor()
1421 MOVE(string); in yaml_emitter_analyze_anchor()
1424 emitter->anchor_data.anchor = string.start; in yaml_emitter_analyze_anchor()
1425 emitter->anchor_data.anchor_length = string.end - string.start; in yaml_emitter_analyze_anchor()
1440 yaml_string_t string; in yaml_emitter_analyze_tag() local
1444 STRING_ASSIGN(string, tag, tag_length); in yaml_emitter_analyze_tag()
1446 if (string.start == string.end) { in yaml_emitter_analyze_tag()
1454 if (prefix_length < (size_t)(string.end - string.start) in yaml_emitter_analyze_tag()
1455 && strncmp((char *)tag_directive->prefix, (char *)string.start, in yaml_emitter_analyze_tag()
1461 emitter->tag_data.suffix = string.start + prefix_length; in yaml_emitter_analyze_tag()
1463 (string.end - string.start) - prefix_length; in yaml_emitter_analyze_tag()
1468 emitter->tag_data.suffix = string.start; in yaml_emitter_analyze_tag()
1469 emitter->tag_data.suffix_length = string.end - string.start; in yaml_emitter_analyze_tag()
1482 yaml_string_t string; in yaml_emitter_analyze_scalar() local
1501 STRING_ASSIGN(string, value, length); in yaml_emitter_analyze_scalar()
1506 if (string.start == string.end) in yaml_emitter_analyze_scalar()
1517 if ((CHECK_AT(string, '-', 0) in yaml_emitter_analyze_scalar()
1518 && CHECK_AT(string, '-', 1) in yaml_emitter_analyze_scalar()
1519 && CHECK_AT(string, '-', 2)) in yaml_emitter_analyze_scalar()
1520 || (CHECK_AT(string, '.', 0) in yaml_emitter_analyze_scalar()
1521 && CHECK_AT(string, '.', 1) in yaml_emitter_analyze_scalar()
1522 && CHECK_AT(string, '.', 2))) { in yaml_emitter_analyze_scalar()
1528 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string)); in yaml_emitter_analyze_scalar()
1530 while (string.pointer != string.end) in yaml_emitter_analyze_scalar()
1532 if (string.start == string.pointer) in yaml_emitter_analyze_scalar()
1534 if (CHECK(string, '#') || CHECK(string, ',') in yaml_emitter_analyze_scalar()
1535 || CHECK(string, '[') || CHECK(string, ']') in yaml_emitter_analyze_scalar()
1536 || CHECK(string, '{') || CHECK(string, '}') in yaml_emitter_analyze_scalar()
1537 || CHECK(string, '&') || CHECK(string, '*') in yaml_emitter_analyze_scalar()
1538 || CHECK(string, '!') || CHECK(string, '|') in yaml_emitter_analyze_scalar()
1539 || CHECK(string, '>') || CHECK(string, '\'') in yaml_emitter_analyze_scalar()
1540 || CHECK(string, '"') || CHECK(string, '%') in yaml_emitter_analyze_scalar()
1541 || CHECK(string, '@') || CHECK(string, '`')) { in yaml_emitter_analyze_scalar()
1546 if (CHECK(string, '?') || CHECK(string, ':')) { in yaml_emitter_analyze_scalar()
1553 if (CHECK(string, '-') && followed_by_whitespace) { in yaml_emitter_analyze_scalar()
1560 if (CHECK(string, ',') || CHECK(string, '?') in yaml_emitter_analyze_scalar()
1561 || CHECK(string, '[') || CHECK(string, ']') in yaml_emitter_analyze_scalar()
1562 || CHECK(string, '{') || CHECK(string, '}')) { in yaml_emitter_analyze_scalar()
1566 if (CHECK(string, ':')) { in yaml_emitter_analyze_scalar()
1573 if (CHECK(string, '#') && preceded_by_whitespace) { in yaml_emitter_analyze_scalar()
1579 if (!IS_PRINTABLE(string) in yaml_emitter_analyze_scalar()
1580 || (!IS_ASCII(string) && !emitter->unicode)) { in yaml_emitter_analyze_scalar()
1584 if (IS_BREAK(string)) { in yaml_emitter_analyze_scalar()
1588 if (IS_SPACE(string)) in yaml_emitter_analyze_scalar()
1590 if (string.start == string.pointer) { in yaml_emitter_analyze_scalar()
1593 if (string.pointer+WIDTH(string) == string.end) { in yaml_emitter_analyze_scalar()
1602 else if (IS_BREAK(string)) in yaml_emitter_analyze_scalar()
1604 if (string.start == string.pointer) { in yaml_emitter_analyze_scalar()
1607 if (string.pointer+WIDTH(string) == string.end) { in yaml_emitter_analyze_scalar()
1622 preceded_by_whitespace = IS_BLANKZ(string); in yaml_emitter_analyze_scalar()
1623 MOVE(string); in yaml_emitter_analyze_scalar()
1624 if (string.pointer != string.end) { in yaml_emitter_analyze_scalar()
1625 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string)); in yaml_emitter_analyze_scalar()
1791 yaml_string_t string; in yaml_emitter_write_indicator() local
1794 STRING_ASSIGN(string, (yaml_char_t *)indicator, indicator_length); in yaml_emitter_write_indicator()
1800 while (string.pointer != string.end) { in yaml_emitter_write_indicator()
1801 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_indicator()
1815 yaml_string_t string; in yaml_emitter_write_anchor() local
1816 STRING_ASSIGN(string, value, length); in yaml_emitter_write_anchor()
1818 while (string.pointer != string.end) { in yaml_emitter_write_anchor()
1819 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_anchor()
1832 yaml_string_t string; in yaml_emitter_write_tag_handle() local
1833 STRING_ASSIGN(string, value, length); in yaml_emitter_write_tag_handle()
1839 while (string.pointer != string.end) { in yaml_emitter_write_tag_handle()
1840 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_tag_handle()
1854 yaml_string_t string; in yaml_emitter_write_tag_content() local
1855 STRING_ASSIGN(string, value, length); in yaml_emitter_write_tag_content()
1861 while (string.pointer != string.end) { in yaml_emitter_write_tag_content()
1862 if (IS_ALPHA(string) in yaml_emitter_write_tag_content()
1863 || CHECK(string, ';') || CHECK(string, '/') in yaml_emitter_write_tag_content()
1864 || CHECK(string, '?') || CHECK(string, ':') in yaml_emitter_write_tag_content()
1865 || CHECK(string, '@') || CHECK(string, '&') in yaml_emitter_write_tag_content()
1866 || CHECK(string, '=') || CHECK(string, '+') in yaml_emitter_write_tag_content()
1867 || CHECK(string, '$') || CHECK(string, ',') in yaml_emitter_write_tag_content()
1868 || CHECK(string, '_') || CHECK(string, '.') in yaml_emitter_write_tag_content()
1869 || CHECK(string, '~') || CHECK(string, '*') in yaml_emitter_write_tag_content()
1870 || CHECK(string, '\'') || CHECK(string, '(') in yaml_emitter_write_tag_content()
1871 || CHECK(string, ')') || CHECK(string, '[') in yaml_emitter_write_tag_content()
1872 || CHECK(string, ']')) { in yaml_emitter_write_tag_content()
1873 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_tag_content()
1876 int width = WIDTH(string); in yaml_emitter_write_tag_content()
1879 value = *(string.pointer++); in yaml_emitter_write_tag_content()
1901 yaml_string_t string; in yaml_emitter_write_plain_scalar() local
1905 STRING_ASSIGN(string, value, length); in yaml_emitter_write_plain_scalar()
1911 while (string.pointer != string.end) in yaml_emitter_write_plain_scalar()
1913 if (IS_SPACE(string)) in yaml_emitter_write_plain_scalar()
1917 && !IS_SPACE_AT(string, 1)) { in yaml_emitter_write_plain_scalar()
1919 MOVE(string); in yaml_emitter_write_plain_scalar()
1922 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_plain_scalar()
1926 else if (IS_BREAK(string)) in yaml_emitter_write_plain_scalar()
1928 if (!breaks && CHECK(string, '\n')) { in yaml_emitter_write_plain_scalar()
1931 if (!WRITE_BREAK(emitter, string)) return 0; in yaml_emitter_write_plain_scalar()
1940 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_plain_scalar()
1957 yaml_string_t string; in yaml_emitter_write_single_quoted_scalar() local
1961 STRING_ASSIGN(string, value, length); in yaml_emitter_write_single_quoted_scalar()
1966 while (string.pointer != string.end) in yaml_emitter_write_single_quoted_scalar()
1968 if (IS_SPACE(string)) in yaml_emitter_write_single_quoted_scalar()
1972 && string.pointer != string.start in yaml_emitter_write_single_quoted_scalar()
1973 && string.pointer != string.end - 1 in yaml_emitter_write_single_quoted_scalar()
1974 && !IS_SPACE_AT(string, 1)) { in yaml_emitter_write_single_quoted_scalar()
1976 MOVE(string); in yaml_emitter_write_single_quoted_scalar()
1979 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_single_quoted_scalar()
1983 else if (IS_BREAK(string)) in yaml_emitter_write_single_quoted_scalar()
1985 if (!breaks && CHECK(string, '\n')) { in yaml_emitter_write_single_quoted_scalar()
1988 if (!WRITE_BREAK(emitter, string)) return 0; in yaml_emitter_write_single_quoted_scalar()
1997 if (CHECK(string, '\'')) { in yaml_emitter_write_single_quoted_scalar()
2000 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_single_quoted_scalar()
2020 yaml_string_t string; in yaml_emitter_write_double_quoted_scalar() local
2023 STRING_ASSIGN(string, value, length); in yaml_emitter_write_double_quoted_scalar()
2028 while (string.pointer != string.end) in yaml_emitter_write_double_quoted_scalar()
2030 if (!IS_PRINTABLE(string) || (!emitter->unicode && !IS_ASCII(string)) in yaml_emitter_write_double_quoted_scalar()
2031 || IS_BOM(string) || IS_BREAK(string) in yaml_emitter_write_double_quoted_scalar()
2032 || CHECK(string, '"') || CHECK(string, '\\')) in yaml_emitter_write_double_quoted_scalar()
2039 octet = string.pointer[0]; in yaml_emitter_write_double_quoted_scalar()
2049 octet = string.pointer[k]; in yaml_emitter_write_double_quoted_scalar()
2052 string.pointer += width; in yaml_emitter_write_double_quoted_scalar()
2139 else if (IS_SPACE(string)) in yaml_emitter_write_double_quoted_scalar()
2143 && string.pointer != string.start in yaml_emitter_write_double_quoted_scalar()
2144 && string.pointer != string.end - 1) { in yaml_emitter_write_double_quoted_scalar()
2146 if (IS_SPACE_AT(string, 1)) { in yaml_emitter_write_double_quoted_scalar()
2149 MOVE(string); in yaml_emitter_write_double_quoted_scalar()
2152 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_double_quoted_scalar()
2158 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_double_quoted_scalar()
2174 yaml_string_t string) in yaml_emitter_write_block_scalar_hints() argument
2179 if (IS_SPACE(string) || IS_BREAK(string)) in yaml_emitter_write_block_scalar_hints()
2189 string.pointer = string.end; in yaml_emitter_write_block_scalar_hints()
2190 if (string.start == string.pointer) in yaml_emitter_write_block_scalar_hints()
2197 string.pointer --; in yaml_emitter_write_block_scalar_hints()
2198 } while ((*string.pointer & 0xC0) == 0x80); in yaml_emitter_write_block_scalar_hints()
2199 if (!IS_BREAK(string)) in yaml_emitter_write_block_scalar_hints()
2203 else if (string.start == string.pointer) in yaml_emitter_write_block_scalar_hints()
2211 string.pointer --; in yaml_emitter_write_block_scalar_hints()
2212 } while ((*string.pointer & 0xC0) == 0x80); in yaml_emitter_write_block_scalar_hints()
2213 if (IS_BREAK(string)) in yaml_emitter_write_block_scalar_hints()
2234 yaml_string_t string; in yaml_emitter_write_literal_scalar() local
2237 STRING_ASSIGN(string, value, length); in yaml_emitter_write_literal_scalar()
2241 if (!yaml_emitter_write_block_scalar_hints(emitter, string)) in yaml_emitter_write_literal_scalar()
2247 while (string.pointer != string.end) in yaml_emitter_write_literal_scalar()
2249 if (IS_BREAK(string)) in yaml_emitter_write_literal_scalar()
2251 if (!WRITE_BREAK(emitter, string)) return 0; in yaml_emitter_write_literal_scalar()
2260 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_literal_scalar()
2273 yaml_string_t string; in yaml_emitter_write_folded_scalar() local
2277 STRING_ASSIGN(string, value, length); in yaml_emitter_write_folded_scalar()
2281 if (!yaml_emitter_write_block_scalar_hints(emitter, string)) in yaml_emitter_write_folded_scalar()
2287 while (string.pointer != string.end) in yaml_emitter_write_folded_scalar()
2289 if (IS_BREAK(string)) in yaml_emitter_write_folded_scalar()
2291 if (!breaks && !leading_spaces && CHECK(string, '\n')) { in yaml_emitter_write_folded_scalar()
2293 while (IS_BREAK_AT(string, k)) { in yaml_emitter_write_folded_scalar()
2294 k += WIDTH_AT(string, k); in yaml_emitter_write_folded_scalar()
2296 if (!IS_BLANKZ_AT(string, k)) { in yaml_emitter_write_folded_scalar()
2300 if (!WRITE_BREAK(emitter, string)) return 0; in yaml_emitter_write_folded_scalar()
2308 leading_spaces = IS_BLANK(string); in yaml_emitter_write_folded_scalar()
2310 if (!breaks && IS_SPACE(string) && !IS_SPACE_AT(string, 1) in yaml_emitter_write_folded_scalar()
2313 MOVE(string); in yaml_emitter_write_folded_scalar()
2316 if (!WRITE(emitter, string)) return 0; in yaml_emitter_write_folded_scalar()