some tabs to spaces

cd src
    grep -P -n '\t' *.c | grep -v "1:"
    cd ../include
    grep -P -n '\t' *.h | grep -v "1:"
    cd ..

side note: win/Qt/*.cpp are full of tabs
This commit is contained in:
nhmall
2022-10-26 14:21:23 -04:00
parent 1cf4f9f7f9
commit 88f6df2d8b
81 changed files with 365 additions and 365 deletions

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 Window.c $NHDT-Date: 1596498371 2020/08/03 23:46:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
@@ -130,40 +130,40 @@ Resize(Widget w)
WindowClassRec windowClassRec = {
{ /* core fields */
/* superclass */ (WidgetClass) &widgetClassRec,
/* class_name */ nhStr("Window"),
/* widget_size */ sizeof(WindowRec),
/* class_initialize */ 0,
/* class_part_initialize */ 0,
/* class_inited */ FALSE,
/* initialize */ 0,
/* initialize_hook */ 0,
/* realize */ XtInheritRealize,
/* actions */ actions,
/* num_actions */ XtNumber(actions),
/* resources */ resources,
/* num_resources */ XtNumber(resources),
/* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE,
/* compress_exposure */ TRUE,
/* compress_enterleave */ TRUE,
/* visible_interest */ FALSE,
/* destroy */ 0,
/* resize */ Resize,
/* expose */ Redisplay,
/* set_values */ 0,
/* set_values_hook */ 0,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ 0,
/* accept_focus */ 0,
/* version */ XtVersion,
/* callback_private */ 0,
/* tm_table */ translations,
/* query_geometry */ XtInheritQueryGeometry,
/* display_accelerator */ XtInheritDisplayAccelerator,
/* extension */ 0 },
/* superclass */ (WidgetClass) &widgetClassRec,
/* class_name */ nhStr("Window"),
/* widget_size */ sizeof(WindowRec),
/* class_initialize */ 0,
/* class_part_initialize */ 0,
/* class_inited */ FALSE,
/* initialize */ 0,
/* initialize_hook */ 0,
/* realize */ XtInheritRealize,
/* actions */ actions,
/* num_actions */ XtNumber(actions),
/* resources */ resources,
/* num_resources */ XtNumber(resources),
/* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE,
/* compress_exposure */ TRUE,
/* compress_enterleave */ TRUE,
/* visible_interest */ FALSE,
/* destroy */ 0,
/* resize */ Resize,
/* expose */ Redisplay,
/* set_values */ 0,
/* set_values_hook */ 0,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ 0,
/* accept_focus */ 0,
/* version */ XtVersion,
/* callback_private */ 0,
/* tm_table */ translations,
/* query_geometry */ XtInheritQueryGeometry,
/* display_accelerator */ XtInheritDisplayAccelerator,
/* extension */ 0 },
{ /* window fields */
/* empty */ 0 }
/* empty */ 0 }
};
WidgetClass windowWidgetClass = (WidgetClass) &windowClassRec;

View File

@@ -7,8 +7,8 @@
* by nethack.
*
* Assumptions:
* + Two dimensional byte arrays are in row order and are not padded
* between rows (x11_colormap[][]).
* + Two dimensional byte arrays are in row order and are not padded
* between rows (x11_colormap[][]).
*/
#include "hack.h" /* for MAX_GLYPH */
#include "tile.h"

View File

@@ -1,11 +1,11 @@
/* NetHack 3.7 winmenu.c $NHDT-Date: 1644531504 2022/02/10 22:18:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
* File for creating menus.
*
* + Global functions: start_menu, add_menu, end_menu, select_menu
* + Global functions: start_menu, add_menu, end_menu, select_menu
*/
#ifndef SYSV

View File

