⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcvt_hdr.h

📁 freebsd v4.4内核源码
💻 H
📖 第 1 页 / 共 4 页
字号:
#define	CSH	0x0800		/* ega/vga charset, upper half of 512 */#define CSSIZE	96		/* (physical) size of a character set *//* charset designations */#define D_G0		0	/* designated as G0 */#define D_G1		1	/* designated as G1 */#define D_G2		2	/* designated as G2 */#define D_G3		3	/* designated as G3 */#define D_G1_96		4	/* designated as G1 for 96-char charsets */#define D_G2_96		5	/* designated as G2 for 96-char charsets */#define D_G3_96		6	/* designated as G3 for 96-char charsets *//* which fkey-labels */#define SYS_FKL		0	/* in hp mode, sys-fkls are active */#define USR_FKL		1	/* in hp mode, user-fkls are active *//* arguments to async_update() */#define UPDATE_START	((void *)0)	/* do cursor update and requeue */#define UPDATE_STOP	((void *)1)	/* suspend cursor updates */#define UPDATE_KERN	((void *)2)	/* do cursor updates for kernel output *//* variables */#ifdef EXTERN#define WAS_EXTERN#else#define EXTERN extern#endifEXTERN	u_char	*more_chars;		/* response buffer via kbd */EXTERN	int	char_count;		/* response char count */EXTERN	u_char	color;			/* color or mono display */EXTERN	u_short	kern_attr;		/* kernel messages char attributes */EXTERN	u_short	user_attr;		/* character attributes */#if !PCVT_EMU_MOUSE#if PCVT_NETBSDEXTERN struct tty *pc_tty[PCVT_NSCREENS];#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)EXTERN struct tty pccons[PCVT_NSCREENS];#elseEXTERN struct tty *pccons[PCVT_NSCREENS];#endif /* PCVT_NETBSD */#else /* PCVT_EMU_MOUSE */#if PCVT_NETBSDEXTERN struct tty *pc_tty[PCVT_NSCREENS + 1];#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)EXTERN struct tty pccons[PCVT_NSCREENS + 1];#elseEXTERN struct tty *pccons[PCVT_NSCREENS + 1];#endif#endif /* PCVT_EMU_MOUSE */struct sixels {	u_char lower[MAXSIXEL];		/* lower half of char */	u_char upper[MAXSIXEL];		/* upper half of char */};struct udkentry {	u_char	first[MAXUDKEYS];	/* index to first char */	u_char	length[MAXUDKEYS];	/* length of this entry */};/* VGA palette handling */struct rgb {	u_char	r, g, b;		/* red/green/blue, valid 0..VGA_PMSK */};typedef struct video_state {	u_short	*Crtat;			/* video page start addr */	u_short *Memory;		/* malloc'ed memory start address */	struct tty *vs_tty;		/* pointer to this screen's tty */	u_char	maxcol;			/* 80 or 132 cols on screen */	u_char 	row, col;		/* current cursor position */	u_short	c_attr;			/* current character attributes */	u_char	vtsgr;			/* current sgr configuration */	u_short	cur_offset;		/* current cursor position offset */	u_char	bell_on;		/* flag, bell enabled */	u_char	sevenbit;		/* flag, data path 7 bits wide */	u_char	dis_fnc;		/* flag, display functions enable */	u_char	transparent;		/* flag, mk path tmp trnsprnt for ctls*/	u_char	scrr_beg;		/* scrolling region, begin */	u_char	scrr_len;		/* scrolling region, length */	u_char	scrr_end;		/* scrolling region, end */	u_char	screen_rows;		/* screen size, length - status lines */	u_char	screen_rowsize; 	/* screen size, length */	u_char	vga_charset;		/* VGA character set value */	u_char	lastchar;		/* flag, vt100 behaviour of last char */	u_char	lastrow;		/* save row, --------- " -----------  */	u_char	*report_chars;		/* ptr, status reports from terminal */	u_char	report_count;		/* count, ----------- " ------------ */	u_char	state;			/* escape sequence state machine */	u_char	m_awm;			/* flag, vt100 mode, auto wrap */	u_char	m_om;			/* flag, vt100 mode, origin mode */	u_char	sc_flag;		/* flag, vt100 mode,saved parms valid */	u_char	sc_row;			/* saved row */	u_char	sc_col;			/* saved col */	u_short sc_cur_offset;		/* saved cursor addr offset */	u_short	sc_attr;		/* saved attributes */	u_char	sc_vtsgr;		/* saved sgr configuration */	u_char	sc_awm;			/* saved auto wrap mode */	u_char	sc_om;			/* saved origin mode */	u_short	*sc_G0;			/* save G0 ptr */	u_short	*sc_G1;			/* save G1 ptr */	u_short	*sc_G2;			/* save G2 ptr */	u_short	*sc_G3;			/* save G3 ptr */	u_short	**sc_GL;		/* save GL ptr */	u_short	**sc_GR;		/* save GR ptr */	u_char	sc_sel;			/* selective erase state */	u_char	ufkl[8][17];		/* user fkey-labels */	u_char	sfkl[8][17];		/* system fkey-labels */	u_char	labels_on;		/* display fkey labels etc. on/off */	u_char	which_fkl;		/* which fkey labels are active */	char	tab_stops[MAXTAB]; 	/* table of active tab stops */	u_char	parmi;			/* parameter index */	u_char	parms[MAXPARMS];	/* parameter array */	u_char	hp_state;		/* hp escape sequence state machine */	u_char	attribute;		/* attribute normal, tx only, local */	u_char	key;			/* fkey label no */	u_char	l_len;			/* buffer length's */	u_char	s_len;	u_char	m_len;	u_char	i;			/* help (got short of names ...) */	u_char	l_buf[MAX_LABEL+1]; 	/* buffers */	u_char	s_buf[MAX_STRING+1];	u_char	m_buf[MAX_STATUS+1];	u_char	openf;			/* we are opened ! */	u_char	vt_pure_mode;		/* no fkey labels, row/col, status */	u_char	cursor_start;		/* Start of cursor */	u_char	cursor_end;		/* End of cursor */	u_char	cursor_on;		/* cursor switched on */	u_char	ckm;			/* true = cursor key normal mode */	u_char	irm;			/* true = insert mode */	u_char	lnm;			/* Line Feed/New Line Mode */	u_char	dcs_state;		/* dcs escape sequence state machine */	u_char	udk_def[MAXUDKDEF]; 	/* new definitions for vt220 FKeys */	u_char	udk_defi;		/* index for FKey definitions */	u_char	udk_deflow;		/* low or high nibble in sequence */	u_char	udk_fnckey;		/* function key to assign to */	u_char	dld_dscs[DSCS_LENGTH];	/* designate soft character set id */	u_char	dld_dscsi;		/* index for dscs */	u_char	dld_sixel_lower;	/* upper/lower sixels of character */	u_char	dld_sixelli;		/* index for lower sixels */	u_char	dld_sixelui;		/* index for upper sixels */	struct sixels sixel;		/* structure for storing char sixels */	u_char	selchar;		/* true = selective attribute on */	u_int	decsca[MAXDECSCA];	/* Select Character Attrib bit array */	u_short **GL;			/* ptr to current GL conversion table*/	u_short **GR;			/* ptr to current GR conversion table*/	u_short *G0;			/* ptr to current G0 conversion table*/	u_short *G1;			/* ptr to current G1 conversion table*/	u_char force24;			/* force 24 lines in DEC 25 and HP 28*/	u_short *G2;			/* ptr to current G2 conversion table*/	u_short *G3;			/* ptr to current G3 conversion table*/	u_char	dld_id[DSCS_LENGTH+1];	/* soft character set id */	u_char	which[DSCS_LENGTH+1];	/* which set to designate */	u_char	whichi;			/* index into which ..	*/	u_char  ss;			/* flag, single shift G2 / G3 -> GL */	u_short **Gs;			/* ptr to cur. G2/G3 conversion table*/	u_char	udkbuf[MAXUDKDEF];	/* buffer for user defined keys */	struct udkentry ukt;		/* index & length for each udk */	u_char	udkff;			/* index into buffer first free entry*/	struct rgb palette[NVGAPEL];	/* saved VGA DAC palette */	u_char	wd132col;		/* we are on a wd vga and in 132 col */	u_char	scroll_lock; 		/* scroll lock active */	u_char	caps_lock;		/* caps lock active */	u_char	shift_lock;		/* shiftlock flag (virtual ..) */	u_char	num_lock;		/* num lock, true = keypad num mode */	u_char	abs_write;		/* write outside of scroll region */#if PCVT_USL_VT_COMPAT			/* SysV compatibility :-( */	struct vt_mode smode;	struct proc *proc;	pid_t pid;	unsigned vt_status;#define	VT_WAIT_REL 1			/* wait till process released vt */#define VT_WAIT_ACK 2			/* wait till process ack vt acquire */#define VT_GRAFX    4			/* vt runs graphics mode */#define VT_WAIT_ACT 8			/* a process is sleeping on this vt */					/*  becoming active */#endif /* PCVT_USL_VT_COMPAT */} video_state;EXTERN video_state vs[PCVT_NSCREENS];	/* parameters for screens */struct vga_char_state {	int	loaded;		/* Whether a font is loaded here */	int	secondloaded;	/* an extension characterset was loaded, */				/*	the number is found here	 */	u_char	char_scanlines;	/* Scanlines per character */	u_char	scr_scanlines;	/* Low byte of scanlines per screen */	int	screen_size;	/* Screen size in SIZ_YYROWS */};EXTERN struct vga_char_state vgacs[NVGAFONTS];	/* Character set states */#if PCVT_EMU_MOUSEstruct mousestat {	struct timeval lastmove; /* last time the pointer moved */	u_char opened;		 /* someone would like to use a mouse */	u_char minor;		 /* minor device number */	u_char buttons;		 /* current "buttons" pressed */	u_char extendedseen;	 /* 0xe0 has been seen, do not use next key */	u_char breakseen;	 /* key break has been seen for a sticky btn */};#endif /* PCVT_EMU_MOUSE */#ifdef WAS_EXTERN#if PCVT_NETBSD > 9int pcprobe ();void pcattach ();struct cfdriver vtcd = {	NULL, "vt", pcprobe, pcattach, DV_TTY, sizeof(struct device)};#elseint pcprobe ( struct isa_device *dev );int pcattach ( struct isa_device *dev );struct	isa_driver vtdriver = {		/* driver routines */	pcprobe, pcattach, "vt", 1,};#endif /* PCVT_NETBSD > 9 */u_char fgansitopc[] = {			/* foreground ANSI color -> pc */	FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, FG_BLUE,	FG_MAGENTA, FG_CYAN, FG_LIGHTGREY};u_char bgansitopc[] = {			/* background ANSI color -> pc */	BG_BLACK, BG_RED, BG_GREEN, BG_BROWN, BG_BLUE,	BG_MAGENTA, BG_CYAN, BG_LIGHTGREY};#if !PCVT_NETBSD/* XXX Crtat is shared with syscons. */u_short *Crtat;			/* screen start address */#if !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)struct tty *pcconsp =	&pccons[0];		/* ptr to current device */#else /* PCVT_FREEBSD > 110 */struct tty *pcconsp;#endif /* !(PCVT_FREEBSD > 110) */#elsestruct tty *pcconsp;		/* ptr to current device, see pcattach() */#endif /* PCVT_NETBSD */#if PCVT_EMU_MOUSEstruct mousestat	mouse = {0};struct mousedefs	mousedef = {0x3b, 0x3c, 0x3d, 0,     250000};#endif /* PCVT_EMU_MOUSE */	/*  F1,   F2,   F3,   false, 0.25 sec */video_state *vsp 		= &vs[0]; /* ptr to current screen parms */#if PCVT_USL_VT_COMPATint	vt_switch_pending	= 0; 		/* if > 0, a vt switch is */#endif /* PCVT_USL_VT_COMPAT */			/* pending; contains the # */						/* of the old vt + 1 */u_int	addr_6845		= MONO_BASE;	/* crtc base addr */u_char	do_initialization	= 1;		/* we have to init ourselves */u_char	pcvt_is_console		= 0;		/* until we know it */u_char 	shift_down 		= 0;		/* shift key down flag */u_char	ctrl_down		= 0; 		/* ctrl key down flag */u_char	meta_down		= 0; 		/* alt key down flag */u_char	altgr_down		= 0; 		/* altgr key down flag */u_char	kbrepflag		= 1;		/* key repeat flag */u_char	totalscreens		= 1;		/* screens available */u_char	current_video_screen	= 0;		/* displayed screen no */u_char	adaptor_type 		= UNKNOWN_ADAPTOR;/* adaptor type */u_char 	vga_type 		= VGA_UNKNOWN;	/* vga chipset */u_char	can_do_132col		= 0;		/* vga chipset can 132 cols */u_char	vga_family		= 0;		/* vga manufacturer */u_char	totalfonts		= 0;		/* fonts available */u_char	chargen_access		= 0;		/* synchronize access */u_char	keyboard_type		= KB_UNKNOWN;	/* type of keyboard */u_char	keyboard_is_initialized = 0;		/* for ddb sanity */u_char	kbd_polling		= 0;		/* keyboard is being polled */#ifdef _I386_ISA_KBDIO_H_u_char	reset_keyboard		= 0;		/* OK to reset keyboard */KBDC	kbdc			= NULL;		/* keyboard controller */#endif /* _I386_ISA_KBDIO_H_ */#if PCVT_SHOWKEYSu_char	keyboard_show		= 0;		/* normal display */#endif /* PCVT_SHOWKEYS */u_char	cursor_pos_valid	= 0;		/* sput left a valid position*/u_char	critical_scroll		= 0;		/* inside scrolling up */int	switch_page		= -1;		/* which page to switch to */#if PCVT_SCREENSAVERu_char	reset_screen_saver	= 1;		/* reset the saver next time */u_char	scrnsv_active		= 0;		/* active flag */#endif /* PCVT_SCREENSAVER */#ifdef XSERVERunsigned scrnsv_timeout		= 0;		/* initially off */#if !PCVT_USL_VT_COMPATu_char pcvt_xmode		= 0;		/* display is grafx */#endif /* PCVT_USL_VT_COMPAT */u_char pcvt_kbd_raw		= 0;		/* keyboard sends scans */#endif /* XSERVER */#if PCVT_BACKUP_FONTSu_char *saved_charsets[NVGAFONTS] = {0};	/* backup copy of fonts */#endif /* PCVT_BACKUP_FONTS *//*---------------------------------------------------------------------------	VT220 attributes -> internal emulator attributes conversion tables	be careful when designing color combinations, because on	EGA and VGA displays, bit 3 of the attribute byte is used	for characterset switching, and is no longer available for	foreground intensity (bold)!---------------------------------------------------------------------------*//* color displays */u_char sgr_tab_color[16] = {/*00*/  (BG_BLACK     | FG_LIGHTGREY),             /* normal               *//*01*/  (BG_BLUE      | FG_LIGHTGREY),             /* bold                 *//*02*/  (BG_BROWN     | FG_LIGHTGREY),             /* underline            *//*03*/  (BG_MAGENTA   | FG_LIGHTGREY),             /* bold+underline       *//*04*/  (BG_BLACK     | FG_LIGHTGREY | FG_BLINK),  /* blink                *//*05*/  (BG_BLUE      | FG_LIGHTGREY | FG_BLINK),  /* bold+blink           *//*06*/  (BG_BROWN     | FG_LIGHTGREY | FG_BLINK),  /* underline+blink      *//*07*/  (BG_MAGENTA   | FG_LIGHTGREY | FG_BLINK),  /* bold+underline+blink *//*08*/  (BG_LIGHTGREY | FG_BLACK),                 /* invers               *//*09*/  (BG_LIGHTGREY | FG_BLUE),                  /* bold+invers          *//*10*/  (BG_LIGHTGREY | FG_BROWN),                 /* underline+invers     *//*11*/  (BG_LIGHTGREY | FG_MAGENTA),               /* bold+underline+invers*//*12*/  (BG_LIGHTGREY | FG_BLACK      | FG_BLINK), /* blink+invers         *//*13*/  (BG_LIGHTGREY | FG_BLUE       | FG_BLINK), /* bold+blink+invers    *//*14*/  (BG_LIGHTGREY | FG_BROWN      | FG_BLINK), /* underline+blink+invers*//*15*/  (BG_LIGHTGREY | FG_MAGENTA    | FG_BLINK)  /*bold+underl+blink+invers*/};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -