|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 2367 (0x93f) Types: TextFile Names: »dots.h«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Dots/dots.h«
/* dots.h */ #include <curses.h> #include <sys/types.h> #include <sys/ioctl.h> #ifdef lint #include <sys/uio.h> #endif lint #include <sys/socket.h> #include <ctype.h> #include <signal.h> #include <setjmp.h> #include <strings.h> extern char *sprintf(); /* Most BSD systems don't have vprintf, but sun versions 3.0 and up do have it. * If you're system doesn't have it, comment out the define line. System-V * systems do have it, but until this code is ported, it doesn't matter. */ /*#define VPRINTF*/ #define PRIZE "cigar" #define DOCFILE "/usr/games/lib/dots/dots.doc" #define SAVE_FILE "dots.save" #define SCOREFILE "/usr/games/lib/dots/dots.scores" /* should be full pathname */ #define version "Dots version 1.0" #define when break;case #define otherwise break;default #define Upper(c) (c = islower(c) ? toupper(c) : c) #define Lower(c) (c = isupper(c) ? tolower(c) : c) #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) #define erase_char '\b' #define ESC '\033' #define DEMO 0 #define INTERACTIVE 1 #define TWOPLAYER 2 #define GOOD 0 #define BAD 1 #define DUMB 0 #define HARD 1 #define KILLER 2 #define FREE 0 #define USED 1 #define CLOSEDEND 0 /* used for segtype for creating doublecrosses */ #define OPENEND 1 /* ditto */ #define MAXL (COLS / 4) #define MAXW (LINES / 2) #define H_MINL 10 #define H_MINW 10 #define MINL 4 #define MINW 4 #define US 0 #define THEM 1 #define SAVE 0 #define LOAD 1 #define isodd(a) ((a)%2) #define iseven(a) (!isodd(a)) #define ism4(a) (!((a)%4)) #define do_twice for(twicecount=1;twicecount<=2;++twicecount) int board[120][120], badboard[120][120], persontally, comptally, Length, Width, xposit, yposit, x_start, y_start, mover, /* 0 is person/US, 1 is computer/THEM */ twicecount, no_good_moves, control_already_established, segtype, /* OPENEND or CLOSEDEND ; set everytime Howbad is called */ dX_found, segflag, mode, level, sd, /* socket descriptor */ jmpbuf_set; struct { int x, y; } Bingo; struct tchars tchars; char *opponent, prize[30], save_file[50], *getenv(); char Initial[2], *username; int onintr(), redraw(), oops(); /* jump to the menu so there's no big stacks (supposedly) */ jmp_buf menu_jmp; extern int errno; extern char *sys_errlist[], *sys_siglist[];