let input_mo_header chn =
let endianess =
let magic_number = seek_in chn 0; input_int32 chn BigEndian
in
if magic_number = mo_sig_be then
BigEndian
else if magic_number = mo_sig_le then
LittleEndian
else
raise MoInvalidFile
in
let seek_and_input x = seek_in chn x; input_int32 chn endianess
in
check_mo_header chn
{
endianess = endianess;
file_format_revision = seek_and_input 4;
number_of_strings = seek_and_input 8;
offset_table_strings = seek_and_input 12;
offset_table_translation = seek_and_input 16;
size_of_hashing_table = seek_and_input 20;
offset_of_hashing_table = seek_and_input 24;
}