Changed variable killchar to killch and erasechar to erasech to avoid
a name clash with the library functions of the same name (in libncurses). This problem was masked when building tset shared (the local symbols had precedence), but caused tset to core dump when it was built -static.
This commit is contained in:
parent
8bcbe4b7a6
commit
e61715de39
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68617
@ -31,13 +31,14 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.1 (Berkeley) 6/9/93
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <termcap.h>
|
||||
|
||||
extern struct termios mode, oldmode;
|
||||
extern int Columns, isreset, Lines;
|
||||
extern int erasechar, intrchar, killchar;
|
||||
extern int erasech, intrchar, killch;
|
||||
|
||||
void add_mapping __P((char *, char *));
|
||||
void cat __P((char *));
|
||||
|
@ -169,19 +169,19 @@ set_control_chars()
|
||||
else
|
||||
bs_char = 0;
|
||||
|
||||
if (erasechar == 0 && bs_char != 0 && !tgetflag("os"))
|
||||
erasechar = -1;
|
||||
if (erasechar < 0)
|
||||
erasechar = (bs_char != 0) ? bs_char : CTRL('h');
|
||||
if (erasech == 0 && bs_char != 0 && !tgetflag("os"))
|
||||
erasech = -1;
|
||||
if (erasech < 0)
|
||||
erasech = (bs_char != 0) ? bs_char : CTRL('h');
|
||||
|
||||
if (mode.c_cc[VERASE] == 0 || erasechar != 0)
|
||||
mode.c_cc[VERASE] = erasechar ? erasechar : CERASE;
|
||||
if (mode.c_cc[VERASE] == 0 || erasech != 0)
|
||||
mode.c_cc[VERASE] = erasech ? erasech : CERASE;
|
||||
|
||||
if (mode.c_cc[VINTR] == 0 || intrchar != 0)
|
||||
mode.c_cc[VINTR] = intrchar ? intrchar : CINTR;
|
||||
|
||||
if (mode.c_cc[VKILL] == 0 || killchar != 0)
|
||||
mode.c_cc[VKILL] = killchar ? killchar : CKILL;
|
||||
if (mode.c_cc[VKILL] == 0 || killch != 0)
|
||||
mode.c_cc[VKILL] = killch ? killch : CKILL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -62,10 +62,10 @@ void usage __P((void));
|
||||
|
||||
struct termios mode, oldmode;
|
||||
|
||||
int erasechar; /* new erase character */
|
||||
int erasech; /* new erase character */
|
||||
int intrchar; /* new interrupt character */
|
||||
int isreset; /* invoked as reset */
|
||||
int killchar; /* new kill character */
|
||||
int killch; /* new kill character */
|
||||
int Lines, Columns; /* window size */
|
||||
speed_t Ospeed;
|
||||
|
||||
@ -110,7 +110,7 @@ main(argc, argv)
|
||||
add_mapping("dialup", optarg);
|
||||
break;
|
||||
case 'e': /* erase character */
|
||||
erasechar = optarg[0] == '^' && optarg[1] != '\0' ?
|
||||
erasech = optarg[0] == '^' && optarg[1] != '\0' ?
|
||||
optarg[1] == '?' ? '\177' : CTRL(optarg[1]) :
|
||||
optarg[0];
|
||||
break;
|
||||
@ -123,7 +123,7 @@ main(argc, argv)
|
||||
optarg[0];
|
||||
break;
|
||||
case 'k': /* kill character */
|
||||
killchar = optarg[0] == '^' && optarg[1] != '\0' ?
|
||||
killch = optarg[0] == '^' && optarg[1] != '\0' ?
|
||||
optarg[1] == '?' ? '\177' : CTRL(optarg[1]) :
|
||||
optarg[0];
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user