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:
@@ -43,7 +43,7 @@
|
||||
*/
|
||||
#define READCHAR 0x00 /* Read Character from Keyboard */
|
||||
#define GETKEYFLAGS 0x02 /* Get Keyboard Flags */
|
||||
/*#define KEY_DEBUG */ /* print values of unexpected key codes - devel*/
|
||||
/*#define KEY_DEBUG */ /* print values of unexpected key codes - devel*/
|
||||
|
||||
void get_cursor(int *, int *);
|
||||
|
||||
@@ -201,7 +201,7 @@ static const struct pad {
|
||||
* Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII
|
||||
* meaning unless assigned one by a keyboard conversion table, so the
|
||||
* keyboard BIOS normally does not return a character code when Alt-letter
|
||||
* is pressed. So, to interpret unassigned Alt-letters, we must use a
|
||||
* is pressed. So, to interpret unassigned Alt-letters, we must use a
|
||||
* scan code table to translate the scan code into a letter, then set the
|
||||
* "meta" bit for it. -3.
|
||||
*/
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
/*
|
||||
* Edit History:
|
||||
*
|
||||
* Initial Creation M.Allison 93/10/21
|
||||
* ifndef MONITOR_HEAP for heaputil.c P.Winner 94/03/12
|
||||
* added Borland C _stklen variable Y.Sapir 94/05/01
|
||||
* fixed to use text tiles from win/share M.Allison 95/01/31
|
||||
* Initial Creation M.Allison 1993/10/21
|
||||
* ifndef MONITOR_HEAP for heaputil.c P.Winner 1994/03/12
|
||||
* added Borland C _stklen variable Y.Sapir 1994/05/01
|
||||
* fixed to use text tiles from win/share M.Allison 1995/01/31
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* NetHack 3.7 video.c $NHDT-Date: 1596498277 2020/08/03 23:44:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
/* */
|
||||
|
||||
/*
|
||||
* video.c - Hardware video support front-ends
|
||||
*
|
||||
*Edit History:
|
||||
* Initial Creation M. Allison 1993/04/04
|
||||
* Add djgpp support K. Smolkowski 1993/04/26
|
||||
* Initial Creation M. Allison 1993/04/04
|
||||
* Add djgpp support K. Smolkowski 1993/04/26
|
||||
* Add txt/graphics mode support M. Allison 1993/10/30
|
||||
* Add graphics mode cursor sim. M. Allison 1994/02/19
|
||||
* Add hooks for decals on vga M. Allison 2001/04/07
|
||||
@@ -527,25 +527,25 @@ gr_finish(void)
|
||||
* as those in win/tty).
|
||||
*
|
||||
* xputs - Writes a c null terminated string at the current location.
|
||||
* Depending on compile options, this could just be a series
|
||||
* of repeated calls to xputc() for each character.
|
||||
* Depending on compile options, this could just be a series
|
||||
* of repeated calls to xputc() for each character.
|
||||
*
|
||||
* xputc - Writes a single character at the current location. Since
|
||||
* various places in the code assume that control characters
|
||||
* can be used to control, we are forced to interpret some of
|
||||
* the more common ones, in order to keep things looking correct.
|
||||
* various places in the code assume that control characters
|
||||
* can be used to control, we are forced to interpret some of
|
||||
* the more common ones, in order to keep things looking correct.
|
||||
*
|
||||
* xputg - If using a graphics mode display mechanism (such as VGA, this
|
||||
* routine is used to display a graphical representation of a
|
||||
* NetHack glyph at the current location. For more information on
|
||||
* NetHack glyphs refer to the comments in include/display.h.
|
||||
* routine is used to display a graphical representation of a
|
||||
* NetHack glyph at the current location. For more information on
|
||||
* NetHack glyphs refer to the comments in include/display.h.
|
||||
*
|
||||
* NOTES:
|
||||
* wintty.h uses macros to redefine common output functions
|
||||
* such as puts, putc, putchar, so that they get steered into
|
||||
* either xputs (for strings) or xputc (for single characters).
|
||||
* References to puts, putc, and putchar in other source files
|
||||
* (that include wintty.h) are actually using these routines.
|
||||
* wintty.h uses macros to redefine common output functions
|
||||
* such as puts, putc, putchar, so that they get steered into
|
||||
* either xputs (for strings) or xputc (for single characters).
|
||||
* References to puts, putc, and putchar in other source files
|
||||
* (that include wintty.h) are actually using these routines.
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -683,30 +683,30 @@ HideCursor(void)
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
/*
|
||||
* CLR_BLACK 0
|
||||
* CLR_RED 1
|
||||
* CLR_GREEN 2
|
||||
* CLR_BROWN 3 low-intensity yellow
|
||||
* CLR_BLUE 4
|
||||
* CLR_MAGENTA 5
|
||||
* CLR_CYAN 6
|
||||
* CLR_GRAY 7 low-intensity white
|
||||
* NO_COLOR 8
|
||||
* CLR_ORANGE 9
|
||||
* CLR_BRIGHT_GREEN 10
|
||||
* CLR_YELLOW 11
|
||||
* CLR_BRIGHT_BLUE 12
|
||||
* CLR_BRIGHT_MAGENTA 13
|
||||
* CLR_BRIGHT_CYAN 14
|
||||
* CLR_WHITE 15
|
||||
* CLR_MAX 16
|
||||
* BRIGHT 8
|
||||
* CLR_BLACK 0
|
||||
* CLR_RED 1
|
||||
* CLR_GREEN 2
|
||||
* CLR_BROWN 3 low-intensity yellow
|
||||
* CLR_BLUE 4
|
||||
* CLR_MAGENTA 5
|
||||
* CLR_CYAN 6
|
||||
* CLR_GRAY 7 low-intensity white
|
||||
* NO_COLOR 8
|
||||
* CLR_ORANGE 9
|
||||
* CLR_BRIGHT_GREEN 10
|
||||
* CLR_YELLOW 11
|
||||
* CLR_BRIGHT_BLUE 12
|
||||
* CLR_BRIGHT_MAGENTA 13
|
||||
* CLR_BRIGHT_CYAN 14
|
||||
* CLR_WHITE 15
|
||||
* CLR_MAX 16
|
||||
* BRIGHT 8
|
||||
*/
|
||||
|
||||
#ifdef VIDEOSHADES
|
||||
/* assign_videoshades() is prototyped in extern.h */
|
||||
/* assign_videocolors() is prototyped in extern.h */
|
||||
/* assign_video() is prototyped in extern.h */
|
||||
/* assign_video() is prototyped in extern.h */
|
||||
|
||||
int shadeflag; /* shades are initialized */
|
||||
int colorflag; /* colors are initialized */
|
||||
@@ -832,8 +832,8 @@ assign_videoshades(char *choiceptr)
|
||||
/*
|
||||
* Process defaults.nh OPTIONS=videocolors:xxx
|
||||
* Left to right assignments for:
|
||||
* red green brown blue magenta cyan orange br.green yellow
|
||||
* br.blue br.mag br.cyan
|
||||
* red green brown blue magenta cyan orange br.green yellow
|
||||
* br.blue br.mag br.cyan
|
||||
*
|
||||
* Default Mapping (BIOS): 4-2-6-1-5-3-12-10-14-9-13-11
|
||||
*/
|
||||
@@ -913,8 +913,8 @@ convert_uchars(char *bufp, /* current pointer */
|
||||
* where (current) legitimate values are:
|
||||
*
|
||||
* autodetect (attempt to determine the adapter type)
|
||||
* default (force use of the default video method for environment)
|
||||
* vga (use vga adapter code)
|
||||
* default (force use of the default video method for environment)
|
||||
* vga (use vga adapter code)
|
||||
*/
|
||||
int
|
||||
assign_video(char *sopt)
|
||||
@@ -922,8 +922,8 @@ assign_video(char *sopt)
|
||||
/*
|
||||
* debug
|
||||
*
|
||||
* printf("video is %s",sopt);
|
||||
* getch();
|
||||
* printf("video is %s",sopt);
|
||||
* getch();
|
||||
*/
|
||||
iflags.grmode = 0;
|
||||
iflags.hasvesa = 0;
|
||||
@@ -966,7 +966,7 @@ assign_video(char *sopt)
|
||||
#endif
|
||||
/*
|
||||
* Auto-detect Priorities (arbitrary for now):
|
||||
* VESA, VGA
|
||||
* VESA, VGA
|
||||
*/
|
||||
if (iflags.hasvesa) iflags.usevesa = 1;
|
||||
else if (iflags.hasvga) {
|
||||
|
||||
@@ -725,7 +725,7 @@ vesa_xputg(const glyph_info *glyphinfo)
|
||||
* These include:
|
||||
*
|
||||
* vesa_gotoloc(x,y) - Moves the "cursor" on screen to the specified x
|
||||
* and y character cell location. This routine
|
||||
* and y character cell location. This routine
|
||||
* determines the location where screen writes
|
||||
* will occur next, it does not change the location
|
||||
* of the player on the NetHack level.
|
||||
@@ -862,7 +862,7 @@ vesa_redrawmap(void)
|
||||
void
|
||||
vesa_userpan(enum vga_pan_direction pan)
|
||||
{
|
||||
/* pline("Into userpan"); */
|
||||
/* pline("Into userpan"); */
|
||||
if (iflags.over_view || iflags.traditional_view)
|
||||
return;
|
||||
|
||||
@@ -918,7 +918,7 @@ vesa_userpan(enum vga_pan_direction pan)
|
||||
void
|
||||
vesa_overview(boolean on)
|
||||
{
|
||||
/* vesa_HideCursor(); */
|
||||
/* vesa_HideCursor(); */
|
||||
if (on) {
|
||||
iflags.over_view = TRUE;
|
||||
clipx = 0;
|
||||
@@ -951,9 +951,9 @@ vesa_overview(boolean on)
|
||||
void
|
||||
vesa_traditional(boolean on)
|
||||
{
|
||||
/* vesa_HideCursor(); */
|
||||
/* vesa_HideCursor(); */
|
||||
if (on) {
|
||||
/* switch_symbols(FALSE); */
|
||||
/* switch_symbols(FALSE); */
|
||||
iflags.traditional_view = TRUE;
|
||||
clipx = 0;
|
||||
clipxmax = COLNO - 1;
|
||||
@@ -1054,7 +1054,7 @@ vesa_Init(void)
|
||||
iflags.over_view = FALSE;
|
||||
CO = 80;
|
||||
LI = 25;
|
||||
/* clear_screen() */ /* not vesa_clear_screen() */
|
||||
/* clear_screen() */ /* not vesa_clear_screen() */
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -1070,7 +1070,7 @@ vesa_Init(void)
|
||||
iflags.over_view = FALSE;
|
||||
CO = 80;
|
||||
LI = 25;
|
||||
/* clear_screen() */ /* not vesa_clear_screen() */
|
||||
/* clear_screen() */ /* not vesa_clear_screen() */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ static int viewport_size = 40;
|
||||
/* static char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */
|
||||
/* static char bittable[8]= {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; */
|
||||
#if 0
|
||||
static char defpalette[] = { /* Default VGA palette */
|
||||
static char defpalette[] = { /* Default VGA palette */
|
||||
0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xaa,
|
||||
0x00, 0xaa, 0x00,
|
||||
@@ -214,7 +214,7 @@ int vp2[SCREENPLANES] = { 1, 2, 4, 8 };
|
||||
static struct planar_cell_struct planecell;
|
||||
static struct overview_planar_cell_struct planecell_O;
|
||||
|
||||
/* static int g_attribute; */ /* Current attribute to use */
|
||||
/* static int g_attribute; */ /* Current attribute to use */
|
||||
|
||||
void
|
||||
vga_get_scr_size(void)
|
||||
@@ -424,7 +424,7 @@ vga_xputg(const glyph_info *glyphinfo)
|
||||
* These include:
|
||||
*
|
||||
* vga_gotoloc(x,y) - Moves the "cursor" on screen to the specified x
|
||||
* and y character cell location. This routine
|
||||
* and y character cell location. This routine
|
||||
* determines the location where screen writes
|
||||
* will occur next, it does not change the location
|
||||
* of the player on the NetHack level.
|
||||
@@ -513,7 +513,7 @@ vga_userpan(enum vga_pan_direction pan)
|
||||
{
|
||||
int x;
|
||||
|
||||
/* pline("Into userpan"); */
|
||||
/* pline("Into userpan"); */
|
||||
if (iflags.over_view || iflags.traditional_view)
|
||||
return;
|
||||
if (pan == pan_left)
|
||||
@@ -530,7 +530,7 @@ vga_userpan(enum vga_pan_direction pan)
|
||||
void
|
||||
vga_overview(boolean on)
|
||||
{
|
||||
/* vga_HideCursor(); */
|
||||
/* vga_HideCursor(); */
|
||||
if (on) {
|
||||
iflags.over_view = TRUE;
|
||||
clipx = 0;
|
||||
@@ -547,9 +547,9 @@ vga_overview(boolean on)
|
||||
void
|
||||
vga_traditional(boolean on)
|
||||
{
|
||||
/* vga_HideCursor(); */
|
||||
/* vga_HideCursor(); */
|
||||
if (on) {
|
||||
/* switch_symbols(FALSE); */
|
||||
/* switch_symbols(FALSE); */
|
||||
iflags.traditional_view = TRUE;
|
||||
clipx = 0;
|
||||
clipxmax = CO - 1;
|
||||
@@ -762,7 +762,7 @@ vga_Init(void)
|
||||
iflags.over_view = FALSE;
|
||||
CO = 80;
|
||||
LI = 25;
|
||||
/* clear_screen() */ /* not vga_clear_screen() */
|
||||
/* clear_screen() */ /* not vga_clear_screen() */
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -868,7 +868,7 @@ vga_NoBorder(int bc)
|
||||
regs.h.al = (char)0x01;
|
||||
regs.h.bh = (char)bc;
|
||||
regs.h.bl = 0;
|
||||
(void) int86(VIDEO_BIOS, ®s, ®s);
|
||||
(void) int86(VIDEO_BIOS, ®s, ®s);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -918,9 +918,9 @@ vga_detect(void)
|
||||
/*
|
||||
* debug
|
||||
*
|
||||
* printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n",
|
||||
* (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl);
|
||||
* getch();
|
||||
* printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n",
|
||||
* (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl);
|
||||
* getch();
|
||||
*/
|
||||
if ((int) regs.h.al == 0x1a) {
|
||||
if (((int) regs.h.bl == 8) || ((int) regs.h.bl == 7)) {
|
||||
@@ -947,7 +947,7 @@ vga_WriteChar(uint32 chr, int col, int row, int colour)
|
||||
int vplane;
|
||||
unsigned char bitmap[ROWS_PER_CELL];
|
||||
|
||||
/* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */
|
||||
/* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */
|
||||
vga_GetBitmap(chr, bitmap);
|
||||
|
||||
x = min(col, (CO - 1)); /* min() used protection from callers */
|
||||
@@ -1312,8 +1312,8 @@ vga_DrawCursor(void)
|
||||
char __far *tmp1;
|
||||
char __far *tmp2;
|
||||
unsigned char first, second;
|
||||
/* char on[2] = {0xFF,0xFF}; */
|
||||
/* char off[2] = {0x00,0x00}; */
|
||||
/* char on[2] = {0xFF,0xFF}; */
|
||||
/* char off[2] = {0x00,0x00}; */
|
||||
boolean isrogue = Is_rogue_level(&u.uz);
|
||||
boolean singlebyte =
|
||||
(isrogue || iflags.over_view || iflags.traditional_view || !inmap);
|
||||
|
||||
Reference in New Issue
Block a user