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 188391 2009-02-09 15:55:21Z 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)
--- 289 unchanged lines hidden (view full) ---
324
325 /* XXX: bounds checking with originreg! */
326 teken_assert(p->tp_row < t->t_winsize.tp_row);
327 teken_assert(p->tp_col < t->t_winsize.tp_col);
328
329 t->t_cursor = *p;
330}
331
332const teken_attr_t *
333teken_get_curattr(teken_t *t)
334{
335
336 return (&t->t_curattr);
337}
338
339const teken_attr_t *
340teken_get_defattr(teken_t *t)
341{
342
343 return (&t->t_defattr);
344}
345
346void
347teken_set_defattr(teken_t *t, const teken_attr_t *a)
348{
349
350 t->t_curattr = t->t_saved_curattr = t->t_defattr = *a;
351}
352
353void
--- 72 unchanged lines hidden ---
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 188391 2009-02-09 15:55:21Z 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)
--- 289 unchanged lines hidden (view full) ---
324
325 /* XXX: bounds checking with originreg! */
326 teken_assert(p->tp_row < t->t_winsize.tp_row);
327 teken_assert(p->tp_col < t->t_winsize.tp_col);
328
329 t->t_cursor = *p;
330}
331
332const teken_attr_t *
333teken_get_curattr(teken_t *t)
334{
335
336 return (&t->t_curattr);
337}
338
339const teken_attr_t *
340teken_get_defattr(teken_t *t)
341{
342
343 return (&t->t_defattr);
344}
345
346void
347teken_set_defattr(teken_t *t, const teken_attr_t *a)
348{
349
350 t->t_curattr = t->t_saved_curattr = t->t_defattr = *a;
351}
352
353void
--- 72 unchanged lines hidden ---