-/* $NetBSD: back.h,v 1.3 1995/03/21 15:05:28 cgd Exp $ */
+/* $NetBSD: back.h,v 1.6 1997/10/10 08:59:41 lukem Exp $ */
/*
* Copyright (c) 1980, 1993
* @(#)back.h 8.1 (Berkeley) 5/31/93
*/
-#include <sgtty.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+
+#include <fcntl.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
#define rnum(r) (random()%r)
#define D0 dice[0]
char **Colorptr; /* color of current player, capitalized */
int colen; /* length of color of current player */
-struct sgttyb tty; /* tty information buffer */
-int old; /* original tty status */
-int noech; /* original tty status without echo */
-int raw; /* raw tty status, no echo */
+struct termios old, noech, raw;/* original tty status */
int curr; /* row position of cursor */
int curc; /* column position of cursor */
int begscr; /* 'beginning' of screen
(not including board) */
-int getout(); /* function to exit backgammon cleanly */
+void addbuf __P((int));
+void backone __P((int));
+void bsect __P((int, int, int, int));
+void buflush __P((void));
+int canhit __P((int, int));
+int checkd __P((int));
+int checkmove __P((int));
+void clear __P((void));
+void clend __P((void));
+void cline __P((void));
+int count __P((void));
+void curmove __P((int, int));
+int dotable __P((char, int));
+void errexit __P((const char *));
+void fancyc __P((int));
+void fboard __P((void));
+void fixcol __P((int, int, int, int, int));
+void fixpos __P((int, int, int, int, int));
+void fixtty __P((struct termios *));
+void getarg __P((char ***));
+int getcaps __P((char *));
+void getmove __P((void));
+void getout __P((int));
+void gwrite __P((void));
+void init __P((void));
+int last __P((void));
+int main __P((int, char *[]));
+int makmove __P((int));
+int movallow __P((void));
+void movback __P((int));
+void moverr __P((int));
+int movokay __P((int));
+void newline __P((void));
+void newpos __P((void));
+void nexturn __P((void));
+void norec __P((char *));
+void odds __P((int, int, int));
+void proll __P((void));
+int quit __P((void));
+int readc __P((void));
+void recover __P((char *));
+void refresh __P((void));
+void roll __P((void));
+int rsetbrd __P((void));
+void save __P((int));
+void strset __P((char *, char *));
+int text __P((char **));
+void tos __P((void));
+void wrboard __P((void));
+void wrbsub __P((void));
+void wrhit __P((int));
+void wrint __P((int));
+void writec __P((char));
+void writel __P((char *));
+void wrscore __P((void));
+int yorn __P((char));