1/* 2 * Copyright (c) 1994, Paul Richards. 3 * 4 * All rights reserved. 5 * 6 * This software may be used, modified, copied, distributed, and sold, in both 7 * source and binary form provided that the above copyright and these terms 8 * are retained, verbatim, as the first lines of this file. Under no 9 * circumstances is the author responsible for the proper functioning of this 10 * software, nor does the author assume any responsibility for damages 11 * incurred with its use. 12 *
| 1/* 2 * Copyright (c) 1994, Paul Richards. 3 * 4 * All rights reserved. 5 * 6 * This software may be used, modified, copied, distributed, and sold, in both 7 * source and binary form provided that the above copyright and these terms 8 * are retained, verbatim, as the first lines of this file. Under no 9 * circumstances is the author responsible for the proper functioning of this 10 * software, nor does the author assume any responsibility for damages 11 * incurred with its use. 12 *
|
13 * $FreeBSD: head/usr.sbin/sade/termcap.c 161060 2006-08-07 23:35:49Z netchild $
| 13 * $FreeBSD: head/usr.sbin/sade/termcap.c 161099 2006-08-08 13:45:46Z delphij $
|
14 */ 15 16#include "sade.h" 17#include <stdarg.h> 18#include <fcntl.h> 19#include <sys/errno.h> 20#include <sys/ioctl.h> 21#include <sys/consio.h> 22 23#define VTY_STATUS_LINE 24 24#define TTY_STATUS_LINE 23 25 26static void 27prompt_term(char **termp, char **termcapp) 28{
| 14 */ 15 16#include "sade.h" 17#include <stdarg.h> 18#include <fcntl.h> 19#include <sys/errno.h> 20#include <sys/ioctl.h> 21#include <sys/consio.h> 22 23#define VTY_STATUS_LINE 24 24#define TTY_STATUS_LINE 23 25 26static void 27prompt_term(char **termp, char **termcapp) 28{
|
29 char str[80]; 30 static struct { 31 const char *term, *termcap; 32 } lookup[] = { { "ansi", termcap_ansi }, 33 { "vt100", termcap_vt100 }, 34 { "cons25", termcap_cons25 }, 35 { "cons25-m", termcap_cons25_m }, 36 { "xterm", termcap_xterm }, 37 { "cons25w", termcap_cons25w } }; /* must be last */
| 29 char str[80];
|
38 39 printf("\nPlease set your TERM variable before running this program.\n"); 40 printf("Defaulting to an ANSI compatible terminal - please press RETURN\n"); 41 fgets(str, 80, stdin); /* Just to make it interactive */ 42 *termp = (char *)"ansi"; 43 *termcapp = (char *)termcap_ansi; 44} 45
--- 76 unchanged lines hidden --- | 30 31 printf("\nPlease set your TERM variable before running this program.\n"); 32 printf("Defaulting to an ANSI compatible terminal - please press RETURN\n"); 33 fgets(str, 80, stdin); /* Just to make it interactive */ 34 *termp = (char *)"ansi"; 35 *termcapp = (char *)termcap_ansi; 36} 37
--- 76 unchanged lines hidden --- |