tty: document the termcap codes
some of the termcap codes were missing document comments.
This commit is contained in:
+16
-15
@@ -227,34 +227,34 @@ tty_startup(int *wid, int *hgt)
|
|||||||
if (CO < COLNO || LI < ROWNO + 3)
|
if (CO < COLNO || LI < ROWNO + 3)
|
||||||
setclipped();
|
setclipped();
|
||||||
#endif
|
#endif
|
||||||
nh_ND = Tgetstr("nd");
|
nh_ND = Tgetstr("nd"); /* move cursor right 1 column */
|
||||||
if (tgetflag("os"))
|
if (tgetflag("os")) /* term can overstrike */
|
||||||
error("NetHack can't have OS.");
|
error("NetHack can't have OS.");
|
||||||
if (tgetflag("ul"))
|
if (tgetflag("ul")) /* underline by overstrike w/ underscore */
|
||||||
ul_hack = TRUE;
|
ul_hack = TRUE;
|
||||||
CE = Tgetstr("ce");
|
CE = Tgetstr("ce"); /* clear line from cursor to eol */
|
||||||
UP = Tgetstr("up");
|
UP = Tgetstr("up"); /* move cursor up 1 line */
|
||||||
/* It seems that xd is no longer supported, and we should use
|
/* It seems that xd is no longer supported, and we should use
|
||||||
a linefeed instead; unfortunately this requires resetting
|
a linefeed instead; unfortunately this requires resetting
|
||||||
CRMOD, and many output routines will have to be modified
|
CRMOD, and many output routines will have to be modified
|
||||||
slightly. Let's leave that till the next release. */
|
slightly. Let's leave that till the next release. */
|
||||||
XD = Tgetstr("xd");
|
XD = Tgetstr("xd");
|
||||||
/* not: XD = Tgetstr("do"); */
|
/* not: XD = Tgetstr("do"); */
|
||||||
if (!(nh_CM = Tgetstr("cm"))) {
|
if (!(nh_CM = Tgetstr("cm"))) { /* cm: move cursor */
|
||||||
if (!UP && !HO)
|
if (!UP && !HO)
|
||||||
error("NetHack needs CM or UP or HO.");
|
error("NetHack needs CM or UP or HO.");
|
||||||
tty_raw_print("Playing NetHack on terminals without CM is suspect.");
|
tty_raw_print("Playing NetHack on terminals without CM is suspect.");
|
||||||
tty_wait_synch();
|
tty_wait_synch();
|
||||||
}
|
}
|
||||||
SO = Tgetstr("so");
|
SO = Tgetstr("so"); /* standout start */
|
||||||
SE = Tgetstr("se");
|
SE = Tgetstr("se"); /* standout end */
|
||||||
nh_US = Tgetstr("us");
|
nh_US = Tgetstr("us"); /* underline start */
|
||||||
nh_UE = Tgetstr("ue");
|
nh_UE = Tgetstr("ue"); /* underline end */
|
||||||
SG = tgetnum("sg"); /* -1: not fnd; else # of spaces left by so */
|
SG = tgetnum("sg"); /* -1: not fnd; else # of spaces left by so */
|
||||||
if (!SO || !SE || (SG > 0))
|
if (!SO || !SE || (SG > 0))
|
||||||
SO = SE = nh_US = nh_UE = nullstr;
|
SO = SE = nh_US = nh_UE = nullstr;
|
||||||
TI = Tgetstr("ti");
|
TI = Tgetstr("ti"); /* nonconsequential cursor movement start */
|
||||||
TE = Tgetstr("te");
|
TE = Tgetstr("te"); /* nonconsequential cursor movement end */
|
||||||
VS = VE = nullstr;
|
VS = VE = nullstr;
|
||||||
#ifdef TERMINFO
|
#ifdef TERMINFO
|
||||||
VS = Tgetstr("eA"); /* enable graphics */
|
VS = Tgetstr("eA"); /* enable graphics */
|
||||||
@@ -282,9 +282,9 @@ tty_startup(int *wid, int *hgt)
|
|||||||
nh_HE = dupstr(&ME[i]);
|
nh_HE = dupstr(&ME[i]);
|
||||||
dynamic_HIHE = TRUE;
|
dynamic_HIHE = TRUE;
|
||||||
|
|
||||||
AS = Tgetstr("as");
|
AS = Tgetstr("as"); /* alt charset start */
|
||||||
AE = Tgetstr("ae");
|
AE = Tgetstr("ae"); /* alt charset end */
|
||||||
nh_CD = Tgetstr("cd");
|
nh_CD = Tgetstr("cd"); /* clear lines from cursor and down */
|
||||||
#ifdef TEXTCOLOR
|
#ifdef TEXTCOLOR
|
||||||
#if defined(TOS) && defined(__GNUC__)
|
#if defined(TOS) && defined(__GNUC__)
|
||||||
if (!strcmp(term, "builtin") || !strcmp(term, "tw52")
|
if (!strcmp(term, "builtin") || !strcmp(term, "tw52")
|
||||||
@@ -297,6 +297,7 @@ tty_startup(int *wid, int *hgt)
|
|||||||
#endif
|
#endif
|
||||||
*wid = CO;
|
*wid = CO;
|
||||||
*hgt = LI;
|
*hgt = LI;
|
||||||
|
/* cl: clear screen, set cursor to upper left */
|
||||||
if (!(CL = Tgetstr("cl"))) /* last thing set */
|
if (!(CL = Tgetstr("cl"))) /* last thing set */
|
||||||
error("NetHack needs CL.");
|
error("NetHack needs CL.");
|
||||||
if ((int) (tbufptr - tbuf) > (int) (sizeof tbuf))
|
if ((int) (tbufptr - tbuf) > (int) (sizeof tbuf))
|
||||||
|
|||||||
Reference in New Issue
Block a user