mirror of
https://github.com/simonask/libyaml-safer
synced 2024-11-23 03:43:03 +00:00
Factor out IS_BREAK macro
This commit is contained in:
parent
5281c57de4
commit
048e47b1c5
3 changed files with 35 additions and 366 deletions
168
src/emitter.rs
168
src/emitter.rs
|
@ -1602,22 +1602,7 @@ unsafe fn yaml_emitter_analyze_scalar(
|
|||
if !IS_PRINTABLE!(string) || !IS_ASCII!(string) && (*emitter).unicode == 0 {
|
||||
special_characters = 1_i32;
|
||||
}
|
||||
if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
if IS_BREAK!(string) {
|
||||
line_breaks = 1_i32;
|
||||
}
|
||||
if *string.pointer as libc::c_int == ' ' as i32 as yaml_char_t as libc::c_int {
|
||||
|
@ -1645,22 +1630,7 @@ unsafe fn yaml_emitter_analyze_scalar(
|
|||
}
|
||||
previous_space = 1_i32;
|
||||
previous_break = 0_i32;
|
||||
} else if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
} else if IS_BREAK!(string) {
|
||||
if string.start == string.pointer {
|
||||
leading_break = 1_i32;
|
||||
}
|
||||
|
@ -2058,22 +2028,7 @@ unsafe fn yaml_emitter_write_plain_scalar(
|
|||
return 0_i32;
|
||||
}
|
||||
spaces = 1_i32;
|
||||
} else if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
} else if IS_BREAK!(string) {
|
||||
if breaks == 0
|
||||
&& *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
|
@ -2142,22 +2097,7 @@ unsafe fn yaml_emitter_write_single_quoted_scalar(
|
|||
return 0_i32;
|
||||
}
|
||||
spaces = 1_i32;
|
||||
} else if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
} else if IS_BREAK!(string) {
|
||||
if breaks == 0
|
||||
&& *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
|
@ -2235,21 +2175,7 @@ unsafe fn yaml_emitter_write_double_quoted_scalar(
|
|||
== -69i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -65i32 as yaml_char_t as libc::c_int
|
||||
|| (*string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
|| IS_BREAK!(string)
|
||||
|| *string.pointer as libc::c_int == '"' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\\' as i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
|
@ -2455,21 +2381,7 @@ unsafe fn yaml_emitter_write_block_scalar_hints(
|
|||
let mut indent_hint: [libc::c_char; 2] = [0; 2];
|
||||
let mut chomp_hint: *const libc::c_char = ptr::null::<libc::c_char>();
|
||||
if *string.pointer as libc::c_int == ' ' as i32 as yaml_char_t as libc::c_int
|
||||
|| (*string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
|| IS_BREAK!(string)
|
||||
{
|
||||
indent_hint[0_usize] =
|
||||
('0' as i32 + (*emitter).best_indent as libc::c_char as libc::c_int) as libc::c_char;
|
||||
|
@ -2490,22 +2402,7 @@ unsafe fn yaml_emitter_write_block_scalar_hints(
|
|||
break;
|
||||
}
|
||||
}
|
||||
if !(*string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
{
|
||||
if !IS_BREAK!(string) {
|
||||
chomp_hint = b"-\0" as *const u8 as *const libc::c_char;
|
||||
} else if string.start == string.pointer {
|
||||
chomp_hint = b"+\0" as *const u8 as *const libc::c_char;
|
||||
|
@ -2517,22 +2414,7 @@ unsafe fn yaml_emitter_write_block_scalar_hints(
|
|||
break;
|
||||
}
|
||||
}
|
||||
if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
if IS_BREAK!(string) {
|
||||
chomp_hint = b"+\0" as *const u8 as *const libc::c_char;
|
||||
(*emitter).open_ended = 2_i32;
|
||||
}
|
||||
|
@ -2572,22 +2454,7 @@ unsafe fn yaml_emitter_write_literal_scalar(
|
|||
(*emitter).indention = 1_i32;
|
||||
(*emitter).whitespace = 1_i32;
|
||||
while string.pointer != string.end {
|
||||
if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
if IS_BREAK!(string) {
|
||||
if !(WRITE_BREAK!(emitter, string)) {
|
||||
return 0_i32;
|
||||
}
|
||||
|
@ -2636,22 +2503,7 @@ unsafe fn yaml_emitter_write_folded_scalar(
|
|||
(*emitter).indention = 1_i32;
|
||||
(*emitter).whitespace = 1_i32;
|
||||
while string.pointer != string.end {
|
||||
if *string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
if IS_BREAK!(string) {
|
||||
if breaks == 0
|
||||
&& leading_spaces == 0
|
||||
&& *string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|
|
|
@ -278,7 +278,23 @@ macro_rules! IS_BREAK_AT {
|
|||
}
|
||||
|
||||
macro_rules! IS_BREAK {
|
||||
() => {}; // TODO
|
||||
($string:expr) => {
|
||||
*$string.pointer as libc::c_int == '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *$string.pointer as libc::c_int == '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *$string.pointer as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *$string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *$string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *$string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *$string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *$string.pointer as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *$string.pointer.wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *$string.pointer.wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! IS_CRLF_AT {
|
||||
|
|
215
src/scanner.rs
215
src/scanner.rs
|
@ -70,24 +70,7 @@ macro_rules! SKIP_LINE {
|
|||
*unread = (*unread as libc::c_ulong).wrapping_sub(2_u64) as size_t as size_t;
|
||||
let pointer = addr_of_mut!((*$parser).buffer.pointer);
|
||||
*pointer = (*pointer).wrapping_offset(2_isize);
|
||||
} else if *((*$parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*$parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*$parser).buffer.pointer) as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*$parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*$parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*$parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*$parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*$parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*$parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*$parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
} else if IS_BREAK!((*$parser).buffer) {
|
||||
let index = addr_of_mut!((*$parser).mark.index);
|
||||
*index = (*index).wrapping_add(1);
|
||||
(*$parser).mark.column = 0_u64;
|
||||
|
@ -1126,24 +1109,7 @@ unsafe fn yaml_parser_scan_to_next_token(mut parser: *mut yaml_parser_t) -> libc
|
|||
}
|
||||
}
|
||||
}
|
||||
if !(*((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
{
|
||||
if !IS_BREAK!((*parser).buffer) {
|
||||
break;
|
||||
}
|
||||
if CACHE!(parser, 2_u64) == 0 {
|
||||
|
@ -1285,37 +1251,7 @@ unsafe fn yaml_parser_scan_directive(
|
|||
as *const libc::c_char,
|
||||
);
|
||||
} else {
|
||||
if *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int
|
||||
{
|
||||
if IS_BREAK!((*parser).buffer) {
|
||||
if CACHE!(parser, 2_u64) == 0 {
|
||||
current_block = 11397968426844348457;
|
||||
} else {
|
||||
|
@ -2278,47 +2214,7 @@ unsafe fn yaml_parser_scan_block_scalar(
|
|||
as *const u8 as *const libc::c_char,
|
||||
);
|
||||
} else {
|
||||
if *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer)
|
||||
as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
|| *((*parser).buffer.pointer)
|
||||
as libc::c_int
|
||||
== -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -123i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
|| *((*parser).buffer.pointer)
|
||||
as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -88i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
|| *((*parser).buffer.pointer)
|
||||
as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
&& *((*parser).buffer.pointer)
|
||||
.wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -87i32 as yaml_char_t
|
||||
as libc::c_int
|
||||
{
|
||||
if IS_BREAK!((*parser).buffer) {
|
||||
if CACHE!(parser, 2_u64) == 0 {
|
||||
current_block = 14984465786483313892;
|
||||
} else {
|
||||
|
@ -2534,24 +2430,7 @@ unsafe fn yaml_parser_scan_block_scalar_breaks(
|
|||
as *const libc::c_char,
|
||||
);
|
||||
}
|
||||
if !(*((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int == -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize) as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize) as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
{
|
||||
if !IS_BREAK!((*parser).buffer) {
|
||||
break;
|
||||
}
|
||||
if CACHE!(parser, 2_u64) == 0 {
|
||||
|
@ -3013,33 +2892,7 @@ unsafe fn yaml_parser_scan_flow_scalar(
|
|||
current_block = 8114179180390253173;
|
||||
break;
|
||||
}
|
||||
while IS_BLANK!((*parser).buffer)
|
||||
|| (*((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
{
|
||||
while IS_BLANK!((*parser).buffer) || IS_BREAK!((*parser).buffer) {
|
||||
if IS_BLANK!((*parser).buffer) {
|
||||
if leading_blanks == 0 {
|
||||
if READ!(parser, whitespaces) == 0 {
|
||||
|
@ -3304,33 +3157,7 @@ unsafe fn yaml_parser_scan_plain_scalar(
|
|||
}
|
||||
}
|
||||
}
|
||||
if !(IS_BLANK!((*parser).buffer)
|
||||
|| (*((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int))
|
||||
{
|
||||
if !(IS_BLANK!((*parser).buffer) || IS_BREAK!((*parser).buffer)) {
|
||||
current_block = 6281126495347172768;
|
||||
break;
|
||||
}
|
||||
|
@ -3338,33 +3165,7 @@ unsafe fn yaml_parser_scan_plain_scalar(
|
|||
current_block = 16642808987012640029;
|
||||
break;
|
||||
}
|
||||
while IS_BLANK!((*parser).buffer)
|
||||
|| (*((*parser).buffer.pointer) as libc::c_int
|
||||
== '\r' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== '\n' as i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -62i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -123i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -88i32 as yaml_char_t as libc::c_int
|
||||
|| *((*parser).buffer.pointer) as libc::c_int
|
||||
== -30i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(1_isize)
|
||||
as libc::c_int
|
||||
== -128i32 as yaml_char_t as libc::c_int
|
||||
&& *((*parser).buffer.pointer).wrapping_offset(2_isize)
|
||||
as libc::c_int
|
||||
== -87i32 as yaml_char_t as libc::c_int)
|
||||
{
|
||||
while IS_BLANK!((*parser).buffer) || IS_BREAK!((*parser).buffer) {
|
||||
if IS_BLANK!((*parser).buffer) {
|
||||
if leading_blanks != 0
|
||||
&& ((*parser).mark.column as libc::c_int) < indent
|
||||
|
|
Loading…
Reference in a new issue