@@ -1,15 +1,15 @@
/* NetHack 3.7 winmesg.c $NHDT-Date: 1596498373 2020/08/03 23:46:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
* Message window routines.
*
* Global functions:
* create_message_window()
* destroy_message_window()
* display_message_window()
* append_message()
* create_message_window()
* destroy_message_window()
* display_message_window()
* append_message()
*/
#ifndef SYSV

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 winstat.c $NHDT-Date: 1649269127 2022/04/06 18:18:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.37 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
@@ -179,7 +179,7 @@ static const char *fancy_status_hilite_colors[] = {
"magenta3",
"dark cyan",
"web gray",
"", /* NO_COLOR */
"", /* NO_COLOR */
"orange",
"green3",
"goldenrod",
@@ -1750,11 +1750,11 @@ apply_hilite_attributes(struct X_status_value *sv, int attributes)
* the other. So only do our update when we update the second line.
*
* Information on the first line:
* name, characteristics, alignment, score
* name, characteristics, alignment, score
*
* Information on the second line:
* dlvl, gold, hp, power, ac, {level & exp or HD **}, time,
* status * (stone, slime, strngl, foodpois, termill,
* dlvl, gold, hp, power, ac, {level & exp or HD **}, time,
* status * (stone, slime, strngl, foodpois, termill,
* hunger, encumbrance, lev, fly, ride,
* blind, deaf, stun, conf, hallu)
*
@@ -1912,8 +1912,8 @@ update_fancy_status_field(int i, int color, int attributes)
/*
* There is a possible infinite loop that occurs with:
*
* impossible->pline->flush_screen->bot->bot{1,2}->
* putstr->adjust_status->update_other->impossible
* impossible->pline->flush_screen->bot->bot{1,2}->
* putstr->adjust_status->update_other->impossible
*
* Break out with this.
*/
@@ -2306,12 +2306,12 @@ static int characteristics_indices[11 - 2] = {
/*
* Produce a form that looks like the following:
*
* title
* title
* location
* col1_indices[0] col2_indices[0] col3_indices[0]
* col1_indices[1] col2_indices[1] col3_indices[1]
* col1_indices[0] col2_indices[0] col3_indices[0]
* col1_indices[1] col2_indices[1] col3_indices[1]
* ... ... ...
* col1_indices[5] col2_indices[5] col3_indices[5]
* col1_indices[5] col2_indices[5] col3_indices[5]
*
* The status conditions are managed separately and appear to the right
* of this form.

View File

@@ -1,11 +1,11 @@
/* NetHack 3.7 wintext.c $NHDT-Date: 1597967808 2020/08/20 23:56:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
* File for dealing with text windows.
*
* + No global functions.
* + No global functions.
*/
#ifndef SYSV
@@ -194,7 +194,7 @@ display_text_window(struct xwindow *wp, boolean blocking)
if (width > (Dimension) XtScreen(wp->w)->width) { /* too wide for screen */
/* Back off some amount - we really need to back off the scrollbar */
/* width plus some extra. */
/* width plus some extra. */
width = XtScreen(wp->w)->width - 20;
}
XtSetArg(args[num_args], XtNstring, text_info->text.text);

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 winval.c $NHDT-Date: 1611697183 2021/01/26 21:39:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
/* Copyright (c) Dean Luick, 1992 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
@@ -149,7 +149,7 @@ get_value_width(Widget w)
}
/* Swap foreground and background colors (this is the best I can do with */
/* a label widget, unless I can get some init hook in there). */
/* a label widget, unless I can get some init hook in there). */
void
hilight_value(Widget w)
{

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 wc_chainin.c $NHDT-Date: 1596498323 2020/08/03 23:45:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Kenneth Lorber, 2012 */
/* Copyright (c) Kenneth Lorber, 2012 */
/* NetHack may be freely redistributed. See license for details. */
/* -chainin is an internal processor that changes the flow from window_procs
@@ -559,10 +559,10 @@ chainin_status_enablefield(
}
void chainin_status_update(
int idx,
genericptr_t ptr,
int chg, int percent, int color,
unsigned long *colormasks)
int idx,
genericptr_t ptr,
int chg, int percent, int color,
unsigned long *colormasks)
{
(*cibase->nprocs->win_status_update)(cibase->ndata, idx, ptr, chg,
percent, color, colormasks);

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 wc_chainout.c $NHDT-Date: 1596498324 2020/08/03 23:45:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) Kenneth Lorber, 2012 */
/* Copyright (c) Kenneth Lorber, 2012 */
/* NetHack may be freely redistributed. See license for details. */
/* -chainout is an internal processor that changes the flow from chain_procs

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 wc_trace.c $NHDT-Date: 1596498324 2020/08/03 23:45:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */
/* Copyright (c) Kenneth Lorber, 2012 */
/* Copyright (c) Kenneth Lorber, 2012 */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
@@ -50,8 +50,8 @@ void trace_putmixed(void *,winid, int, const char *);
void trace_display_file(void *,const char *, boolean);
void trace_start_menu(void *,winid, unsigned long);
void trace_add_menu(void *,winid, const glyph_info *, const ANY_P *,
char, char, int, int,
const char *, unsigned int);
char, char, int, int,
const char *, unsigned int);
void trace_end_menu(void *,winid, const char *);
int trace_select_menu(void *,winid, int, MENU_ITEM_P **);
char trace_message_menu(void *,char, int, const char *);
@@ -65,7 +65,7 @@ void trace_cliparound(void *,int, int);
void trace_update_positionbar(void *,char *);
#endif
void trace_print_glyph(void *,winid, coordxy, coordxy,
const glyph_info *, const glyph_info *);
const glyph_info *, const glyph_info *);
void trace_raw_print(void *,const char *);
void trace_raw_print_bold(void *,const char *);
int trace_nhgetch(void *);
@@ -96,9 +96,9 @@ void trace_putmsghistory(void *,const char *, boolean);
void trace_status_init(void *);
void trace_status_finish(void *);
void trace_status_enablefield(void *,int, const char *, const char *,
boolean);
boolean);
void trace_status_update(void *,int, genericptr_t, int, int, int,
unsigned long *);
unsigned long *);
boolean trace_can_suspend(void *);

View File

@@ -298,8 +298,8 @@ draw_horizontal(boolean border)
#endif
int i, j, number_of_lines,
cap_and_hunger, exp_points, sho_score,
/* both height and width get their values set,
* but only width gets used in this function */
/* both height and width get their values set,
* but only width gets used in this function */
height UNUSED, width, w, xtra, clen, x, y, t, ex, ey,
condstart = 0, conddummy = 0;
#ifdef STATUS_HILITES

View File

@@ -5,8 +5,8 @@
/*
* Edit History:
*
* Initial Creation M.Allison 1994/01/11
* 256 colour bmp and statue support M.Allison 2015/04/19
* Initial Creation M.Allison 1994/01/11
* 256 colour bmp and statue support M.Allison 2015/04/19
*
*/
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
initflag = 1;
}
set_grayscale(pass == 3);
/* printf("Colormap initialized\n"); */
/* printf("Colormap initialized\n"); */
while (read_text_tile(tilepixels)) {
build_bmptile(tilepixels);
tilecount++;

View File

@@ -242,8 +242,8 @@ xwaitforspace(register const char *s) /* chars allowed besides return */
* Return TRUE if we've extended the string at base. Otherwise return FALSE.
* Assumptions:
*
* + we don't change the characters that are already in base
* + base has enough room to hold our string
* + we don't change the characters that are already in base
* + base has enough room to hold our string
*/
static boolean
ext_cmd_getlin_hook(char *base)

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhaskyn.c $NHDT-Date: 1596498346 2020/08/03 23:45:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include <assert.h>

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhdlg.c $NHDT-Date: 1596498347 2020/08/03 23:45:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
/* various dialog boxes are defined here */

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhfont.c $NHDT-Date: 1596498349 2020/08/03 23:45:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.29 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
/* font management and such */

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhinput.c $NHDT-Date: 1596498350 2020/08/03 23:45:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include <assert.h>

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhmain.c $NHDT-Date: 1596498352 2020/08/03 23:45:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include "winMS.h"
@@ -766,8 +766,8 @@ VOID CALLBACK FuzzTimerProc(
BOOL gen_alt = (rn2(50) == 0) && isalpha(c);
if (!iflags.debug_fuzzer) {
KillTimer(hwnd, IDT_FUZZ_TIMER);
return;
KillTimer(hwnd, IDT_FUZZ_TIMER);
return;
}
if (!GetFocus())
@@ -775,17 +775,17 @@ VOID CALLBACK FuzzTimerProc(
ZeroMemory(input, sizeof(input));
if (gen_alt) {
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++;
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++;
}
if (HIBYTE(k) & 1) {
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++;
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++;
}
input[i_pos].type = INPUT_KEYBOARD;
@@ -794,16 +794,16 @@ VOID CALLBACK FuzzTimerProc(
i_pos++;
if (HIBYTE(k) & 1) {
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++;
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++;
}
if (gen_alt) {
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++;
input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++;
}
SendInput(i_pos, input, sizeof(input[0]));
}

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhmsgwnd.c $NHDT-Date: 1596498357 2020/08/03 23:45:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.40 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include "winMS.h"

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhrip.c $NHDT-Date: 1596498358 2020/08/03 23:45:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include "win10.h"

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhsplash.c $NHDT-Date: 1596498360 2020/08/03 23:46:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include "win10.h"

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhstatus.c $NHDT-Date: 1596498360 2020/08/03 23:46:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.35 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include <assert.h>

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mhtext.c $NHDT-Date: 1596498362 2020/08/03 23:46:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.31 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
#include "winMS.h"

View File

@@ -1,5 +1,5 @@
/* NetHack 3.7 mswproc.c $NHDT-Date: 1613292828 2021/02/14 08:53:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
/*