teken_demo.c (197117) | teken_demo.c (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_demo.c 197117 2009-09-12 12:44:21Z ed $ | 26 * $FreeBSD: head/sys/teken/teken_demo.c 197522 2009-09-26 15:26:32Z ed $ |
27 */ 28 29#include <sys/ioctl.h> 30 31#include <assert.h> 32#include <errno.h> 33#include <inttypes.h> 34#include <locale.h> --- 76 unchanged lines hidden (view full) --- 111 attr |= A_BOLD; 112 if (px->a.ta_format & TF_UNDERLINE) 113 attr |= A_UNDERLINE; 114 if (px->a.ta_format & TF_BLINK) 115 attr |= A_BLINK; 116 if (px->a.ta_format & TF_REVERSE) 117 attr |= A_REVERSE; 118 | 27 */ 28 29#include <sys/ioctl.h> 30 31#include <assert.h> 32#include <errno.h> 33#include <inttypes.h> 34#include <locale.h> --- 76 unchanged lines hidden (view full) --- 111 attr |= A_BOLD; 112 if (px->a.ta_format & TF_UNDERLINE) 113 attr |= A_UNDERLINE; 114 if (px->a.ta_format & TF_BLINK) 115 attr |= A_BLINK; 116 if (px->a.ta_format & TF_REVERSE) 117 attr |= A_REVERSE; 118 |
119 bkgdset(attr | COLOR_PAIR(px->a.ta_fgcolor + 8 * px->a.ta_bgcolor)); | 119 bkgdset(attr | COLOR_PAIR(teken_256to8(px->a.ta_fgcolor) + 120 8 * teken_256to8(px->a.ta_bgcolor))); |
120 mvaddstr(p->tp_row, p->tp_col, str); 121 122 move(y, x); 123} 124 125static void 126test_bell(void *s __unused) 127{ --- 226 unchanged lines hidden --- | 121 mvaddstr(p->tp_row, p->tp_col, str); 122 123 move(y, x); 124} 125 126static void 127test_bell(void *s __unused) 128{ --- 226 unchanged lines hidden --- |