Deleted Added
full compact
teken.c (193184) teken.c (194293)
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/dev/syscons/teken/teken.c 193184 2009-05-31 19:35:41Z ed $
26 * $FreeBSD: head/sys/dev/syscons/teken/teken.c 194293 2009-06-16 14:55:13Z ed $
27 */
28
29#include <sys/cdefs.h>
30#if defined(__FreeBSD__) && defined(_KERNEL)
31#include <sys/param.h>
32#include <sys/lock.h>
33#include <sys/systm.h>
34#define teken_assert(x) MPASS(x)

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

295 t->t_utf8_left = 3;
296 t->t_utf8_partial = c & 0x07;
297 } else if ((c & 0xc0) == 0x80) {
298 if (t->t_utf8_left == 0)
299 return;
300 t->t_utf8_left--;
301 t->t_utf8_partial = (t->t_utf8_partial << 6) | (c & 0x3f);
302 if (t->t_utf8_left == 0) {
27 */
28
29#include <sys/cdefs.h>
30#if defined(__FreeBSD__) && defined(_KERNEL)
31#include <sys/param.h>
32#include <sys/lock.h>
33#include <sys/systm.h>
34#define teken_assert(x) MPASS(x)

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

295 t->t_utf8_left = 3;
296 t->t_utf8_partial = c & 0x07;
297 } else if ((c & 0xc0) == 0x80) {
298 if (t->t_utf8_left == 0)
299 return;
300 t->t_utf8_left--;
301 t->t_utf8_partial = (t->t_utf8_partial << 6) | (c & 0x3f);
302 if (t->t_utf8_left == 0) {
303 teken_printf("Got UTF-8 char %u\n", t->t_utf8_partial);
303 teken_printf("Got UTF-8 char %x\n", t->t_utf8_partial);
304 teken_input_char(t, t->t_utf8_partial);
305 }
306 }
307#else /* !TEKEN_UTF8 */
308 teken_input_char(t, c);
309#endif /* TEKEN_UTF8 */
310}
311

--- 119 unchanged lines hidden ---
304 teken_input_char(t, t->t_utf8_partial);
305 }
306 }
307#else /* !TEKEN_UTF8 */
308 teken_input_char(t, c);
309#endif /* TEKEN_UTF8 */
310}
311

--- 119 unchanged lines hidden ---