switch source tree from k&r to c99
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
void
|
||||
get_scr_size()
|
||||
get_scr_size(void)
|
||||
{
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.usevga) {
|
||||
@@ -116,13 +116,13 @@ typedef long clock_t;
|
||||
#endif
|
||||
|
||||
#ifdef SCREEN_BIOS
|
||||
void FDECL(get_cursor, (int *, int *));
|
||||
void get_cursor(int *, int *);
|
||||
#endif
|
||||
|
||||
void FDECL(adjust_cursor_flags, (struct WinDesc *));
|
||||
void FDECL(cmov, (int, int));
|
||||
void FDECL(nocmov, (int, int));
|
||||
static void NDECL(init_ttycolor);
|
||||
void adjust_cursor_flags(struct WinDesc *);
|
||||
void cmov(int, int);
|
||||
void nocmov(int, int);
|
||||
static void init_ttycolor(void);
|
||||
|
||||
int savevmode; /* store the original video mode in here */
|
||||
int curcol, currow; /* graphics mode current cursor locations */
|
||||
@@ -139,7 +139,7 @@ char ttycolors[CLR_MAX]; /* also used/set in options.c */
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
void
|
||||
backsp()
|
||||
backsp(void)
|
||||
{
|
||||
if (!iflags.grmode) {
|
||||
txt_backsp();
|
||||
@@ -155,7 +155,7 @@ backsp()
|
||||
}
|
||||
|
||||
void
|
||||
clear_screen()
|
||||
clear_screen(void)
|
||||
{
|
||||
if (!iflags.grmode) {
|
||||
txt_clear_screen();
|
||||
@@ -170,7 +170,7 @@ clear_screen()
|
||||
}
|
||||
}
|
||||
|
||||
void cl_end() /* clear to end of line */
|
||||
void cl_end(void) /* clear to end of line */
|
||||
{
|
||||
int col, row;
|
||||
|
||||
@@ -190,7 +190,7 @@ void cl_end() /* clear to end of line */
|
||||
tty_curs(BASE_WINDOW, (int) ttyDisplay->curx + 1, (int) ttyDisplay->cury);
|
||||
}
|
||||
|
||||
void cl_eos() /* clear to end of screen */
|
||||
void cl_eos(void) /* clear to end of screen */
|
||||
{
|
||||
int cy = (int) ttyDisplay->cury + 1;
|
||||
|
||||
@@ -209,8 +209,7 @@ void cl_eos() /* clear to end of screen */
|
||||
}
|
||||
|
||||
void
|
||||
cmov(col, row)
|
||||
register int col, row;
|
||||
cmov(int col, int row)
|
||||
{
|
||||
ttyDisplay->cury = (uchar) row;
|
||||
ttyDisplay->curx = (uchar) col;
|
||||
@@ -241,7 +240,7 @@ has_color(int color)
|
||||
#endif
|
||||
|
||||
void
|
||||
home()
|
||||
home(void)
|
||||
{
|
||||
tty_curs(BASE_WINDOW, 1, 0);
|
||||
ttyDisplay->curx = ttyDisplay->cury = (uchar) 0;
|
||||
@@ -259,8 +258,7 @@ home()
|
||||
}
|
||||
|
||||
void
|
||||
nocmov(col, row)
|
||||
int col, row;
|
||||
nocmov(int col, int row)
|
||||
{
|
||||
if (!iflags.grmode) {
|
||||
txt_gotoxy(col, row);
|
||||
@@ -276,13 +274,13 @@ int col, row;
|
||||
}
|
||||
|
||||
void
|
||||
standoutbeg()
|
||||
standoutbeg(void)
|
||||
{
|
||||
g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense;
|
||||
}
|
||||
|
||||
void
|
||||
standoutend()
|
||||
standoutend(void)
|
||||
{
|
||||
g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal;
|
||||
}
|
||||
@@ -379,7 +377,7 @@ term_start_raw_bold(void)
|
||||
}
|
||||
|
||||
void
|
||||
tty_delay_output()
|
||||
tty_delay_output(void)
|
||||
{
|
||||
#ifdef TIMED_DELAY
|
||||
if (flags.nap) {
|
||||
@@ -391,7 +389,7 @@ tty_delay_output()
|
||||
}
|
||||
|
||||
void
|
||||
tty_end_screen()
|
||||
tty_end_screen(void)
|
||||
{
|
||||
if (!iflags.grmode) {
|
||||
txt_clear_screen();
|
||||
@@ -410,21 +408,19 @@ tty_end_screen()
|
||||
}
|
||||
|
||||
void
|
||||
tty_nhbell()
|
||||
tty_nhbell(void)
|
||||
{
|
||||
txt_nhbell();
|
||||
}
|
||||
|
||||
void
|
||||
tty_number_pad(state)
|
||||
int state;
|
||||
tty_number_pad(int state)
|
||||
{
|
||||
++state; /* prevents compiler warning (unref. param) */
|
||||
}
|
||||
|
||||
void
|
||||
tty_startup(wid, hgt)
|
||||
int *wid, *hgt;
|
||||
tty_startup(int *wid, int *hgt)
|
||||
{
|
||||
/* code to sense display adapter is required here - MJA */
|
||||
|
||||
@@ -468,7 +464,7 @@ int *wid, *hgt;
|
||||
}
|
||||
|
||||
void
|
||||
tty_start_screen()
|
||||
tty_start_screen(void)
|
||||
{
|
||||
#ifdef PC9800
|
||||
fputs("\033[>1h", stdout);
|
||||
@@ -478,7 +474,7 @@ tty_start_screen()
|
||||
}
|
||||
|
||||
void
|
||||
gr_init()
|
||||
gr_init(void)
|
||||
{
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.usevga) {
|
||||
@@ -499,7 +495,7 @@ gr_init()
|
||||
}
|
||||
|
||||
void
|
||||
gr_finish()
|
||||
gr_finish(void)
|
||||
{
|
||||
if (iflags.grmode) {
|
||||
#ifdef SCREEN_VGA
|
||||
@@ -552,8 +548,7 @@ gr_finish()
|
||||
*/
|
||||
|
||||
void
|
||||
xputs(s)
|
||||
const char *s;
|
||||
xputs(const char *s)
|
||||
{
|
||||
int col, row;
|
||||
|
||||
@@ -575,8 +570,7 @@ const char *s;
|
||||
|
||||
/* same signature as 'putchar()' with potential failure result ignored */
|
||||
int
|
||||
xputc(ch) /* write out character (and attribute) */
|
||||
int ch;
|
||||
xputc(int ch) /* write out character (and attribute) */
|
||||
{
|
||||
int i;
|
||||
char attribute;
|
||||
@@ -599,10 +593,7 @@ int ch;
|
||||
}
|
||||
|
||||
/* write out a glyph picture at current location */
|
||||
void xputg(glyphnum, ch, special)
|
||||
int glyphnum;
|
||||
int ch;
|
||||
unsigned special;
|
||||
void xputg(int glyphnum, int ch, unsigned special)
|
||||
{
|
||||
if (!iflags.grmode || !iflags.tile_view) {
|
||||
(void) xputc((char) ch);
|
||||
@@ -619,8 +610,7 @@ unsigned special;
|
||||
|
||||
#ifdef POSITIONBAR
|
||||
void
|
||||
video_update_positionbar(posbar)
|
||||
char *posbar;
|
||||
video_update_positionbar(char *posbar)
|
||||
{
|
||||
if (!iflags.grmode)
|
||||
return;
|
||||
@@ -636,8 +626,7 @@ char *posbar;
|
||||
#endif
|
||||
|
||||
void
|
||||
adjust_cursor_flags(cw)
|
||||
struct WinDesc *cw;
|
||||
adjust_cursor_flags(struct WinDesc *cw)
|
||||
{
|
||||
#ifdef SIMULATE_CURSOR
|
||||
#if 0
|
||||
@@ -664,7 +653,7 @@ int cursor_flag;
|
||||
|
||||
/* The check for iflags.grmode is made BEFORE calling these. */
|
||||
void
|
||||
DrawCursor()
|
||||
DrawCursor(void)
|
||||
{
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.usevga)
|
||||
@@ -677,7 +666,7 @@ DrawCursor()
|
||||
}
|
||||
|
||||
void
|
||||
HideCursor()
|
||||
HideCursor(void)
|
||||
{
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.usevga)
|
||||
@@ -720,12 +709,12 @@ HideCursor()
|
||||
|
||||
int shadeflag; /* shades are initialized */
|
||||
int colorflag; /* colors are initialized */
|
||||
char *schoice[3] = { "dark", "normal", "light" };
|
||||
char *shade[3];
|
||||
const char *schoice[3] = { "dark", "normal", "light" };
|
||||
const char *shade[3];
|
||||
#endif /* VIDEOSHADES */
|
||||
|
||||
static void
|
||||
init_ttycolor()
|
||||
init_ttycolor(void)
|
||||
{
|
||||
#ifdef VIDEOSHADES
|
||||
if (!shadeflag) {
|
||||
@@ -763,7 +752,7 @@ init_ttycolor()
|
||||
#endif
|
||||
}
|
||||
|
||||
static int FDECL(convert_uchars, (char *, uchar *, int));
|
||||
static int convert_uchars(char *, uchar *, int);
|
||||
#ifdef VIDEOSHADES
|
||||
int
|
||||
assign_videoshades(char *choiceptr)
|
||||
@@ -872,10 +861,9 @@ assign_videocolors(char *colorvals)
|
||||
}
|
||||
|
||||
static int
|
||||
convert_uchars(bufp, list, size)
|
||||
char *bufp; /* current pointer */
|
||||
uchar *list; /* return list */
|
||||
int size;
|
||||
convert_uchars(char *bufp, /* current pointer */
|
||||
uchar *list, /* return list */
|
||||
int size)
|
||||
{
|
||||
unsigned int num = 0;
|
||||
int count = 0;
|
||||
@@ -928,8 +916,7 @@ int size;
|
||||
* vga (use vga adapter code)
|
||||
*/
|
||||
int
|
||||
assign_video(sopt)
|
||||
char *sopt;
|
||||
assign_video(char *sopt)
|
||||
{
|
||||
/*
|
||||
* debug
|
||||
@@ -994,8 +981,7 @@ char *sopt;
|
||||
}
|
||||
|
||||
void
|
||||
tileview(enable)
|
||||
boolean enable;
|
||||
tileview(boolean enable)
|
||||
{
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.grmode && iflags.usevga)
|
||||
@@ -1011,8 +997,7 @@ boolean enable;
|
||||
#else /* STUBVIDEO */
|
||||
|
||||
void
|
||||
tileview(enable)
|
||||
boolean enable;
|
||||
tileview(boolean enable)
|
||||
{
|
||||
}
|
||||
#endif /* STUBVIDEO */
|
||||
|
||||
Reference in New Issue
Block a user