📄 pcvt_hdr.h
字号:
/* monochrome displays (VGA version, no intensity) */u_char sgr_tab_mono[16] = {/*00*/ (BG_BLACK | FG_LIGHTGREY), /* normal *//*01*/ (BG_BLACK | FG_UNDERLINE), /* bold *//*02*/ (BG_BLACK | FG_UNDERLINE), /* underline *//*03*/ (BG_BLACK | FG_UNDERLINE), /* bold+underline *//*04*/ (BG_BLACK | FG_LIGHTGREY | FG_BLINK), /* blink *//*05*/ (BG_BLACK | FG_UNDERLINE | FG_BLINK), /* bold+blink *//*06*/ (BG_BLACK | FG_UNDERLINE | FG_BLINK), /* underline+blink *//*07*/ (BG_BLACK | FG_UNDERLINE | FG_BLINK), /* bold+underline+blink *//*08*/ (BG_LIGHTGREY | FG_BLACK), /* invers *//*09*/ (BG_LIGHTGREY | FG_BLACK), /* bold+invers *//*10*/ (BG_LIGHTGREY | FG_BLACK), /* underline+invers *//*11*/ (BG_LIGHTGREY | FG_BLACK), /* bold+underline+invers*//*12*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK), /* blink+invers *//*13*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK), /* bold+blink+invers *//*14*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK), /* underline+blink+invers*//*15*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK) /*bold+underl+blink+invers*/};/* monochrome displays (MDA version, with intensity) */u_char sgr_tab_imono[16] = {/*00*/ (BG_BLACK | FG_LIGHTGREY), /* normal *//*01*/ (BG_BLACK | FG_LIGHTGREY | FG_INTENSE), /* bold *//*02*/ (BG_BLACK | FG_UNDERLINE), /* underline *//*03*/ (BG_BLACK | FG_UNDERLINE | FG_INTENSE), /* bold+underline *//*04*/ (BG_BLACK | FG_LIGHTGREY | FG_BLINK), /* blink *//*05*/ (BG_BLACK | FG_LIGHTGREY | FG_INTENSE | FG_BLINK), /* bold+blink *//*06*/ (BG_BLACK | FG_UNDERLINE | FG_BLINK), /* underline+blink *//*07*/ (BG_BLACK | FG_UNDERLINE | FG_BLINK | FG_INTENSE), /* bold+underline+blink *//*08*/ (BG_LIGHTGREY | FG_BLACK), /* invers *//*09*/ (BG_LIGHTGREY | FG_BLACK | FG_INTENSE), /* bold+invers *//*10*/ (BG_LIGHTGREY | FG_BLACK), /* underline+invers *//*11*/ (BG_LIGHTGREY | FG_BLACK | FG_INTENSE), /* bold+underline+invers*//*12*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK), /* blink+invers *//*13*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK | FG_INTENSE),/* bold+blink+invers*//*14*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK), /* underline+blink+invers*//*15*/ (BG_LIGHTGREY | FG_BLACK | FG_BLINK | FG_INTENSE) /* bold+underl+blink+invers */};#else /* WAS_EXTERN */extern u_char vga_type;extern struct tty *pcconsp;extern video_state *vsp;#if PCVT_EMU_MOUSEextern struct mousestat mouse;extern struct mousedefs mousedef;#endif /* PCVT_EMU_MOUSE */#if PCVT_USL_VT_COMPATextern int vt_switch_pending;#endif /* PCVT_USL_VT_COMPAT */extern u_int addr_6845;extern u_short *Crtat;extern u_char do_initialization;extern u_char pcvt_is_console;extern u_char bgansitopc[];extern u_char fgansitopc[];extern u_char shift_down;extern u_char ctrl_down;extern u_char meta_down;extern u_char altgr_down;extern u_char kbrepflag;extern u_char adaptor_type;extern u_char current_video_screen;extern u_char totalfonts;extern u_char totalscreens;extern u_char chargen_access;extern u_char keyboard_type;extern u_char can_do_132col;extern u_char vga_family;extern u_char keyboard_is_initialized;extern u_char kbd_polling;#ifdef _I386_ISA_KBDIO_H_extern u_char reset_keyboard;extern KBDC kbdc;#endif /* _I386_ISA_KBDIO_H_ */#if PCVT_SHOWKEYSextern u_char keyboard_show;#endif /* PCVT_SHOWKEYS */extern u_char cursor_pos_valid;extern u_char critical_scroll;extern int switch_page;#if PCVT_SCREENSAVERextern u_char reset_screen_saver;extern u_char scrnsv_active;#endif /* PCVT_SCREENSAVER */extern u_char sgr_tab_color[];extern u_char sgr_tab_mono[];extern u_char sgr_tab_imono[];#ifdef XSERVERextern unsigned scrnsv_timeout;extern u_char pcvt_xmode;extern u_char pcvt_kbd_raw;#endif /* XSERVER */#if PCVT_BACKUP_FONTSextern u_char *saved_charsets[NVGAFONTS];#endif /* PCVT_BACKUP_FONTS */#endif /* WAS_EXTERN *//* * FreeBSD > 1.0.2 cleaned up the kernel definitions (with the aim of * getting ANSI-clean). Since there has been a mixed usage of types like * "dev_t" (actually some short) in prototyped and non-prototyped fasion, * each of those types is declared as "int" within function prototypes * (which is what the compiler would actually promote it to). * * The macros below are used to clarify which type a parameter ought to * be, regardless of its actual promotion to "int". */#define Dev_t int#define U_short int#define U_char int/* * In FreeBSD >= 2.0, dev_t has type `unsigned long', so promoting it * doesn't cause any problems in prototypes. */#if PCVT_FREEBSD >= 200#undef Dev_t#define Dev_t dev_t#endif#if !PCVT_FREEBSD || (PCVT_FREEBSD < 210)extern void bcopyb(void *from, void *to, u_int length);#endif#if !PCVT_FREEBSD || (PCVT_FREEBSD < 200)extern void fillw(U_short value, void *addr, u_int length);#endifint pcparam ( struct tty *tp, struct termios *t );/* * In FreeBSD > 2.0.6, driver console functions are declared in machine/cons.h * and some return void, so don't declare them here. */#if PCVT_FREEBSD <= 205int pccnprobe ( struct consdev *cp );int pccninit ( struct consdev *cp );int pccngetc ( Dev_t dev );int pccncheckc ( Dev_t dev );int pccnputc ( Dev_t dev, U_char c );#endifvoid pcstart ( struct tty *tp );void pcstop ( struct tty *tp, int flag );# if PCVT_FREEBSD < 200void consinit ( void );# endif#if PCVT_USL_VT_COMPATvoid switch_screen ( int n, int oldgrafx, int newgrafx );int usl_vt_ioctl (Dev_t dev, int cmd, caddr_t data, int flag, struct proc *);int vt_activate ( int newscreen );int vgapage ( int n );void get_usl_keymap( keymap_t *map );void reset_usl_modes (struct video_state *vsx);#elsevoid vgapage ( int n );#endif /* PCVT_USL_VT_COMPAT */#if PCVT_EMU_MOUSEint mouse_ioctl ( Dev_t dev, int cmd, caddr_t data );#endif /* PCVT_EMU_MOUSE */#if PCVT_SCREENSAVERvoid pcvt_scrnsv_reset ( void );#endif /* PCVT_SCREENSAVER */#if PCVT_SCREENSAVER && defined(XSERVER)void pcvt_set_scrnsv_tmo ( int );#endif /* PCVT_SCREENSAVER && defined(XSERVER) */void vga_move_charset ( unsigned n, unsigned char *b, int save_it);void async_update ( void *arg );void clr_parms ( struct video_state *svsp );void cons_highlight ( void );void cons_normal ( void );void dprintf ( unsigned flgs, const char *fmt, ... );int egavga_test ( void );void fkl_off ( struct video_state *svsp );void fkl_on ( struct video_state *svsp );struct tty *get_pccons ( Dev_t dev );void init_sfkl ( struct video_state *svsp );void init_ufkl ( struct video_state *svsp );#ifndef _I386_ISA_KBDIO_H_int kbd_cmd ( int val );int kbd_response ( void );#endif /* _I386_ISA_KBDIO_H_ */void kbd_code_init ( void );void kbd_code_init1 ( void );#if PCVT_SCANSET > 1void kbd_emulate_pc(int do_emulation);#endifint kbdioctl ( Dev_t dev, int cmd, caddr_t data, int flag );void loadchar ( int fontset, int character, int char_scanlines, u_char *char_table );void mda2egaorvga ( void );void roll_up ( struct video_state *svsp, int n );void select_vga_charset ( int vga_charset );void set_2ndcharset ( void );void set_charset ( struct video_state *svsp, int curvgacs );void set_emulation_mode ( struct video_state *svsp, int mode );void set_screen_size ( struct video_state *svsp, int size );u_char *sgetc ( int noblock );void sixel_vga ( struct sixels *charsixel, u_char *charvga );void sput ( u_char *s, U_char attrib, int len, int page );void sw_cursor ( int onoff );void sw_sfkl ( struct video_state *svsp );void sw_ufkl ( struct video_state *svsp );void swritefkl ( int num, u_char *string, struct video_state *svsp );void toggl_awm ( struct video_state *svsp );void toggl_bell ( struct video_state *svsp );void toggl_columns ( struct video_state *svsp );void toggl_dspf ( struct video_state *svsp );void toggl_sevenbit ( struct video_state *svsp );void update_hp ( struct video_state *svsp );void update_led ( void );void vga10_vga10 ( u_char *invga, u_char *outvga );void vga10_vga14 ( u_char *invga, u_char *outvga );void vga10_vga16 ( u_char *invga, u_char *outvga );void vga10_vga8 ( u_char *invga, u_char *outvga );u_char vga_chipset ( void );int vga_col ( struct video_state *svsp, int cols );void vga_screen_off ( void );void vga_screen_on ( void );char *vga_string ( int number );int vga_test ( void );int vgaioctl ( Dev_t dev, int cmd, caddr_t data, int flag );void vgapaletteio ( unsigned idx, struct rgb *val, int writeit );void vt_aln ( struct video_state *svsp );void vt_clearudk ( struct video_state *svsp );void vt_clreol ( struct video_state *svsp );void vt_clreos ( struct video_state *svsp );void vt_clrtab ( struct video_state *svsp );int vt_col ( struct video_state *svsp, int cols );void vt_coldmalloc ( void );void vt_cub ( struct video_state *svsp );void vt_cud ( struct video_state *svsp );void vt_cuf ( struct video_state *svsp );void vt_curadr ( struct video_state *svsp );void vt_cuu ( struct video_state *svsp );void vt_da ( struct video_state *svsp );void vt_dch ( struct video_state *svsp );void vt_dcsentry ( U_char ch, struct video_state *svsp );void vt_designate ( struct video_state *svsp);void vt_dl ( struct video_state *svsp );void vt_dld ( struct video_state *svsp );void vt_dsr ( struct video_state *svsp );void vt_ech ( struct video_state *svsp );void vt_ic ( struct video_state *svsp );void vt_il ( struct video_state *svsp );void vt_ind ( struct video_state *svsp );void vt_initsel ( struct video_state *svsp );void vt_keyappl ( struct video_state *svsp );void vt_keynum ( struct video_state *svsp );void vt_mc ( struct video_state *svsp );void vt_nel ( struct video_state *svsp );void vt_rc ( struct video_state *svsp );void vt_reqtparm ( struct video_state *svsp );void vt_reset_ansi ( struct video_state *svsp );void vt_reset_dec_priv_qm ( struct video_state *svsp );void vt_ri ( struct video_state *svsp );void vt_ris ( struct video_state *svsp );void vt_sc ( struct video_state *svsp );void vt_sca ( struct video_state *svsp );void vt_sd ( struct video_state *svsp );void vt_sed ( struct video_state *svsp );void vt_sel ( struct video_state *svsp );void vt_set_ansi ( struct video_state *svsp );void vt_set_dec_priv_qm ( struct video_state *svsp );void vt_sgr ( struct video_state *svsp );void vt_stbm ( struct video_state *svsp );void vt_str ( struct video_state *svsp );void vt_su ( struct video_state *svsp );void vt_tst ( struct video_state *svsp );void vt_udk ( struct video_state *svsp );void toggl_24l ( struct video_state *svsp );#ifdef PCVT_INCLUDE_VT_SELATTR#define INT_BITS (sizeof(unsigned int) * 8)#define INT_INDEX(n) ((n) / INT_BITS)#define BIT_INDEX(n) ((n) % INT_BITS)/*---------------------------------------------------------------------------* * set selective attribute if appropriate *---------------------------------------------------------------------------*/static __inline void vt_selattr(struct video_state *svsp){ int i; i = (svsp->Crtat + svsp->cur_offset) - svsp->Crtat; if(svsp->selchar) svsp->decsca[INT_INDEX(i)] |= (1 << BIT_INDEX(i)); else svsp->decsca[INT_INDEX(i)] &= ~(1 << BIT_INDEX(i));}#endif /* PCVT_INCLUDE_VT_SELATTR *//*---------------------------------------------------------------------------* * produce 7 us delay accessing the keyboard controller *---------------------------------------------------------------------------*/#if PCVT_PORTIO_DELAY /* use multiple dummy accesses to port */ /* 0x84 to produce keyboard controller */ /* access delays */#define PCVT_KBD_DELAY() \ { (void)inb(0x84); } \ { (void)inb(0x84); } \ { (void)inb(0x84); } \ { (void)inb(0x84); } \ { (void)inb(0x84); } \ { (void)inb(0x84); }#else /* PCVT_PORTIO_DELAY */ /* use system supplied delay function for */ /* producing delays for accesssing the */ /* keyboard controller */#if PCVT_NETBSD > 9#define PCVT_KBD_DELAY() delay(7)#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)#define PCVT_KBD_DELAY() DELAY(7)#endif#endif /* PCVT_PORTIO_DELAY *//*---------------------------------- E O F ----------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -