diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-11-09 14:08:54 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-11-09 14:08:54 +0000 |
commit | 6181f4622a00a9de81df01cecb5fa73ffdb697bc (patch) | |
tree | c963ba08ac935d7f048b78517309fe6fc2f496e6 /ncurses/tinfo/lib_tputs.c | |
parent | c0e48ca1322e978a8f9795a5ddb251df2479f930 (diff) | |
download | src-6181f4622a00a9de81df01cecb5fa73ffdb697bc.tar.gz src-6181f4622a00a9de81df01cecb5fa73ffdb697bc.zip |
- Import ncurses 5.7-20081102 (5.7 release) onto vendor branchvendor/ncurses/5.7-20081102
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=184798
svn path=/vendor/ncurses/5.7-20081102/; revision=184799; tag=vendor/ncurses/5.7-20081102
Diffstat (limited to 'ncurses/tinfo/lib_tputs.c')
-rw-r--r-- | ncurses/tinfo/lib_tputs.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c index aab3351905ce..a8b7276895a5 100644 --- a/ncurses/tinfo/lib_tputs.c +++ b/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2003,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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * * and: Eric S. Raymond <esr@snark.thyrsus.com> * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -45,13 +46,29 @@ #include <termcap.h> /* ospeed */ #include <tic.h> -MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.66 2008/06/28 13:12:15 tom Exp $") NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */ +#if NCURSES_NO_PADDING +NCURSES_EXPORT(void) +_nc_set_no_padding(SCREEN *sp) +{ + bool no_padding = (getenv("NCURSES_NO_PADDING") != 0); + + if (sp) + sp->_no_padding = no_padding; + else + _nc_prescreen._no_padding = no_padding; + + TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used", + GetNoPadding(sp) ? " not" : "")); +} +#endif + static int (*my_outch) (int c) = _nc_outch; NCURSES_EXPORT(int) @@ -147,7 +164,7 @@ tputs(const char *string, int affcnt, int (*outc) (int)) !xon_xoff && padding_baud_rate #if NCURSES_NO_PADDING - && (SP == 0 || !(SP->_no_padding)) + && !GetNoPadding(SP) #endif && (_nc_baudrate(ospeed) >= padding_baud_rate); } |