projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
break out special local mail processing (e.g., mapping to the
[unix-history]
/
usr
/
src
/
usr.bin
/
window
/
win.c
diff --git
a/usr/src/usr.bin/window/win.c
b/usr/src/usr.bin/window/win.c
index
55ed942
..
18cbaaa
100644
(file)
--- a/
usr/src/usr.bin/window/win.c
+++ b/
usr/src/usr.bin/window/win.c
@@
-1,19
+1,19
@@
/*
/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Edward Wang at The University of California, Berkeley.
*
* %sccs.include.redist.c%
*/
#ifndef lint
*
* %sccs.include.redist.c%
*/
#ifndef lint
-static char sccsid[] = "@(#)win.c
3.23
(Berkeley) %G%";
+static char sccsid[] = "@(#)win.c
8.1
(Berkeley) %G%";
#endif /* not lint */
#include "defs.h"
#include "char.h"
#endif /* not lint */
#include "defs.h"
#include "char.h"
-#ifdef POSIX_TTY
-#include <sys/ioctl.h>
-#endif
/*
* Higher level routines for dealing with windows.
/*
* Higher level routines for dealing with windows.
@@
-275,17
+275,19
@@
register struct ww *w;
stopwin(w)
register struct ww *w;
{
stopwin(w)
register struct ww *w;
{
- w->ww_stopped = 1;
- if (w->ww_pty >= 0 && w->ww_ispty)
- (void) ioctl(w->ww_pty, TIOCSTOP, (char *)0);
+ if (w->ww_pty >= 0 && w->ww_ispty && wwstoptty(w->ww_pty) < 0)
+ error("Can't stop output: %s.", wwerror());
+ else
+ w->ww_stopped = 1;
}
startwin(w)
register struct ww *w;
{
}
startwin(w)
register struct ww *w;
{
- w->ww_stopped = 0;
- if (w->ww_pty >= 0 && w->ww_ispty)
- (void) ioctl(w->ww_pty, TIOCSTART, (char *)0);
+ if (w->ww_pty >= 0 && w->ww_ispty && wwstarttty(w->ww_pty) < 0)
+ error("Can't start output: %s.", wwerror());
+ else
+ w->ww_stopped = 0;
}
sizewin(w, nrow, ncol)
}
sizewin(w, nrow, ncol)