From: David Griffith Date: Sun, 30 Apr 2023 23:52:46 +0000 (-0700) Subject: Marked functions in src/sdl/ taking no parameters with the void parameter. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=caeca3ce55244175d40c0f6d16bf6c0f3f18412e;p=liskon_frotz.git Marked functions in src/sdl/ taking no parameters with the void parameter. --- diff --git a/src/sdl/generic.c b/src/sdl/generic.c index 01ef498..18e2cc5 100644 --- a/src/sdl/generic.c +++ b/src/sdl/generic.c @@ -369,7 +369,7 @@ void gen_add_to_history(zchar * str) /** * Reset the view to the end of history. */ -void gen_history_reset() +void gen_history_reset(void) { history_view = history_next; } /* gen_history_reset */ diff --git a/src/sdl/sf_fonts.c b/src/sdl/sf_fonts.c index 1d08e4c..f5c5ef4 100644 --- a/src/sdl/sf_fonts.c +++ b/src/sdl/sf_fonts.c @@ -483,7 +483,7 @@ static void setfontk(int k, SFONT * f) } -static void cleanfonts() +static void cleanfonts(void) { int i; for (i = 0; i < 8; i++) @@ -493,13 +493,13 @@ static void cleanfonts() } -SF_textsetting *sf_curtextsetting() +SF_textsetting *sf_curtextsetting(void) { return ¤t; } -void sf_pushtextsettings() +void sf_pushtextsettings(void) { if (tsstackptr < MAXSTACK) { tsstack[tsstackptr] = current; @@ -508,7 +508,7 @@ void sf_pushtextsettings() } -void sf_poptextsettings() +void sf_poptextsettings(void) { if (tsstackptr) { tsstackptr--; @@ -868,7 +868,7 @@ SFONT *sf_VGA_SFONT; /* ensure a font loaded */ -void sf_initfonts() +void sf_initfonts(void) { int i, j, size = 0; zbyte *cfont, *bmp; diff --git a/src/sdl/sf_frotz.h b/src/sdl/sf_frotz.h index d29139c..5ace234 100644 --- a/src/sdl/sf_frotz.h +++ b/src/sdl/sf_frotz.h @@ -130,7 +130,7 @@ void sf_setgamma(double gamma); /* get pointer from cache */ sf_picture *sf_getpic(int num); -void sf_flushtext(); +void sf_flushtext(void); /* glyph */ typedef struct { @@ -185,7 +185,7 @@ int sf_GetProfileInt(const char *sect, const char *id, int def); double sf_GetProfileDouble(const char *sect, const char *id, double def); char *sf_GetProfileString(const char *sect, const char *id, char *def); -void sf_readsettings(); +void sf_readsettings(void); zlong sf_GetColour(int colour); zlong sf_GetDefaultColour(bool fore); diff --git a/src/sdl/sf_ftype.c b/src/sdl/sf_ftype.c index 4ed6032..9414fad 100644 --- a/src/sdl/sf_ftype.c +++ b/src/sdl/sf_ftype.c @@ -130,7 +130,7 @@ static int hasglyph(SFONT * fo, zword c, int allowdef) static int inited = 0, initerr = 0; static FT_Library library; -static void libfinish() +static void libfinish(void) { if (!inited) return; @@ -139,7 +139,7 @@ static void libfinish() } /* libfinish */ -static void libinit() +static void libinit(void) { if (initerr) return; @@ -340,7 +340,7 @@ SFONT *sf_loadftype(char *fspec, SFONT * like, int *err) /****************************************/ -void sf_initloader() +void sf_initloader(void) { ttfontloader = sf_loadftype; } /* sf_initloader */ diff --git a/src/sdl/sf_images.c b/src/sdl/sf_images.c index 819a2e0..3650738 100644 --- a/src/sdl/sf_images.c +++ b/src/sdl/sf_images.c @@ -422,7 +422,7 @@ static int sf_loadpic(int picture, sf_picture * graphic) static sf_picture cached[MAXCACHE]; static int cacheinited = 0; -static void cacheflush() +static void cacheflush(void) { int i; if (!cacheinited) @@ -437,7 +437,7 @@ static void cacheflush() } /* cacheflush */ -static void cacheinit() +static void cacheinit(void) { int i; if (cacheinited) diff --git a/src/sdl/sf_osfdlg.c b/src/sdl/sf_osfdlg.c index 6b10af1..82f80dc 100644 --- a/src/sdl/sf_osfdlg.c +++ b/src/sdl/sf_osfdlg.c @@ -55,13 +55,13 @@ static int X, Y, W, H, xdlg, ydlg, wdlg, hdlg; #define HTEXT 18 STATIC void cleanlist(ENTRY * t); -STATIC void drawlist(); +STATIC void drawlist(void); STATIC ENTRY *dodir(char *dirname, char *pattern, char *resdir, int size, int *ndirs, int *ntot); static int Numdirs, Numtot, First; static ENTRY *curdir = NULL, *selected; -STATIC void updatelist() +STATIC void updatelist(void) { if (curdir) cleanlist(curdir); @@ -72,10 +72,10 @@ STATIC void updatelist() drawlist(); } /* updatelist */ -STATIC void goright(); -STATIC void goleft(); +STATIC void goright(void); +STATIC void goleft(void); /* assumes a / at end */ -STATIC void goup() +STATIC void goup(void) { char *p; if (strlen(lastdir) < 2) @@ -929,7 +929,7 @@ STATIC void drawnames(int x, int y, int w, int h, ENTRY * files, int first, } /* drawnames */ -STATIC void drawlist() +STATIC void drawlist(void) { BAREA *a = bareas + A_list, *b = bareas + A_dir; @@ -941,7 +941,7 @@ STATIC void drawlist() } /* drawlist */ -STATIC void goright() +STATIC void goright(void) { if (First + Nrows * Ncols > Numtot) return; @@ -950,7 +950,7 @@ STATIC void goright() } /* goright */ -STATIC void goleft() +STATIC void goleft(void) { if (!First) return; diff --git a/src/sdl/sf_resource.c b/src/sdl/sf_resource.c index 211ae7f..4927192 100644 --- a/src/sdl/sf_resource.c +++ b/src/sdl/sf_resource.c @@ -85,7 +85,7 @@ bool m_adaptiveMode = FALSE; bb_resolution_t *reso; -static void checkwidths() +static void checkwidths(void) { reso = bb_get_resolution(blorb_map); if (reso) { @@ -217,7 +217,7 @@ FILE *os_path_open(const char *name, const char *mode) return fp; } return NULL; /* give up */ -} /* os_path_open() */ +} /* os_path_open */ /* @@ -366,7 +366,7 @@ void os_restart_game(int stage) #define DEFAULT_GAMMA 2.2 double m_gamma = DEFAULT_GAMMA; -void sf_initcolours() +void sf_initcolours(void) { int i; @@ -802,7 +802,7 @@ void os_fatal(const char *s, ...) /* If true, running one of Infocom's V6 games */ -bool sf_IsInfocomV6() +bool sf_IsInfocomV6(void) { switch (story_id) { case ARTHUR: @@ -1005,7 +1005,7 @@ static void cleanLLENTRY(LLENTRY * e) } /* cleanLLENTRY */ -static void cleanlocallist() +static void cleanlocallist(void) { cleanLLENTRY(Lpics); Lpics = NULL; diff --git a/src/sdl/sf_sig.c b/src/sdl/sf_sig.c index a41cde2..f33ac19 100644 --- a/src/sdl/sf_sig.c +++ b/src/sdl/sf_sig.c @@ -30,7 +30,7 @@ #ifdef WIN32 -static void resethandlers() +static void resethandlers(void) { signal(SIGINT, SIG_DFL); signal(SIGFPE, SIG_DFL); @@ -60,7 +60,7 @@ static void myhandler(int s) } /* myhandler */ -void sf_installhandlers() +void sf_installhandlers(void) { signal(SIGINT, myhandler); signal(SIGFPE, myhandler); @@ -150,7 +150,7 @@ static void bt_sighandler(int sig, siginfo_t * info, void *secret) } /* bt_sighandler */ -void sf_installhandlers() +void sf_installhandlers(void) { /* Install our signal handler */ diff --git a/src/sdl/sf_sound.c b/src/sdl/sf_sound.c index dc3e9cc..5316bd1 100644 --- a/src/sdl/sf_sound.c +++ b/src/sdl/sf_sound.c @@ -73,7 +73,7 @@ static int audio_buffers = 512; static Uint16 audio_format; static int bits; -static void finishaudio() +static void finishaudio(void) { if (!SFaudiorunning) return; @@ -100,12 +100,12 @@ static void channel_finished(int channel); * whether sound is desired and has no means for indicating whether sound is * available. See sf_initsound for the real init. */ -void os_init_sound() +void os_init_sound(void) { } /* os_init_sound */ -int sf_initsound() +int sf_initsound(void) { if (SFaudiorunning) return 1; @@ -186,7 +186,7 @@ static void channel_finished(int channel) } /* channel_finished */ -static void stopsample() +static void stopsample(void) { if (!e_sfx) return; @@ -198,7 +198,7 @@ static void stopsample() } /* stopsample */ -static void stopmodule() +static void stopmodule(void) { if (!e_mod) return; @@ -208,7 +208,7 @@ static void stopmodule() } /* stopmodule */ -static void startsample() +static void startsample(void) { if (!e_sfx) return; @@ -218,7 +218,7 @@ static void startsample() } /* startsample */ -static void startmodule() +static void startmodule(void) { if (!e_mod) return; @@ -436,7 +436,7 @@ void os_stop_sample(int number) } /* os_stop_sample */ -void sf_checksound() +void sf_checksound(void) { if ((e_sfx) && (e_sfx->ended)) { e_sfx->ended = 0; diff --git a/src/sdl/sf_util.c b/src/sdl/sf_util.c index 33849fd..068cda2 100644 --- a/src/sdl/sf_util.c +++ b/src/sdl/sf_util.c @@ -75,7 +75,7 @@ void sf_regcleanfunc(void *f, const char *p) } /* sf_regcleanfunc */ -void sf_cleanup_all() +void sf_cleanup_all(void) { while (cflist) { cfrec *n = cflist->next; @@ -840,7 +840,7 @@ static int dialog_read_file_name(char *file_name, const char *default_name, static char *rc = NULL; -void sf_FinishProfile() +void sf_FinishProfile(void) { if (!rc) return; diff --git a/src/sdl/sf_video.c b/src/sdl/sf_video.c index ea60698..886be8e 100644 --- a/src/sdl/sf_video.c +++ b/src/sdl/sf_video.c @@ -42,7 +42,7 @@ int m_timerinterval = 100; extern bool sdl_active; -static void sf_quitconf(); +static void sf_quitconf(void); static bool ApplyPalette(sf_picture *); static zlong screen_palette[16]; @@ -91,7 +91,7 @@ static int mywcslen(zchar * b) } /* mywcslen */ -static void myGrefresh() +static void myGrefresh(void) { SDL_RenderClear(renderer); SDL_RenderCopy(renderer, texture, NULL, NULL); @@ -329,7 +329,7 @@ void sf_rect(zlong color, int x, int y, int w, int h) } /* sf_rect */ -void sf_flushtext() +void sf_flushtext(void) { SF_textsetting *ts = sf_curtextsetting(); ts->cx += ts->oh; @@ -410,7 +410,7 @@ static void scroll(int x, int y, int w, int h, int n) * Update the display if contents have changed. * Return whether contents had changed, i.e., display was updated. */ -bool sf_flushdisplay() +bool sf_flushdisplay(void) { if (dirty) { SDL_UpdateTexture(texture, NULL, sbuffer, @@ -469,7 +469,7 @@ static Uint32 SDLCALL mytimer(Uint32 inter, void *parm) } /* mytimer */ -static void cleanvideo() +static void cleanvideo(void) { if (timerid) SDL_RemoveTimer(timerid); @@ -480,7 +480,7 @@ static void cleanvideo() #define GM 0x00ff00 #define BM 0xff0000 -static void sf_toggle_fullscreen() +static void sf_toggle_fullscreen(void) { if (SDL_SetWindowFullscreen (window, isfullscreen ? 0 : SDL_WINDOW_FULLSCREEN_DESKTOP)) @@ -1332,7 +1332,7 @@ void sf_videodata(zlong ** sb, int *sp, int *ew, int *eh) extern zword sf_yesnooverlay(int xc, int yc, char *t, int sr); -static void sf_quitconf() +static void sf_quitconf(void) { if (sf_yesnooverlay(ewidth / 2, eheight / 2, "Quit: are you sure?", 1) == ZC_RETURN) { @@ -1344,7 +1344,7 @@ static void sf_quitconf() } /* sf_quitconf */ -void os_tick() +void os_tick(void) { sf_checksound(); if (SDL_AtomicSet(&SFticked, 0)) {