summaryrefslogtreecommitdiffstats
path: root/contrib/less/output.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-07-24 01:09:11 +0000
committerdelphij <delphij@FreeBSD.org>2012-07-24 01:09:11 +0000
commite39250a384a3ca30e8cb4cfa39a696fa01008590 (patch)
treef62589b704975274e070eea934ccb4e46d830ae3 /contrib/less/output.c
parent142df5fc8eb25ab65ff82ee819ffb79841bcba18 (diff)
downloadFreeBSD-src-e39250a384a3ca30e8cb4cfa39a696fa01008590.zip
FreeBSD-src-e39250a384a3ca30e8cb4cfa39a696fa01008590.tar.gz
MFV: less v451.
Diffstat (limited to 'contrib/less/output.c')
-rw-r--r--contrib/less/output.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/contrib/less/output.c b/contrib/less/output.c
index ba07421..bcc8471 100644
--- a/contrib/less/output.c
+++ b/contrib/less/output.c
@@ -1,11 +1,11 @@
-/*
- * Copyright (C) 1984-2012 Mark Nudelman
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Less License, as specified in the README file.
- *
- * For more information, see the README file.
- */
+/*
+ * Copyright (C) 1984-2012 Mark Nudelman
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Less License, as specified in the README file.
+ *
+ * For more information, see the README file.
+ */
/*
@@ -272,13 +272,16 @@ flush()
break;
if (at & 1)
{
-#if MSDOS_COMPILER==WIN32C
- fg |= FOREGROUND_INTENSITY;
- bg |= BACKGROUND_INTENSITY;
-#else
- fg = bo_fg_color;
- bg = bo_bg_color;
-#endif
+ /*
+ * If \e[1m use defined bold
+ * color, else set intensity.
+ */
+ if (p[-2] == '[')
+ {
+ fg = bo_fg_color;
+ bg = bo_bg_color;
+ } else
+ fg |= 8;
} else if (at & 2)
{
fg = so_fg_color;
OpenPOWER on IntegriCloud