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);
|
||||
|
||||
@@ -296,7 +296,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
if (argcheck(argc, argv, ARG_DEBUG) == 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||
@@ -566,7 +566,7 @@ process_options(int argc, char *argv[])
|
||||
switch_symbols(TRUE);
|
||||
}
|
||||
break;
|
||||
/* case 'D': */
|
||||
/* case 'D': */
|
||||
case 'd':
|
||||
if (!strncmpi(argv[0] + 1, "DEC", 3)) {
|
||||
load_symset("DECGraphics", PRIMARYSET);
|
||||
|
||||
@@ -131,7 +131,7 @@ dosh(void)
|
||||
#endif /* MICRO */
|
||||
|
||||
/*
|
||||
* Add a backslash to any name not ending in /, \ or : There must
|
||||
* Add a backslash to any name not ending in /, \ or : There must
|
||||
* be room for the \
|
||||
*/
|
||||
void
|
||||
|
||||
@@ -18,20 +18,20 @@
|
||||
/* Several minor changes were made for the NetHack distribution to satisfy
|
||||
* non-BSD compilers (by definition BSD compilers do not need to compile
|
||||
* this file for NetHack). These changes consisted of:
|
||||
* - changing the sccsid conditions to nested ifdefs from defined()s
|
||||
* to accommodate stupid preprocessors
|
||||
* - giving srandom() type void instead of allowing it to default to int
|
||||
* - making the first return in initstate() return a value consistent
|
||||
* with its type (instead of no value)
|
||||
* - ANSI function prototyping in extern.h - therefore include hack.h
|
||||
* instead of stdio.h and remove separate declaration of random() from
|
||||
* the beginning of function srandom
|
||||
* - moving sccsid after hack.h to allow precompiled headers, which
|
||||
* means the defined()s would be ok again...
|
||||
* - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z)
|
||||
* - remove useless variable `j' from srandom()
|
||||
* - cast result of pointer subtraction to long since ptrdiff_t could
|
||||
* be bigger than that and trigger warnings when assigning to long
|
||||
* - changing the sccsid conditions to nested ifdefs from defined()s
|
||||
* to accommodate stupid preprocessors
|
||||
* - giving srandom() type void instead of allowing it to default to int
|
||||
* - making the first return in initstate() return a value consistent
|
||||
* with its type (instead of no value)
|
||||
* - ANSI function prototyping in extern.h - therefore include hack.h
|
||||
* instead of stdio.h and remove separate declaration of random() from
|
||||
* the beginning of function srandom
|
||||
* - moving sccsid after hack.h to allow precompiled headers, which
|
||||
* means the defined()s would be ok again...
|
||||
* - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z)
|
||||
* - remove useless variable `j' from srandom()
|
||||
* - cast result of pointer subtraction to long since ptrdiff_t could
|
||||
* be bigger than that and trigger warnings when assigning to long
|
||||
*
|
||||
* $NHDT-Date: 1432512787 2015/05/25 00:13:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $
|
||||
*/
|
||||
@@ -42,7 +42,7 @@
|
||||
#else
|
||||
#ifdef LIBC_SCCS
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)random.c 5.5 (Berkeley) 7/6/88";
|
||||
static char sccsid[] = "@(#)random.c 5.5 (Berkeley) 7/6/88";
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@@ -131,13 +131,13 @@ static const int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
|
||||
|
||||
/*
|
||||
* Initially, everything is set up as if from :
|
||||
* initstate( 1, &randtbl, 128 );
|
||||
* initstate( 1, &randtbl, 128 );
|
||||
* Note that this initialization takes advantage of the fact that srandom()
|
||||
* advances the front and rear pointers 10*rand_deg times, and hence the
|
||||
* rear pointer which starts at 0 will also end up at zero; thus the zeroeth
|
||||
* element of the state information, which contains info about the current
|
||||
* position of the rear pointer is just
|
||||
* MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3.
|
||||
* MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3.
|
||||
*/
|
||||
|
||||
static long randtbl[DEG_3 + 1] = {
|
||||
@@ -158,7 +158,7 @@ static long randtbl[DEG_3 + 1] = {
|
||||
* away with just one pointer, but the code for random() is more efficient
|
||||
*this
|
||||
* way). The pointers are left positioned as they would be from the call
|
||||
* initstate( 1, randtbl, 128 )
|
||||
* initstate( 1, randtbl, 128 )
|
||||
* (The position of the rear pointer, rptr, is really 0 (as explained above
|
||||
* in the initialization of randtbl) because the state table pointer is set
|
||||
* to point to randtbl[1] (as explained below).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* NetHack 3.7 tclib.c $NHDT-Date: 1596498287 2020/08/03 23:44:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
|
||||
/* Copyright (c) Robert Patrick Rankin, 1995 */
|
||||
/* Copyright (c) Robert Patrick Rankin, 1995 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/* termcap library implementation */
|
||||
|
||||
@@ -257,7 +257,7 @@ setftty(void)
|
||||
/* Should use (ECHO|CRMOD) here instead of ECHO */
|
||||
if ((unsigned) (curttyb.echoflgs & ECHO) != ef) {
|
||||
curttyb.echoflgs &= ~ECHO;
|
||||
/* curttyb.echoflgs |= ef; */
|
||||
/* curttyb.echoflgs |= ef; */
|
||||
change++;
|
||||
}
|
||||
if ((unsigned) (curttyb.cbrkflgs & CBRKMASK) != cf) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* produces a binary only 6 blocks long, as opposed to the 137-block one
|
||||
* produced by an ordinary link). To set up the VMS symbol to run the
|
||||
* program ("run uudecode filename" won't work), do:
|
||||
* uudecode :== "$disk:[directory]uudecode.exe"
|
||||
* uudecode :== "$disk:[directory]uudecode.exe"
|
||||
* and don't forget the leading "$" or it still won't work. The binaries
|
||||
* produced by this program are in VMS "stream-LF" format; this makes no
|
||||
* difference to VMS when running decoded executables, nor to VMS unzip,
|
||||
@@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)uudecode.c 5.5 (Berkeley) 7/6/88";
|
||||
static char sccsid[] = "@(#)uudecode.c 5.5 (Berkeley) 7/6/88";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifdef __MSDOS__ /* For Turbo C */
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* will hide privileges from the caller if so desired.
|
||||
*
|
||||
* Currently supported UNIX variants:
|
||||
* Linux version 2.1.44 and above
|
||||
* FreeBSD (versions unknown)
|
||||
* Linux version 2.1.44 and above
|
||||
* FreeBSD (versions unknown)
|
||||
*
|
||||
* Note: SunOS and Solaris have no mechanism for retrieving the saved id,
|
||||
* so temporarily dropping privileges on these systems is sufficient to
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* NetHack 3.7 oldcrtl.c $NHDT-Date: 1596498304 2020/08/03 23:45:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
|
||||
/* Pat Rankin May'90 */
|
||||
/* Pat Rankin May'90 */
|
||||
/* VMS NetHack support, not needed for vms 4.6,4.7,5.x,or later */
|
||||
|
||||
#ifdef VERYOLD_VMS
|
||||
@@ -7,7 +7,7 @@
|
||||
* The following routines are used by NetHack but were not available
|
||||
* from the C Run-Time Library (VAXCRTL) prior to VMS V4.6.
|
||||
*
|
||||
* atexit, memcmp, memcpy, qsort, rename, vprintf, vsprintf
|
||||
* atexit, memcmp, memcpy, qsort, rename, vprintf, vsprintf
|
||||
*
|
||||
* Most of them are implemented here, but others will have to be worked
|
||||
* around in another fashion [such as '#define USE_OLDARGS' (even though
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
/* tty.c - (Windows console) version */
|
||||
|
||||
/*
|
||||
* Initial Creation M. Allison 1993/01/31
|
||||
* Switch to low level console output routines M. Allison 2003/10/01
|
||||
* Restrict cursor movement until input pending M. Lehotay 2003/10/02
|
||||
* Call Unicode version of output API on NT R. Chason 2005/10/28
|
||||
* Use of back buffer to improve performance B. House 2018/05/06
|
||||
* Initial Creation M. Allison 1993/01/31
|
||||
* Switch to low level console output routines M. Allison 2003/10/01
|
||||
* Restrict cursor movement until input pending M. Lehotay 2003/10/02
|
||||
* Call Unicode version of output API on NT R. Chason 2005/10/28
|
||||
* Use of back buffer to improve performance B. House 2018/05/06
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1013,7 +1013,7 @@ static BOOL
|
||||
CtrlHandler(DWORD ctrltype)
|
||||
{
|
||||
switch (ctrltype) {
|
||||
/* case CTRL_C_EVENT: */
|
||||
/* case CTRL_C_EVENT: */
|
||||
case CTRL_BREAK_EVENT:
|
||||
clear_screen();
|
||||
case CTRL_CLOSE_EVENT:
|
||||
@@ -3519,7 +3519,7 @@ ray_checkinput(
|
||||
else if (ir->Event.MouseEvent.dwButtonState
|
||||
& RIGHTBUTTON)
|
||||
*mod = CLICK_2;
|
||||
#if 0 /* middle button */
|
||||
#if 0 /* middle button */
|
||||
else if (ir->Event.MouseEvent.dwButtonState & MIDBUTTON)
|
||||
*mod = CLICK_3;
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* NetHack 3.7 win10.c $NHDT-Date: 1596498318 2020/08/03 23:45:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
|
||||
/* Copyright (C) 2018 by Bart House */
|
||||
/* Copyright (C) 2018 by Bart House */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "win10.h"
|
||||
|
||||
@@ -679,7 +679,7 @@ attempt_restore:
|
||||
You("are in non-scoring discovery mode.");
|
||||
}
|
||||
|
||||
// iflags.debug_fuzzer = TRUE;
|
||||
// iflags.debug_fuzzer = TRUE;
|
||||
|
||||
moveloop(resuming);
|
||||
nethack_exit(EXIT_SUCCESS);
|
||||
@@ -970,7 +970,7 @@ fakeconsole(void)
|
||||
/* Bool rval; */
|
||||
AllocConsole();
|
||||
AttachConsole(GetCurrentProcessId());
|
||||
/* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */
|
||||
/* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */
|
||||
freopen("CON", "w", stdout);
|
||||
freopen("CON", "r", stdin);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ void nt_regularize(char* s) /* normalize file name */
|
||||
char *getxxx(void)
|
||||
{
|
||||
char szFullPath[MAX_PATH] = "";
|
||||
HMODULE hInst = NULL; /* NULL gets the filename of this module */
|
||||
HMODULE hInst = NULL; /* NULL gets the filename of this module */
|
||||
|
||||
GetModuleFileName(hInst, szFullPath, sizeof(szFullPath));
|
||||
return &szFullPath[0];
|
||||
@@ -621,7 +621,7 @@ windows_early_options(const char *window_opt)
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a backslash to any name not ending in /, \ or : There must
|
||||
* Add a backslash to any name not ending in /, \ or : There must
|
||||
* be room for the \
|
||||
*/
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user