/* xterm-rops,v 1.4 1994/05/26 21:02:56 me Exp */

/*
 * This file is part of the Emu system.
 *
 * Copyright 1990 by PCS Computer Systeme, GmbH. Munich, West Germany.
 * 
 * Copyright 1994 by Jordan K. Hubbard and Michael W. Elbel
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL PCS, THE AUTHORS, OR THEIR HOUSEPETS BE LIABLE FOR
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SO DON'T SUE US.
 * THANK YOU.
 */

/*
 * Reverse operation definitions for the emu "xterm" terminal.
 *
 * Author: Michael Elbel
 * Date: September, 30., 1991
 * Description: Various things a xterm might be expected to output
 *		plus the rops for initializing the canvas and tty for
 *		a xterm.
 *
 * Revision History:
 *
 * Revision 1.1.1.1  1994/05/22  11:22:43  me
 * Initial import into CVS
 *
 */

*term.xterm-rops:							\
ROP_INSERT_CHAR		<%gA%c>						\
ROP_SCREEN_SIZE		<\\E[%gy%d;%gx%dS>				\
ROP_CURSOR_POS		<\\E[%{gy,1,+,d};%{gx,1,+,d}R>			\
									\
ROP_PRIMARY_DA		<\\E[?1;2c>					\
ROP_SECONDARY_DA	<\\E[?1;2c>					\
									\
/* Setup stuff */							\
									\
/* Request to initialize the emulation				*/	\
/* Initialize the tty to get the state from the caller		*/	\
/*								*/	\
/* Initialize the canvas:					*/	\
/* Preset G0 to be ASCII, G1 to be Graphics,			*/	\
/* G2 to be DEC Supplementary and G3 to be UK national;		*/	\
/* Add Translations 2 (Numeric Keypad), 4 (Normal Cursor Keys),	*/	\
/*     5 (Function Keys), 6 (misc Function Keys)		*/	\
/*     7 Umlaute and 8 (the Compose Key stuff);			*/	\
/* Set the FLUT to contain ASCII in the lower half 		*/	\
/*     and DEC supplementary characters in the upper half	*/	\
/*								*/	\
/* IF we have more than 2 colors				*/	\
/* Initialize colors 1 to 8 to be 				*/	\
/*       1 black						*/	\
/*       2 red							*/	\
/*       3 green						*/	\
/*       4 yellow						*/	\
/*       5 blue							*/	\
/*       6 magenta						*/	\
/*       7 cyan							*/	\
/*	 8 white						*/	\
/* both on background and foreground				*/	\
/*								*/	\
ROP_INIT_CANVAS		<%{						\
			"ascii" p0 "dec" p1 "graphics" p2 "uk" p3	\
			0 p5, 1 p6					\
			"numKeypad" pa OP_OVERRIDE_TRANSLATIONS C	\
			"normCKeys" pa OP_OVERRIDE_TRANSLATIONS C	\
			"fkeys" pa OP_OVERRIDE_TRANSLATIONS C		\
			"miscFkeys" pa OP_OVERRIDE_TRANSLATIONS C	\
			"multiKeys" pa OP_OVERRIDE_TRANSLATIONS C	\
			"ascii" pa  32 pb OP_CHANGE_FLUT C		\
			"dec" pa 160 pb OP_CHANGE_FLUT C		\
			0 pF						\
			OP_CANVAS_DISPLAY_CELLS C ga 2 = ! ?		\
                           1 pa "black" D pb pc OP_SET_CIT_CELL C	\
                           2 pa "red" D pb pc OP_SET_CIT_CELL C		\
                           3 pa "green" D pb pc OP_SET_CIT_CELL C	\
                           4 pa "yellow" D pb pc OP_SET_CIT_CELL C	\
                           5 pa "blue" D pb pc OP_SET_CIT_CELL C	\
                           6 pa "magenta" D pb pc OP_SET_CIT_CELL C	\
                           7 pa "cyan" D pb pc OP_SET_CIT_CELL C	\
			   8 pa "white" D pb pc OP_SET_CIT_CELL C	\
			;						\
			}>
