summaryrefslogtreecommitdiffstats
path: root/usr.bin/tset
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>2000-11-11 23:03:38 +0000
committerdg <dg@FreeBSD.org>2000-11-11 23:03:38 +0000
commit3d05ea18329d0232b9f11453c046a6ba9a0b88fd (patch)
treeb46acd9b141721d39cdf57d92b6f9f9c90503cf2 /usr.bin/tset
parent41a2af4aa78cb0838a57ddf63eaf05e17d92e122 (diff)
downloadFreeBSD-src-3d05ea18329d0232b9f11453c046a6ba9a0b88fd.zip
FreeBSD-src-3d05ea18329d0232b9f11453c046a6ba9a0b88fd.tar.gz
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.
Diffstat (limited to 'usr.bin/tset')
-rw-r--r--usr.bin/tset/extern.h3
-rw-r--r--usr.bin/tset/set.c16
-rw-r--r--usr.bin/tset/tset.c8
3 files changed, 14 insertions, 13 deletions
diff --git a/usr.bin/tset/extern.h b/usr.bin/tset/extern.h
index f1c1163..8cce228 100644
--- a/usr.bin/tset/extern.h
+++ b/usr.bin/tset/extern.h
@@ -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 *));
diff --git a/usr.bin/tset/set.c b/usr.bin/tset/set.c
index e5c52cf..515a87d 100644
--- a/usr.bin/tset/set.c
+++ b/usr.bin/tset/set.c
@@ -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;
}
/*
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c
index c146547..7a7ca82 100644
--- a/usr.bin/tset/tset.c
+++ b/usr.bin/tset/tset.c
@@ -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;
OpenPOWER on IntegriCloud