X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_termcap.c;h=2d245ffbb61f345db2ca0741134ca3c7c6804f84;hp=8459266b5be312dab6804d39b754374d58725ade;hb=684ea7a15772d25d6eb430c5751295e52a2d8a66;hpb=7a27c7d49c2e8b4a1ecbe85b4423d647cbc75ea5 diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index 8459266b..2d245ffb 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -45,7 +45,7 @@ #include -MODULE_ID("$Id: lib_termcap.c,v 1.60 2007/04/21 22:23:46 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.63 2008/08/16 19:22:55 tom Exp $") NCURSES_EXPORT_VAR(char *) UP = 0; NCURSES_EXPORT_VAR(char *) BC = 0; @@ -142,7 +142,7 @@ tgetent(char *bufp, const char *name) if (errcode == 1) { if (cursor_left) - if ((backspaces_with_bs = !strcmp(cursor_left, "\b")) == 0) + if ((backspaces_with_bs = (char) !strcmp(cursor_left, "\b")) == 0) backspace_if_not_bs = cursor_left; /* we're required to export these */ @@ -164,6 +164,7 @@ tgetent(char *bufp, const char *name) LAST_BUF = bufp; LAST_USE = TRUE; + SetNoPadding(SP); (void) baudrate(); /* sets ospeed as a side-effect */ /* LINT_PREPRO @@ -283,7 +284,8 @@ _nc_tgetent_leaks(void) { for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) { FreeIfNeeded(FIX_SGR0); - del_curterm(LAST_TRM); + if (LAST_TRM != 0) + del_curterm(LAST_TRM); } } #endif