diff --git a/include/config.h b/include/config.h index f14273810..7069b268d 100644 --- a/include/config.h +++ b/include/config.h @@ -273,7 +273,7 @@ # endif # ifdef __linux__ # define PANICTRACE -# ifndef NOSTATICFN // may be defined on command line +# ifndef NOSTATICFN // may be defined on command line # define NOSTATICFN # endif # endif diff --git a/src/bones.c b/src/bones.c index 922737fe1..5afb0cbcd 100644 --- a/src/bones.c +++ b/src/bones.c @@ -614,7 +614,7 @@ savebones(int how, time_t when, struct obj *corpse) /* if a bones pool digit is in use, it precedes the bonesid string and isn't recorded in the file */ Sfo_char(nhfp, &c, "bones_count", 1); - Sfo_char(nhfp, bonesid, "bonesid", (int) c); /* DD.nnn */ + Sfo_char(nhfp, bonesid, "bonesid", (int) c); /* DD.nnn */ savefruitchn(nhfp); update_mlstmv(); /* update monsters for eventual restoration */ savelev(nhfp, ledger_no(&u.uz)); diff --git a/src/files.c b/src/files.c index ab4ba9ed8..c984c673e 100644 --- a/src/files.c +++ b/src/files.c @@ -2106,7 +2106,7 @@ make_converted_name(const char *filename) #endif /* UNIX || WIN32 */ if (dir) { finaldirchar = c_eos(dir); - finaldirchar--; + finaldirchar--; if (!(*finaldirchar == '/' || *finaldirchar == '\\' || *finaldirchar == ':')) { needsep = TRUE; diff --git a/src/restore.c b/src/restore.c index bf2376c4e..59bc231ad 100644 --- a/src/restore.c +++ b/src/restore.c @@ -860,7 +860,7 @@ dorecover(NHFILE *nhfp) restoreinfo.mread_flags = 1; /* return despite error */ while (1) { Sfi_xint8(nhfp, <mp, "gamestate-level_number"); - if (nhfp->eof) + if (nhfp->eof) break; getlev(nhfp, 0, ltmp); #ifdef MICRO diff --git a/src/save.c b/src/save.c index 9dc8a3f7b..57c8bfb41 100644 --- a/src/save.c +++ b/src/save.c @@ -54,7 +54,7 @@ dosave(void) program_state.done_hup = 0; #endif if (dosave0()) { - program_state.savefile_completed++; + program_state.savefile_completed++; u.uhp = -1; /* universal game's over indicator */ if (soundprocs.sound_exit_nhsound) (*soundprocs.sound_exit_nhsound)("dosave"); @@ -564,7 +564,7 @@ savelevl(NHFILE *nhfp) for (x = 0; x < COLNO; x++) { for (y = 0; y < ROWNO; y++) { Sfo_rm(nhfp, &levl[x][y], "location-rm"); - } + } } return; } diff --git a/src/sfstruct.c b/src/sfstruct.c index c62b46405..6014d97b2 100644 --- a/src/sfstruct.c +++ b/src/sfstruct.c @@ -506,7 +506,7 @@ bwrite(int fd, const genericptr_t loc, unsigned num) fprintf(ofp[fd], "%08ld, %08ld, %d\n", ocnt, ftell(ofp[fd]), num); ocnt++; - } + } } #endif @@ -559,7 +559,7 @@ mread(int fd, genericptr_t buf, unsigned len) fprintf(ifp[fd], "%08ld, %08ld, %d\n", icnt, ftell(ifp[fd]), (int) len); icnt++; - } + } } #endif diff --git a/sys/msdos/vidtxt.c b/sys/msdos/vidtxt.c index 680f23e3c..990d6d064 100644 --- a/sys/msdos/vidtxt.c +++ b/sys/msdos/vidtxt.c @@ -40,10 +40,10 @@ extern int attrib_gr_intense; /* graphics mode intense attribute */ #if defined(SCREEN_BIOS) && !defined(PC9800) static unsigned char cursor_info = 0, - cursor_start_scanline = 6, cursor_end_scanline = 7; + cursor_start_scanline = 6, cursor_end_scanline = 7; static void get_cursinfo(unsigned char *start, unsigned char *end, - unsigned char *flg); + unsigned char *flg); #endif void @@ -414,8 +414,8 @@ void txt_get_cursor(int *x, int *y) *y = regs.h.dh; if (!cursor_info) { cursor_start_scanline = regs.h.ch; - cursor_end_scanline = regs.h.cl; - cursor_info = 1; + cursor_end_scanline = regs.h.cl; + cursor_info = 1; } } @@ -464,7 +464,7 @@ get_cursinfo(uchar *start, uchar *end, uchar *flg) *end = regs.h.cl; } else { *start = 6; - *end = 7; + *end = 7; } *flg = 1; } diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 06bc853e6..e74cfc8c5 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -707,10 +707,10 @@ early_options(int *argc_p, char ***argv_p, char **hackdir_p) break; case 's': if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { - gd.deferred_showpaths = TRUE; - gd.deferred_showpaths_dir = *hackdir_p; + gd.deferred_showpaths = TRUE; + gd.deferred_showpaths_dir = *hackdir_p; config_error_done(); - return; + return; } /* check for "-s" request to show scores */ if (lopt(arg, ((ArgValDisallowed | ArgErrComplain) diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 25c40b842..7b52691ea 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -82,7 +82,7 @@ main(int argc, char *argv[]) if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { gd.deferred_showpaths = TRUE; return; - } + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; diff --git a/util/dlb_main.c b/util/dlb_main.c index 27310b303..1926b871d 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -67,14 +67,14 @@ static char origdir[255] = ""; * * dlb COMMANDoptions arg... files... * commands: - * dlb x extract all files - * dlb c build the archive - * dlb t list the archive + * dlb x extract all files + * dlb c build the archive + * dlb t list the archive * options: - * v verbose - * f file specify archive file (default DLBFILE) - * I file specify file for list of files (default LIBLISTFILE) - * C dir chdir to dir (used ONCE, not like tar's -C) + * v verbose + * f file specify archive file (default DLBFILE) + * I file specify file for list of files (default LIBLISTFILE) + * C dir chdir to dir (used ONCE, not like tar's -C) */ ATTRNORETURN static void diff --git a/util/recover.c b/util/recover.c index f43d1132c..508263675 100644 --- a/util/recover.c +++ b/util/recover.c @@ -1,5 +1,5 @@ /* NetHack 3.7 recover.c $NHDT-Date: 1687547437 2023/06/23 19:10:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.33 $ */ -/* Copyright (c) Janet Walz, 1992. */ +/* Copyright (c) Janet Walz, 1992. */ /* NetHack may be freely redistributed. See license for details. */ /* diff --git a/util/sfctool.c b/util/sfctool.c index d1ecaaceb..8bfc3ccde 100644 --- a/util/sfctool.c +++ b/util/sfctool.c @@ -1,5 +1,5 @@ /* NetHack 3.7 sfctool.c */ -/* Copyright (c) Michael Allison, 2025. */ +/* Copyright (c) Michael Allison, 2025. */ /* NetHack may be freely redistributed. See license for details. */ /* @@ -318,18 +318,18 @@ process_savefile(const char *srcfnam, enum saveformats srcstyle, cscbuf[5]); /* ptr */ if (sfstatus > SF_UPTODATE && ((sfstatus <= SF_CRITICAL_BYTE_COUNT_MISMATCH) || !unconvert)) { - if (sfstatus == SF_OUTDATED) { + if (sfstatus == SF_OUTDATED) { fprintf(stderr, "The %s savefile is outdated with respect to this %d.%d.%d EDITLEVEL %ld " - "%s%s%s.\n", + "%s%s%s.\n", briefname(srcfnam), - VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, - (long) EDITLEVEL, + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, + (long) EDITLEVEL, thisdatamodel ? thisdatamodel : "", thisdatamodel ? " " : "", - "sfctool"); + "sfctool"); return 0; - } else { + } else { fprintf(stderr, "The %s savefile %s%s%s not compatible with this %s%s %s utility.\n", briefname(srcfnam), @@ -338,9 +338,9 @@ process_savefile(const char *srcfnam, enum saveformats srcstyle, dmfile ? " savefile, thus" : " is", thisdatamodel ? thisdatamodel : "", thisdatamodel ? " " : "", - "sfctool"); + "sfctool"); return 0; - } + } } if (sfstatus >= SF_DM_IL32LLP64_ON_ILP32LL64) { renidx = sfstatus - SF_DM_IL32LLP64_ON_ILP32LL64; diff --git a/util/sftags.c b/util/sftags.c index 5f055a60e..3a04cb94d 100644 --- a/util/sftags.c +++ b/util/sftags.c @@ -1,9 +1,9 @@ /* NetHack 3.6 sftags.c $Date$ $Revision$ */ -/* Copyright (c) Michael Allison, 2025 */ +/* Copyright (c) Michael Allison, 2025 */ /* NetHack may be freely redistributed. See license for details. */ /* - * Read the given ctags file and generate: + * Read the given ctags file and generate: * Intermediate temp files: * include/sfo_proto.tmp * include/sfi_proto.tmp @@ -45,12 +45,12 @@ #endif #endif -#define NHTYPE_SIMPLE 1 -#define NHTYPE_COMPLEX 2 +#define NHTYPE_SIMPLE 1 +#define NHTYPE_COMPLEX 2 struct nhdatatypes_t { - uint dtclass; - char *dtype; - size_t dtsize; + uint dtclass; + char *dtype; + size_t dtsize; }; struct tagstruct { @@ -867,7 +867,7 @@ findtype(char *st, char *tag) /* comma or semicolon immediately following tag */ else { volatile int y = 0; - nhUse(y); + nhUse(y); y = 1; } if (strncmpi(ftbuf, "struct ", 7) == 0) diff --git a/util/stripbs.c b/util/stripbs.c index fbe8316c6..15d319566 100644 --- a/util/stripbs.c +++ b/util/stripbs.c @@ -28,16 +28,16 @@ int main(int argc UNUSED, char *argv[] UNUSED) while (!stop) { if ((fread(buf, 1, 1, stdin)) > 0) { if (*cp == 8) { - *prev = 0; - } else { - if (*prev) + *prev = 0; + } else { + if (*prev) fputc(*prev, stdout); - *prev = *cp; - } + *prev = *cp; + } } else { - if (errno != EOF) + if (errno != EOF) trouble = 1; - if (*prev) + if (*prev) fputc(*prev, stdout); stop = 1; } diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 326f7999b..77d1013f6 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -622,7 +622,7 @@ curses_putmixed(winid window, int attr, const char *str) /* now send buf to the normal putstr */ curses_putstr(window, attr, buf); done_output = TRUE; - } + } } if (!done_output) { @@ -824,11 +824,11 @@ curses_ctrl_nhwindow( case request_settings: break; case set_menu_promptstyle: - curses_menu_promptstyle.color = wri->fromcore.menu_promptstyle.color; + curses_menu_promptstyle.color = wri->fromcore.menu_promptstyle.color; if (curses_menu_promptstyle.color == NO_COLOR) curses_menu_promptstyle.color = NONE; - attr = wri->fromcore.menu_promptstyle.attr; - curses_menu_promptstyle.attr = curses_convert_attr(attr);; + attr = wri->fromcore.menu_promptstyle.attr; + curses_menu_promptstyle.attr = curses_convert_attr(attr);; break; default: break; diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index a3f46c39d..d5e6b116e 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -764,7 +764,7 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) msg_data->buffer[index++] = '\r'; msg_data->buffer[index++] = '\n'; } - nhUse(mgch); + nhUse(mgch); } break; #ifdef ENHANCED_SYMBOLS diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 5c5ef6328..5609bab89 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -259,7 +259,7 @@ NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) DrawText(hdc, VersionString, strlen(VersionString), &rt, DT_LEFT | DT_NOPREFIX); EndPaint(hWnd, &ps); - nhUse(OldFont); + nhUse(OldFont); } break; case WM_COMMAND: diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 8f5c4cc45..06464c6de 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -379,8 +379,8 @@ prompt_for_player_selection(void) * bottom of the window. */ /* tty_clear_nhwindow(BASE_WINDOW) */ - ; - } + ; + } if (pick4u != 'y' && pick4u != 'n') { give_up: /* Quit */ if (selected)