Annotation of 43BSDReno/games/snake/snake.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1980 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted
        !             6:  * provided that: (1) source distributions retain this entire copyright
        !             7:  * notice and comment, and (2) distributions including binaries display
        !             8:  * the following acknowledgement:  ``This product includes software
        !             9:  * developed by the University of California, Berkeley and its contributors''
        !            10:  * in the documentation or other materials provided with the distribution
        !            11:  * and in all advertising materials mentioning features or use of this
        !            12:  * software. Neither the name of the University nor the names of its
        !            13:  * contributors may be used to endorse or promote products derived
        !            14:  * from this software without specific prior written permission.
        !            15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            18:  *
        !            19:  *     @(#)snake.h     5.5 (Berkeley) 6/1/90
        !            20:  */
        !            21: 
        !            22: # include <stdio.h>
        !            23: # include <assert.h>
        !            24: # include <sys/types.h>
        !            25: # include <sgtty.h>
        !            26: # include <signal.h>
        !            27: # include <math.h>
        !            28: 
        !            29: #define ESC    '\033'
        !            30: 
        !            31: struct tbuffer {
        !            32:        long t[4];
        !            33: } tbuffer;
        !            34: 
        !            35: char   *CL, *UP, *DO, *ND, *BS,
        !            36:        *HO, *CM,
        !            37:        *TA, *LL,
        !            38:        *KL, *KR, *KU, *KD,
        !            39:        *TI, *TE, *KS, *KE;
        !            40: int    LINES, COLUMNS; /* physical screen size. */
        !            41: int    lcnt, ccnt;     /* user's idea of screen size */
        !            42: char   xBC, PC;
        !            43: int    AM, BW;
        !            44: char   tbuf[1024], tcapbuf[128];
        !            45: char   *tgetstr(), *tgoto();
        !            46: int    Klength;        /* length of KX strings */
        !            47: int    chunk;          /* amount of money given at a time */
        !            48: #ifdef debug
        !            49: #define        cashvalue       (loot-penalty)/25
        !            50: #else
        !            51: #define cashvalue      chunk*(loot-penalty)/25
        !            52: #endif
        !            53: 
        !            54: struct point {
        !            55:        int col, line;
        !            56: };
        !            57: struct point cursor;
        !            58: struct sgttyb orig, new;
        !            59: #ifdef TIOCLGET
        !            60: struct ltchars olttyc, nlttyc;
        !            61: #endif
        !            62: struct point *point();
        !            63: 
        !            64: #define        same(s1, s2)    ((s1)->line == (s2)->line && (s1)->col == (s2)->col)
        !            65: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.