Deleted Added
full compact
scterm-teken.c (199171) scterm-teken.c (199243)
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/syscons/scterm-teken.c 199171 2009-11-11 08:20:19Z ed $");
31__FBSDID("$FreeBSD: head/sys/dev/syscons/scterm-teken.c 199243 2009-11-13 05:54:55Z ed $");
32
33#include "opt_syscons.h"
34#include "opt_teken.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/module.h>

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

45#else
46#include <machine/pc/display.h>
47#endif
48
49#include <dev/syscons/syscons.h>
50
51#include <teken/teken.h>
52
32
33#include "opt_syscons.h"
34#include "opt_teken.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/module.h>

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

45#else
46#include <machine/pc/display.h>
47#endif
48
49#include <dev/syscons/syscons.h>
50
51#include <teken/teken.h>
52
53#if defined(TEKEN_XTERM) && defined(TEKEN_CONS25)
54#error "xterm and cons25 are mutually exclusive."
55#endif
56
57/* XXX: Use cons25 on i386, for compatibility with pc98. */
58#if defined(__i386__) && !defined(TEKEN_XTERM) && !defined(TEKEN_CONS25)
59#define TEKEN_CONS25
60#endif
61
53static void scteken_revattr(unsigned char, teken_attr_t *);
54static unsigned int scteken_attr(const teken_attr_t *);
55
56static sc_term_init_t scteken_init;
57static sc_term_term_t scteken_term;
58static sc_term_puts_t scteken_puts;
59static sc_term_ioctl_t scteken_ioctl;
60static sc_term_default_attr_t scteken_default_attr;

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

127 ++sc_term_scteken.te_refcount;
128 ts->ts_busy = 1;
129 /* FALLTHROUGH */
130 case SC_TE_WARM_INIT:
131 teken_init(&ts->ts_teken, &scteken_funcs, scp);
132#ifndef TEKEN_UTF8
133 teken_set_8bit(&ts->ts_teken);
134#endif /* !TEKEN_UTF8 */
62static void scteken_revattr(unsigned char, teken_attr_t *);
63static unsigned int scteken_attr(const teken_attr_t *);
64
65static sc_term_init_t scteken_init;
66static sc_term_term_t scteken_term;
67static sc_term_puts_t scteken_puts;
68static sc_term_ioctl_t scteken_ioctl;
69static sc_term_default_attr_t scteken_default_attr;

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

136 ++sc_term_scteken.te_refcount;
137 ts->ts_busy = 1;
138 /* FALLTHROUGH */
139 case SC_TE_WARM_INIT:
140 teken_init(&ts->ts_teken, &scteken_funcs, scp);
141#ifndef TEKEN_UTF8
142 teken_set_8bit(&ts->ts_teken);
143#endif /* !TEKEN_UTF8 */
135#ifndef TEKEN_XTERM
144#ifdef TEKEN_CONS25
136 teken_set_cons25(&ts->ts_teken);
145 teken_set_cons25(&ts->ts_teken);
137#endif /* !TEKEN_XTERM */
146#endif /* TEKEN_CONS25 */
138
139 tp.tp_row = scp->ysize;
140 tp.tp_col = scp->xsize;
141 teken_set_winsize(&ts->ts_teken, &tp);
142
143 if (scp->cursor_pos < scp->ysize * scp->xsize) {
144 /* Valid old cursor position. */
145 tp.tp_row = scp->cursor_pos / scp->xsize;

--- 567 unchanged lines hidden ---
147
148 tp.tp_row = scp->ysize;
149 tp.tp_col = scp->xsize;
150 teken_set_winsize(&ts->ts_teken, &tp);
151
152 if (scp->cursor_pos < scp->ysize * scp->xsize) {
153 /* Valid old cursor position. */
154 tp.tp_row = scp->cursor_pos / scp->xsize;

--- 567 unchanged lines hidden ---