/* Copyright (c) 2008, 2009 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Micah Cowan (micah@cowan.name) * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program (see the file COPYING); if not, see * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** * $Id$ GNU */ #define NATTR 6 #define ATTR_DI 0 /* Dim mode */ #define ATTR_US 1 /* Underscore mode */ #define ATTR_BD 2 /* Bold mode */ #define ATTR_RV 3 /* Reverse mode */ #define ATTR_SO 4 /* Standout mode */ #define ATTR_BL 5 /* Blinking */ #define A_DI (1<font[(x) + 1] == 0xff && (unsigned char)(ml)->image[(x) + 1] == 0xff : \ ((unsigned char)(ml)->font[x] & 0x1f) != 0 && ((unsigned char)(ml)->font[x] & 0xe0) == 0 \ ) # define dw_right(ml, x, enc) ((enc == UTF8) ? \ (unsigned char)(ml)->font[x] == 0xff && (unsigned char)(ml)->image[x] == 0xff : \ ((unsigned char)(ml)->font[x] & 0xe0) == 0x80 \ ) # else # define dw_left(ml, x, enc) ( \ ((unsigned char)(ml)->font[x] & 0x1f) != 0 && ((unsigned char)(ml)->font[x] & 0xe0) == 0 \ ) # define dw_right(ml, x, enc) ( \ ((unsigned char)(ml)->font[x] & 0xe0) == 0x80 \ ) # endif /* UTF8 */ #else # define dw_left(ml, x, enc) 0 # define dw_right(ml, x, enc) 0 #endif