diff options
Diffstat (limited to 'lib/libcurses/tinfo')
-rw-r--r-- | lib/libcurses/tinfo/captoinfo.c | 6 | ||||
-rw-r--r-- | lib/libcurses/tinfo/lib_cur_term.c | 20 | ||||
-rw-r--r-- | lib/libcurses/tinfo/lib_termname.c | 14 | ||||
-rw-r--r-- | lib/libcurses/tinfo/lib_ttyflags.c | 6 | ||||
-rw-r--r-- | lib/libcurses/tinfo/read_entry.c | 6 |
5 files changed, 27 insertions, 25 deletions
diff --git a/lib/libcurses/tinfo/captoinfo.c b/lib/libcurses/tinfo/captoinfo.c index 11b7d07e929..74185ae0ccf 100644 --- a/lib/libcurses/tinfo/captoinfo.c +++ b/lib/libcurses/tinfo/captoinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: captoinfo.c,v 1.2 1999/03/02 06:23:28 millert Exp $ */ +/* $OpenBSD: captoinfo.c,v 1.3 1999/08/15 11:40:55 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -96,7 +96,7 @@ #include <ctype.h> #include <tic.h> -MODULE_ID("$From: captoinfo.c,v 1.23 1999/02/28 23:42:20 tom Exp $") +MODULE_ID("$From: captoinfo.c,v 1.24 1999/07/24 20:06:13 tom Exp $") #define MAX_PUSHED 16 /* max # args we can push onto the stack */ #define MAX_ENTRY 2048 /* maximum chars in a translated capability */ @@ -588,7 +588,7 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ for (; *str && str != trimmed; str++) { int c1, c2; - char *cp; + char *cp = 0; if (str[0] == '\\' && (str[1] == '^' || str[1] == ',')) { diff --git a/lib/libcurses/tinfo/lib_cur_term.c b/lib/libcurses/tinfo/lib_cur_term.c index 782c1fff767..a7618f95a05 100644 --- a/lib/libcurses/tinfo/lib_cur_term.c +++ b/lib/libcurses/tinfo/lib_cur_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_cur_term.c,v 1.2 1999/03/02 06:23:28 millert Exp $ */ +/* $OpenBSD: lib_cur_term.c,v 1.3 1999/08/15 11:40:55 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -42,29 +42,29 @@ #include <term_entry.h> /* TTY, cur_term */ #include <termcap.h> /* ospeed */ -MODULE_ID("$From: lib_cur_term.c,v 1.7 1999/02/22 18:41:09 tom Exp $") +MODULE_ID("$From: lib_cur_term.c,v 1.8 1999/07/24 20:08:19 tom Exp $") TERMINAL *cur_term; -TERMINAL *set_curterm(TERMINAL *term) +TERMINAL *set_curterm(TERMINAL *termp) { TERMINAL *oldterm = cur_term; - if ((cur_term = term) != 0) { + if ((cur_term = termp) != 0) { ospeed = _nc_ospeed(cur_term->_baudrate); PC = (pad_char != NULL) ? pad_char[0] : 0; } return oldterm; } -int del_curterm(TERMINAL *term) +int del_curterm(TERMINAL *termp) { - T((T_CALLED("del_curterm(%p)"), term)); + T((T_CALLED("del_curterm(%p)"), termp)); - if (term != 0) { - _nc_free_termtype(&(term->type)); - free(term); - if (term == cur_term) + if (termp != 0) { + _nc_free_termtype(&(termp->type)); + free(termp); + if (termp == cur_term) cur_term = 0; returnCode(OK); } diff --git a/lib/libcurses/tinfo/lib_termname.c b/lib/libcurses/tinfo/lib_termname.c index dc4e69e2907..ad6353e01e9 100644 --- a/lib/libcurses/tinfo/lib_termname.c +++ b/lib/libcurses/tinfo/lib_termname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_termname.c,v 1.1 1999/01/18 19:10:20 millert Exp $ */ +/* $OpenBSD: lib_termname.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -31,18 +31,18 @@ #include <curses.priv.h> #include <tic.h> /* for MAX_ALIAS */ -MODULE_ID("$From: lib_termname.c,v 1.1 1998/12/19 23:07:43 tom Exp $") +MODULE_ID("$From: lib_termname.c,v 1.2 1999/07/24 21:02:40 tom Exp $") char *termname(void) { -char *term = getenv("TERM"); +char *name = getenv("TERM"); static char ret[MAX_ALIAS+1]; T(("termname() called")); - if (term != 0) { - (void) strncpy(ret, term, sizeof(ret) - 1); - term = ret; + if (name != 0) { + (void) strncpy(ret, name, sizeof(ret) - 1); + name = ret; } - return term; + return name; } diff --git a/lib/libcurses/tinfo/lib_ttyflags.c b/lib/libcurses/tinfo/lib_ttyflags.c index f3b875c3bd4..269c28ea088 100644 --- a/lib/libcurses/tinfo/lib_ttyflags.c +++ b/lib/libcurses/tinfo/lib_ttyflags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_ttyflags.c,v 1.1 1999/01/18 19:10:21 millert Exp $ */ +/* $OpenBSD: lib_ttyflags.c,v 1.2 1999/08/15 11:40:55 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -40,7 +40,7 @@ #include <curses.priv.h> #include <term.h> /* cur_term */ -MODULE_ID("$From: lib_ttyflags.c,v 1.1 1998/12/20 00:49:19 tom Exp $") +MODULE_ID("$From: lib_ttyflags.c,v 1.2 1999/07/24 22:36:12 tom Exp $") #undef tabs @@ -63,6 +63,7 @@ int _nc_get_tty_mode(TTY *buf) if (cur_term == 0 || GET_TTY(cur_term->Filedes, buf) != 0) return(ERR); + TR(TRACE_BITS,("_nc_get_tty_mode: %s", _nc_tracebits())); return (OK); } @@ -71,6 +72,7 @@ int _nc_set_tty_mode(TTY *buf) if (cur_term == 0 || SET_TTY(cur_term->Filedes, buf) != 0) return(ERR); + TR(TRACE_BITS,("_nc_set_tty_mode: %s", _nc_tracebits())); return (OK); } diff --git a/lib/libcurses/tinfo/read_entry.c b/lib/libcurses/tinfo/read_entry.c index 09902edc114..7737580f544 100644 --- a/lib/libcurses/tinfo/read_entry.c +++ b/lib/libcurses/tinfo/read_entry.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read_entry.c,v 1.4 1999/03/02 06:23:29 millert Exp $ */ +/* $OpenBSD: read_entry.c,v 1.5 1999/08/15 11:40:56 millert Exp $ */ /**************************************************************************** * Copyright (c) 1999 Free Software Foundation, Inc. * @@ -49,7 +49,7 @@ #include <tic.h> #include <term_entry.h> -MODULE_ID("$From: read_entry.c,v 1.60 1999/03/01 23:59:28 tom Exp $") +MODULE_ID("$From: read_entry.c,v 1.61 1999/07/24 20:07:20 tom Exp $") #ifndef O_BINARY #define O_BINARY 0 @@ -366,7 +366,7 @@ static int read_termtype(int fd, TERMTYPE *ptr) int _nc_read_file_entry(const char *const filename, TERMTYPE *ptr) /* return 1 if read, 0 if not found or garbled */ { - int code, fd; + int code, fd = -1; #ifdef __OpenBSD__ if (_nc_read_bsd_terminfo_file(filename, ptr) == 1) |