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 161115 2006-08-09 09:12:01Z netchild $
| 13 * $FreeBSD: head/usr.sbin/sade/termcap.c 167260 2007-03-06 09:32:41Z kevlo $
|
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) 28{ 29 char str[80]; 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");
| 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) 28{ 29 char str[80]; 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 */
| 33 fgets(str, sizeof(str), stdin); /* Just to make it interactive */
|
34 *termp = (char *)"ansi"; 35} 36 37int 38set_termcap(void) 39{ 40 char *term; 41 int stat;
--- 63 unchanged lines hidden --- | 34 *termp = (char *)"ansi"; 35} 36 37int 38set_termcap(void) 39{ 40 char *term; 41 int stat;
--- 63 unchanged lines hidden --- |