Deleted Added
full compact
output.c (221715) output.c (237613)
1/*
1/*
2 * Copyright (C) 1984-2011 Mark Nudelman
2 * Copyright (C) 1984-2012 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.
7 * For more information, see the README file.
9 */
10
11
12/*
13 * High level routines dealing with the output to the screen.
14 */
15
16#include "less.h"

--- 152 unchanged lines hidden (view full) ---

169 {
170 /*
171 * Handle null escape sequence
172 * "ESC[m", which restores
173 * the normal color.
174 */
175 p++;
176 anchor = p_next = p;
8 */
9
10
11/*
12 * High level routines dealing with the output to the screen.
13 */
14
15#include "less.h"

--- 152 unchanged lines hidden (view full) ---

168 {
169 /*
170 * Handle null escape sequence
171 * "ESC[m", which restores
172 * the normal color.
173 */
174 p++;
175 anchor = p_next = p;
176 at = 0;
177 WIN32setcolors(nm_fg_color, nm_bg_color);
178 continue;
179 }
180 p_next = p;
181
182 /*
183 * Select foreground/background colors
184 * based on the escape sequence.

--- 82 unchanged lines hidden (view full) ---

267 break;
268 }
269 p = q;
270 }
271 if (!is_ansi_end(*p) || p == p_next)
272 break;
273 if (at & 1)
274 {
177 WIN32setcolors(nm_fg_color, nm_bg_color);
178 continue;
179 }
180 p_next = p;
181
182 /*
183 * Select foreground/background colors
184 * based on the escape sequence.

--- 82 unchanged lines hidden (view full) ---

267 break;
268 }
269 p = q;
270 }
271 if (!is_ansi_end(*p) || p == p_next)
272 break;
273 if (at & 1)
274 {
275 fg = bo_fg_color;
276 bg = bo_bg_color;
275#if MSDOS_COMPILER==WIN32C
276 fg |= FOREGROUND_INTENSITY;
277 bg |= BACKGROUND_INTENSITY;
278#else
279 fg = bo_fg_color;
280 bg = bo_bg_color;
281#endif
277 } else if (at & 2)
278 {
282 } else if (at & 2)
283 {
279 fg = so_fg_color;
280 bg = so_bg_color;
284 fg = so_fg_color;
285 bg = so_bg_color;
281 } else if (at & 4)
282 {
286 } else if (at & 4)
287 {
283 fg = ul_fg_color;
284 bg = ul_bg_color;
288 fg = ul_fg_color;
289 bg = ul_bg_color;
285 } else if (at & 8)
286 {
290 } else if (at & 8)
291 {
287 fg = bl_fg_color;
288 bg = bl_bg_color;
292 fg = bl_fg_color;
293 bg = bl_bg_color;
289 }
290 fg &= 0xf;
291 bg &= 0xf;
292 WIN32setcolors(fg, bg);
293 p_next = anchor = p + 1;
294 } else
295 p_next++;
296 }

--- 305 unchanged lines hidden ---
294 }
295 fg &= 0xf;
296 bg &= 0xf;
297 WIN32setcolors(fg, bg);
298 p_next = anchor = p + 1;
299 } else
300 p_next++;
301 }

--- 305 unchanged lines hidden ---