1*d25013f2Scamield /* $OpenBSD: def.gen.h,v 1.3 2003/03/16 21:22:35 camield Exp $*/ 2*d25013f2Scamield /* $NetBSD: def.gen.h,v 1.3 1995/03/23 08:29:25 cgd Exp $*/ 3d0b779f3Sniklas 4df930be7Sderaadt /* 5*d25013f2Scamield * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, 6*d25013f2Scamield * Amsterdam 7*d25013f2Scamield * All rights reserved. 8df930be7Sderaadt * 9*d25013f2Scamield * Redistribution and use in source and binary forms, with or without 10*d25013f2Scamield * modification, are permitted provided that the following conditions are 11*d25013f2Scamield * met: 12*d25013f2Scamield * 13*d25013f2Scamield * - Redistributions of source code must retain the above copyright notice, 14*d25013f2Scamield * this list of conditions and the following disclaimer. 15*d25013f2Scamield * 16*d25013f2Scamield * - Redistributions in binary form must reproduce the above copyright 17*d25013f2Scamield * notice, this list of conditions and the following disclaimer in the 18*d25013f2Scamield * documentation and/or other materials provided with the distribution. 19*d25013f2Scamield * 20*d25013f2Scamield * - Neither the name of the Stichting Centrum voor Wiskunde en 21*d25013f2Scamield * Informatica, nor the names of its contributors may be used to endorse or 22*d25013f2Scamield * promote products derived from this software without specific prior 23*d25013f2Scamield * written permission. 24*d25013f2Scamield * 25*d25013f2Scamield * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 26*d25013f2Scamield * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27*d25013f2Scamield * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 28*d25013f2Scamield * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 29*d25013f2Scamield * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30*d25013f2Scamield * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31*d25013f2Scamield * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32*d25013f2Scamield * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33*d25013f2Scamield * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34*d25013f2Scamield * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35*d25013f2Scamield * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36*d25013f2Scamield */ 37*d25013f2Scamield 38*d25013f2Scamield /* 39*d25013f2Scamield * Copyright (c) 1982 Jay Fenlason <hack@gnu.org> 40*d25013f2Scamield * All rights reserved. 41*d25013f2Scamield * 42*d25013f2Scamield * Redistribution and use in source and binary forms, with or without 43*d25013f2Scamield * modification, are permitted provided that the following conditions 44*d25013f2Scamield * are met: 45*d25013f2Scamield * 1. Redistributions of source code must retain the above copyright 46*d25013f2Scamield * notice, this list of conditions and the following disclaimer. 47*d25013f2Scamield * 2. Redistributions in binary form must reproduce the above copyright 48*d25013f2Scamield * notice, this list of conditions and the following disclaimer in the 49*d25013f2Scamield * documentation and/or other materials provided with the distribution. 50*d25013f2Scamield * 3. The name of the author may not be used to endorse or promote products 51*d25013f2Scamield * derived from this software without specific prior written permission. 52*d25013f2Scamield * 53*d25013f2Scamield * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 54*d25013f2Scamield * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 55*d25013f2Scamield * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 56*d25013f2Scamield * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 57*d25013f2Scamield * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 58*d25013f2Scamield * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 59*d25013f2Scamield * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 60*d25013f2Scamield * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 61*d25013f2Scamield * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 62*d25013f2Scamield * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 63df930be7Sderaadt */ 64df930be7Sderaadt 65df930be7Sderaadt struct gen { 66df930be7Sderaadt struct gen *ngen; 67df930be7Sderaadt xchar gx,gy; 68df930be7Sderaadt unsigned gflag; /* 037: trap type; 040: SEEN flag */ 69df930be7Sderaadt /* 0100: ONCE only */ 70df930be7Sderaadt #define TRAPTYPE 037 71df930be7Sderaadt #define SEEN 040 72df930be7Sderaadt #define ONCE 0100 73df930be7Sderaadt }; 74df930be7Sderaadt extern struct gen *fgold, *ftrap; 75df930be7Sderaadt struct gen *g_at(); 76df930be7Sderaadt #define newgen() (struct gen *) alloc(sizeof(struct gen)) 77