pub unsafe fn mailimf_ignore_field_parse(
    mut message: *const libc::c_char,
    mut length: size_t,
    mut indx: *mut size_t,
) -> libc::c_int {
    let mut has_field: libc::c_int = 0;
    let mut cur_token: size_t = 0;
    let mut state: libc::c_int = 0;
    let mut terminal: size_t = 0;
    has_field = 0i32;
    cur_token = *indx;
    terminal = cur_token;
    state = UNSTRUCTURED_START as libc::c_int;
    if cur_token >= length {
        return MAILIMF_ERROR_PARSE as libc::c_int;
    }
    match *message.offset(cur_token as isize) as libc::c_int {
        13 => return MAILIMF_ERROR_PARSE as libc::c_int,
        10 => return MAILIMF_ERROR_PARSE as libc::c_int,
        _ => {}
    }
    while state != UNSTRUCTURED_OUT as libc::c_int {
        match state {
            0 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    13 => state = UNSTRUCTURED_CR as libc::c_int,
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            1 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            2 => {
                if cur_token >= length {
                    terminal = cur_token;
                    state = UNSTRUCTURED_OUT as libc::c_int
                } else {
                    match *message.offset(cur_token as isize) as libc::c_int {
                        9 | 32 => state = UNSTRUCTURED_WSP as libc::c_int,
                        _ => {
                            terminal = cur_token;
                            state = UNSTRUCTURED_OUT as libc::c_int
                        }
                    }
                }
            }
            3 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    13 => state = UNSTRUCTURED_CR as libc::c_int,
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            _ => {}
        }
        cur_token = cur_token.wrapping_add(1)
    }
    if 0 == has_field {
        return MAILIMF_ERROR_PARSE as libc::c_int;
    }
    *indx = terminal;
    return MAILIMF_NO_ERROR as libc::c_int;
}
/*
  mailimf_ignore_field_parse will skip the given field

  @param message this is a string containing the header field
  @param length this is the size of the given string
  @param indx this is a pointer to the start of the header field in
    the given string, (* indx) is modified to point at the end
    of the parsed data

  @return MAILIMF_NO_ERROR on success, MAILIMF_ERROR_XXX on error
*/
mailimf_ignore_field_parse will skip the given field
mailimf_ignore_field_parse will skip the given field
pub unsafe fn mailimf_ignore_field_parse(
    mut message: *const libc::c_char,
    mut length: size_t,
    mut indx: *mut size_t,
) -> libc::c_int {
    let mut has_field: libc::c_int = 0;
    let mut cur_token: size_t = 0;
    let mut state: libc::c_int = 0;
    let mut terminal: size_t = 0;
    has_field = 0i32;
    cur_token = *indx;
    terminal = cur_token;
    state = UNSTRUCTURED_START as libc::c_int;
    if cur_token >= length {
        return MAILIMF_ERROR_PARSE as libc::c_int;
    }
    match *message.offset(cur_token as isize) as libc::c_int {
        13 => return MAILIMF_ERROR_PARSE as libc::c_int,
        10 => return MAILIMF_ERROR_PARSE as libc::c_int,
        _ => {}
    }
    while state != UNSTRUCTURED_OUT as libc::c_int {
        match state {
            0 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    13 => state = UNSTRUCTURED_CR as libc::c_int,
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            1 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            2 => {
                if cur_token >= length {
                    terminal = cur_token;
                    state = UNSTRUCTURED_OUT as libc::c_int
                } else {
                    match *message.offset(cur_token as isize) as libc::c_int {
                        9 | 32 => state = UNSTRUCTURED_WSP as libc::c_int,
                        _ => {
                            terminal = cur_token;
                            state = UNSTRUCTURED_OUT as libc::c_int
                        }
                    }
                }
            }
            3 => {
                if cur_token >= length {
                    return MAILIMF_ERROR_PARSE as libc::c_int;
                }
                match *message.offset(cur_token as isize) as libc::c_int {
                    13 => state = UNSTRUCTURED_CR as libc::c_int,
                    10 => state = UNSTRUCTURED_LF as libc::c_int,
                    58 => {
                        has_field = 1i32;
                        state = UNSTRUCTURED_START as libc::c_int
                    }
                    _ => state = UNSTRUCTURED_START as libc::c_int,
                }
            }
            _ => {}
        }
        cur_token = cur_token.wrapping_add(1)
    }
    if 0 == has_field {
        return MAILIMF_ERROR_PARSE as libc::c_int;
    }
    *indx = terminal;
    return MAILIMF_NO_ERROR as libc::c_int;
}
pub unsafe fn mailimf_ignore_field_parse ( mut message : * const libc :: c_char , mut length : size_t , mut indx : * mut size_t , ) -> libc :: c_int { let mut has_field : libc :: c_int = 0 ; let mut cur_token : size_t = 0 ; let mut state : libc :: c_int = 0 ; let mut terminal : size_t = 0 ; has_field = 0i32 ; cur_token = * indx ; terminal = cur_token ; state = UNSTRUCTURED_START as libc :: c_int ; if cur_token >= length { return MAILIMF_ERROR_PARSE as libc :: c_int ; } match * message . offset ( cur_token as isize ) as libc :: c_int { 13 => return MAILIMF_ERROR_PARSE as libc :: c_int , 10 => return MAILIMF_ERROR_PARSE as libc :: c_int , _ => { } } while state != UNSTRUCTURED_OUT as libc :: c_int { match state { 0 => { if cur_token >= length { return MAILIMF_ERROR_PARSE as libc :: c_int ; } match * message . offset ( cur_token as isize ) as libc :: c_int { 13 => state = UNSTRUCTURED_CR as libc :: c_int , 10 => state = UNSTRUCTURED_LF as libc :: c_int , 58 => { has_field = 1i32 ; state = UNSTRUCTURED_START as libc :: c_int } _ => state = UNSTRUCTURED_START as libc :: c_int , } } 1 => { if cur_token >= length { return MAILIMF_ERROR_PARSE as libc :: c_int ; } match * message . offset ( cur_token as isize ) as libc :: c_int { 10 => state = UNSTRUCTURED_LF as libc :: c_int , 58 => { has_field = 1i32 ; state = UNSTRUCTURED_START as libc :: c_int } _ => state = UNSTRUCTURED_START as libc :: c_int , } } 2 => { if cur_token >= length { terminal = cur_token ; state = UNSTRUCTURED_OUT as libc :: c_int } else { match * message . offset ( cur_token as isize ) as libc :: c_int { 9 | 32 => state = UNSTRUCTURED_WSP as libc :: c_int , _ => { terminal = cur_token ; state = UNSTRUCTURED_OUT as libc :: c_int } } } } 3 => { if cur_token >= length { return MAILIMF_ERROR_PARSE as libc :: c_int ; } match * message . offset ( cur_token as isize ) as libc :: c_int { 13 => state = UNSTRUCTURED_CR as libc :: c_int , 10 => state = UNSTRUCTURED_LF as libc :: c_int , 58 => { has_field = 1i32 ; state = UNSTRUCTURED_START as libc :: c_int } _ => state = UNSTRUCTURED_START as libc :: c_int , } } _ => { } } cur_token = cur_token . wrapping_add ( 1 ) } if 0 == has_field { return MAILIMF_ERROR_PARSE as libc :: c_int ; } * indx = terminal ; return MAILIMF_NO_ERROR as libc :: c_int ; }
mailimf_ignore_field_parse will skip the given field
mailimf_ignore_field_parse will skip the given field
message
*const libc::c_char
length
size_t
indx
*mut size_t
MAILIMF_NO_ERROR on success, MAILIMF_ERROR_XXX on error
MAILIMF_NO_ERROR on success MAILIMF_ERROR_XXX on error
message
*const libc::c_char
this is a string containing the header field
this is a string containing the header field
length
size_t
this is the size of the given string
this is the size of the given string
indx
*mut size_t
this is a pointer to the start of the header field in
the given string, (* indx) is modified to point at the end
of the parsed data
this is a pointer to the start of the header field in the given string ( * indx ) is modified to point at the end of the parsed data