X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_chgat.c;fp=ncurses%2Fbase%2Flib_chgat.c;h=54e66ed1ffae6743b0d9b4e21f44c080b74da4af;hp=7690ae4a2af3b685c488c15b526bb60bc147edcc;hb=46722468f47c2b77b3987729b4bcf2321cccfd01;hpb=c633e5103a29a38532cf1925257b91cea33fd090 diff --git a/ncurses/base/lib_chgat.c b/ncurses/base/lib_chgat.c index 7690ae4a..54e66ed1 100644 --- a/ncurses/base/lib_chgat.c +++ b/ncurses/base/lib_chgat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000,2001 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 * @@ -40,23 +40,23 @@ #include -MODULE_ID("$Id: lib_chgat.c,v 1.2 1998/02/11 12:14:00 tom Exp $") +MODULE_ID("$Id: lib_chgat.c,v 1.5 2001/06/03 00:05:02 skimo Exp $") -int wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED) +NCURSES_EXPORT(int) +wchgat +(WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED) { - int i; + int i; T((T_CALLED("wchgat(%p,%d,%s,%d)"), win, n, _traceattr(attr), color)); if (win) { - toggle_attr_on(attr,COLOR_PAIR(color)); + toggle_attr_on(attr, COLOR_PAIR(color)); - for (i = win->_curx; i <= win->_maxx && (n == -1 || (n-- > 0)); i++) - win->_line[win->_cury].text[i] - = TextOf(win->_line[win->_cury].text[i]) | attr; + for (i = win->_curx; i <= win->_maxx && (n == -1 || (n-- > 0)); i++) + SetAttr(win->_line[win->_cury].text[i], attr); - returnCode(OK); - } - else - returnCode(ERR); + returnCode(OK); + } else + returnCode(ERR); }