cvt.c (7e1b7636c894be9d1130c284089ce1ea0786ecec) | cvt.c (b2ea244070ff84eab79e04befb7aa30c982fc84d) |
---|---|
1/* 2 * Copyright (C) 1984-2017 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 * 7 * For more information, see the README file. 8 */ --- 69 unchanged lines hidden (view full) --- 78 int src_pos = (int) (src - osrc); 79 int dst_pos = (int) (dst - odst); 80 ch = step_char(&src, +1, src_end); 81 if ((ops & CVT_BS) && ch == '\b' && dst > odst) 82 { 83 /* Delete backspace and preceding char. */ 84 do { 85 dst--; | 1/* 2 * Copyright (C) 1984-2017 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 * 7 * For more information, see the README file. 8 */ --- 69 unchanged lines hidden (view full) --- 78 int src_pos = (int) (src - osrc); 79 int dst_pos = (int) (dst - odst); 80 ch = step_char(&src, +1, src_end); 81 if ((ops & CVT_BS) && ch == '\b' && dst > odst) 82 { 83 /* Delete backspace and preceding char. */ 84 do { 85 dst--; |
86 } while (dst > odst && | 86 } while (dst > odst && utf_mode && |
87 !IS_ASCII_OCTET(*dst) && !IS_UTF8_LEAD(*dst)); 88 } else if ((ops & CVT_ANSI) && IS_CSI_START(ch)) 89 { 90 /* Skip to end of ANSI escape sequence. */ 91 src++; /* skip the CSI start char */ 92 while (src < src_end) 93 if (!is_ansi_middle(*src++)) 94 break; --- 20 unchanged lines hidden --- | 87 !IS_ASCII_OCTET(*dst) && !IS_UTF8_LEAD(*dst)); 88 } else if ((ops & CVT_ANSI) && IS_CSI_START(ch)) 89 { 90 /* Skip to end of ANSI escape sequence. */ 91 src++; /* skip the CSI start char */ 92 while (src < src_end) 93 if (!is_ansi_middle(*src++)) 94 break; --- 20 unchanged lines hidden --- |