~ubuntu-branches/ubuntu/natty/ncurses/natty

« back to all changes in this revision

Viewing changes to ncurses/base/lib_wattron.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-17 09:00:42 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517090042-86fgxrr6j5jzagot
Tags: 5.6-0ubuntu1
* New upstream version.
  - Remove patches applied upstream: ncurses.upstream, signed-chars.
  - Update patches: debian-backspace.
* Build-depend on g++-multilib instead of lib{32,64}c*-dev-*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
3
3
 *                                                                          *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a  *
5
5
 * copy of this software and associated documentation files (the            *
42
42
#include <curses.priv.h>
43
43
#include <ctype.h>
44
44
 
45
 
MODULE_ID("$Id: lib_wattron.c,v 1.8 2005/01/29 21:23:08 tom Exp $")
 
45
MODULE_ID("$Id: lib_wattron.c,v 1.9 2006/05/27 19:30:46 tom Exp $")
46
46
 
47
47
NCURSES_EXPORT(int)
48
48
wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
49
49
{
50
50
    T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at)));
51
51
    if (win != 0) {
52
 
        T(("... current %s (%d)", _traceattr(win->_attrs), GET_WINDOW_PAIR(win)));
 
52
        T(("... current %s (%d)",
 
53
           _traceattr(WINDOW_ATTRS(win)),
 
54
           GET_WINDOW_PAIR(win)));
 
55
 
53
56
        if_EXT_COLORS({
54
57
            if (at & A_COLOR)
55
58
                win->_color = PAIR_NUMBER(at);
56
59
        });
57
 
        toggle_attr_on(win->_attrs, at);
 
60
        toggle_attr_on(WINDOW_ATTRS(win), at);
58
61
        returnCode(OK);
59
62
    } else
60
63
        returnCode(ERR);