pub fn writeint(outfile: &mut Vec<u8>, a: i32) {
    let mut b: [u8; 4] = [0; 4];
    let mut a = a;

    // TODO check this
    for i in (0..4).rev() {
        b[i] = a as u8;
        a >>= 8;
    }

    qwrite(outfile, &b, 4);
}
/* Write integer A one byte at a time to outfile.
 *
 * This is portable from Vax to Sun since it eliminates the
 * need for byte-swapping.
 */
Write integer A one byte at a time to outfile.
This is portable from Vax to Sun since it eliminates the
need for byte-swapping.
Write integer A one byte at a time to outfile . This is portable from Vax to Sun since it eliminates the need for byte - swapping .
pub fn writeint(outfile: &mut Vec<u8>, a: i32) {
    let mut b: [u8; 4] = [0; 4];
    let mut a = a;
    // TODO check this
    for i in (0..4).rev() {
        b[i] = a as u8;
        a >>= 8;
    }
    qwrite(outfile, &b, 4);
}
pub fn writeint ( outfile : & mut Vec < u8 > , a : i32 ) { let mut b : [ u8 ; 4 ] = [ 0 ; 4 ] ; let mut a = a ; // TODO check this for i in ( 0 .. 4 ) . rev ( ) { b [ i ] = a as u8 ; a >>= 8 ; } qwrite ( outfile , & b , 4 ) ; }
Write integer A one byte at a time to outfile.
Write integer A one byte at a time to outfile .
outfile
&mut Vec<u8>
a
i32
outfile
&mut Vec<u8>
a
i32