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 186798 2009-01-05 22:09:46Z 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#ifdef TEKEN_CONS25 |
283 setenv("TERM", "cons25", 1); |
284#else /* !TEKEN_CONS25 */ 285 setenv("TERM", "xterm", 1); 286#endif /* TEKEN_CONS25 */ |
287#ifdef TEKEN_UTF8 288 setenv("LC_CTYPE", "UTF-8", 0); 289#endif /* TEKEN_UTF8 */ 290 execlp("zsh", "-zsh", NULL); 291 execlp("bash", "-bash", NULL); 292 execlp("sh", "-sh", NULL); 293 _exit(1); 294 } --- 48 unchanged lines hidden --- |