Reformat all C files.

I'll push a formatting guide at some point. There may still be
outstanding changes, but please feel free to resolve those as you arrive
a them.

To the best of my knowledge, there is no changes to the actual code
content, but the formatter does have the occasional bug. If you run into
an issue, please fix it!
This commit is contained in:
Sean Hunt
2015-05-09 13:43:16 -04:00
parent 167800afdf
commit 97d6fade74
270 changed files with 182649 additions and 173878 deletions
+49 -32
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 amitty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.6 amitty.c $NHDT-Date: 1431192784 2015/05/09 17:33:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */
/* NetHack 3.6 amitty.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.3 $ */
/* SCCS Id: @(#)amitty.c 3.5 2000/01/12
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */
@@ -16,54 +16,71 @@
#include <proto/dos.h>
#ifdef _DCC
# define getch() getchar()
#define getch() getchar()
#endif
#ifdef __SASC_60
# include <clib/dos_protos.h>
#include <clib/dos_protos.h>
#endif
void NDECL( tty_change_color );
char *NDECL( tty_get_color_string );
void NDECL(tty_change_color);
char *NDECL(tty_get_color_string);
#ifdef TTY_GRAPHICS
int amibbs=0; /* BBS mode */
char bbs_id[80]=""; /* BBS uid equivalent */
long afh_in, afh_out; /* BBS mode Amiga filehandles */
int amibbs = 0; /* BBS mode */
char bbs_id[80] = ""; /* BBS uid equivalent */
long afh_in, afh_out; /* BBS mode Amiga filehandles */
void settty(const char *s){
end_screen();
if(s)raw_print(s);
iflags.cbreak=ON; /* this is too easy: probably wrong */
#if 1 /* should be version>=36 */
/* if(IsInteractive(afh_in)){ */
SetMode(afh_in,0); /* con mode */
void
settty(const char *s)
{
end_screen();
if (s)
raw_print(s);
iflags.cbreak = ON; /* this is too easy: probably wrong */
#if 1 /* should be version>=36 */
/* if(IsInteractive(afh_in)){ */
SetMode(afh_in, 0); /* con mode */
/* } */
#endif
}
void gettty(){
#if 1 /* should be VERSION >=36 */
/* if(IsInteractive(afh_in)){ */
SetMode(afh_in,1); /* raw mode */
void
gettty()
{
#if 1 /* should be VERSION >=36 */
/* if(IsInteractive(afh_in)){ */
SetMode(afh_in, 1); /* raw mode */
/* } */
#endif
}
void setftty(){
iflags.cbreak=ON; /* ditto */
void
setftty()
{
iflags.cbreak = ON; /* ditto */
}
char kill_char='X'-'@';
char erase_char='\b';
tgetch(){
char x;
Read(afh_in,&x,1);
return (x=='\r')?'\n':x;
char kill_char = 'X' - '@';
char erase_char = '\b';
tgetch()
{
char x;
Read(afh_in, &x, 1);
return (x == '\r') ? '\n' : x;
}
void get_scr_size(){
CO=80;
LI=24;
void
get_scr_size()
{
CO = 80;
LI = 24;
}
#endif
void tty_change_color() {}
char *tty_get_color_string() { return( "" ); }
void
tty_change_color()
{
}
char *
tty_get_color_string()
{
return ("");
}