1 /* 2 * Copyright (c) 1988 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 this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 * 12 * @(#)state.h 3.2 (Berkeley) 03/28/88 13 */ 14 15 #define INCLUDED_STATE 16 17 /* this defines the state structure used by the key mapping routines */ 18 19 20 #define STATE_NULL -1 /* Falls off edge */ 21 #define STATE_GOTO -2 /* GOTO internal state */ 22 23 #define state struct State 24 struct State { 25 int match; /* character to match */ 26 int result; /* 3270 control code */ 27 state *next; /* next entry in this same state */ 28 state *address; /* if goto, where is next state */ 29 }; 30