unsafe fn CMap_match_codespace(cmap: *mut CMap, c: &[u8]) -> i32 {
    assert!(!cmap.is_null());
    let dim = c.len();
    for csr in &(*cmap).codespace {
        if csr.dim == dim {
            let mut pos = 0;
            while pos < dim {
                if c[pos] as i32 > *csr.codeHi.offset(pos as isize) as i32
                    || (c[pos] as i32) < *csr.codeLo.offset(pos as isize) as i32
                {
                    break;
                }
                pos += 1;
            }
            if pos == dim {
                return 0;
            }
        }
        /* Valid */
    }
    return -1;
    /* Invalid */
}
/* Test the validity of character c. */
Test the validity of character c.
Test the validity of character c .
unsafe fn CMap_match_codespace(cmap: *mut CMap, c: &[u8]) -> i32 {
    assert!(!cmap.is_null());
    let dim = c.len();
    for csr in &(*cmap).codespace {
        if csr.dim == dim {
            let mut pos = 0;
            while pos < dim {
                if c[pos] as i32 > *csr.codeHi.offset(pos as isize) as i32
                    || (c[pos] as i32) < *csr.codeLo.offset(pos as isize) as i32
                {
                    break;
                }
                pos += 1;
            }
            if pos == dim {
                return 0;
            }
        }
        /* Valid */
    }
    return -1;
    /* Invalid */
}
unsafe fn CMap_match_codespace ( cmap : * mut CMap , c : & [ u8 ] ) -> i32 { assert ! ( cmap is_null ( ) ) ; let dim = c . len ( ) ; for csr in & ( * cmap ) . codespace { if csr . dim == dim { let mut pos = 0 ; while pos < dim { if c [ pos ] as i32 > * csr . codeHi . offset ( pos as isize ) as i32 || ( c [ pos ] as i32 ) < * csr . codeLo . offset ( pos as isize ) as i32 { break ; } pos += 1 ; } if pos == dim { return 0 ; } } /* Valid */ } return - 1 ; /* Invalid */ }
Test the validity of character c.
Test the validity of character c .
cmap
*mut CMap
c
&[u8]