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:
+35
-32
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 pctty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.6 pctty.c $NHDT-Date: 1431192779 2015/05/09 17:32:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
|
||||
/* NetHack 3.6 pctty.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)pctty.c 3.5 1990/22/02
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
/* tty.c - (PC) version */
|
||||
|
||||
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
|
||||
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers \
|
||||
*/
|
||||
#include "hack.h"
|
||||
#include "wintty.h"
|
||||
|
||||
@@ -18,15 +19,16 @@ char erase_char, kill_char;
|
||||
* Called by startup() in termcap.c and after returning from ! or ^Z
|
||||
*/
|
||||
void
|
||||
gettty(){
|
||||
erase_char = '\b';
|
||||
kill_char = 21; /* cntl-U */
|
||||
iflags.cbreak = TRUE;
|
||||
#if !defined(TOS)
|
||||
disable_ctrlP(); /* turn off ^P processing */
|
||||
gettty()
|
||||
{
|
||||
erase_char = '\b';
|
||||
kill_char = 21; /* cntl-U */
|
||||
iflags.cbreak = TRUE;
|
||||
#if !defined(TOS)
|
||||
disable_ctrlP(); /* turn off ^P processing */
|
||||
#endif
|
||||
#if defined(MSDOS) && defined(NO_TERMS)
|
||||
gr_init();
|
||||
gr_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -36,21 +38,21 @@ settty(s)
|
||||
const char *s;
|
||||
{
|
||||
#if defined(MSDOS) && defined(NO_TERMS)
|
||||
gr_finish();
|
||||
gr_finish();
|
||||
#endif
|
||||
end_screen();
|
||||
if(s) raw_print(s);
|
||||
end_screen();
|
||||
if (s)
|
||||
raw_print(s);
|
||||
#if !defined(TOS)
|
||||
enable_ctrlP(); /* turn on ^P processing */
|
||||
enable_ctrlP(); /* turn on ^P processing */
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* called by init_nhwindows() and resume_nhwindows() */
|
||||
void
|
||||
setftty()
|
||||
{
|
||||
start_screen();
|
||||
start_screen();
|
||||
}
|
||||
|
||||
#if defined(TIMED_DELAY) && defined(_MSC_VER)
|
||||
@@ -58,30 +60,31 @@ void
|
||||
msleep(mseconds)
|
||||
unsigned mseconds;
|
||||
{
|
||||
/* now uses clock() which is ANSI C */
|
||||
clock_t goal;
|
||||
/* now uses clock() which is ANSI C */
|
||||
clock_t goal;
|
||||
|
||||
goal = mseconds + clock();
|
||||
while ( goal > clock()) {
|
||||
/* do nothing */
|
||||
}
|
||||
goal = mseconds + clock();
|
||||
while (goal > clock()) {
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* fatal error */
|
||||
/*VARARGS1*/
|
||||
|
||||
void
|
||||
error VA_DECL(const char *,s)
|
||||
VA_START(s);
|
||||
VA_INIT(s, const char *);
|
||||
/* error() may get called before tty is initialized */
|
||||
if (iflags.window_inited) end_screen();
|
||||
putchar('\n');
|
||||
Vprintf(s,VA_ARGS);
|
||||
putchar('\n');
|
||||
VA_END();
|
||||
exit(EXIT_FAILURE);
|
||||
void error
|
||||
VA_DECL(const char *, s)
|
||||
VA_START(s);
|
||||
VA_INIT(s, const char *);
|
||||
/* error() may get called before tty is initialized */
|
||||
if (iflags.window_inited)
|
||||
end_screen();
|
||||
putchar('\n');
|
||||
Vprintf(s, VA_ARGS);
|
||||
putchar('\n');
|
||||
VA_END();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*pctty.c*/
|
||||
|
||||
Reference in New Issue
Block a user