X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2Flib_vidattr.c;h=ab7a165ae3226861b1966374a3b086fe2d7e9df1;hp=4bee100abe191e1d1645ab45bf6dd26686e72877;hb=78e49873c69dc0494bb34c62f897f8b446584a33;hpb=7a27c7d49c2e8b4a1ecbe85b4423d647cbc75ea5 diff --git a/ncurses/tty/lib_vidattr.c b/ncurses/tty/lib_vidattr.c index 4bee100a..ab7a165a 100644 --- a/ncurses/tty/lib_vidattr.c +++ b/ncurses/tty/lib_vidattr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2009 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,7 +29,8 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * - * and: Thomas E. Dickey 1996 on * + * and: Thomas E. Dickey 1996-on * + * and: Juergen Pfeifer 2009 * ****************************************************************************/ /* @@ -65,7 +66,7 @@ #include #include -MODULE_ID("$Id: lib_vidattr.c,v 1.48 2007/04/21 23:25:38 tom Exp $") +MODULE_ID("$Id: lib_vidattr.c,v 1.50 2009/02/15 00:51:03 tom Exp $") #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc) @@ -102,6 +103,7 @@ vidputs(chtype newmode, int (*outc) (int)) #define fix_pair0 FALSE #endif + newmode &= A_ATTRIBUTES; T((T_CALLED("vidputs(%s)"), _traceattr(newmode))); /* this allows us to go on whether or not newterm() has been called */ @@ -298,7 +300,7 @@ vidattr(chtype newmode) } NCURSES_EXPORT(chtype) -termattrs(void) +NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0) { chtype attrs = A_NORMAL; @@ -330,8 +332,16 @@ termattrs(void) if (enter_underline_mode) attrs |= A_UNDERLINE; - if (SP->_coloron) + if (SP_PARM->_coloron) attrs |= A_COLOR; returnChar(attrs); } + +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(chtype) +termattrs(void) +{ + return NCURSES_SP_NAME(termattrs) (CURRENT_SCREEN); +} +#endif