version 1.10, 1999/01/11 20:11:16 |
version 1.11, 1999/01/18 18:57:36 |
|
|
#include <curses.h> /* for bool typedef */ |
#include <curses.h> /* for bool typedef */ |
#include <dump_entry.h> |
#include <dump_entry.h> |
|
|
MODULE_ID("$From: tset.c,v 0.34 1998/09/05 22:02:19 tom Exp $") |
MODULE_ID("$From: tset.c,v 0.35 1999/01/02 19:57:24 tom Exp $") |
|
|
extern char **environ; |
extern char **environ; |
|
|
|
|
char *base = 0; |
char *base = 0; |
|
|
copy = strdup(arg); |
copy = strdup(arg); |
mapp = malloc((u_int)sizeof(MAP)); |
mapp = malloc(sizeof(MAP)); |
if (copy == 0 || mapp == 0) |
if (copy == 0 || mapp == 0) |
failed("malloc"); |
failed("malloc"); |
mapp->next = 0; |
mapp->next = 0; |
|
|
ttype = askuser(0); |
ttype = askuser(0); |
} |
} |
/* Find the terminfo entry. If it doesn't exist, ask the user. */ |
/* Find the terminfo entry. If it doesn't exist, ask the user. */ |
while ((rval = setupterm(ttype, STDOUT_FILENO, &errret)) != OK) { |
while ((rval = setupterm((NCURSES_CONST char *)ttype, STDOUT_FILENO, &errret)) != OK) { |
if (errret == 0) { |
if (errret == 0) { |
(void)fprintf(stderr, "tset: unknown terminal type %s\n", |
(void)fprintf(stderr, "tset: unknown terminal type %s\n", |
ttype); |
ttype); |
|
|
* Tell the user if a control key has been changed from the default value. |
* Tell the user if a control key has been changed from the default value. |
*/ |
*/ |
static void |
static void |
report(const char *name, int which, u_int def) |
report(const char *name, int which, unsigned def) |
{ |
{ |
#ifdef TERMIOS |
#ifdef TERMIOS |
u_int older, newer; |
unsigned older, newer; |
char *p; |
char *p; |
|
|
newer = mode.c_cc[which]; |
newer = mode.c_cc[which]; |
|
|
if (newer == 0177) |
if (newer == 0177) |
(void)fprintf(stderr, "delete.\n"); |
(void)fprintf(stderr, "delete.\n"); |
else if ((p = key_backspace) != 0 |
else if ((p = key_backspace) != 0 |
&& newer == (u_int)p[0] |
&& newer == (unsigned char)p[0] |
&& p[1] == '\0') |
&& p[1] == '\0') |
(void)fprintf(stderr, "backspace.\n"); |
(void)fprintf(stderr, "backspace.\n"); |
else if (newer < 040) { |
else if (newer < 040) { |
|
|
struct winsize win; |
struct winsize win; |
#endif |
#endif |
int ch, noinit, noset, quiet, Sflag, sflag, showterm; |
int ch, noinit, noset, quiet, Sflag, sflag, showterm; |
const char *p, *t; |
const char *p; |
const char *ttype; |
const char *ttype; |
#ifdef __OpenBSD__ |
#ifdef __OpenBSD__ |
char tcapbuf[1024]; |
char tcapbuf[1024], *t; |
int tcgetent(char *, const char *); |
int tcgetent(char *, const char *); |
void wrtermcap (char *); |
void wrtermcap (char *); |
#endif |
#endif |