| OLD | NEW |
| 1 /*- | 1 /*- |
| 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> | 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 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 | 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 | 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 | 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 24 * SUCH DAMAGE. | 24 * SUCH DAMAGE. |
| 25 * | 25 * |
| 26 * $FreeBSD: head/sys/teken/teken.c 261551 2014-02-06 13:28:06Z ray $ | 26 * $FreeBSD: head/sys/teken/teken.c 261551 2014-02-06 13:28:06Z ray $ |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include <sys/cdefs.h> | |
| 30 #if defined(__FreeBSD__) && defined(_KERNEL) | 29 #if defined(__FreeBSD__) && defined(_KERNEL) |
| 31 #include <sys/param.h> | 30 #include <sys/param.h> |
| 32 #include <sys/lock.h> | 31 #include <sys/lock.h> |
| 33 #include <sys/systm.h> | 32 #include <sys/systm.h> |
| 34 #define teken_assert(x) MPASS(x) | 33 #define teken_assert(x) MPASS(x) |
| 35 #else /* !(__FreeBSD__ && _KERNEL) */ | 34 #else /* !(__FreeBSD__ && _KERNEL) */ |
| 36 #include <sys/types.h> | 35 #include <sys/types.h> |
| 37 #include <assert.h> | 36 #include <assert.h> |
| 38 #include <stdint.h> | 37 #include <stdint.h> |
| 39 #include <stdio.h> | 38 #include <stdio.h> |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 return (special_strings_ckeys[k]); | 548 return (special_strings_ckeys[k]); |
| 550 | 549 |
| 551 /* Default xterm sequences. */ | 550 /* Default xterm sequences. */ |
| 552 if (k < sizeof special_strings_normal / sizeof(char *)) | 551 if (k < sizeof special_strings_normal / sizeof(char *)) |
| 553 return (special_strings_normal[k]); | 552 return (special_strings_normal[k]); |
| 554 | 553 |
| 555 return (NULL); | 554 return (NULL); |
| 556 } | 555 } |
| 557 | 556 |
| 558 #include "teken_state.h" | 557 #include "teken_state.h" |
| OLD | NEW |