From a490ce57593445f75db3b32b8712cea0ead8ddd0 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 10 Jan 2025 01:30:49 -0800 Subject: [PATCH] remove trailing spaces from src/*.c, include/*.h --- include/hack.h | 3 +-- include/winprocs.h | 13 ++++++------- src/decl.c | 4 ++-- src/dig.c | 4 ++-- src/explode.c | 4 ++-- src/hack.c | 4 ++-- src/music.c | 4 ++-- src/restore.c | 4 ++-- src/shknam.c | 4 ++-- src/sounds.c | 10 +++++----- src/symbols.c | 4 ++-- src/wizcmds.c | 4 ++-- src/worn.c | 4 ++-- 13 files changed, 32 insertions(+), 34 deletions(-) diff --git a/include/hack.h b/include/hack.h index 09e41407e..643075129 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 hack.h $NHDT-Date: 1725653009 2024/09/06 20:03:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.262 $ */ +/* NetHack 3.7 hack.h $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.266 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -347,7 +347,6 @@ enum digcheck_result { DIGCHECK_FAIL_OBJ_POOL_OR_TRAP }; - /* Dismount: causes for why you are no longer riding */ enum dismount_types { diff --git a/include/winprocs.h b/include/winprocs.h index 5e0bc675f..c77288891 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 winprocs.h $NHDT-Date: 1725653017 2024/09/06 20:03:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.81 $ */ +/* NetHack 3.7 winprocs.h $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.83 $ */ /* Copyright (c) David Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,7 +10,7 @@ #include "color.h" #endif -enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses, +enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses, wp_chainin, wp_chainout, wp_safestartup, wp_shim, wp_hup, wp_guistubs, wp_ttystubs, #ifdef OUTDATED_STUFF @@ -124,10 +124,9 @@ extern #define display_file (*windowprocs.win_display_file) #define start_menu (*windowprocs.win_start_menu) #define end_menu (*windowprocs.win_end_menu) -/* 3.7: There are real add_menu() and select_menu - * in the core now. +/* 3.7: There are real add_menu() and select_menu in the core now. * add_menu does some common activities, such as menu_colors. - * select_menu does some before and after activities. + * select_menu does some before and after activities. * add_menu() and select_menu() are in windows.c */ /* #define add_menu (*windowprocs.win_add_menu) */ @@ -185,10 +184,10 @@ extern #define ctrl_nhwindow (*windowprocs.win_ctrl_nhwindow) /* - * + * */ #define WPID(name) #name, wp_##name -#define WPIDMINUS(name) "-" #name, wp_##name +#define WPIDMINUS(name) "-" #name, wp_##name /* * WINCAP diff --git a/src/decl.c b/src/decl.c index 4afe5544a..fe16b2b44 100644 --- a/src/decl.c +++ b/src/decl.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 decl.c $NHDT-Date: 1725138480 2024/08/31 21:08:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.337 $ */ +/* NetHack 3.7 decl.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.341 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1168,7 +1168,7 @@ decl_globals_init(void) gv.valuables[1].size = SIZE(ga.amulets); gv.valuables[2].list = NULL; gv.valuables[2].size = 0; - + #if 0 MAGICCHECK(g_init); #endif diff --git a/src/dig.c b/src/dig.c index 2e028b035..00f2f0422 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 dig.c $NHDT-Date: 1724613307 2024/08/25 19:15:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.219 $ */ +/* NetHack 3.7 dig.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.225 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -898,7 +898,7 @@ dighole(boolean pit_only, boolean by_magic, coord *cc) coordxy dig_x, dig_y; boolean nohole, retval = FALSE; enum digcheck_result dig_check_result; - + if (!cc) { dig_x = u.ux; dig_y = u.uy; diff --git a/src/explode.c b/src/explode.c index 2aff34776..18bf8d53c 100644 --- a/src/explode.c +++ b/src/explode.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 explode.c $NHDT-Date: 1619553210 2021/04/27 19:53:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */ +/* NetHack 3.7 explode.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.122 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -794,7 +794,7 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */ if (cansee(sx, sy)) { pline("%s.", Tobjnam(otmp, "crumble")); } else { - Soundeffect(se_stone_crumbling, 100); + Soundeffect(se_stone_crumbling, 100); You_hear("stone crumbling."); } (void) break_statue(otmp); diff --git a/src/hack.c b/src/hack.c index 14eea831a..c7dcf0c24 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 hack.c $NHDT-Date: 1723410639 2024/08/11 21:10:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.452 $ */ +/* NetHack 3.7 hack.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.477 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -962,7 +962,7 @@ invocation_pos(coordxy x, coordxy y) && x == svi.inv_pos.x && y == svi.inv_pos.y); } -/* return TRUE if (ux+dx,ux+dy) is an OK place to move; +/* return TRUE if (ux+dx,uy+dy) is an OK place to move; mode is one of DO_MOVE, TEST_MOVE, TEST_TRAV, or TEST_TRAP */ boolean test_move( diff --git a/src/music.c b/src/music.c index 82fe8abcc..374b848ab 100644 --- a/src/music.c +++ b/src/music.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 music.c $NHDT-Date: 1702349065 2023/12/12 02:44:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.102 $ */ +/* NetHack 3.7 music.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.120 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -733,7 +733,7 @@ staticfn char * improvised_notes(boolean *same_as_last_time) { static const char notes[7] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' }; - /* target buffer has to be in svc.context, otherwise saving game + /* target buffer has to be in svc.context, otherwise saving game * between improvised recitals would not be able to maintain * the same_as_last_time context. */ diff --git a/src/restore.c b/src/restore.c index fcf31f3fb..b8e0988aa 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 restore.c $NHDT-Date: 1717878585 2024/06/08 20:29:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.228 $ */ +/* NetHack 3.7 restore.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.234 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -578,7 +578,7 @@ restgamestate(NHFILE *nhfp) /* savefile has wizard or explore mode, but player is no longer authorized to access either; can't downgrade mode any further, so fail restoration. */ - u.uhp = 0; + u.uhp = 0; } if (nhfp->structlevel) diff --git a/src/shknam.c b/src/shknam.c index 7bd9f4e21..5aaeefcca 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 shknam.c $NHDT-Date: 1715203028 2024/05/08 21:17:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ */ +/* NetHack 3.7 shknam.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.82 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -201,7 +201,7 @@ static const char *const shkhealthfoods[] = { * *_CLASS enum value) or a specific object enum value. * In the latter case, prepend it with a unary minus so the code can know * (by testing the sign) whether to use mkobj() or mksobj(). - * shtypes[] is externally referenced from mkroom.c, mon.c and shk.c. + * shtypes[] is externally referenced from mkroom.c, mon.c and shk.c. * * The second, usually shorter, store type name is used in automatically * generated annotations for #overview. If Null, the first name gets used. diff --git a/src/sounds.c b/src/sounds.c index 5b7d2baae..ec5d2aae2 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 sounds.c $NHDT-Date: 1674548234 2023/01/24 08:17:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.134 $ */ +/* NetHack 3.7 sounds.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -1230,7 +1230,7 @@ domonnoise(struct monst *mtmp) and without quotation marks */ char tmpbuf[BUFSZ]; pline1(ucase(strcpy(tmpbuf, verbl_msg))); - SetVoice((struct monst *) 0, 0, 80, voice_death); + SetVoice((struct monst *) 0, 0, 80, voice_death); sound_speak(tmpbuf); } else { SetVoice(mtmp, 0, 80, 0); @@ -2169,14 +2169,14 @@ set_voice( if (gv.voice.nameid) free((genericptr_t) gv.voice.nameid); gv.voice.gender = gender; - gv.voice.serialno = mtmp ? mtmp->m_id + gv.voice.serialno = mtmp ? mtmp->m_id : ((moreinfo & voice_talking_artifact) != 0) ? 3 : ((moreinfo & voice_deity) != 0) ? 4 : 2; gv.voice.tone = tone; gv.voice.volume = volume; gv.voice.moreinfo = moreinfo; gv.voice.nameid = (const char *) 0; - gp.pline_flags |= PLINE_SPEECH; + gp.pline_flags |= PLINE_SPEECH; #endif } @@ -2213,7 +2213,7 @@ sound_speak(const char *text SPEECHONLY) *cpdst = '\0'; } (*soundprocs.sound_verbal)(buf, gv.voice.gender, gv.voice.tone, - gv.voice.volume, gv.voice.moreinfo); + gv.voice.volume, gv.voice.moreinfo); } #endif } diff --git a/src/symbols.c b/src/symbols.c index ff352d214..7c32af3e3 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 symbols.c $NHDT-Date: 1711477037 2024/03/26 18:17:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.120 $ */ +/* NetHack 3.7 symbols.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.123 $ */ /* Copyright (c) NetHack Development Team 2020. */ /* NetHack may be freely redistributed. See license for details. */ @@ -371,7 +371,7 @@ symset_is_compatible( * particular types of symset "handling", define a * H_XXX macro in include/sym.h and add the name * to this array at the matching offset. - * Externally referenced from files.c, options.c, utf8map.c. + * Externally referenced from files.c, options.c, utf8map.c. */ const char *const known_handling[] = { "UNKNOWN", /* H_UNK */ diff --git a/src/wizcmds.c b/src/wizcmds.c index a22b6883d..6cee64b36 100644 --- a/src/wizcmds.c +++ b/src/wizcmds.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 wizcmds.c $NHDT-Date: 1735950605 2025/01/03 16:30:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.19 $ */ +/* NetHack 3.7 wizcmds.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.21 $ */ /*-Copyright (c) Robert Patrick Rankin, 2024. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1887,7 +1887,7 @@ wiz_custom(void) if (wizard) { static const char wizcustom[] = "#wizcustom"; winid win; - char buf[BUFSZ], bufa[BUFSZ]; + char buf[BUFSZ], bufa[BUFSZ]; int n; #if 0 int j, glyph; diff --git a/src/worn.c b/src/worn.c index 7e545370c..b7db2d94a 100644 --- a/src/worn.c +++ b/src/worn.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 worn.c $NHDT-Date: 1715109581 2024/05/07 19:19:41 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.109 $ */ +/* NetHack 3.7 worn.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -162,7 +162,7 @@ setnotworn(struct obj *obj) *(wp->w_obj) = (struct obj *) 0; p = objects[obj->otyp].oc_oprop; u.uprops[p].extrinsic = u.uprops[p].extrinsic & ~wp->w_mask; - monstunseesu_prop(p); /* remove this extrinsic from seenres */ + monstunseesu_prop(p); /* remove this extrinsic from seenres */ obj->owornmask &= ~wp->w_mask; if (obj->oartifact) set_artifact_intrinsic(obj, 0, wp->w_mask);