Enlightenment CVS committal
Author : mej
Project : eterm
Module : Eterm
Dir : eterm/Eterm/src
Modified Files:
feature.h options.c options.h screen.c screen.h term.c term.h
windows.c
Log Message:
Mon Aug 25 21:08:20 2003 Michael Jennings (mej)
Patch from David Lloyd <[EMAIL PROTECTED]>. Removed the NO_BRIGHTCOLOR
and NO_BOLDOVERSTRIKE defines. If you want to do NO_BRIGHTCOLOR, set
colors 8-16 the same as 0-7. :P For bold overstrike, it's now an
option (--overstrike-bold). There are also options to deactivate the
"bold" and "blink" attributes' setting of high-intensity colors, and
to allow non-default foreground colors to be bolded.
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/feature.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- feature.h 19 Feb 2003 21:17:50 -0000 1.35
+++ feature.h 26 Aug 2003 01:45:10 -0000 1.36
@@ -100,10 +100,6 @@
config files and pixmaps */
#define PATH_ENV "ETERMPATH"
-/* Disable simulation of bold font using an "overstrike" technique. This technique
- has been known to cause pixel droppings. See also FORCE_CLEAR_CHARS. */
-/* #define NO_BOLDOVERSTRIKE */
-
/* Disable the secondary screen ("\E[?47h" / "\E[?47l") */
/* #define NO_SECONDARY_SCREEN */
@@ -112,7 +108,7 @@
/* This will force clearing of characters before writing new ones on top of
* them. This is experimental - added in order to try and fix pixel dropping
- * problems some people have had. See also NO_BOLDOVERSTRIKE. */
+ * problems some people have had. */
/*# define FORCE_CLEAR_CHARS*/
/* The command through which to pipe print-screen requests */
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -3 -r1.128 -r1.129
--- options.c 24 Aug 2003 15:09:32 -0000 1.128
+++ options.c 26 Aug 2003 01:45:10 -0000 1.129
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: options.c,v 1.128 2003/08/24 15:09:32 mej Exp
$";
+static const char cvs_ident[] = "$Id: options.c,v 1.129 2003/08/26 01:45:10 mej Exp
$";
#include "config.h"
#include "feature.h"
@@ -97,7 +97,8 @@
#endif
unsigned long eterm_options = (ETERM_OPTIONS_SCROLLBAR |
ETERM_OPTIONS_SELECT_TRAILING_SPACES);
-unsigned long vt_options = (VT_OPTIONS_SECONDARY_SCREEN);
+unsigned long vt_options = (VT_OPTIONS_SECONDARY_SCREEN | VT_OPTIONS_OVERSTRIKE_BOLD
| VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND |
+ VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND |
VT_OPTIONS_COLORS_SUPPRESS_BOLD);
unsigned long image_options = 0;
char *theme_dir = NULL, *user_dir = NULL;
char **rs_exec_args = NULL; /* Args to exec (-e or --exec) */
@@ -195,7 +196,6 @@
SPIFOPT_STR_LONG("color5", "color 5", rs_color[minColor + 5]),
SPIFOPT_STR_LONG("color6", "color 6", rs_color[minColor + 6]),
SPIFOPT_STR_LONG("color7", "color 7", rs_color[minColor + 7]),
-#ifndef NO_BRIGHTCOLOR
SPIFOPT_STR_LONG("color8", "color 8", rs_color[minBright]),
SPIFOPT_STR_LONG("color9", "color 9", rs_color[minBright + 1]),
SPIFOPT_STR_LONG("color10", "color 10", rs_color[minBright + 2]),
@@ -204,7 +204,6 @@
SPIFOPT_STR_LONG("color13", "color 13", rs_color[minBright + 5]),
SPIFOPT_STR_LONG("color14", "color 14", rs_color[minBright + 6]),
SPIFOPT_STR_LONG("color15", "color 15", rs_color[minBright + 7]),
-#endif /* NO_BRIGHTCOLOR */
#ifndef NO_BOLDUNDERLINE
SPIFOPT_STR_LONG("colorBD", "bold color", rs_color[colorBD]),
SPIFOPT_STR_LONG("colorUL", "underline color", rs_color[colorUL]),
@@ -288,6 +287,10 @@
SPIFOPT_BOOL_LONG("scrollbar-floating", "display the scrollbar with no trough",
eterm_options, ETERM_OPTIONS_SCROLLBAR_FLOATING),
SPIFOPT_BOOL_LONG("scrollbar-popup", "popup the scrollbar only when focused",
eterm_options, ETERM_OPTIONS_SCROLLBAR_POPUP),
SPIFOPT_BOOL('x', "borderless", "force Eterm to have no borders", eterm_options,
ETERM_OPTIONS_BORDERLESS),
+ SPIFOPT_BOOL_LONG("overstrike-bold", "simulate bold by overstriking characters",
vt_options, VT_OPTIONS_OVERSTRIKE_BOLD),
+ SPIFOPT_BOOL_LONG("bold-brightens-foreground", "\"bold\" attribute brightens
foreground color", vt_options, VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND),
+ SPIFOPT_BOOL_LONG("blink-brightens-background", "\"blink\" attribute brightens
background color", vt_options, VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND),
+ SPIFOPT_BOOL_LONG("colors-suppress-bold", "do not make ANSI colors 0-16 bold",
vt_options, VT_OPTIONS_COLORS_SUPPRESS_BOLD),
#ifndef NO_MAPALERT
# ifdef MAPALERT_OPTION
SPIFOPT_BOOL('m', "map-alert", "uniconify on beep", vt_options,
VT_OPTIONS_MAP_ALERT),
@@ -510,21 +513,11 @@
#else
printf(" -NO_CURSORCOLOR");
#endif
-#ifdef NO_BRIGHTCOLOR
- printf(" +NO_BRIGHTCOLOR");
-#else
- printf(" -NO_BRIGHTCOLOR");
-#endif
#ifdef NO_BOLDUNDERLINE
printf(" +NO_BOLDUNDERLINE");
#else
printf(" -NO_BOLDUNDERLINE");
#endif
-#ifdef NO_BOLDOVERSTRIKE
- printf(" +NO_BOLDOVERSTRIKE");
-#else
- printf(" -NO_BOLDOVERSTRIKE");
-#endif
#ifdef NO_BOLDFONT
printf(" +NO_BOLDFONT");
#else
@@ -1239,6 +1232,35 @@
} else {
BITFIELD_CLEAR(eterm_options, ETERM_OPTIONS_RESIZE_GRAVITY);
}
+
+ } else if (!BEG_STRCASECMP(buff, "overstrike_bold ")) {
+ if (bool_val) {
+ BITFIELD_SET(vt_options, VT_OPTIONS_OVERSTRIKE_BOLD);
+ } else {
+ BITFIELD_CLEAR(vt_options, VT_OPTIONS_OVERSTRIKE_BOLD);
+ }
+
+ } else if (!BEG_STRCASECMP(buff, "bold_brightens_foreground ")) {
+ if (bool_val) {
+ BITFIELD_SET(vt_options, VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND);
+ } else {
+ BITFIELD_CLEAR(vt_options, VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND);
+ }
+
+ } else if (!BEG_STRCASECMP(buff, "blink_brightens_background ")) {
+ if (bool_val) {
+ BITFIELD_SET(vt_options, VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND);
+ } else {
+ BITFIELD_CLEAR(vt_options, VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND);
+ }
+
+ } else if (!BEG_STRCASECMP(buff, "colors_suppress_bold ")) {
+ if (bool_val) {
+ BITFIELD_SET(vt_options, VT_OPTIONS_COLORS_SUPPRESS_BOLD);
+ } else {
+ BITFIELD_CLEAR(vt_options, VT_OPTIONS_COLORS_SUPPRESS_BOLD);
+ }
+
} else {
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid
within context toggles\n", file_peek_path(),
file_peek_line(), buff);
@@ -2483,9 +2505,7 @@
#ifdef PIXMAP_SUPPORT
rs_path = NULL;
#endif
-#ifndef NO_BRIGHTCOLOR
colorfgbg = DEFAULT_RSTYLE;
-#endif
/* Font stuff. */
MEMSET(rs_font, 0, sizeof(char *) * NFONTS);
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- options.h 24 Aug 2003 15:09:32 -0000 1.47
+++ options.h 26 Aug 2003 01:45:10 -0000 1.48
@@ -38,6 +38,10 @@
# define VT_OPTIONS_REPORT_AS_KEYSYMS (1LU << 7)
# define VT_OPTIONS_PROPORTIONAL (1LU << 8)
# define VT_OPTIONS_SECONDARY_SCREEN (1LU << 9)
+# define VT_OPTIONS_OVERSTRIKE_BOLD (1LU << 10)
+# define VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND (1LU << 11)
+# define VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND (1LU << 12)
+# define VT_OPTIONS_COLORS_SUPPRESS_BOLD (1LU << 13)
# define ETERM_OPTIONS_LOGIN_SHELL (1LU << 0)
# define ETERM_OPTIONS_ICONIC (1LU << 1)
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- screen.c 24 Aug 2003 15:09:32 -0000 1.75
+++ screen.c 26 Aug 2003 01:45:10 -0000 1.76
@@ -3,7 +3,7 @@
*
*/
-static const char cvs_ident[] = "$Id: screen.c,v 1.75 2003/08/24 15:09:32 mej Exp $";
+static const char cvs_ident[] = "$Id: screen.c,v 1.76 2003/08/26 01:45:10 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -485,11 +485,20 @@
break;
}
} else {
-#ifndef NO_BRIGHTCOLOR
if ((rstyle & Intensity) && color >= minColor && color <= maxColor) {
- color += (minBright - minColor);
+ switch (Intensity) {
+ case RS_Bold:
+ if (BITFIELD_IS_SET(vt_options,
VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND)) {
+ color += (minBright - minColor);
+ }
+ break;
+ case RS_Blink:
+ if (BITFIELD_IS_SET(vt_options,
VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND)) {
+ color += (minBright - minColor);
+ }
+ break;
+ }
}
-#endif
}
}
switch (Intensity) {
@@ -520,7 +529,6 @@
if (rvideo)
rstyle &= ~RS_RVid;
break;
-#ifndef NO_BRIGHTCOLOR
case RS_Bold:
color = GET_FGCOLOR(rstyle);
scr_color((color == fgColor ? GET_FGCOLOR(colorfgbg) : color), RS_Bold);
@@ -529,7 +537,6 @@
color = GET_BGCOLOR(rstyle);
scr_color((color == bgColor ? GET_BGCOLOR(colorfgbg) : color),
RS_Blink);
break;
-#endif
}
} else {
/* B: Unset style */
@@ -543,7 +550,6 @@
if (rvideo)
rstyle |= RS_RVid;
break;
-#ifndef NO_BRIGHTCOLOR
case RS_Bold:
color = GET_FGCOLOR(rstyle);
if (color >= minBright && color <= maxBright) {
@@ -560,7 +566,6 @@
scr_color(restoreBG, RS_Blink);
}
break;
-#endif
}
}
}
@@ -1942,12 +1947,10 @@
}
DRAW_STRING(draw_string, xpixel, ypixel, buffer, 1);
UPDATE_BOX(xpixel, ypixel - ascent, xpixel + Width2Pixel(1), ypixel +
Height2Pixel(1));
-#ifndef NO_BOLDOVERSTRIKE
- if (MONO_BOLD(rend)) {
+ if (BITFIELD_IS_SET(vt_options, VT_OPTIONS_OVERSTRIKE_BOLD) &&
MONO_BOLD(rend)) {
DRAW_STRING(draw_string, xpixel + 1, ypixel, buffer, 1);
UPDATE_BOX(xpixel + 1, ypixel - ascent, xpixel + 1 +
Width2Pixel(1), ypixel + Height2Pixel(1));
}
-#endif
} else {
#ifdef PIXMAP_SUPPORT
if (background_is_pixmap() && (back == bgColor)) {
@@ -2042,12 +2045,10 @@
}
/* do the convoluted bold overstrike */
-#ifndef NO_BOLDOVERSTRIKE
- if (MONO_BOLD(rend)) {
+ if (BITFIELD_IS_SET(vt_options, VT_OPTIONS_OVERSTRIKE_BOLD) &&
MONO_BOLD(rend)) {
DRAW_STRING(draw_string, xpixel + 1, ypixel, buffer, wlen);
UPDATE_BOX(xpixel + 1, ypixel - ascent, xpixel + 1 +
Width2Pixel(wlen), ypixel + Height2Pixel(1));
}
-#endif
if (rend & RS_Uline) {
if (descent > 1) {
@@ -3340,21 +3341,17 @@
fprintf(stderr, "): ");
color = GET_FGCOLOR(rstyle);
-#ifndef NO_BRIGHTCOLOR
if (color >= minBright && color <= maxBright) {
color -= (minBright - minColor);
fprintf(stderr, "bright ");
}
-#endif
fprintf(stderr, "%s on ", name[color]);
color = GET_BGCOLOR(rstyle);
-#ifndef NO_BRIGHTCOLOR
if (color >= minBright && color <= maxBright) {
color -= (minBright - minColor);
fprintf(stderr, "bright ");
}
-#endif
fprintf(stderr, "%s\n", name[color]);
}
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- screen.h 24 Aug 2003 15:09:32 -0000 1.28
+++ screen.h 26 Aug 2003 01:45:11 -0000 1.29
@@ -60,11 +60,10 @@
#define ERASE_ROWS(row, num) do {XFillRectangle(Xdisplay, draw_buffer, TermWin.gc,
Col2Pixel(0), Row2Pixel(row), TERM_WINDOW_GET_WIDTH(), Height2Pixel(num)); \
if (buffer_pixmap) {XClearArea(Xdisplay,
TermWin.vt, Col2Pixel(0), Row2Pixel(row), TERM_WINDOW_GET_WIDTH(), Height2Pixel(num),
0);}} while (0)
#define DRAW_STRING(Func, x, y, str, len) Func(Xdisplay, draw_buffer, TermWin.gc, x,
y, str, len)
-#ifndef NO_BRIGHTCOLOR
-# define MONO_BOLD(x) (((x) & RS_Bold) && fore == fgColor)
-#else
-# define MONO_BOLD(x) ((x) & (RS_Bold|RS_Blink))
-#endif
+
+/* Make bold if bold flag is set and either we're drawing the foreground color or
we're not suppressing bold.
+ In other words, the foreground color can always be bolded, but other colors can't
if bold is suppressed. */
+#define MONO_BOLD(x) (((x) & RS_Bold) && (!BITFIELD_IS_SET(vt_options,
VT_OPTIONS_COLORS_SUPPRESS_BOLD) || fore == fgColor))
/* Screen refresh methods */
#define NO_REFRESH 0 /* Window not visible at all! */
@@ -224,9 +223,7 @@
} selection_t;
/************ Variables ************/
-#ifndef NO_BRIGHTCOLOR
extern unsigned int colorfgbg;
-#endif
extern unsigned char refresh_all;
#ifdef MULTI_CHARSET
extern encoding_t encoding_method;
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/term.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- term.c 24 Aug 2003 15:09:32 -0000 1.98
+++ term.c 26 Aug 2003 01:45:11 -0000 1.99
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: term.c,v 1.98 2003/08/24 15:09:32 mej Exp $";
+static const char cvs_ident[] = "$Id: term.c,v 1.99 2003/08/26 01:45:11 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -60,7 +60,6 @@
char *def_colorName[] = {
"rgb:aa/aa/aa", "rgb:0/0/0", /* fg/bg */
"rgb:0/0/0", /* 0: black (#000000) */
-#ifndef NO_BRIGHTCOLOR
/* low-intensity colors */
"rgb:cc/00/00", /* 1: red */
"rgb:00/cc/00", /* 2: green */
@@ -71,7 +70,6 @@
"rgb:aa/aa/aa", /* 7: white */
/* high-intensity colors */
"rgb:33/33/33", /* 8: bright black */
-#endif /* NO_BRIGHTCOLOR */
"rgb:ff/00/00", /* 1/9: bright red */
"rgb:00/ff/00", /* 2/10: bright green */
"rgb:ff/ff/00", /* 3/11: bright yellow */
@@ -1689,7 +1687,6 @@
}
/* find if fg/bg matches any of the normal (low-intensity) colors */
-#ifndef NO_BRIGHTCOLOR
void
set_colorfgbg(void)
{
@@ -1748,7 +1745,6 @@
colorfgbg = SET_BGCOLOR(colorfgbg, i);
}
}
-#endif /* NO_BRIGHTCOLOR */
void
set_title(const char *str)
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/term.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- term.h 3 Mar 2003 04:53:34 -0000 1.25
+++ term.h 26 Aug 2003 01:45:11 -0000 1.26
@@ -99,10 +99,6 @@
Magenta3Color,
Cyan3Color,
maxColor, /* minColor + 7 */
-# ifdef NO_BRIGHTCOLOR
- WhiteColor = maxColor,
- maxBright = maxColor,
-# else
AntiqueWhiteColor = maxColor,
minBright, /* maxColor + 1 */
Grey25Color = minBright,
@@ -114,7 +110,6 @@
CyanColor,
maxBright, /* minBright + 7 */
WhiteColor = maxBright,
-# endif
# ifndef NO_CURSORCOLOR
cursorColor,
cursorColor2,
@@ -186,11 +181,7 @@
extern void process_window_mode(unsigned int, int []);
extern void process_terminal_mode(int, int, unsigned int, int []);
extern void process_sgr_mode(unsigned int, int []);
-#ifndef NO_BRIGHTCOLOR
extern void set_colorfgbg(void);
-#else
-# define set_colorfgbg() ((void)0)
-#endif /* NO_BRIGHTCOLOR */
extern void set_title(const char *);
extern void set_icon_name(const char *);
extern void append_to_title(const char *);
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/windows.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- windows.c 24 Aug 2003 15:09:32 -0000 1.64
+++ windows.c 26 Aug 2003 01:45:11 -0000 1.65
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: windows.c,v 1.64 2003/08/24 15:09:32 mej Exp $";
+static const char cvs_ident[] = "$Id: windows.c,v 1.65 2003/08/26 01:45:11 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -692,14 +692,8 @@
i = atoi(color);
if (i >= 8 && i <= 15) { /* bright colors */
i -= 8;
-# ifndef NO_BRIGHTCOLOR
PixColors[idx] = PixColors[minBright + i];
-# endif
- }
-# ifndef NO_BRIGHTCOLOR
- else
-# endif
- if (i >= 0 && i <= 7) { /* normal colors */
+ } else if (i >= 0 && i <= 7) { /* normal colors */
PixColors[idx] = PixColors[minColor + i];
} else {
print_warning("Color index %d is invalid.\n", i);
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs