unsafe fn ostrtouc(inbuf: &mut &[u8], valid: *mut u8) -> u8 {
    let mut cur = *inbuf;
    let mut val: u32 = 0_u32;
    let mut i = 0;
    while !cur.is_empty() && i < 3 && (cur[0] >= b'0' && cur[0] <= b'7') {
        val = val << 3 | (cur[0] - b'0') as u32;
        cur = &cur[1..];
        i += 1;
    }
    *valid = if val > 255 || i == 0 { 0 } else { 1 };
    *inbuf = cur;
    val as u8
}
/* Overflowed value is set to invalid char.  */
Overflowed value is set to invalid char.
Overflowed value is set to invalid char .
unsafe fn ostrtouc(inbuf: &mut &[u8], valid: *mut u8) -> u8 {
    let mut cur = *inbuf;
    let mut val: u32 = 0_u32;
    let mut i = 0;
    while !cur.is_empty() && i < 3 && (cur[0] >= b'0' && cur[0] <= b'7') {
        val = val << 3 | (cur[0] - b'0') as u32;
        cur = &cur[1..];
        i += 1;
    }
    *valid = if val > 255 || i == 0 { 0 } else { 1 };
    *inbuf = cur;
    val as u8
}
unsafe fn ostrtouc ( inbuf : & mut & [ u8 ] , valid : * mut u8 ) -> u8 { let mut cur = * inbuf ; let mut val : u32 = 0_u32 ; let mut i = 0 ; while ! cur . is_empty ( ) && i < 3 && ( cur [ 0 ] >= b'0' && cur [ 0 ] <= b'7' ) { val = val << 3 | ( cur [ 0 ] - b'0' ) as u32 ; cur = & cur [ 1 .. ] ; i += 1 ; } * valid = if val > 255 || i == 0 { 0 } else { 1 } ; * inbuf = cur ; val as u8 }
Overflowed value is set to invalid char.
Overflowed value is set to invalid char .
inbuf
&mut &[u8]
valid
*mut u8