From 21baf85c221cb36069289679138ff029f9028e6e Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sat, 26 Sep 2020 10:19:33 -0700 Subject: [PATCH] Fix prototype syntax for functions with no parameters in include files Add some overlooked function prototypes to xxxdefs.h include files Add missing #include of relevant xxxdefs.h in a couple of source files Add prototypes in standalone programs to silence (some) -Wmissing-prototype warnings Remove duplicate prototype from hardrtn.c modified: inc/commondefs.h modified: inc/dirdefs.h modified: inc/dspifdefs.h modified: inc/dspsubrsdefs.h modified: inc/etherdefs.h modified: inc/gcmain3defs.h modified: inc/initdspdefs.h modified: inc/initkbddefs.h modified: inc/keyeventdefs.h modified: inc/maindefs.h modified: inc/osmsgdefs.h modified: inc/testtooldefs.h modified: inc/timerdefs.h modified: inc/unixfork.h modified: inc/uraiddefs.h modified: inc/vmemsavedefs.h modified: inc/xcursordefs.h modified: inc/xlspwindefs.h modified: src/arith2.c modified: src/ether.c modified: src/hardrtn.c modified: src/keytstno.c modified: src/setsout.c modified: src/tstsout.c --- inc/commondefs.h | 6 +++--- inc/dirdefs.h | 2 +- inc/dspifdefs.h | 1 + inc/dspsubrsdefs.h | 2 +- inc/etherdefs.h | 10 +++++----- inc/gcmain3defs.h | 2 +- inc/initdspdefs.h | 10 +++++----- inc/initkbddefs.h | 6 +++--- inc/keyeventdefs.h | 2 +- inc/maindefs.h | 4 ++-- inc/osmsgdefs.h | 8 ++++---- inc/testtooldefs.h | 1 + inc/timerdefs.h | 16 ++++++++-------- inc/unixfork.h | 2 +- inc/uraiddefs.h | 10 ++++++---- inc/vmemsavedefs.h | 2 +- inc/xcursordefs.h | 2 +- inc/xlspwindefs.h | 2 +- src/arith2.c | 1 + src/ether.c | 1 + src/hardrtn.c | 1 - src/keytstno.c | 5 ++++- src/setsout.c | 1 + src/tstsout.c | 1 + 24 files changed, 54 insertions(+), 44 deletions(-) diff --git a/inc/commondefs.h b/inc/commondefs.h index f5ae025..17a3755 100644 --- a/inc/commondefs.h +++ b/inc/commondefs.h @@ -1,8 +1,8 @@ #ifndef COMMONDEFS_H #define COMMONDEFS_H 1 -void stab(); +void stab(void); void warn(char *s); int error(char *s); -int stackcheck(); -void stackoverflow(); +int stackcheck(void); +void stackoverflow(void); #endif diff --git a/inc/dirdefs.h b/inc/dirdefs.h index 7d541ba..a520211 100644 --- a/inc/dirdefs.h +++ b/inc/dirdefs.h @@ -6,7 +6,7 @@ int make_old_version(char *old, char *file); #ifdef FSDEBUG void print_finfo(FINFO *fp); #endif -int init_finfo(); +int init_finfo(void); LispPTR COM_gen_files(register LispPTR *args); LispPTR COM_next_file(register LispPTR *args); LispPTR COM_finish_finfo(register LispPTR *args); diff --git a/inc/dspifdefs.h b/inc/dspifdefs.h index 91f171c..9643b40 100644 --- a/inc/dspifdefs.h +++ b/inc/dspifdefs.h @@ -5,4 +5,5 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h unsigned long GenericReturnT(void); void GenericPanic(DspInterface dsp); LispPTR SwitchDisplay(LispPTR display); +void describedsp(DspInterface dsp); #endif diff --git a/inc/dspsubrsdefs.h b/inc/dspsubrsdefs.h index 0d2a357..34add2b 100644 --- a/inc/dspsubrsdefs.h +++ b/inc/dspsubrsdefs.h @@ -7,5 +7,5 @@ void DSP_Cursor(LispPTR *args, int argnum); void DSP_SetMousePos(register LispPTR *args); LispPTR DSP_ScreenWidth(LispPTR *args); LispPTR DSP_ScreenHight(LispPTR *args); -void flip_cursor(); +void flip_cursor(void); #endif diff --git a/inc/etherdefs.h b/inc/etherdefs.h index 0ceb173..056aa7f 100644 --- a/inc/etherdefs.h +++ b/inc/etherdefs.h @@ -4,13 +4,13 @@ LispPTR ether_suspend(LispPTR args[]); LispPTR ether_resume(LispPTR args[]); LispPTR ether_ctrlr(LispPTR args[]); LispPTR ether_reset(LispPTR args[]); -LispPTR get_packet(); +LispPTR get_packet(void); LispPTR ether_get(LispPTR args[]); LispPTR ether_send(LispPTR args[]); LispPTR ether_setfilter(LispPTR args[]); -int *ether_debug(); -LispPTR check_ether(); -void init_ifpage_ether(); -void init_ether(); +int *ether_debug(void); +LispPTR check_ether(void); +void init_ifpage_ether(void); +void init_ether(void); LispPTR check_sum(register LispPTR *args); #endif diff --git a/inc/gcmain3defs.h b/inc/gcmain3defs.h index 66495c1..9e97019 100644 --- a/inc/gcmain3defs.h +++ b/inc/gcmain3defs.h @@ -1,6 +1,6 @@ #ifndef GCMAIN3DEFS_H #define GCMAIN3DEFS_H 1 -LispPTR gcmapscan(); +LispPTR gcmapscan(void); LispPTR gcmapscan(void); LispPTR gcmapunscan(void); LispPTR gcscanstack(void); diff --git a/inc/initdspdefs.h b/inc/initdspdefs.h index f5caa2b..2d21760 100644 --- a/inc/initdspdefs.h +++ b/inc/initdspdefs.h @@ -1,11 +1,11 @@ #ifndef INITDSPDEFS_H #define INITDSPDEFS_H 1 -void init_cursor(); -void set_cursor(); -void clear_display(); +void init_cursor(void); +void set_cursor(void); +void clear_display(void); void init_display2(DLword *display_addr, int display_max); -void display_before_exit(); -void flush_display_buffer(); +void display_before_exit(void); +void flush_display_buffer(void); void flush_display_region(int x, int y, int w, int h); void byte_swapped_displayregion(int x, int y, int w, int h); void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h); diff --git a/inc/initkbddefs.h b/inc/initkbddefs.h index 8859886..c98821c 100644 --- a/inc/initkbddefs.h +++ b/inc/initkbddefs.h @@ -1,9 +1,9 @@ #ifndef INITKBDDEFS_H #define INITKBDDEFS_H 1 -void set_kbd_iopointers(); +void set_kbd_iopointers(void); void keyboardtype(int fd); void init_keyboard(int flg); -void device_before_exit(); -void set_kbd_iopointers(); +void device_before_exit(void); +void set_kbd_iopointers(void); void keyboardtype(int fd); #endif diff --git a/inc/keyeventdefs.h b/inc/keyeventdefs.h index 5d1a86e..c0ec1fb 100644 --- a/inc/keyeventdefs.h +++ b/inc/keyeventdefs.h @@ -2,7 +2,7 @@ #define KEYEVENTDEFS_H 1 void getsignaldata(int sig, int code, void *scp); void kb_trans(u_short keycode, u_short upflg); -void taking_mouse_down(); +void taking_mouse_down(void); void copy_cursor(int newx, int newy); void cursor_hidden_bitmap(int x, int y); #endif diff --git a/inc/maindefs.h b/inc/maindefs.h index 7a44a03..599f59b 100644 --- a/inc/maindefs.h +++ b/inc/maindefs.h @@ -1,6 +1,6 @@ #ifndef MAINDEFS_H #define MAINDEFS_H 1 int makepathname(char *src, char *dst); -void start_lisp(); -void print_info_lines(); +void start_lisp(void); +void print_info_lines(void); #endif diff --git a/inc/osmsgdefs.h b/inc/osmsgdefs.h index 6801a29..119f85c 100644 --- a/inc/osmsgdefs.h +++ b/inc/osmsgdefs.h @@ -1,8 +1,8 @@ #ifndef OSMSGDEFS_H #define OSMSGDEFS_H 1 -void mess_init(); -void mess_reset(); +void mess_init(void); +void mess_reset(void); LispPTR mess_read(LispPTR *args); -LispPTR mess_readp(); -LispPTR flush_pty(); +LispPTR mess_readp(void); +LispPTR flush_pty(void); #endif diff --git a/inc/testtooldefs.h b/inc/testtooldefs.h index bb48af2..622113d 100644 --- a/inc/testtooldefs.h +++ b/inc/testtooldefs.h @@ -32,6 +32,7 @@ int MAKEATOM(char *string); LispPTR *MakeAtom68k(char *string); void GETTOPVAL(char *string); void S_TOPVAL(char *string); +int S_MAKEATOM(char *string); void all_stack_dump(DLword start, DLword end, DLword silent); void dtd_chain(DLword type); void Trace_FNCall(int numargs, int atomindex, int arg1, LispPTR *tos); diff --git a/inc/timerdefs.h b/inc/timerdefs.h index 2cb22ae..27339d0 100644 --- a/inc/timerdefs.h +++ b/inc/timerdefs.h @@ -1,18 +1,18 @@ #ifndef TIMERDEFS_H #define TIMERDEFS_H 1 -void update_miscstats(); -void init_miscstats(); +void update_miscstats(void); +void init_miscstats(void); LispPTR subr_gettime(LispPTR args[]); void subr_settime(LispPTR args[]); void subr_copytimestats(LispPTR args[]); LispPTR N_OP_rclk(LispPTR tos); -void update_timer(); +void update_timer(void); void int_io_open(int fd); void int_io_close(int fd); -void int_block(); -void int_unblock(); -void int_timer_off(); -void int_timer_on(); +void int_block(void); +void int_unblock(void); +void int_timer_off(void); +void int_timer_on(void); void panicuraid(int sig, int code, void *scp, void *addr); -void int_init(); +void int_init(void); #endif diff --git a/inc/unixfork.h b/inc/unixfork.h index becd330..945e530 100644 --- a/inc/unixfork.h +++ b/inc/unixfork.h @@ -1,4 +1,4 @@ -int fork_Unix(); +int fork_Unix(void); #ifdef FULLSLAVENAME int ForkUnixShell(int slot, char *PtySlave, char *termtype, char *shellarg); #else diff --git a/inc/uraiddefs.h b/inc/uraiddefs.h index 9a5879c..4edf67f 100644 --- a/inc/uraiddefs.h +++ b/inc/uraiddefs.h @@ -1,9 +1,11 @@ #ifndef URAIDDEFS_H #define URAIDDEFS_H 1 LispPTR parse_atomstring(char *string); -void uraid_commclear(); +void uraid_commclear(void); void copy_region(DLword *src, DLword *dst, int width, int h); -LispPTR uraid_commands(); -int device_before_raid(); -int device_after_raid(); +struct dtd *uGetDTD(unsigned int typenum); +unsigned int uGetTN(unsigned int address); +LispPTR uraid_commands(void); +int device_before_raid(void); +int device_after_raid(void); #endif diff --git a/inc/vmemsavedefs.h b/inc/vmemsavedefs.h index fc8106c..b4e20db 100644 --- a/inc/vmemsavedefs.h +++ b/inc/vmemsavedefs.h @@ -5,5 +5,5 @@ LispPTR vmem_save(char *sysout_file_name); LispPTR vmem_save0(LispPTR *args); int twowords(const void *i, const void *j); void sort_fptovp(DLword *fptovp, int size); -void lisp_finish(); +void lisp_finish(void); #endif diff --git a/inc/xcursordefs.h b/inc/xcursordefs.h index 01db230..fee2448 100644 --- a/inc/xcursordefs.h +++ b/inc/xcursordefs.h @@ -2,7 +2,7 @@ #define XCURSORDEFS_H 1 #include #include "devif.h" -void Init_XCursor(); +void Init_XCursor(void); void Set_XCursor(int x, int y); void init_Xcursor(Display *display, int window); void set_Xcursor(DspInterface dsp, unsigned char *bitmap, int hotspot_x, int hotspot_y, Cursor *return_cursor, int from_lisp); diff --git a/inc/xlspwindefs.h b/inc/xlspwindefs.h index 1836c1a..b710623 100644 --- a/inc/xlspwindefs.h +++ b/inc/xlspwindefs.h @@ -4,5 +4,5 @@ void Create_LispWindow(DspInterface dsp); void lisp_Xvideocolor(int flag); void set_Xmouseposition(int x, int y); -void DoRing(); +void DoRing(void); #endif diff --git a/src/arith2.c b/src/arith2.c index c744de3..ba0e71f 100644 --- a/src/arith2.c +++ b/src/arith2.c @@ -20,6 +20,7 @@ static char *id = "$Id: arith2.c,v 1.4 2001/12/24 01:08:58 sybalsky Exp $ Copyri #include "medleyfp.h" #include "arith.h" +#include "arith2defs.h" #include "fpdefs.h" #include "mkcelldefs.h" diff --git a/src/ether.c b/src/ether.c index 09aa44f..3b7346a 100644 --- a/src/ether.c +++ b/src/ether.c @@ -67,6 +67,7 @@ static char *id = "$Id: ether.c,v 1.4 2001/12/24 01:09:02 sybalsky Exp $ Copyrig #include "adr68k.h" #include "ether.h" #include "dbprint.h" +#include "etherdefs.h" #ifdef USE_DLPI #define NIOCSETF PFIOCSETF diff --git a/src/hardrtn.c b/src/hardrtn.c index 32c2386..5b82950 100644 --- a/src/hardrtn.c +++ b/src/hardrtn.c @@ -51,7 +51,6 @@ static FX *make_FXcopy(register FX *fx68k) { int nametbl_on_stk = NIL; register DLword *new68k; register Bframe *retbf68k; - extern DLword *freestackblock(DLword n, StackWord * start68k, int align); #ifdef FLIPCURSOR flip_cursorbar(5); diff --git a/src/keytstno.c b/src/keytstno.c index 9927925..73a28fb 100644 --- a/src/keytstno.c +++ b/src/keytstno.c @@ -13,4 +13,7 @@ static char *id = "$Id: keytstno.c,v 1.3 1999/05/31 23:35:36 sybalsky Exp $ Copy #include "version.h" -int keytester(void) { return 0; } +int keytester(void); +int keytester() { + return 0; +} diff --git a/src/setsout.c b/src/setsout.c index b41cc0f..c0d486d 100644 --- a/src/setsout.c +++ b/src/setsout.c @@ -44,6 +44,7 @@ static char *id = "$Id: setsout.c,v 1.3 1999/05/31 23:35:41 sybalsky Exp $ Copyr extern int errno; /* JDS protoize char *valloc(size_t); */ +void set_sysout(int version, char *sysout_file_name); void set_sysout(int version, char *sysout_file_name) { int sysout; /* SysoutFile descriptor */ diff --git a/src/tstsout.c b/src/tstsout.c index 1d39697..4f370c3 100644 --- a/src/tstsout.c +++ b/src/tstsout.c @@ -36,6 +36,7 @@ static char *id = "$Id: tstsout.c,v 1.3 1999/05/31 23:35:44 sybalsky Exp $ Copyr extern int errno; /* JDS protoize char *valloc(size_t); */ +void check_sysout(char *sysout_file_name); void check_sysout(char *sysout_file_name) { int sysout; /* SysoutFile descriptor */