=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/output.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/less/output.c 2012/05/17 18:00:19 1.8 --- src/usr.bin/less/output.c 2014/04/25 13:38:21 1.9 *************** *** 1,11 **** /* ! * Copyright (C) 1984-2011 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 about less, or for information on how to ! * contact the author, see the README file. */ --- 1,10 ---- /* ! * 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. */ *************** *** 175,180 **** --- 174,180 ---- */ p++; anchor = p_next = p; + at = 0; WIN32setcolors(nm_fg_color, nm_bg_color); continue; } *************** *** 274,293 **** break; if (at & 1) { fg = bo_fg_color; bg = bo_bg_color; } else if (at & 2) { ! fg = so_fg_color; ! bg = so_bg_color; } else if (at & 4) { ! fg = ul_fg_color; ! bg = ul_bg_color; } else if (at & 8) { ! fg = bl_fg_color; ! bg = bl_bg_color; } fg &= 0xf; bg &= 0xf; --- 274,306 ---- break; if (at & 1) { + /* + * If \e[1m use defined bold + * color, else set intensity. + */ + if (p[-2] == '[') + { + #if MSDOS_COMPILER==WIN32C + fg |= FOREGROUND_INTENSITY; + bg |= BACKGROUND_INTENSITY; + #else fg = bo_fg_color; bg = bo_bg_color; + #endif + } else + fg |= 8; } else if (at & 2) { ! fg = so_fg_color; ! bg = so_bg_color; } else if (at & 4) { ! fg = ul_fg_color; ! bg = ul_bg_color; } else if (at & 8) { ! fg = bl_fg_color; ! bg = bl_bg_color; } fg &= 0xf; bg &= 0xf;