-/* $NetBSD: hack.tty.c,v 1.11 2003/04/02 18:36:41 jsm Exp $ */
+/* $NetBSD: hack.tty.c,v 1.14 2009/08/12 07:28:41 dholland Exp $ */
/*-
* Copyright (c) 1988, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)hack.tty.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: hack.tty.c,v 1.11 2003/04/02 18:36:41 jsm Exp $");
+__RCSID("$NetBSD: hack.tty.c,v 1.14 2009/08/12 07:28:41 dholland Exp $");
#endif
#endif /* not lint */
static char erase_char, kill_char;
static boolean settty_needed = FALSE;
-struct termios inittyb, curttyb;
+static struct termios inittyb, curttyb;
+
+static void setctty(void);
/*
* Get initial state of terminal, set ospeed (for termcap routines)
* Called by startup() in termcap.c and after returning from ! or ^Z
*/
void
-gettty()
+gettty(void)
{
if (tcgetattr(0, &inittyb) < 0)
perror("Hack (gettty)");
/* reset terminal to original state */
void
-settty(s)
- const char *s;
+settty(const char *s)
{
clear_screen();
end_screen();
setioctls();
}
-void
-setctty()
+static void
+setctty(void)
{
if (tcsetattr(0, TCSADRAIN, &curttyb) < 0)
perror("Hack (setctty)");
void
-setftty()
+setftty(void)
{
int change = 0;
flags.cbreak = ON;
* resulting string is "\033".
*/
void
-getlin(bufp)
- char *bufp;
+getlin(char *bufp)
{
char *obufp = bufp;
int c;
}
void
-getret()
+getret(void)
{
cgetret("");
}
void
-cgetret(s)
- const char *s;
+cgetret(const char *s)
{
putsym('\n');
if (flags.standout)
char morc; /* tell the outside world what char he used */
+/* s = chars allowed besides space or return */
void
-xwaitforspace(s)
- const char *s; /* chars allowed besides space or return */
+xwaitforspace(const char *s)
{
int c;
}
char *
-parse()
+parse(void)
{
static char inputline[COLNO];
int foo;
}
char
-readchar()
+readchar(void)
{
int sym;
}
void
-end_of_input()
+end_of_input(void)
{
settty("End of input?\n");
clearlocks();