dtcalc: Remove support for optional K&R prototypes to simplify code
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
#ifndef _calctool_h
|
||||
#define _calctool_h
|
||||
|
||||
|
||||
#include <float.h>
|
||||
|
||||
@@ -88,14 +91,6 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s);
|
||||
#endif
|
||||
#endif /* sun */
|
||||
|
||||
/* For all function declarations, if ANSI then use a prototype. */
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define P(args) args
|
||||
#else /* ! __STDC__ */
|
||||
#define P(args) ()
|
||||
#endif /* STDC */
|
||||
|
||||
#ifdef hpux
|
||||
#define HIL_PC101_KBD 1
|
||||
#define HIL_ITF_KBD 2
|
||||
@@ -581,205 +576,206 @@ extern ApplicationArgs application_args;
|
||||
#define dmax(a, b) (double) max(a, b)
|
||||
#define dmin(a, b) (double) min(a, b)
|
||||
|
||||
BOOLEAN ibool P((double)) ;
|
||||
BOOLEAN ibool2 P((double)) ;
|
||||
BOOLEAN ibool(double);
|
||||
BOOLEAN ibool2(double);
|
||||
|
||||
char *convert P((char *)) ;
|
||||
char *get_resource P((enum res_type)) ;
|
||||
char *make_eng_sci P((int *)) ;
|
||||
char *make_fixed P((int *, int)) ;
|
||||
char *make_number P((int *, BOOLEAN)) ;
|
||||
char *convert(char *);
|
||||
char *get_resource(enum res_type);
|
||||
char *make_eng_sci(int *);
|
||||
char *make_fixed(int *, int);
|
||||
char *make_number(int *, BOOLEAN);
|
||||
|
||||
double mppow_di P((double *, int *)) ;
|
||||
double mppow_ri P((float *, int *)) ;
|
||||
double setbool P((BOOLEAN)) ;
|
||||
double mppow_di(double *, int *);
|
||||
double mppow_ri(float *, int *);
|
||||
double setbool(BOOLEAN);
|
||||
|
||||
int char_val P((char)) ;
|
||||
int get_bool_resource P((enum res_type, int *)) ;
|
||||
int get_index P((char)) ;
|
||||
int get_int_resource P((enum res_type, int *)) ;
|
||||
int get_str_resource P((enum res_type, char *)) ;
|
||||
int main P((int, char **)) ;
|
||||
int char_val(char);
|
||||
int get_bool_resource(enum res_type, int *);
|
||||
int get_index(char);
|
||||
int get_int_resource(enum res_type, int *);
|
||||
int get_str_resource(enum res_type, char *);
|
||||
int main(int, char **);
|
||||
|
||||
void beep P(()) ;
|
||||
void check_ow_beep P(()) ;
|
||||
void clear_display P(()) ;
|
||||
void doerr P((char *)) ;
|
||||
void do_accuracy P(()) ;
|
||||
void do_ascii P(()) ;
|
||||
void do_base P(()) ;
|
||||
void set_base P(()) ;
|
||||
void do_business P(()) ;
|
||||
void do_calc P(()) ;
|
||||
void do_dtcalc P((int, char **)) ;
|
||||
void do_clear P(()) ;
|
||||
void do_constant P(()) ;
|
||||
void do_delete P(()) ;
|
||||
void do_exchange P(()) ;
|
||||
void do_expno P(()) ;
|
||||
void do_factorial P((int *, int *)) ;
|
||||
void do_frame P(()) ;
|
||||
void do_function P(()) ;
|
||||
void do_immed P(()) ;
|
||||
void do_keys P(()) ;
|
||||
void do_mode P(()) ;
|
||||
void do_none P(()) ;
|
||||
void do_number P(()) ;
|
||||
void do_numtype P(()) ;
|
||||
void do_paren P(()) ;
|
||||
void set_numtype P((enum num_type dtype));
|
||||
void do_nothing P(()) ;
|
||||
void do_pending P(()) ;
|
||||
void do_point P(()) ;
|
||||
void do_portion P(()) ;
|
||||
double do_round P((double, int)) ;
|
||||
void do_shift P(()) ;
|
||||
void do_sto_rcl P(()) ;
|
||||
void do_trig P(()) ;
|
||||
void do_trigtype P(()) ;
|
||||
void draw_button P((int, enum fcp_type, int, int, int)) ;
|
||||
void get_display P(()) ;
|
||||
void get_key_val P((char *, char *)) ;
|
||||
void get_label P((int)) ;
|
||||
void get_options P((int, char **)) ;
|
||||
void getparam P((char *, char **, char *)) ;
|
||||
void get_rcfile P((char *)) ;
|
||||
void grey_button P((int, int, int)) ;
|
||||
void grey_buttons P((enum base_type)) ;
|
||||
void handle_menu_selection P((int, int)) ;
|
||||
void handle_selection P(()) ;
|
||||
void initialize P(()) ;
|
||||
void init_cmdline_opts P(()) ;
|
||||
void init_graphics P(()) ;
|
||||
void init_options P(()) ;
|
||||
void init_text P(()) ;
|
||||
void init_vars P(()) ;
|
||||
void key_init P(()) ;
|
||||
void load_resources P(()) ;
|
||||
void make_frames P(()) ;
|
||||
void make_items P(()) ;
|
||||
void make_modewin P(()) ;
|
||||
void make_fin_registers P(()) ;
|
||||
void make_registers P((int)) ;
|
||||
void MPstr_to_num P((char *, enum base_type, int *)) ;
|
||||
void paren_disp P((char)) ;
|
||||
void process_event P((int)) ;
|
||||
void process_item P((int)) ;
|
||||
void process_parens P((char)) ;
|
||||
void process_stack P((int, int, int)) ;
|
||||
void process_str P((char *, enum menu_type)) ;
|
||||
void push_num P((int *)) ;
|
||||
void push_op P((int)) ;
|
||||
void put_resource P((enum res_type, char *)) ;
|
||||
void read_rcfiles P(()) ;
|
||||
void read_resources P(()) ;
|
||||
void redraw_buttons P(()) ;
|
||||
void save_cmdline P((int, char **)) ;
|
||||
void save_pending_values P((int)) ;
|
||||
void save_resources P((char *)) ;
|
||||
void blank_display P(()) ;
|
||||
void ErrorDialog P((char *string));
|
||||
void set_item P((enum item_type, char *)) ;
|
||||
void set_title P((enum fcp_type, char *)) ;
|
||||
void show_ascii_frame P(()) ;
|
||||
void show_display P((int *)) ;
|
||||
void srand48 P(()) ;
|
||||
void start_tool P(()) ;
|
||||
void switch_hands P((int)) ;
|
||||
void usage P((char *)) ;
|
||||
void win_display P((enum fcp_type, int)) ;
|
||||
void write_cmdline P(()) ;
|
||||
void write_rcfile P((enum menu_type, int, int, char *, char *)) ;
|
||||
void write_resources P((char *)) ;
|
||||
void RestoreSession P(()) ;
|
||||
void TimerEvent P(( XtPointer, XtIntervalId *)) ;
|
||||
void ErrDialog P(( char *, Widget ));
|
||||
void beep(void);
|
||||
void check_ow_beep(void);
|
||||
void clear_display(void);
|
||||
void doerr(char *);
|
||||
void do_accuracy(void);
|
||||
void do_ascii(void);
|
||||
void do_base(void);
|
||||
void set_base(enum base_type type);
|
||||
void do_business(void);
|
||||
void do_calc(void);
|
||||
void do_dtcalc(int, char **);
|
||||
void do_clear(void);
|
||||
void do_constant(void);
|
||||
void do_delete(void);
|
||||
void do_exchange(void);
|
||||
void do_expno(void);
|
||||
void do_factorial(int *, int *);
|
||||
void do_frame(void);
|
||||
void do_function(void);
|
||||
void do_immed(void);
|
||||
void do_keys(void);
|
||||
void do_mode(void);
|
||||
void do_none(void);
|
||||
void do_number(void);
|
||||
void do_numtype(void);
|
||||
void do_paren(void);
|
||||
void set_numtype(enum num_type dtype);
|
||||
void do_nothing(void);
|
||||
void do_pending(void);
|
||||
void do_point(void);
|
||||
void do_portion(void);
|
||||
double do_round(double, int);
|
||||
void do_shift(void);
|
||||
void do_sto_rcl(void);
|
||||
void do_trig(void);
|
||||
void do_trigtype(void);
|
||||
void draw_button(int, enum fcp_type, int, int, int);
|
||||
void get_display(void);
|
||||
void get_key_val(char *, char *);
|
||||
void get_label(int);
|
||||
void get_options(int, char **);
|
||||
void getparam(char *, char **, char *);
|
||||
void get_rcfile(char *);
|
||||
void grey_button(int, int, int);
|
||||
void grey_buttons(enum base_type);
|
||||
void handle_menu_selection(int, int);
|
||||
void handle_selection(void);
|
||||
void initialize(void);
|
||||
void init_cmdline_opts(void);
|
||||
void init_graphics(void);
|
||||
void init_options(void);
|
||||
void init_text(void);
|
||||
void init_vars(void);
|
||||
void key_init(void);
|
||||
void load_resources(void);
|
||||
void make_frames(void);
|
||||
void make_items(void);
|
||||
void make_modewin(void);
|
||||
void make_fin_registers(void);
|
||||
void make_registers(int);
|
||||
void MPstr_to_num(char *, enum base_type, int *);
|
||||
void paren_disp(char);
|
||||
void process_event(int);
|
||||
void process_item(int);
|
||||
void process_parens(char);
|
||||
void process_stack(int, int, int);
|
||||
void process_str(char *, enum menu_type);
|
||||
void push_num(int *);
|
||||
void push_op(int);
|
||||
void put_resource(enum res_type, char *);
|
||||
void read_rcfiles(void);
|
||||
void read_resources(void);
|
||||
void redraw_buttons(void);
|
||||
void save_cmdline(int, char **);
|
||||
void save_pending_values(int);
|
||||
void save_resources(char *);
|
||||
void blank_display(void);
|
||||
void ErrorDialog(char *string);
|
||||
void set_item(enum item_type, char *);
|
||||
void set_title(enum fcp_type, char *);
|
||||
void show_ascii_frame(void);
|
||||
void show_display(int *);
|
||||
void srand48(long);
|
||||
void start_tool(void);
|
||||
void switch_hands(int);
|
||||
void usage(char *);
|
||||
void win_display(enum fcp_type, int);
|
||||
void write_cmdline(void);
|
||||
void write_rcfile(enum menu_type, int, int, char *, char *);
|
||||
void write_resources(char *);
|
||||
void RestoreSession(void);
|
||||
void TimerEvent(XtPointer, XtIntervalId *);
|
||||
void ErrDialog(char *, Widget );
|
||||
|
||||
/* MP routines not found in the Brent FORTRAN package. */
|
||||
void mpacos P((int *, int *)) ;
|
||||
void mpacosh P((int *, int *)) ;
|
||||
void mpasinh P((int *, int *)) ;
|
||||
void mpatanh P((int *, int *)) ;
|
||||
void mplog10 P((int *, int *)) ;
|
||||
void mpacos(int *, int *);
|
||||
void mpacosh(int *, int *);
|
||||
void mpasinh(int *, int *);
|
||||
void mpatanh(int *, int *);
|
||||
void mplog10(int *, int *);
|
||||
|
||||
/* Brent MP routines in mp.c. */
|
||||
int mpcmpi P((int *, int *)) ;
|
||||
int mpcmpr P((int *, float *)) ;
|
||||
int mpcomp P((int *, int *)) ;
|
||||
int pow_ii P((int *, int *)) ;
|
||||
int mpcmpi(int *, int *);
|
||||
int mpcmpr(int *, float *);
|
||||
int mpcomp(int *, int *);
|
||||
int pow_ii(int *, int *);
|
||||
|
||||
int mpeq P((int *, int *)) ;
|
||||
int mpge P((int *, int *)) ;
|
||||
int mpgt P((int *, int *)) ;
|
||||
int mple P((int *, int *)) ;
|
||||
int mplt P((int *, int *)) ;
|
||||
int mpeq(int *, int *);
|
||||
int mpge(int *, int *);
|
||||
int mpgt(int *, int *);
|
||||
int mple(int *, int *);
|
||||
int mplt(int *, int *);
|
||||
|
||||
void mpabs P((int *, int *)) ;
|
||||
void mpadd P((int *, int *, int *)) ;
|
||||
void mpadd2 P((int *, int *, int *, int *, int *)) ;
|
||||
void mpadd3 P((int *, int *, int *, int *, int *)) ;
|
||||
void mpaddi P((int *, int *, int *)) ;
|
||||
void mpaddq P((int *, int *, int *, int *)) ;
|
||||
void mpart1 P((int *, int *)) ;
|
||||
void mpasin P((int *, int *)) ;
|
||||
void mpatan P((int *, int *)) ;
|
||||
void mpcdm P((double *, int *)) ;
|
||||
void mpchk P((int *, int *)) ;
|
||||
void mpcim P((int *, int *)) ;
|
||||
void mpcmd P((int *, double *)) ;
|
||||
void mpcmf P((int *, int *)) ;
|
||||
void mpcmi P((int *, int *)) ;
|
||||
void mpcmim P((int *, int *)) ;
|
||||
void mpcmr P((int *, float *)) ;
|
||||
void mpcos P((int *, int *)) ;
|
||||
void mpcosh P((int *, int *)) ;
|
||||
void mpcqm P((int *, int *, int *)) ;
|
||||
void mpcrm P((float *, int *)) ;
|
||||
void mpdiv P((int *, int *, int *)) ;
|
||||
void mpdivi P((int *, int *, int *)) ;
|
||||
void mperr P(()) ;
|
||||
void mpexp P((int *, int *)) ;
|
||||
void mpexp1 P((int *, int *)) ;
|
||||
void mpext P((int *, int *, int *)) ;
|
||||
void mpgcd P((int *, int *)) ;
|
||||
void mpln P((int *, int *)) ;
|
||||
void mplns P((int *, int *)) ;
|
||||
void mpmaxr P((int *)) ;
|
||||
void mpmlp P((int *, int *, int *, int *)) ;
|
||||
void mpmul P((int *, int *, int *)) ;
|
||||
void mpmul2 P((int *, int *, int *, int *)) ;
|
||||
void mpmuli P((int *, int *, int *)) ;
|
||||
void mpmulq P((int *, int *, int *, int *)) ;
|
||||
void mpneg P((int *, int *)) ;
|
||||
void mpnzr P((int *, int *, int *, int *)) ;
|
||||
void mpovfl P((int *)) ;
|
||||
void mppi P((int *)) ;
|
||||
void mppwr P((int *, int *, int *)) ;
|
||||
void mppwr2 P((int *, int *, int *)) ;
|
||||
void mprec P((int *, int *)) ;
|
||||
void mproot P((int *, int *, int *)) ;
|
||||
void mpset P((int *, int *, int *)) ;
|
||||
void mpsin P((int *, int *)) ;
|
||||
void mpsin1 P((int *, int *, int *)) ;
|
||||
void mpsinh P((int *, int *)) ;
|
||||
void mpsqrt P((int *, int *)) ;
|
||||
void mpstr P((int *, int *)) ;
|
||||
void mpsub P((int *, int *, int *)) ;
|
||||
void mptanh P((int *, int *)) ;
|
||||
void mpunfl P((int *)) ;
|
||||
void mpabs(int *, int *);
|
||||
void mpadd(int *, int *, int *);
|
||||
void mpadd2(int *, int *, int *, int *, int *);
|
||||
void mpadd3(int *, int *, int *, int *, int *);
|
||||
void mpaddi(int *, int *, int *);
|
||||
void mpaddq(int *, int *, int *, int *);
|
||||
void mpart1(int *, int *);
|
||||
void mpasin(int *, int *);
|
||||
void mpatan(int *, int *);
|
||||
void mpcdm(double *, int *);
|
||||
void mpchk(int *, int *);
|
||||
void mpcim(int *, int *);
|
||||
void mpcmd(int *, double *);
|
||||
void mpcmf(int *, int *);
|
||||
void mpcmi(int *, int *);
|
||||
void mpcmim(int *, int *);
|
||||
void mpcmr(int *, float *);
|
||||
void mpcos(int *, int *);
|
||||
void mpcosh(int *, int *);
|
||||
void mpcqm(int *, int *, int *);
|
||||
void mpcrm(float *, int *);
|
||||
void mpdiv(int *, int *, int *);
|
||||
void mpdivi(int *, int *, int *);
|
||||
void mperr(void);
|
||||
void mpexp(int *, int *);
|
||||
void mpexp1(int *, int *);
|
||||
void mpext(int *, int *, int *);
|
||||
void mpgcd(int *, int *);
|
||||
void mpln(int *, int *);
|
||||
void mplns(int *, int *);
|
||||
void mpmaxr(int *);
|
||||
void mpmlp(int *, int *, int *, int *);
|
||||
void mpmul(int *, int *, int *);
|
||||
void mpmul2(int *, int *, int *, int *);
|
||||
void mpmuli(int *, int *, int *);
|
||||
void mpmulq(int *, int *, int *, int *);
|
||||
void mpneg(int *, int *);
|
||||
void mpnzr(int *, int *, int *, int *);
|
||||
void mpovfl(int *);
|
||||
void mppi(int *);
|
||||
void mppwr(int *, int *, int *);
|
||||
void mppwr2(int *, int *, int *);
|
||||
void mprec(int *, int *);
|
||||
void mproot(int *, int *, int *);
|
||||
void mpset(int *, int *, int *);
|
||||
void mpsin(int *, int *);
|
||||
void mpsin1(int *, int *, int *);
|
||||
void mpsinh(int *, int *);
|
||||
void mpsqrt(int *, int *);
|
||||
void mpstr(int *, int *);
|
||||
void mpsub(int *, int *, int *);
|
||||
void mptanh(int *, int *);
|
||||
void mpunfl(int *);
|
||||
|
||||
/* Help routines */
|
||||
void Help P((char *, char *)) ;
|
||||
void HelpRequestCB P(()) ;
|
||||
void HelpModeCB P(()) ;
|
||||
void HelpCloseCB P(()) ;
|
||||
void HelpHyperlinkCB P(()) ;
|
||||
void DisplayHelp P((char *, char *)) ;
|
||||
void CenterMsgCB P(()) ;
|
||||
void HelpHelp P(()) ;
|
||||
void SetWmHnts P(()) ;
|
||||
void Help(char *, char *);
|
||||
void HelpRequestCB(Widget, caddr_t, caddr_t);
|
||||
void HelpModeCB(Widget, caddr_t, caddr_t);
|
||||
void HelpCloseCB(Widget, caddr_t, caddr_t);
|
||||
void HelpHyperlinkCB(Widget, caddr_t, caddr_t);
|
||||
void DisplayHelp(char *, char *);
|
||||
void CenterMsgCB(Widget, XtPointer, XtPointer);
|
||||
void HelpHelp(void);
|
||||
void SetWmHnts(void);
|
||||
|
||||
void _DtmapCB P((Widget, XtPointer, XtPointer)) ;
|
||||
void _DtmapCB(Widget, XtPointer, XtPointer);
|
||||
|
||||
void set_option_menu P((int, int)) ;
|
||||
void set_option_menu(int, int);
|
||||
|
||||
#endif /* _calctool_h */
|
||||
|
||||
Reference in New Issue
Block a user