Fix my color/attr separation patch.

Swap foreground/background logic to allow DIM REVERSE
This commit is contained in:
Andrey A. Chernov 1995-11-30 03:29:31 +00:00
parent 309851e0c1
commit 662f3a95dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12541
3 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.130 1995/11/24 14:56:00 bde Exp $
* $Id: syscons.c,v 1.131 1995/11/28 00:17:30 ache Exp $
*/
#include "sc.h"
@ -169,10 +169,10 @@ mask2attr(struct term_stat *term)
int attr, mask = term->attr_mask;
if (mask & REVERSE_ATTR) {
attr = ((mask & BACKGROUND_CHANGED) ?
attr = ((mask & FOREGROUND_CHANGED) ?
((term->cur_color & 0xF000) >> 4) :
(term->rev_color & 0x0F00)) |
((mask & FOREGROUND_CHANGED) ?
((mask & BACKGROUND_CHANGED) ?
((term->cur_color & 0x0F00) << 4) :
(term->rev_color & 0xF000));
} else

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.130 1995/11/24 14:56:00 bde Exp $
* $Id: syscons.c,v 1.131 1995/11/28 00:17:30 ache Exp $
*/
#include "sc.h"
@ -169,10 +169,10 @@ mask2attr(struct term_stat *term)
int attr, mask = term->attr_mask;
if (mask & REVERSE_ATTR) {
attr = ((mask & BACKGROUND_CHANGED) ?
attr = ((mask & FOREGROUND_CHANGED) ?
((term->cur_color & 0xF000) >> 4) :
(term->rev_color & 0x0F00)) |
((mask & FOREGROUND_CHANGED) ?
((mask & BACKGROUND_CHANGED) ?
((term->cur_color & 0x0F00) << 4) :
(term->rev_color & 0xF000));
} else

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.130 1995/11/24 14:56:00 bde Exp $
* $Id: syscons.c,v 1.131 1995/11/28 00:17:30 ache Exp $
*/
#include "sc.h"
@ -169,10 +169,10 @@ mask2attr(struct term_stat *term)
int attr, mask = term->attr_mask;
if (mask & REVERSE_ATTR) {
attr = ((mask & BACKGROUND_CHANGED) ?
attr = ((mask & FOREGROUND_CHANGED) ?
((term->cur_color & 0xF000) >> 4) :
(term->rev_color & 0x0F00)) |
((mask & FOREGROUND_CHANGED) ?
((mask & BACKGROUND_CHANGED) ?
((term->cur_color & 0x0F00) << 4) :
(term->rev_color & 0xF000));
} else