mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcalc: Remove support for optional K&R prototypes to simplify code
This commit is contained in:
parent
25d34e6398
commit
e4024b0bf9
9 changed files with 281 additions and 317 deletions
|
@ -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 */
|
||||
|
|
|
@ -38,16 +38,8 @@
|
|||
#include <X11/Xresource.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/* For all function declarations, if ANSI then use a prototype. */
|
||||
char *set_bool(int);
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define P(args) args
|
||||
#else /* ! __STDC__ */
|
||||
#define P(args) ()
|
||||
#endif /* STDC */
|
||||
|
||||
char *set_bool P((int)) ;
|
||||
|
||||
void read_str P((char **, char *)) ;
|
||||
void read_str(char **, char *);
|
||||
|
||||
#endif /*_ds_common_h*/
|
||||
|
|
|
@ -50,7 +50,7 @@ extern XmWidgetExtData _XmGetWidgetExtData(
|
|||
#include "calctool.h"
|
||||
#include "motif.h"
|
||||
|
||||
void _DtChildPosition P((Widget, Widget, Position *, Position *)) ;
|
||||
void _DtChildPosition(Widget, Widget, Position *, Position *);
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
|
|
|
@ -38,14 +38,6 @@
|
|||
#include <X11/Intrinsic.h>
|
||||
#include <Xm/Xm.h>
|
||||
|
||||
/* For all function declarations, if ANSI then use a prototype. */
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define P(args) args
|
||||
#else /* ! __STDC__ */
|
||||
#define P(args) ()
|
||||
#endif /* STDC */
|
||||
|
||||
/* Location ops for ds_position_popup(). */
|
||||
|
||||
enum ds_location_op {
|
||||
|
@ -58,12 +50,12 @@ enum ds_location_op {
|
|||
DS_POPUP_CENTERED /* Center popup within baseframe */
|
||||
} ;
|
||||
|
||||
int ds_position_popup P((Widget, Widget, enum ds_location_op)) ;
|
||||
int ds_force_popup_on_screen P((Widget, int *, int *)) ;
|
||||
int ds_position_popup(Widget, Widget, enum ds_location_op);
|
||||
int ds_force_popup_on_screen(Widget, int *, int *);
|
||||
|
||||
void ds_get_screen_size P((Widget, int *, int *)) ;
|
||||
void ds_get_screen_size(Widget, int *, int *);
|
||||
|
||||
void _DtGenericMapWindow P((Widget shell, Widget parent ));
|
||||
void _DtChildPosition P((Widget w, Widget parent, Position *newX, Position *newY));
|
||||
void _DtGenericMapWindow(Widget shell, Widget parent);
|
||||
void _DtChildPosition(Widget w, Widget parent, Position *newX, Position *newY);
|
||||
|
||||
#endif /*!_ds_popup_h*/
|
||||
|
|
|
@ -45,14 +45,6 @@
|
|||
#include <Xm/PushB.h>
|
||||
#include <Xm/TextF.h>
|
||||
|
||||
/* For all function declarations, if ANSI then use a prototype. */
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define P(args) args
|
||||
#else /* ! __STDC__ */
|
||||
#define P(args) ()
|
||||
#endif /* STDC */
|
||||
|
||||
enum choice_type { CH_ACTIVE, CH_VALUE } ; /* Choice operations. */
|
||||
|
||||
/* Text widget operations. */
|
||||
|
@ -74,20 +66,20 @@ struct tW_struct { /* Text widget structure. */
|
|||
Widget textfield ; /* xmTextWidgetClass. */
|
||||
} ;
|
||||
|
||||
int get_choice P((struct cW_struct *, enum choice_type)) ;
|
||||
int get_choice(struct cW_struct *, enum choice_type);
|
||||
|
||||
struct cW_struct *make_choiceW P((Widget, char *, char **, int, int,
|
||||
int, void (*)())) ;
|
||||
struct tW_struct *make_textW P((Widget, char *)) ;
|
||||
struct cW_struct *make_choiceW(Widget, char *, char **, int, int,
|
||||
int, void (*)());
|
||||
struct tW_struct *make_textW(Widget, char *);
|
||||
|
||||
Widget make_butW P((Widget, char *)) ;
|
||||
Widget make_labelW P((Widget, char *)) ;
|
||||
Widget make_manW P((char *, Widget, int, int)) ;
|
||||
Widget make_toggleW P((Widget, char *)) ;
|
||||
Widget make_butW(Widget, char *);
|
||||
Widget make_labelW(Widget, char *);
|
||||
Widget make_manW(char *, Widget, int, int);
|
||||
Widget make_toggleW(Widget, char *);
|
||||
|
||||
void set_choice P((struct cW_struct *, enum choice_type, int)) ;
|
||||
void set_choice_help P((struct cW_struct *, char *)) ;
|
||||
void set_text_help P((struct tW_struct *, char *)) ;
|
||||
void set_text_str P((struct tW_struct *, enum text_type, char *)) ;
|
||||
void set_choice(struct cW_struct *, enum choice_type, int);
|
||||
void set_choice_help(struct cW_struct *, char *);
|
||||
void set_text_help(struct tW_struct *, char *);
|
||||
void set_text_str(struct tW_struct *, enum text_type, char *);
|
||||
|
||||
#endif /*_ds_widget_h*/
|
||||
|
|
|
@ -39,31 +39,23 @@
|
|||
#include <X11/Intrinsic.h>
|
||||
#include <Xm/Xm.h>
|
||||
|
||||
/* For all function declarations, if ANSI then use a prototype. */
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define P(args) args
|
||||
#else /* ! __STDC__ */
|
||||
#define P(args) ()
|
||||
#endif /* STDC */
|
||||
|
||||
/* Function declarations. */
|
||||
|
||||
char *ds_get_resource P((XrmDatabase, char *, char *)) ;
|
||||
char *ds_get_resource(XrmDatabase, char *, char *);
|
||||
|
||||
int ds_get_choice_value P((Widget)) ;
|
||||
int ds_get_strwidth P((XFontStruct *, char *)) ;
|
||||
int ds_save_resources P((XrmDatabase, char *)) ;
|
||||
int ds_get_choice_value(Widget) ;
|
||||
int ds_get_strwidth(XFontStruct *, char *);
|
||||
int ds_save_resources(XrmDatabase, char *) ;
|
||||
|
||||
void ds_add_help P((Widget, char *)) ;
|
||||
void ds_beep P((Display *)) ;
|
||||
void ds_get_geometry_size P((char *, int *, int *)) ;
|
||||
void ds_get_frame_size P((Widget, int *, int *, int *, int *)) ;
|
||||
void ds_put_resource P((XrmDatabase *, char *, char *, char *)) ;
|
||||
void ds_save_cmdline P((Display *, Window, int, char **)) ;
|
||||
void ds_set_choice_value P((Widget, int)) ;
|
||||
void ds_set_frame_size P((Widget, int, int, int, int)) ;
|
||||
void ds_add_help(Widget, char *);
|
||||
void ds_beep(Display *);
|
||||
void ds_get_geometry_size(char *, int *, int *);
|
||||
void ds_get_frame_size(Widget, int *, int *, int *, int *);
|
||||
void ds_put_resource(XrmDatabase *, char *, char *, char *);
|
||||
void ds_save_cmdline(Display *, Window, int, char **);
|
||||
void ds_set_choice_value(Widget, int);
|
||||
void ds_set_frame_size(Widget, int, int, int, int);
|
||||
|
||||
XrmDatabase ds_load_resources P((Display *)) ;
|
||||
XrmDatabase ds_load_resources(Display *);
|
||||
|
||||
#endif /*_ds_xlib_h*/
|
||||
|
|
|
@ -56,7 +56,7 @@ extern struct button buttons[] ; /* Calculator button values. */
|
|||
|
||||
extern Boolean ignore_event;
|
||||
extern XtIntervalId timerId;
|
||||
extern void _DtChildPosition P((Widget, Widget, Position *, Position *)) ;
|
||||
extern void _DtChildPosition(Widget, Widget, Position *, Position *);
|
||||
|
||||
typedef struct _helpStruct {
|
||||
struct _helpStruct *pNext;
|
||||
|
@ -65,8 +65,8 @@ typedef struct _helpStruct {
|
|||
Boolean inUse;
|
||||
} HelpStruct;
|
||||
|
||||
static Widget GetHelpDialog P(()) ;
|
||||
static void UnmanageCB P(()) ;
|
||||
static Widget GetHelpDialog(void);
|
||||
static void UnmanageCB(Widget, XtPointer, XtPointer) ;
|
||||
|
||||
void
|
||||
Help(char *helpVolume, char *locationId)
|
||||
|
|
|
@ -187,47 +187,47 @@ typedef struct
|
|||
Window icon;
|
||||
} WM_STATE;
|
||||
|
||||
void menu_proc P((Widget, XtPointer, XtPointer)) ;
|
||||
void show_ascii P((Widget, XtPointer, XtPointer)) ;
|
||||
void write_cf_value P((Widget, XtPointer, XtPointer)) ;
|
||||
void close_cf P((Widget, XtPointer, XtPointer)) ;
|
||||
void close_ascii P((Widget, XtPointer, XtPointer)) ;
|
||||
void move_cf P((Widget, XtPointer, XtPointer)) ;
|
||||
void FocusInCB P((Widget, XtPointer, XtPointer)) ;
|
||||
void map_popup P((Widget, XtPointer, XtPointer)) ;
|
||||
void menu_proc(Widget, XtPointer, XtPointer);
|
||||
void show_ascii(Widget, XtPointer, XtPointer);
|
||||
void write_cf_value(Widget, XtPointer, XtPointer);
|
||||
void close_cf(Widget, XtPointer, XtPointer);
|
||||
void close_ascii(Widget, XtPointer, XtPointer);
|
||||
void move_cf(Widget, XtPointer, XtPointer);
|
||||
void FocusInCB(Widget, XtPointer, XtPointer);
|
||||
void map_popup(Widget, XtPointer, XtPointer);
|
||||
|
||||
static int event_is_keypad P((XEvent *)) ;
|
||||
static int get_next_event P((Widget, int, XEvent *)) ;
|
||||
static int is_window_showing P((Widget)) ;
|
||||
static int event_is_keypad(XEvent *);
|
||||
static int get_next_event(Widget, int, XEvent *);
|
||||
static int is_window_showing(Widget);
|
||||
|
||||
static KeySym keypad_keysym P((XEvent *)) ;
|
||||
static KeySym keypad_keysym(XEvent *);
|
||||
|
||||
static void modelineValueChanged P((Widget, XtPointer, XtPointer)) ;
|
||||
static void dtcalc_kkeyboard_create P((Widget)) ;
|
||||
static void dtcalc_kpanel_create P((Widget)) ;
|
||||
static void confirm_callback P((Widget, XtPointer, XtPointer)) ;
|
||||
static void create_cfframe P(()) ;
|
||||
static void create_menu P((enum menu_type, Widget, int)) ;
|
||||
static void do_button P((Widget, XtPointer, XtPointer)) ;
|
||||
static void do_confirm_notice P((Widget, char *)) ;
|
||||
static void do_continue_notice P((Widget, char *)) ;
|
||||
static void close_reg P((Widget, XtPointer, XtPointer)) ;
|
||||
static void event_proc P((Widget, XtPointer, XEvent *, Boolean *)) ;
|
||||
static void frame_interpose P((Widget, XtPointer, XEvent *, Boolean *)) ;
|
||||
static void menu_handler P((Widget, XtPointer, XEvent *, Boolean *)) ;
|
||||
static void popupHandler P((Widget, XtPointer, XEvent *, Boolean *)) ;
|
||||
static void new_cf_value P((Widget, XtPointer, XtPointer)) ;
|
||||
static void do_memory P((Widget, XtPointer, XtPointer)) ;
|
||||
static void switch_mode P((enum mode_type)) ;
|
||||
static void update_cf_value P(()) ;
|
||||
static void xerror_interpose P((Display *, XErrorEvent *)) ;
|
||||
static void modelineValueChanged(Widget, XtPointer, XtPointer);
|
||||
static void dtcalc_kkeyboard_create(Widget);
|
||||
static void dtcalc_kpanel_create(Widget);
|
||||
static void confirm_callback(Widget, XtPointer, XtPointer);
|
||||
static void create_cfframe(void);
|
||||
static void create_menu(enum menu_type, Widget, int);
|
||||
static void do_button(Widget, XtPointer, XtPointer);
|
||||
static void do_confirm_notice(Widget, char *);
|
||||
static void do_continue_notice(Widget, char *);
|
||||
static void close_reg(Widget, XtPointer, XtPointer);
|
||||
static void event_proc(Widget, XtPointer, XEvent *, Boolean *);
|
||||
static void frame_interpose(Widget, XtPointer, XEvent *, Boolean *);
|
||||
static void menu_handler(Widget, XtPointer, XEvent *, Boolean *);
|
||||
static void popupHandler(Widget, XtPointer, XEvent *, Boolean *);
|
||||
static void new_cf_value(Widget, XtPointer, XtPointer);
|
||||
static void do_memory(Widget, XtPointer, XtPointer);
|
||||
static void switch_mode(enum mode_type);
|
||||
static void update_cf_value(void);
|
||||
static void xerror_interpose(Display *, XErrorEvent *);
|
||||
|
||||
static Widget button_create P((Widget, int, int, int, int)) ;
|
||||
static void save_state P((Widget, XtPointer, XtPointer)) ;
|
||||
static void SaveSession P(( char *, char * )) ;
|
||||
static void setCalcHints P(()) ;
|
||||
static Widget button_create(Widget, int, int, int, int);
|
||||
static void save_state(Widget, XtPointer, XtPointer);
|
||||
static void SaveSession(char *, char *);
|
||||
static void setCalcHints(void);
|
||||
|
||||
static char * _DtcalcStripSpaces P(( char * )) ;
|
||||
static char * _DtcalcStripSpaces(char *);
|
||||
|
||||
static void ProcessMotifSelection(Widget);
|
||||
static void create_menu_bar(Widget parent);
|
||||
|
@ -446,7 +446,7 @@ button_create(Widget owner, int row, int column, int maxrows, int maxcols)
|
|||
if (mtype != M_NONE) create_menu(mtype, button, n) ;
|
||||
val = (v->curwin << 16) + n ;
|
||||
XtAddCallback(button, XmNactivateCallback, do_button, (XtPointer) val) ;
|
||||
XtAddCallback(button, XmNhelpCallback, HelpRequestCB, (XtPointer) val) ;
|
||||
XtAddCallback(button, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB, (XtPointer) val) ;
|
||||
XtAddEventHandler(button, KeyPressMask | KeyReleaseMask,
|
||||
FALSE, event_proc, NULL) ;
|
||||
|
||||
|
@ -806,7 +806,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNleftAttachment, XmATTACH_FORM,
|
||||
XmNnavigationType, XmTAB_GROUP,
|
||||
NULL) ;
|
||||
XtAddCallback(X->textFrame, XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->textFrame, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer)HELP_DISPLAY) ;
|
||||
|
||||
X->textForm = XtVaCreateManagedWidget("textForm",
|
||||
|
@ -816,7 +816,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNbackground, tmp_pixelbg,
|
||||
XmNforeground, tmp_pixelfg,
|
||||
NULL) ;
|
||||
XtAddCallback(X->textForm, XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->textForm, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer)HELP_DISPLAY) ;
|
||||
|
||||
X->modevals[(int) DISPLAYITEM] = XtVaCreateManagedWidget("display",
|
||||
|
@ -833,7 +833,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNbackground, tmp_pixelbg,
|
||||
XmNforeground, tmp_pixelfg,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modevals[(int) DISPLAYITEM], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[(int) DISPLAYITEM], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_DISPLAY) ;
|
||||
XtAddEventHandler(X->modevals[(int) DISPLAYITEM],
|
||||
KeyPressMask | KeyReleaseMask, FALSE, event_proc, NULL) ;
|
||||
|
@ -851,7 +851,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNleftAttachment, XmATTACH_FORM,
|
||||
XmNnavigationType, XmTAB_GROUP,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modeFrame, XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modeFrame, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODELINE) ;
|
||||
|
||||
X->modeline = XtVaCreateManagedWidget("modeline",
|
||||
|
@ -859,7 +859,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
X->modeFrame,
|
||||
XmNshadowThickness, 0,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modeline, XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modeline, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODELINE) ;
|
||||
|
||||
label_string = XmStringCreateLocalized (" ");
|
||||
|
@ -873,7 +873,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNalignment, XmALIGNMENT_CENTER,
|
||||
XmNlabelString, label_string,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODELINE) ;
|
||||
|
||||
i = (int) HYPITEM;
|
||||
|
@ -887,7 +887,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNalignment, XmALIGNMENT_CENTER,
|
||||
XmNlabelString, label_string,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODELINE) ;
|
||||
|
||||
i = (int) INVITEM;
|
||||
|
@ -901,7 +901,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XmNalignment, XmALIGNMENT_CENTER,
|
||||
XmNlabelString, label_string,
|
||||
NULL) ;
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODELINE) ;
|
||||
XmStringFree(label_string);
|
||||
|
||||
|
@ -952,7 +952,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XtSetArg(args[n], XmNmenuHistory, modeArry[(int)v->modetype]); n++;
|
||||
X->modevals[i] = XmCreateOptionMenu(X->modeline, "mode", args, n);
|
||||
XtManageChild (X->modevals[i]);
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_MODE) ;
|
||||
|
||||
XtOverrideTranslations(X->modevals[i], trans_table);
|
||||
|
@ -1016,7 +1016,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XtSetArg(args[n], XmNmenuHistory, X->baseWidgArry[(int)v->base]); n++;
|
||||
X->modevals[i] = XmCreateOptionMenu(X->modeline, "base", args, n);
|
||||
XtManageChild (X->modevals[i]);
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_BASE) ;
|
||||
|
||||
XtOverrideTranslations(X->modevals[i], trans_table);
|
||||
|
@ -1070,7 +1070,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XtSetArg(args[n], XmNmenuHistory, X->numWidgArry[(int)v->dtype]); n++;
|
||||
X->modevals[i] = XmCreateOptionMenu(X->modeline, "num", args, n);
|
||||
XtManageChild (X->modevals[i]);
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_NOTATION) ;
|
||||
|
||||
XtOverrideTranslations(X->modevals[i], trans_table);
|
||||
|
@ -1128,7 +1128,7 @@ dtcalc_kpanel_create(Widget owner)
|
|||
XtSetArg(args[n], XmNmenuHistory, X->ttypeWidgArry[(int)v->ttype]); n++;
|
||||
X->modevals[i] = XmCreateOptionMenu(X->modeline, "trig", args, n);
|
||||
XtManageChild (X->modevals[i]);
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->modevals[i], XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_TRIG) ;
|
||||
|
||||
XtOverrideTranslations(X->modevals[i], trans_table);
|
||||
|
@ -2350,7 +2350,7 @@ new_cf_value(Widget widget, XtPointer client_data, XtPointer call_data)
|
|||
XmStringFree(cstr) ;
|
||||
|
||||
XtRemoveAllCallbacks(X->CFpi_butHelp, XmNactivateCallback);
|
||||
XtAddCallback(X->CFpi_butHelp, XmNactivateCallback, HelpRequestCB,
|
||||
XtAddCallback(X->CFpi_butHelp, XmNactivateCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_CONSTANT);
|
||||
}
|
||||
else
|
||||
|
@ -2363,7 +2363,7 @@ new_cf_value(Widget widget, XtPointer client_data, XtPointer call_data)
|
|||
XmStringFree(cstr) ;
|
||||
|
||||
XtRemoveAllCallbacks(X->CFpi_butHelp, XmNactivateCallback);
|
||||
XtAddCallback(X->CFpi_butHelp, XmNactivateCallback, HelpRequestCB,
|
||||
XtAddCallback(X->CFpi_butHelp, XmNactivateCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_FUNCTION);
|
||||
}
|
||||
|
||||
|
@ -2633,7 +2633,7 @@ show_ascii_frame(void) /* Display ASCII popup. */
|
|||
XtAddCallback(X->Api_butOK, XmNactivateCallback, show_ascii, NULL) ;
|
||||
XtAddCallback(X->Api_butClose, XmNactivateCallback, close_ascii,
|
||||
(XtPointer) NULL) ;
|
||||
XtAddCallback(X->Api_butHelp, XmNactivateCallback, HelpRequestCB,
|
||||
XtAddCallback(X->Api_butHelp, XmNactivateCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer) HELP_ASCII) ;
|
||||
|
||||
j = 0;
|
||||
|
@ -3310,7 +3310,7 @@ create_menu_bar(Widget parent)
|
|||
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
|
||||
X->menubar = XmCreateMenuBar(parent, "mainMenu", args, n);
|
||||
XtManageChild(X->menubar);
|
||||
XtAddCallback(X->menubar, XmNhelpCallback, HelpRequestCB,
|
||||
XtAddCallback(X->menubar, XmNhelpCallback, (void (*)(Widget, XtPointer, XtPointer)) HelpRequestCB,
|
||||
(XtPointer)HELP_MENUBAR);
|
||||
|
||||
mnemonic = GETMESSAGE(2, 13, "O");
|
||||
|
|
|
@ -43,7 +43,7 @@ extern struct menu_entry menu_entries[] ; /* All the menu strings. */
|
|||
|
||||
extern Vars v ; /* Calctool variables and options. */
|
||||
|
||||
void init_mess P(()) ;
|
||||
void init_mess(void);
|
||||
|
||||
/* The following are all the strings used by the dtcalc program.
|
||||
* They are initialized in init_text() to the local language equivalents.
|
||||
|
|
Loading…
Reference in a new issue