home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
util
/
vim-3.0.lha
/
Vim
/
src
/
term.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-09
|
16KB
|
866 lines
/* vi:ts=4:sw=4
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Read the file "credits.txt" for a list of people who contributed.
* Read the file "uganda.txt" for copying and usage conditions.
*/
/*
* This file contains the machine dependent escape sequences that the editor
* needs to perform various operations. Some of the sequences here are
* optional. Anything not available should be indicated by a null string. In
* the case of insert/delete line sequences, the editor checks the capability
* and works around the deficiency, if necessary.
*/
#ifdef SASC
/*
* the SAS C compiler has a bug that makes typedefs being forget sometimes
*/
typedef unsigned char char_u;
#endif
/*
* the terminal capabilities are stored in this structure
* keep in sync with array in term.c
*/
typedef struct _tcarr
{
/* output codes */
char_u *t_name; /* name of this terminal entry */
char_u *t_el; /* el ce clear to end of line */
char_u *t_il; /* il1 al add new blank line */
char_u *t_cil; /* il AL add number of blank lines */
char_u *t_dl; /* dl1 dl delete line */
char_u *t_cdl; /* dl DL delete number of lines */
char_u *t_cs; /* cs scroll region */
char_u *t_ed; /* clear cl clear screen */
char_u *t_ci; /* civis vi cursur invisible */
char_u *t_cv; /* cnorm ve cursur visible */
char_u *t_cvv; /* cvvis vs cursor very visible */
char_u *t_tp; /* sgr0 me normal mode */
char_u *t_ti; /* rev mr reverse mode */
char_u *t_tb; /* bold md bold mode */
char_u *t_se; /* rmso se normal mode */
char_u *t_so; /* smso so standout mode */
char_u *t_ms; /* msgr ms save to move cursor in reverse mode */
char_u *t_cm; /* cup cm cursor motion */
char_u *t_sr; /* ri sr scroll reverse (backward) */
char_u *t_cri; /* cuf RI cursor number of chars right */
char_u *t_vb; /* flash vb visual bell */
char_u *t_ks; /* smkx ks put terminal in "keypad transmit" mode */
char_u *t_ke; /* rmkx ke out of "keypad transmit" mode */
char_u *t_ts; /* ti put terminal in termcap mode */
char_u *t_te; /* te out of termcap mode */
/* key codes */
char_u *t_ku; /* kcuu1 ku arrow up */
char_u *t_kd; /* kcud1 kd arrow down */
char_u *t_kl; /* kcub1 kl arrow left */
char_u *t_kr; /* kcuf1 kr arrow right */
char_u *t_sku; /* shift arrow up */
char_u *t_skd; /* shift arrow down */
char_u *t_skl; /* kLFT #4 shift arrow left */
char_u *t_skr; /* kRIT % shift arrow right */
char_u *t_f1; /* kf1 k1 function key 1 */
char_u *t_f2; /* kf2 k2 function key 2 */
char_u *t_f3; /* kf3 k3 function key 3 */
char_u *t_f4; /* kf4 k4 function key 4 */
char_u *t_f5; /* kf5 k5 function key 5 */
char_u *t_f6; /* kf6 k6 function key 6 */
char_u *t_f7; /* kf7 k7 function key 7 */
char_u *t_f8; /* kf8 k8 function key 8 */
char_u *t_f9; /* kf9 k9 function key 9 */
char_u *t_f10; /* kf10 k; function key 10 */
char_u *t_sf1; /* kf11 F1 shifted function key 1 */
char_u *t_sf2; /* kf12 F2 shifted function key 2 */
char_u *t_sf3; /* kf13 F3 shifted function key 3 */
char_u *t_sf4; /* kf14 F4 shifted function key 4 */
char_u *t_sf5; /* kf15 F5 shifted function key 5 */
char_u *t_sf6; /* kf16 F6 shifted function key 6 */
char_u *t_sf7; /* kf17 F7 shifted function key 7 */
char_u *t_sf8; /* kf18 F8 shifted function key 8 */
char_u *t_sf9; /* kf19 F9 shifted function key 9 */
char_u *t_sf10; /* kf20 FA shifted function key 10 */
char_u *t_help; /* khlp %1 help key */
char_u *t_undo; /* kund &8 undo key */
/* adjust inchar() for last key entry! */
char_u *t_csc; /* - - cursor relative to scrolling region */
} Tcarr;
extern Tcarr term_strings; /* currently used terminal strings */
/*
* strings used for terminal
*/
#define T_EL (term_strings.t_el)
#define T_IL (term_strings.t_il)
#define T_CIL (term_strings.t_cil)
#define T_DL (term_strings.t_dl)
#define T_CDL (term_strings.t_cdl)
#define T_CS (term_strings.t_cs)
#define T_ED (term_strings.t_ed)
#define T_CI (term_strings.t_ci)
#define T_CV (term_strings.t_cv)
#define T_CVV (term_strings.t_cvv)
#define T_TP (term_strings.t_tp)
#define T_TI (term_strings.t_ti)
#define T_TB (term_strings.t_tb)
#define T_SE (term_strings.t_se)
#define T_SO (term_strings.t_so)
#define T_MS (term_strings.t_ms)
#define T_CM (term_strings.t_cm)
#define T_SR (term_strings.t_sr)
#define T_CRI (term_strings.t_cri)
#define T_VB (term_strings.t_vb)
#define T_KS (term_strings.t_ks)
#define T_KE (term_strings.t_ke)
#define T_TS (term_strings.t_ts)
#define T_TE (term_strings.t_te)
#define T_CSC (term_strings.t_csc)
#ifndef TERMINFO
# ifndef NO_BUILTIN_TCAPS
/*
* here are the builtin termcap entries.
* They not stored as complete Tcarr structures, as such a structure
* is to big.
* Each termcap is a concatenated string of entries, where '\0' characters
* followed by a skip character sepereate the capabilities. The skip
* character is the relative structure offset for the following entry.
* See parse_builtin_tcap() in term.c for all details.
*/
# define AMIGA_TCAP "amiga\0\
\0\033[K\0\
\0\033[L\0\
\0\033[%dL\0\
\0\033[M\0\
\0\033[%dM\0\
\1\014\0\
\0\033[0 p\0\
\0\033[1 p\0\
\1\033[0m\0\
\0\033[7m\0\
\0\033[1m\0\
\0\033[0m\0\
\0\033[33m\0\
\0\001\0\
\0\033[%i%d;%dH\0\
\1\033[%dC\0\
\5\233A\0\
\0\233B\0\
\0\233D\0\
\0\233C\0\
\0\233T\0\
\0\233S\0\
\0\233 A\0\
\0\233 @\0\
\0\233\060~\0\
\0\233\061~\0\
\0\233\062~\0\
\0\233\063~\0\
\0\233\064~\0\
\0\233\065~\0\
\0\233\066~\0\
\0\233\067~\0\
\0\233\070~\0\
\0\233\071~\0\
\0\233\061\060~\0\
\0\233\061\061~\0\
\0\233\061\062~\0\
\0\233\061\063~\0\
\0\233\061\064~\0\
\0\233\061\065~\0\
\0\233\061\066~\0\
\0\233\061\067~\0\
\0\233\061\070~\0\
\0\233\061\071~\0\
\0\233?~\0\
\0\0"
# define ATARI_TCAP "atari\0\
\0\033l\0\
\0\033L\0\
\1\033M\0\
\2\033E\0\
\0\033f\0\
\0\033e\0\
\0\0"
# define ANSI_TCAP "ansi\0\
\0\033[2K\0\
\0\033[L\0\
\0\033[%dL\0\
\0\033[M\0\
\0\033[%dM\0\
\1\033[2J\0\
\3\033[0m\0\
\0\033[7m\0\
\3\001\0\
\0\033[%i%d;%dH\0\
\1\033[%dC\0\
\0\0"
/*
* These codes are valid when nansi.sys or equivalent has been installed.
* Function keys on a PC are preceded with a NUL. These are converted into
* K_NUL '\316' in GetChars(), because we cannot handle NULs in key codes.
* CTRL-arrow is used instead of SHIFT-arrow.
*/
# define PCANSI_TCAP "pcansi\0\
\0\033[K\0\
\0\033[L\0\
\1\033[M\0\
\2\033[2J\0\
\3\033[0m\0\
\0\033[7m\0\
\3\001\0\
\0\033[%i%d;%dH\0\
\1\033[%dC\0\
\5\316H\0\
\0\316P\0\
\0\316K\0\
\0\316M\0\
\2\316s\0\
\0\316t\0\
\0\316;\0\
\0\316<\0\
\0\316=\0\
\0\316>\0\
\0\316?\0\
\0\316@\0\
\0\316A\0\
\0\316B\0\
\0\316C\0\
\0\316D\0\
\0\316T\0\
\0\316U\0\
\0\316V\0\
\0\316W\0\
\0\316X\0\
\0\316Y\0\
\0\316Z\0\
\0\316[\0\
\0\316\\\0\
\0\316]\0\
\0\0"
/*
* These codes are valid for the pc video.
* The entries that start with ESC | are translated into conio calls in msdos.c.
*/
# define PCTERM_TCAP "pcterm\0\
\0\033|K\0\
\0\033|L\0\
\1\033|M\0\
\1\033|%i%d;%dr\0\
\0\033|J\0\
\3\033|0m\0\
\0\033|112m\0\
\0\033|63m\0\
\0\033|0m\0\
\0\033|31m\0\
\0\001\0\
\0\033|%i%d;%dH\0\
\7\316H\0\
\0\316P\0\
\0\316K\0\
\0\316M\0\
\2\316s\0\
\0\316t\0\
\0\316;\0\
\0\316<\0\
\0\316=\0\
\0\316>\0\
\0\316?\0\
\0\316@\0\
\0\316A\0\
\0\316B\0\
\0\316C\0\
\0\316D\0\
\0\316T\0\
\0\316U\0\
\0\316V\0\
\0\316W\0\
\0\316X\0\
\0\316Y\0\
\0\316Z\0\
\0\316[\0\
\0\316\\\0\
\0\316]\0\
\0\0"
/*
* These codes are valid for the NT Console
* The entries that start with ESC | are translated into console calls
* in winnt.c.
*/
# define NTCONSOLE_TCAP "ntconsole\0\
\0\033|K\0\
\0\033|L\0\
\0\033|%dL\0\
\0\033|M\0\
\0\033|%dM\0\
\1\033|J\0\
\0\033|v\0\
\0\033|V\0\
\1\033|0m\0\
\0\033|112m\0\
\0\033|63m\0\
\0\033|0m\0\
\0\033|31m\0\
\0\001\0\
\0\033|%i%d;%dH\0\
\7\316H\0\
\0\316P\0\
\0\316K\0\
\0\316M\0\
\2\316s\0\
\0\316t\0\
\0\316;\0\
\0\316<\0\
\0\316=\0\
\0\316>\0\
\0\316?\0\
\0\316@\0\
\0\316A\0\
\0\316B\0\
\0\316C\0\
\0\316D\0\
\0\316T\0\
\0\316U\0\
\0\316V\0\
\0\316W\0\
\0\316