replace leading tabs in several more files
This commit is contained in:
@@ -3548,7 +3548,7 @@ tty_print_glyph(winid window, xchar x, xchar y,
|
||||
ttyDisplay->color = color;
|
||||
if (color != NO_COLOR)
|
||||
term_start_color(color);
|
||||
}
|
||||
}
|
||||
#endif /* TEXTCOLOR */
|
||||
} /* iflags.use_color aka iflags.wc_color */
|
||||
|
||||
|
||||
@@ -750,59 +750,59 @@ mswin_layout_main_window(HWND changed_child)
|
||||
}
|
||||
|
||||
VOID CALLBACK FuzzTimerProc(
|
||||
_In_ HWND hwnd,
|
||||
_In_ UINT uMsg,
|
||||
_In_ UINT_PTR idEvent,
|
||||
_In_ DWORD dwTime
|
||||
)
|
||||
_In_ HWND hwnd,
|
||||
_In_ UINT uMsg,
|
||||
_In_ UINT_PTR idEvent,
|
||||
_In_ DWORD dwTime
|
||||
)
|
||||
{
|
||||
INPUT input[16];
|
||||
int i_pos = 0;
|
||||
int c = randomkey();
|
||||
SHORT k = VkKeyScanA(c);
|
||||
BOOL gen_alt = (rn2(50) == 0) && isalpha(c);
|
||||
INPUT input[16];
|
||||
int i_pos = 0;
|
||||
int c = randomkey();
|
||||
SHORT k = VkKeyScanA(c);
|
||||
BOOL gen_alt = (rn2(50) == 0) && isalpha(c);
|
||||
|
||||
if (!iflags.debug_fuzzer) {
|
||||
KillTimer(hwnd, IDT_FUZZ_TIMER);
|
||||
return;
|
||||
}
|
||||
if (!iflags.debug_fuzzer) {
|
||||
KillTimer(hwnd, IDT_FUZZ_TIMER);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetFocus())
|
||||
if (!GetFocus())
|
||||
return;
|
||||
|
||||
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++;
|
||||
}
|
||||
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++;
|
||||
}
|
||||
|
||||
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++;
|
||||
}
|
||||
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(LOBYTE(k), 0);
|
||||
i_pos++;
|
||||
input[i_pos].type = INPUT_KEYBOARD;
|
||||
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
|
||||
input[i_pos].ki.wScan = MapVirtualKey(LOBYTE(k), 0);
|
||||
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++;
|
||||
}
|
||||
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++;
|
||||
}
|
||||
SendInput(i_pos, input, sizeof(input[0]));
|
||||
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++;
|
||||
}
|
||||
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++;
|
||||
}
|
||||
SendInput(i_pos, input, sizeof(input[0]));
|
||||
}
|
||||
|
||||
LRESULT
|
||||
|
||||
@@ -756,11 +756,11 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
} break;
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
|
||||
} /* end switch(wParam) */
|
||||
} /* end switch(wParam) */
|
||||
}
|
||||
|
||||
/* on WM_CREATE */
|
||||
|
||||
@@ -625,7 +625,7 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
data->menui.menu.items[new_item].attr = msg_data->attr;
|
||||
strncpy(data->menui.menu.items[new_item].str, msg_data->str,
|
||||
NHMENU_STR_SIZE);
|
||||
/* prevent & being interpreted as a mnemonic start */
|
||||
/* prevent & being interpreted as a mnemonic start */
|
||||
strNsubst(data->menui.menu.items[new_item].str, "&", "&&", 0);
|
||||
data->menui.menu.items[new_item].presel = msg_data->presel;
|
||||
data->menui.menu.items[new_item].itemflags = msg_data->itemflags;
|
||||
@@ -690,10 +690,10 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
} break;
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT: {
|
||||
PostMessage(GetMenuControl(hWnd),
|
||||
WM_MSNH_COMMAND, MSNH_MSG_RANDOM_INPUT, 0);
|
||||
} break;
|
||||
case MSNH_MSG_RANDOM_INPUT: {
|
||||
PostMessage(GetMenuControl(hWnd),
|
||||
WM_MSNH_COMMAND, MSNH_MSG_RANDOM_INPUT, 0);
|
||||
} break;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -915,10 +915,10 @@ GetMenuControl(HWND hWnd)
|
||||
|
||||
data = (PNHMenuWindow) GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
|
||||
/* We may continue getting window messages after a window's WM_DESTROY is
|
||||
called. We need to handle the case that USERDATA has been freed. */
|
||||
if (data == NULL)
|
||||
return NULL;
|
||||
/* We may continue getting window messages after a window's WM_DESTROY is
|
||||
called. We need to handle the case that USERDATA has been freed. */
|
||||
if (data == NULL)
|
||||
return NULL;
|
||||
|
||||
if (data->type == MENU_TYPE_TEXT) {
|
||||
return GetDlgItem(hWnd, IDC_MENU_TEXT);
|
||||
|
||||
@@ -416,9 +416,9 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
} break;
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
|
||||
} /* switch( wParam ) */
|
||||
}
|
||||
|
||||
@@ -283,9 +283,9 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
}
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,9 +220,9 @@ StatusWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
} break;
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
case MSNH_MSG_RANDOM_INPUT:
|
||||
nhassert(0); // unexpected
|
||||
break;
|
||||
|
||||
} /* end switch( wParam ) { */
|
||||
} break;
|
||||
|
||||
@@ -214,11 +214,11 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
}
|
||||
|
||||
case MSNH_MSG_RANDOM_INPUT: {
|
||||
PostMessage(GetDlgItem(hWnd, IDC_TEXT_CONTROL),
|
||||
case MSNH_MSG_RANDOM_INPUT: {
|
||||
PostMessage(GetDlgItem(hWnd, IDC_TEXT_CONTROL),
|
||||
WM_MSNH_COMMAND, MSNH_MSG_RANDOM_INPUT, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1293,10 +1293,10 @@ print_glyph(window, x, y, glyphinfo, bkglyphinfo)
|
||||
window. Glyphs are integers mapped to whatever the window-
|
||||
port wants (symbol, font, color, attributes, ...there's
|
||||
a 1-1 map between glyphs and distinct things on the map).
|
||||
-- bkglyphinfo contains a background glyph for potential use
|
||||
-- bkglyphinfo contains a background glyph for potential use
|
||||
by some graphical or tiled environments to allow the depiction
|
||||
to fall against a background consistent with the grid
|
||||
around x,y.
|
||||
to fall against a background consistent with the grid
|
||||
around x,y.
|
||||
|
||||
*/
|
||||
void
|
||||
@@ -1451,7 +1451,7 @@ mswin_nh_poskey(int *x, int *y, int *mod)
|
||||
mswin_main_loop();
|
||||
|
||||
if (event->type == NHEVENT_MOUSE) {
|
||||
if (iflags.wc_mouse_support) {
|
||||
if (iflags.wc_mouse_support) {
|
||||
*mod = event->ei.ms.mod;
|
||||
*x = event->ei.ms.x;
|
||||
*y = event->ei.ms.y;
|
||||
@@ -2396,22 +2396,22 @@ mswin_read_reg(void)
|
||||
char keystring[MAX_PATH];
|
||||
int i;
|
||||
COLORREF default_mapcolors[CLR_MAX] = {
|
||||
RGB(0x55, 0x55, 0x55), /* CLR_BLACK */
|
||||
RGB(0xFF, 0x00, 0x00), /* CLR_RED */
|
||||
RGB(0x00, 0x80, 0x00), /* CLR_GREEN */
|
||||
RGB(0xA5, 0x2A, 0x2A), /* CLR_BROWN */
|
||||
RGB(0x00, 0x00, 0xFF), /* CLR_BLUE */
|
||||
RGB(0xFF, 0x00, 0xFF), /* CLR_MAGENTA */
|
||||
RGB(0x00, 0xFF, 0xFF), /* CLR_CYAN */
|
||||
RGB(0xC0, 0xC0, 0xC0), /* CLR_GRAY */
|
||||
RGB(0xFF, 0xFF, 0xFF), /* NO_COLOR */
|
||||
RGB(0xFF, 0xA5, 0x00), /* CLR_ORANGE */
|
||||
RGB(0x00, 0xFF, 0x00), /* CLR_BRIGHT_GREEN */
|
||||
RGB(0xFF, 0xFF, 0x00), /* CLR_YELLOW */
|
||||
RGB(0x00, 0xC0, 0xFF), /* CLR_BRIGHT_BLUE */
|
||||
RGB(0xFF, 0x80, 0xFF), /* CLR_BRIGHT_MAGENTA */
|
||||
RGB(0x80, 0xFF, 0xFF), /* CLR_BRIGHT_CYAN */
|
||||
RGB(0xFF, 0xFF, 0xFF) /* CLR_WHITE */
|
||||
RGB(0x55, 0x55, 0x55), /* CLR_BLACK */
|
||||
RGB(0xFF, 0x00, 0x00), /* CLR_RED */
|
||||
RGB(0x00, 0x80, 0x00), /* CLR_GREEN */
|
||||
RGB(0xA5, 0x2A, 0x2A), /* CLR_BROWN */
|
||||
RGB(0x00, 0x00, 0xFF), /* CLR_BLUE */
|
||||
RGB(0xFF, 0x00, 0xFF), /* CLR_MAGENTA */
|
||||
RGB(0x00, 0xFF, 0xFF), /* CLR_CYAN */
|
||||
RGB(0xC0, 0xC0, 0xC0), /* CLR_GRAY */
|
||||
RGB(0xFF, 0xFF, 0xFF), /* NO_COLOR */
|
||||
RGB(0xFF, 0xA5, 0x00), /* CLR_ORANGE */
|
||||
RGB(0x00, 0xFF, 0x00), /* CLR_BRIGHT_GREEN */
|
||||
RGB(0xFF, 0xFF, 0x00), /* CLR_YELLOW */
|
||||
RGB(0x00, 0xC0, 0xFF), /* CLR_BRIGHT_BLUE */
|
||||
RGB(0xFF, 0x80, 0xFF), /* CLR_BRIGHT_MAGENTA */
|
||||
RGB(0x80, 0xFF, 0xFF), /* CLR_BRIGHT_CYAN */
|
||||
RGB(0xFF, 0xFF, 0xFF) /* CLR_WHITE */
|
||||
};
|
||||
|
||||
sprintf(keystring, "%s\\%s\\%s\\%s", CATEGORYKEY, COMPANYKEY, PRODUCTKEY,
|
||||
@@ -3050,14 +3050,14 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percent, int color, u
|
||||
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
|
||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX,
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
||||
-- fldindex could also be BL_FLUSH, which is not really
|
||||
a field index, but is a special trigger to tell the
|
||||
windowport that it should output all changes received
|
||||
-- fldindex could also be BL_FLUSH, which is not really
|
||||
a field index, but is a special trigger to tell the
|
||||
windowport that it should output all changes received
|
||||
to this point. It marks the end of a bot() cycle.
|
||||
-- fldindex could also be BL_RESET, which is not really
|
||||
a field index, but is a special advisory to to tell the
|
||||
windowport that it should redisplay all its status fields,
|
||||
even if no changes have been presented to it.
|
||||
-- fldindex could also be BL_RESET, which is not really
|
||||
a field index, but is a special advisory to to tell the
|
||||
windowport that it should redisplay all its status fields,
|
||||
even if no changes have been presented to it.
|
||||
-- ptr is usually a "char *", unless fldindex is BL_CONDITION.
|
||||
If fldindex is BL_CONDITION, then ptr is a long value with
|
||||
any or none of the following bits set (from botl.h):
|
||||
|
||||
Reference in New Issue
Block a user