*
* %sccs.include.redist.c%
*
- * from: Utah $Hdr: hpux_tty.c 1.1 90/07/09$
+ * from: Utah $Hdr: hpux_tty.c 1.12 92/04/15$
*
- * @(#)hpux_tty.c 7.11 (Berkeley) %G%
+ * @(#)hpux_tty.c 7.15 (Berkeley) %G%
*/
/*
* stty/gtty/termio emulation stuff
*/
#ifdef HPUXCOMPAT
+#ifndef COMPAT_43
+#define COMPAT_43
+#endif
-#include "param.h"
-#include "systm.h"
-#include "filedesc.h"
-#include "ioctl.h"
-#include "proc.h"
-#include "tty.h"
-#include "file.h"
-#include "conf.h"
-#include "buf.h"
-#include "kernel.h"
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/filedesc.h>
+#include <sys/ioctl.h>
+#include <sys/proc.h>
+#include <sys/tty.h>
+#include <sys/file.h>
+#include <sys/conf.h>
+#include <sys/buf.h>
+#include <sys/kernel.h>
-#include "hpux.h"
-#include "hpux_termio.h"
+#include <hp/hpux/hpux.h>
+#include <hp/hpux/hpux_termio.h>
/*
* Map BSD/POSIX style termios info to and from SYS5 style termio stuff.
case HPUXTCSETA:
case HPUXTCSETAW:
case HPUXTCSETAF:
- if (newi)
- bcopy(data, (char *)&htios, sizeof htios);
- else
- termiototermios((struct termio *)data, &htios);
/*
* Get old characteristics and determine if we are a tty.
*/
if (error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, p))
break;
+ if (newi)
+ bcopy(data, (char *)&htios, sizeof htios);
+ else
+ termiototermios((struct termio *)data, &htios, &tios);
/*
* Set iflag.
* Same through ICRNL, no HP-UX equiv for IMAXBEL
return(error);
}
-termiototermios(tio, tios)
+termiototermios(tio, tios, bsdtios)
struct hpuxtermio *tio;
struct hpuxtermios *tios;
+ struct termios *bsdtios;
{
int i;
tios->c_cc[HPUXVMINS] = tio->c_cc[HPUXVMIN];
tios->c_cc[HPUXVTIMES] = tio->c_cc[HPUXVTIME];
}
+ tios->c_cc[HPUXVMINS] = bsdtios->c_cc[VMIN];
+ tios->c_cc[HPUXVTIMES] = bsdtios->c_cc[VTIME];
+ tios->c_cc[HPUXVSUSP] = bsdtios->c_cc[VSUSP];
+ tios->c_cc[HPUXVSTART] = bsdtios->c_cc[VSTART];
+ tios->c_cc[HPUXVSTOP] = bsdtios->c_cc[VSTOP];
}
termiostotermio(tios, tio)
tio->c_line = tios->c_reserved;
for (i = 0; i <= HPUXVSWTCH; i++)
tio->c_cc[i] = tios->c_cc[i];
- if (tios->c_lflag & ICANON) {
+ if (tios->c_lflag & TIO_ICANON) {
tio->c_cc[HPUXVEOF] = tios->c_cc[HPUXVEOF];
tio->c_cc[HPUXVEOL] = tios->c_cc[HPUXVEOL];
} else {
}
#ifdef COMPAT_OHPUX
+struct ohpuxsgtty_args {
+ int fdes;
+ caddr_t cmarg;
+};
ohpuxgtty(p, uap, retval)
struct proc *p;
- struct args {
- int fdes;
- caddr_t cmarg;
- } *uap;
+ struct ohpuxsgtty_args *uap;
int *retval;
{
ohpuxstty(p, uap, retval)
struct proc *p;
- struct args {
- int fdes;
- caddr_t cmarg;
- } *uap;
+ struct ohpuxsgtty_args *uap;
int *retval;
{