Deleted Added
full compact
teken_scs.h (197471) teken_scs.h (197520)
1/*-
2 * Copyright (c) 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) 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_scs.h 197471 2009-09-24 20:34:44Z ed $
26 * $FreeBSD: head/sys/teken/teken_scs.h 197520 2009-09-26 15:03:42Z ed $
27 */
28
27 */
28
29static void
30teken_scs_set(teken_t *t, unsigned int g, teken_scs_t *ts)
31{
32
33 t->t_scs[g] = ts;
34}
35
36static void
37teken_scs_switch(teken_t *t, unsigned int g)
38{
39
40 t->t_curscs = g;
41}
42
43static void
44teken_scs_restore(teken_t *t)
45{
46
47 t->t_scs[t->t_curscs] = t->t_saved_curscs;
48}
49
50static void
51teken_scs_save(teken_t *t)
52{
53
54 t->t_saved_curscs = t->t_scs[t->t_curscs];
55}
56
57static teken_char_t
29static inline teken_char_t
58teken_scs_process(teken_t *t, teken_char_t c)
59{
60
61 return (t->t_scs[t->t_curscs](t, c));
62}
63
64/* Unicode points for VT100 box drawing. */
65static const uint16_t teken_boxdrawing_unicode[31] = {

--- 43 unchanged lines hidden ---
30teken_scs_process(teken_t *t, teken_char_t c)
31{
32
33 return (t->t_scs[t->t_curscs](t, c));
34}
35
36/* Unicode points for VT100 box drawing. */
37static const uint16_t teken_boxdrawing_unicode[31] = {

--- 43 unchanged lines hidden ---