/* file: display.c */
extern void arrange_display();
extern void draw_status();
extern void status(char *fmt, ...);
extern void update_all();
extern void draw_mini_info();
extern void draw_mini_freq();
extern void draw_mini_time();
extern void draw_time();
extern void draw_time_info();
extern void show_time_status(int xx, int yy);
extern void draw_label(Rect *rr, int ox, int oy, int vert, double val0, double val1);
extern inline int mapval(double val, double max, int sy);
extern void draw_freq();
extern void draw_freq_info();
extern void show_freq_status(int xx, int yy);
extern void setup_pager(char *txt, char *inf, int typ);
extern void draw_pager();
extern void draw_info();
extern void draw_help();
extern inline int calcNow();
extern inline int calcNow();
extern void progress_init(Progress *pr, int max, char *txt, int wid);
extern void progress_update(Progress *pr);

/* file: filter.c */
extern Filter *filters;
extern char *filt_typename[];
extern int filter_load_file(char *fnam);
extern int filter_load_immed(char *txt);
extern Filter *filter_find(int index);
extern void filter_setup_run(Filter *filt);
extern RunFilter *filter_run(Filter *ff);
extern void runfilter_free(RunFilter *rr);
extern inline double runfilter_step(RunFilter *rr, double val);
extern int filter_complete(Filter *ff, double prop, int max);
extern void filter_setup_cnt(Filter *ff);
extern double filter_response(Filter *filt, double freq, double *phase);
extern double *filter_resp_range(Filter *ff, double freq0, double freq1, int slots, int subslots);
extern void filter_setup_gain(Filter *ff);
extern char *filter_dump(Filter *ff);
extern void filter_dump_code(FidFilter *inpfilt, double adj, int opt);
extern void filter_dump_var_code(Filter *filt);
extern void filter_dump_fidlib_calls(Filter *filt);
extern void dump_filter_coef(FidFilter *ff, FILE *out);
extern char *filter_standard_code();
extern double *do_filter_test(Filter *curr, int ftmod, double ftarg, double freq0, double freq1, int slots);
extern int blackman_init(Blackman *bl, double wid);
extern double blackman_gen(Blackman *bl);
extern int wavelet_init(Wavelet *ww, double freq, double len);
extern void wavelet_gen(Wavelet *ww);

/* file: fiview.c */
extern SDL_Surface *disp;
extern Uint32 *disp_pix32;
extern Uint16 *disp_pix16;
extern int disp_my;
extern int disp_sx, disp_sy;
extern int disp_rl, disp_rs;
extern int disp_gl, disp_gs;
extern int disp_bl, disp_bs;
extern int disp_am;
extern int font_sx, font_sy;
extern int *colour;
extern Rect d_info;
extern Rect d_freq;
extern Rect d_time;
extern Rect d_minf;
extern Rect d_main;
extern double *d_wrk1;
extern double a_f0, a_f1;
extern int a_adj;
extern Filter *curr;
extern double s_rate;
extern int s_main;
extern int s_tmzoom;
extern int s_zoom;
extern int s_minmax;
extern double s_freq0;
extern double s_freq1;
extern int s_ftmod;
extern double s_ftarg;
extern int s_logsc;
extern double s_tim0;
extern double s_tim1;
extern int s_pager_lin;
extern char *s_pager_txt;
extern char *s_pager_inf;
extern int s_pager_cnt;
extern int s_pager_at_end;
extern int s_pager_typ;
extern double c_tim0;
extern double c_tim1;
extern int c_tim_sx;
extern Filter *c_tim_filt;
extern float *c_tim_buf;
extern double c_freq0;
extern double c_freq1;
extern int c_freq_sx;
extern Filter *c_freq_filt;
extern double *c_freq_buf;
extern int c_ftmod;
extern double c_ftarg;
extern double *c_ftbuf;
extern Filter *c_info_filt;
extern int rearrange;
extern int redraw;
extern int part_cmd;
extern int n_filt;
extern char *prompt;
extern void(*prompt_cb)(char *str);
extern char prompt_buf[];
extern int prompt_len;
extern int grabkey;
extern void(*grabkey_cb)(int, int);
extern double nan_global;
extern char *helptext;
extern void error(char *fmt, ...);
extern void errorSDL(char *fmt, ...);
extern void usage();
extern void warn(char *fmt, ...);
extern void *Alloc(int size);
extern void *StrDup(char *str);
extern int main(int ac, char **av);
extern int inRect(Rect *rr, int xx, int yy);
extern void auto_adjust_time();
extern void auto_adjust_freq();
extern void set_s_tmzoom();
extern void display_prompt();
extern void run_prompt(char *txt, void(*rout)(char *));
extern void run_grabkey(char *txt, void(*rout)(int, int));
extern void set_test_mode(char *str);
extern void set_logscale(int key, int mod);

/* file: graphics.c */
extern int colour_data[];
extern int suspend_update;
extern void graphics_init(int sx, int sy, int bpp);
extern int map_rgb(int col);
extern void update(int xx, int yy, int sx, int sy);
extern void update_force(int xx, int yy, int sx, int sy);
extern void mouse_pointer(int on);
extern void clear_rect(int xx, int yy, int sx, int sy, int val);
extern void alpha_rect(int xx, int yy, int sx, int sy, int val, int opac);
extern void vline(int xx, int yy, int sy, int val);
extern void hline(int xx, int yy, int sx, int val);
extern int get_point(int xx, int yy);
extern void plot(int xx, int yy, int val);
extern void drawtext(int siz, int xx, int yy, char *str);
extern int pure_hue_src[][4];
extern Uint8 pure_hue_mem[];
extern Uint8 *pure_hue_data[][3];
extern void init_pure_hues();
extern void plot_hue(int xx, int yy, int sy, double ii, double hh);
extern int cint_table[];
extern void init_cint_table();
extern void plot_cint(int xx, int yy, int sy, double ii);
extern void plot_cint_bar(int xx, int yy, int sx, int sy, int unit, double ii);
extern void plot_gray(int xx, int yy, int sy, double ii);
extern char *font6x8[];
extern char *font8x16[];

/* file: helptext.c */
extern char *gen_helptext();

/* file: main_redir.c */
extern int main(int ac, char **av);

/* file: scratch.c */
extern char *scratch;
extern int scr_len;
extern int scr_max;
extern int scr_wid;
extern char *scr_ind;
extern int scr_indlen;
extern void scr_realloc();
extern void scr_zap();
extern void scr_wrap(int wid, char *ind);
extern void scr_vpr(char *fmt, va_list ap);
extern void scr_pr(char *fmt, ...);
extern void scr_prw(char *fmt, ...);
extern void scr_zap_pr(char *fmt, ...);
extern void scr_lf();
extern char *scr_dup();
extern void *scr_inc(int len);
extern void scr_wrD(double dval);
extern void scr_wrI(int ival);

extern double *mkfilter(char *, ...);
