
#ifndef iff_h_INCLUDED 
#define iff_h_INCLUDED

#include <stdio.h>
#include "types.h"

#define IFF_MODE_READ 0
#define IFF_MODE_WRITE 1

/*@null@*/ /*@dependent@*/ FILE *open_simple_iff_file(char *filename, int mode);
int start_new_chunk(char *id, FILE *iff_file);
int end_current_chunk(FILE *iff_file);
int close_simple_iff_file(FILE *iff_file);
int find_chunk(char *id, FILE *iff_file);
/*@external@*/ extern int read_chunk_length(FILE *iff_file);
int get_last_chunk_length();
uint32_t read_four_byte_number(FILE *iff_file);
char *read_form_type(FILE *iff_file);
bool is_form_type(FILE *iff_file, char* form_type);

#endif /* iff_h_INCLUDED */

