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_demo.c 186731 2009-01-04 00:20:18Z ed $
27 */
28
29#include <sys/ioctl.h>
30
31#include <assert.h>
32#include <errno.h>
33#include <inttypes.h>
34#include <stdio.h>
--- 239 unchanged lines hidden (view full) ---
274 tp.tp_row = ws.ws_row = NROWS;
275 tp.tp_col = ws.ws_col = NCOLS;
276
277 switch (forkpty(&ptfd, NULL, NULL, &ws)) {
278 case -1:
279 perror("forkpty");
280 exit(1);
281 case 0:
282 setenv("TERM", "cons25", 1);
283#ifdef TEKEN_UTF8
284 setenv("LC_CTYPE", "UTF-8", 0);
285#endif /* TEKEN_UTF8 */
286 execlp("zsh", "-zsh", NULL);
287 execlp("bash", "-bash", NULL);
288 execlp("sh", "-sh", NULL);
289 _exit(1);
290 }
--- 48 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_demo.c 186731 2009-01-04 00:20:18Z ed $
27 */
28
29#include <sys/ioctl.h>
30
31#include <assert.h>
32#include <errno.h>
33#include <inttypes.h>
34#include <stdio.h>
--- 239 unchanged lines hidden (view full) ---
274 tp.tp_row = ws.ws_row = NROWS;
275 tp.tp_col = ws.ws_col = NCOLS;
276
277 switch (forkpty(&ptfd, NULL, NULL, &ws)) {
278 case -1:
279 perror("forkpty");
280 exit(1);
281 case 0:
282 setenv("TERM", "cons25", 1);
283#ifdef TEKEN_UTF8
284 setenv("LC_CTYPE", "UTF-8", 0);
285#endif /* TEKEN_UTF8 */
286 execlp("zsh", "-zsh", NULL);
287 execlp("bash", "-bash", NULL);
288 execlp("sh", "-sh", NULL);
289 _exit(1);
290 }
--- 48 unchanged lines hidden ---