Deleted Added
full compact
teken_subr.h (197521) teken_subr.h (197522)
1/*-
2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/teken/teken_subr.h 197521 2009-09-26 15:07:11Z ed $
26 * $FreeBSD: head/sys/teken/teken_subr.h 197522 2009-09-26 15:26:32Z ed $
27 */
28
29static void teken_subr_cursor_up(teken_t *, unsigned int);
30static void teken_subr_erase_line(teken_t *, unsigned int);
31static void teken_subr_regular_character(teken_t *, teken_char_t);
32static void teken_subr_reset_to_initial_state(teken_t *);
33static void teken_subr_save_cursor(teken_t *);
34

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

1145 case 32: /* Set foreground color: green */
1146 case 33: /* Set foreground color: brown */
1147 case 34: /* Set foreground color: blue */
1148 case 35: /* Set foreground color: magenta */
1149 case 36: /* Set foreground color: cyan */
1150 case 37: /* Set foreground color: white */
1151 t->t_curattr.ta_fgcolor = n - 30;
1152 break;
27 */
28
29static void teken_subr_cursor_up(teken_t *, unsigned int);
30static void teken_subr_erase_line(teken_t *, unsigned int);
31static void teken_subr_regular_character(teken_t *, teken_char_t);
32static void teken_subr_reset_to_initial_state(teken_t *);
33static void teken_subr_save_cursor(teken_t *);
34

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

1145 case 32: /* Set foreground color: green */
1146 case 33: /* Set foreground color: brown */
1147 case 34: /* Set foreground color: blue */
1148 case 35: /* Set foreground color: magenta */
1149 case 36: /* Set foreground color: cyan */
1150 case 37: /* Set foreground color: white */
1151 t->t_curattr.ta_fgcolor = n - 30;
1152 break;
1153 case 38: /* Set foreground color: 256 color mode */
1154 if (i + 2 >= ncmds || cmds[i + 1] != 5)
1155 continue;
1156 t->t_curattr.ta_fgcolor = cmds[i + 2];
1157 i += 2;
1158 break;
1153 case 39: /* Set default foreground color. */
1154 t->t_curattr.ta_fgcolor = t->t_defattr.ta_fgcolor;
1155 break;
1156 case 40: /* Set background color: black */
1157 case 41: /* Set background color: red */
1158 case 42: /* Set background color: green */
1159 case 43: /* Set background color: brown */
1160 case 44: /* Set background color: blue */
1161 case 45: /* Set background color: magenta */
1162 case 46: /* Set background color: cyan */
1163 case 47: /* Set background color: white */
1164 t->t_curattr.ta_bgcolor = n - 40;
1165 break;
1159 case 39: /* Set default foreground color. */
1160 t->t_curattr.ta_fgcolor = t->t_defattr.ta_fgcolor;
1161 break;
1162 case 40: /* Set background color: black */
1163 case 41: /* Set background color: red */
1164 case 42: /* Set background color: green */
1165 case 43: /* Set background color: brown */
1166 case 44: /* Set background color: blue */
1167 case 45: /* Set background color: magenta */
1168 case 46: /* Set background color: cyan */
1169 case 47: /* Set background color: white */
1170 t->t_curattr.ta_bgcolor = n - 40;
1171 break;
1172 case 48: /* Set background color: 256 color mode */
1173 if (i + 2 >= ncmds || cmds[i + 1] != 5)
1174 continue;
1175 t->t_curattr.ta_bgcolor = cmds[i + 2];
1176 i += 2;
1177 break;
1166 case 49: /* Set default background color. */
1167 t->t_curattr.ta_bgcolor = t->t_defattr.ta_bgcolor;
1168 break;
1178 case 49: /* Set default background color. */
1179 t->t_curattr.ta_bgcolor = t->t_defattr.ta_bgcolor;
1180 break;
1181 case 90: /* Set bright foreground color: black */
1182 case 91: /* Set bright foreground color: red */
1183 case 92: /* Set bright foreground color: green */
1184 case 93: /* Set bright foreground color: brown */
1185 case 94: /* Set bright foreground color: blue */
1186 case 95: /* Set bright foreground color: magenta */
1187 case 96: /* Set bright foreground color: cyan */
1188 case 97: /* Set bright foreground color: white */
1189 t->t_curattr.ta_fgcolor = n - 90 + 8;
1190 break;
1191 case 100: /* Set bright background color: black */
1192 case 101: /* Set bright background color: red */
1193 case 102: /* Set bright background color: green */
1194 case 103: /* Set bright background color: brown */
1195 case 104: /* Set bright background color: blue */
1196 case 105: /* Set bright background color: magenta */
1197 case 106: /* Set bright background color: cyan */
1198 case 107: /* Set bright background color: white */
1199 t->t_curattr.ta_bgcolor = n - 100 + 8;
1200 break;
1169 default:
1170 teken_printf("unsupported attribute %u\n", n);
1171 }
1172 }
1173}
1174
1175static void
1176teken_subr_set_top_and_bottom_margins(teken_t *t, unsigned int top,

--- 75 unchanged lines hidden ---
1201 default:
1202 teken_printf("unsupported attribute %u\n", n);
1203 }
1204 }
1205}
1206
1207static void
1208teken_subr_set_top_and_bottom_margins(teken_t *t, unsigned int top,

--- 75 unchanged lines hidden ---