unsafe fn read_sfd_record(rec: &mut sfd_rec_, lbuf: *const i8) -> i32 {
    let mut p: *const i8 = lbuf;
    let mut r: *mut i8 = ptr::null_mut();
    let mut v2: i32 = 0;
    let mut curpos: i32 = 0;
    let error: i32 = 0;
    while *p as i32 != 0 && libc::isspace(*p as _) != 0 {
        p = p.offset(1)
    }
    while error == 0 && *p as i32 != 0 {
        let mut repos = 0;
        //q = p;
        let v1 = strtol(p, &mut r, 0) as i32;
        let mut q = r as *const i8;
        if q == p
            || !(*q as i32 == '\u{0}' as i32 || libc::isspace(*q as _) != 0)
                && *q as i32 != ':' as i32
                && *q as i32 != '_' as i32
        {
            warn!(
                "Unknown token in subfont mapping table: {}",
                char::from(*q as u8),
            );
            return -1;
        }
        match *q as i32 {
            58 => {
                if v1 < 0 || v1 > 0xff {
                    warn!("Invalud value for subfont table offset: {}", v1);
                    return -1;
                }
                repos = 1;
                q = q.offset(1)
            }
            95 => {
                p = q.offset(1);
                v2 = strtol(p, &mut r, 0) as i32;
                q = r;
                if v1 < 0 || v1 as i64 > 0xffff || v2 < 0 || v2 as i64 > 0xffff {
                    warn!(
                        "Invalid value in subfont mapping table: 0x{:x}_0x{:x}",
                        v1, v2,
                    );
                    return -1;
                } else {
                    if q == p || !(*q as i32 == '\u{0}' as i32 || libc::isspace(*q as _) != 0) {
                        warn!(
                            "Invalid char in subfont mapping table: {}",
                            char::from(*q as u8),
                        );
                        return -1;
                    }
                }
            }
            _ => {
                if v1 < 0 || v1 as i64 > 0xffff {
                    warn!(
                        "Invalid character code in subfont mapping table: 0x{:x}",
                        v1,
                    );
                    return -1;
                }
                v2 = v1
            }
        }
        if repos != 0 {
            curpos = v1
        } else {
            if v2 < v1 || curpos + (v2 - v1) > 0xff {
                warn!("Invalid range in subfont mapping: curpos=\"0x{:02x}\" range=\"0x{:04x},0x{:04x}\"", curpos,
                            v1, v2);
                return -1;
            }
            for c in v1..=v2 {
                if rec.vector[curpos as usize] != 0 {
                    warn!(
                        "Subfont mapping for slot=\"0x{:02x}\" already defined...",
                        curpos,
                    );
                    return -1;
                }
                assert!(curpos >= 0 && curpos <= 255);
                rec.vector[curpos as usize] = c as u16;
                curpos += 1;
            }
        }
        p = q;
        while *p as i32 != 0 && libc::isspace(*p as _) != 0 {
            p = p.offset(1)
        }
    }
    error
}
/* subfont_id is already consumed here. */
subfont_id is already consumed here.
subfont_id is already consumed here .
unsafe fn read_sfd_record(rec: &mut sfd_rec_, lbuf: *const i8) -> i32 {
    let mut p: *const i8 = lbuf;
    let mut r: *mut i8 = ptr::null_mut();
    let mut v2: i32 = 0;
    let mut curpos: i32 = 0;
    let error: i32 = 0;
    while *p as i32 != 0 && libc::isspace(*p as _) != 0 {
        p = p.offset(1)
    }
    while error == 0 && *p as i32 != 0 {
        let mut repos = 0;
        //q = p;
        let v1 = strtol(p, &mut r, 0) as i32;
        let mut q = r as *const i8;
        if q == p
            || !(*q as i32 == '\u{0}' as i32 || libc::isspace(*q as _) != 0)
                && *q as i32 != ':' as i32
                && *q as i32 != '_' as i32
        {
            warn!(
                "Unknown token in subfont mapping table: {}",
                char::from(*q as u8),
            );
            return -1;
        }
        match *q as i32 {
            58 => {
                if v1 < 0 || v1 > 0xff {
                    warn!("Invalud value for subfont table offset: {}", v1);
                    return -1;
                }
                repos = 1;
                q = q.offset(1)
            }
            95 => {
                p = q.offset(1);
                v2 = strtol(p, &mut r, 0) as i32;
                q = r;
                if v1 < 0 || v1 as i64 > 0xffff || v2 < 0 || v2 as i64 > 0xffff {
                    warn!(
                        "Invalid value in subfont mapping table: 0x{:x}_0x{:x}",
                        v1, v2,
                    );
                    return -1;
                } else {
                    if q == p || !(*q as i32 == '\u{0}' as i32 || libc::isspace(*q as _) != 0) {
                        warn!(
                            "Invalid char in subfont mapping table: {}",
                            char::from(*q as u8),
                        );
                        return -1;
                    }
                }
            }
            _ => {
                if v1 < 0 || v1 as i64 > 0xffff {
                    warn!(
                        "Invalid character code in subfont mapping table: 0x{:x}",
                        v1,
                    );
                    return -1;
                }
                v2 = v1
            }
        }
        if repos != 0 {
            curpos = v1
        } else {
            if v2 < v1 || curpos + (v2 - v1) > 0xff {
                warn!("Invalid range in subfont mapping: curpos=\"0x{:02x}\" range=\"0x{:04x},0x{:04x}\"", curpos,
                            v1, v2);
                return -1;
            }
            for c in v1..=v2 {
                if rec.vector[curpos as usize] != 0 {
                    warn!(
                        "Subfont mapping for slot=\"0x{:02x}\" already defined...",
                        curpos,
                    );
                    return -1;
                }
                assert!(curpos >= 0 && curpos <= 255);
                rec.vector[curpos as usize] = c as u16;
                curpos += 1;
            }
        }
        p = q;
        while *p as i32 != 0 && libc::isspace(*p as _) != 0 {
            p = p.offset(1)
        }
    }
    error
}
unsafe fn read_sfd_record ( rec : & mut sfd_rec_ , lbuf : * const i8 ) -> i32 { let mut p : * const i8 = lbuf ; let mut r : * mut i8 = ptr :: null_mut ( ) ; let mut v2 : i32 = 0 ; let mut curpos : i32 = 0 ; let error : i32 = 0 ; while * p as i32 != 0 && libc :: isspace ( * p as _ ) != 0 { p = p . offset ( 1 ) } while error == 0 && * p as i32 != 0 { let mut repos = 0 ; //q = p; let v1 = strtol ( p , & mut r , 0 ) as i32 ; let mut q = r as * const i8 ; if q == p || ! ( * q as i32 == '\u{0}' as i32 || libc :: isspace ( * q as _ ) != 0 ) && * q as i32 != ':' as i32 && * q as i32 != '_' as i32 { warn ! ( " " char from ( q as u8 ) ) ; return - 1 ; } match * q as i32 { 58 => { if v1 < 0 || v1 > 0xff { warn ! ( " " v1 ) ; return - 1 ; } repos = 1 ; q = q . offset ( 1 ) } 95 => { p = q . offset ( 1 ) ; v2 = strtol ( p , & mut r , 0 ) as i32 ; q = r ; if v1 < 0 || v1 as i64 > 0xffff || v2 < 0 || v2 as i64 > 0xffff { warn ! ( " " v1 v2 ) ; return - 1 ; } else { if q == p || ! ( * q as i32 == '\u{0}' as i32 || libc :: isspace ( * q as _ ) != 0 ) { warn ! ( " " char from ( q as u8 ) ) ; return - 1 ; } } } _ => { if v1 < 0 || v1 as i64 > 0xffff { warn ! ( " " v1 ) ; return - 1 ; } v2 = v1 } } if repos != 0 { curpos = v1 } else { if v2 < v1 || curpos + ( v2 - v1 ) > 0xff { warn ! ( " \" \" \" \" " curpos v1 v2 ) ; return - 1 ; } for c in v1 ..= v2 { if rec . vector [ curpos as usize ] != 0 { warn ! ( " \" \" " curpos ) ; return - 1 ; } assert ! ( curpos 0 curpos 255 ) ; rec . vector [ curpos as usize ] = c as u16 ; curpos += 1 ; } } p = q ; while * p as i32 != 0 && libc :: isspace ( * p as _ ) != 0 { p = p . offset ( 1 ) } } error }
subfont_id is already consumed here.
subfont_id is already consumed here .
rec
&mut sfd_rec_
lbuf
*const i8