most BSDs), privileges weren't dropped before opening the pty,
resulting in wrong permissions on the pseudo terminal.
Reported and fixed by Ryan Beasley.
+ - implemented intensityStyles option which enables/disables bold/blink
+ selecting high intensity foreground/background colours, suggested by
+ Chuck Blake.
- replaced callback.h by a fixed version from gvpe that correctly
returns the callback result (affects new -pty-fd semantics in urxvtc
on a few architectures). Reported by darix.
Compile font-styles: The bold italic font list to use when bold characters are to
be printed. See resource B<boldItalicFont> for details.
+=item B<-is>|B<+is>
+
+Compile font-styles: Bold/Italic font styles imply high intensity
+foreground/background (default). See resource B<intensityStyles> for
+details.
+
=item B<-name> I<name>
Specify the application name under which resources are to be obtained,
If set, but empty, then this specific style is disabled and the normal
text font will being used for the given style.
+=item B<intensityStyles:> I<boolean>
+
+When font styles are not enabled, or this option is enabled (B<True>,
+option B<-is>, the default), bold and italic font styles imply high
+intensity foreground/backround colours. Disabling this option (B<False>,
+option B<+is>) disables this behaviour, the high intensity colours are not
+reachable.
+
=item B<selectstyle:> I<mode>
Set mouse selection style to B<old> which is 2.20, B<oldword> which is
int pfd;
#ifdef PTYS_ARE_OPENPTY
- char tty_name[sizeof "/dev/pts/????\0"];
+ char tty_name[sizeof "/dev/pts/?????\0"];
- if (openpty (&pfd, fd_tty, tty_name, NULL, NULL) != -1)
+ rxvt_privileges (RESTORE);
+ int res = openpty (&pfd, fd_tty, tty_name, NULL, NULL);
+ rxvt_privileges (IGNORE);
+
+ if (res != -1)
{
*ttydev = strdup (tty_name);
return pfd;
Rs_borderLess,
Rs_lineSpace,
Rs_cursorUnderline,
+ Rs_intensityStyles,
#endif
#if CURSOR_BLINK
Rs_cursorBlink,
#define GET_BASEFG(x) (((x) & RS_fgMask))
#define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits)
#ifndef NO_BRIGHTCOLOR
-# define GET_FGCOLOR(x) \
- ((((x) & RS_Bold) == 0 \
- || GET_BASEFG (x) < minCOLOR \
- || GET_BASEFG (x) >= minBrightCOLOR) \
- ? GET_BASEFG (x) \
- : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR)))
-# define GET_BGCOLOR(x) \
- ((((x) & RS_Blink) == 0 \
- || GET_BASEBG (x) < minCOLOR \
- || GET_BASEBG (x) >= minBrightCOLOR) \
- ? GET_BASEBG (x) \
- : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR)))
+# define GET_FGCOLOR(x) ( \
+ !((x) & RS_Bold) \
+ || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \
+ || !IN_RANGE_INC (GET_BASEFG (x), minCOLOR, minBrightCOLOR) \
+ ? GET_BASEFG (x) \
+ : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR)))
+# define GET_BGCOLOR(x) ( \
+ !((x) & RS_Blink) \
+ || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \
+ || !IN_RANGE_INC (GET_BASEBG (x), minCOLOR, minBrightCOLOR) \
+ ? GET_BASEBG (x) \
+ : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR)))
#else
# define GET_FGCOLOR(x) GET_BASEFG(x)
# define GET_BGCOLOR(x) GET_BASEBG(x)
# define Opt_borderLess 0
# define Opt_hold 0
#endif
+#if ENABLE_STYLES
+# define Opt_intensityStyles (1UL<<27) // font styles imply intensity
+#else
+# define Opt_intensityStyles 0
+#endif
/* place holder used for parsing command-line options */
#define Opt_Reverse (1UL<<30)
#define Opt_Boolean (1UL<<31)
#define DEFAULT_OPTIONS (Opt_scrollBar | Opt_scrollTtyOutput \
| Opt_jumpScroll | Opt_secondaryScreen \
- | Opt_pastableTabs)
+ | Opt_pastableTabs | Opt_intensityStyles)
/* ------------------------------------------------------------------------- */
STRG (Rs_boldFont, "boldFont", "fb", "fontname", "bold font"),
STRG (Rs_italicFont, "italicFont", "fi", "fontname", "italic font"),
STRG (Rs_boldItalicFont, "boldItalicFont", "fbi", "fontname", "bold italic font"),
+ BOOL (Rs_intensityStyles, "intensityStyles", "is", Opt_intensityStyles, "font styles imply intensity changes"),
#endif
#ifdef USE_XIM
STRG (Rs_inputMethod, "inputMethod", "im", "name", "name of input method"),