/* fileio.c */

#ifndef fileio_H
#define fileio_H

void autostart_quetzal (void);
void close_record (void);
void close_script (void);
void close_story (void);
zword_t file_checksum (void);
int get_story_byte (void);
void get_story_bytes (void *dst, int len);
unsigned int get_story_size (void);
void load_extra_blorb(void);
void z_input_stream(int);
void open_record (void);
void open_script (void);
void open_story (const char *);
int playback_key (void);
int playback_line (int, zword_t *);
void read_from_story_file (void *, long, size_t);
void read_game (void *, int);
void record_key (int);
void record_line (const zword_t *, int);
void z_restore(int, unsigned *);
void restore_drag(const char *name);
void z_save(int, unsigned *);
void script_backup(int );
void script_char(int);
void script_string(const zword_t *);
void script_line (const zword_t *);
void script_new_line (void);
int story_error (void);
void z_restore_undo(void);
void z_save_undo(void);
void z_verify(void);
void z_piracy(void);

extern int undo_slots, option_undo_slots;

extern int zcode_in_blorb;

extern zbyte_t *undo_datap[];
extern zword_t *undo_stack[];

extern struct bb_map_struct *blorb_map;
extern char *blorb_copyright, *blorb_author, *blorb_anno, *blorb_name_s;
extern zword_t *blorb_name;
extern unsigned blorb_release;

extern int quetzal_started;
extern char *quetzal_to_load;

extern FILE *bfp;

#endif
