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
convert VOP_UNLOCK and vrele into vput's; add proc parameter to union_dircache
[unix-history]
/
usr
/
src
/
sys
/
kern
/
tty.c
diff --git
a/usr/src/sys/kern/tty.c
b/usr/src/sys/kern/tty.c
index
ba0e1dc
..
012f20a
100644
(file)
--- a/
usr/src/sys/kern/tty.c
+++ b/
usr/src/sys/kern/tty.c
@@
-9,7
+9,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)tty.c 8.
8
(Berkeley) %G%
+ * @(#)tty.c 8.
13
(Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
@@
-397,15
+397,18
@@
ttyoutput(c, tp)
if (c == '\t' &&
ISSET(oflag, OXTABS) && !ISSET(tp->t_lflag, EXTPROC)) {
c = 8 - (tp->t_column & 7);
if (c == '\t' &&
ISSET(oflag, OXTABS) && !ISSET(tp->t_lflag, EXTPROC)) {
c = 8 - (tp->t_column & 7);
- if (!ISSET(tp->t_lflag, FLUSHO)) {
+ if (ISSET(tp->t_lflag, FLUSHO)) {
+ notout = 0;
+ } else {
s = spltty(); /* Don't interrupt tabs. */
s = spltty(); /* Don't interrupt tabs. */
- c -= b_to_q(" ", c, &tp->t_outq);
+ notout = b_to_q(" ", c, &tp->t_outq);
+ c -= notout;
tk_nout += c;
tp->t_outcc += c;
splx(s);
}
tp->t_column += c;
tk_nout += c;
tp->t_outcc += c;
splx(s);
}
tp->t_column += c;
- return (
c ? -1 : '\t'
);
+ return (
notout ? '\t' : -1
);
}
if (c == CEOT && ISSET(oflag, ONOEOT))
return (-1);
}
if (c == CEOT && ISSET(oflag, ONOEOT))
return (-1);
@@
-458,8
+461,9
@@
ttyoutput(c, tp)
int
ttioctl(tp, cmd, data, flag)
register struct tty *tp;
int
ttioctl(tp, cmd, data, flag)
register struct tty *tp;
-
int cmd, flag
;
+
u_long cmd
;
void *data;
void *data;
+ int flag;
{
extern struct tty *constty; /* Temporary virtual console. */
extern int nlinesw;
{
extern struct tty *constty; /* Temporary virtual console. */
extern int nlinesw;
@@
-1606,11
+1610,11
@@
ttyinfo(tp)
ttyprintf(tp, "not a controlling terminal\n");
else if (tp->t_pgrp == NULL)
ttyprintf(tp, "no foreground process group\n");
ttyprintf(tp, "not a controlling terminal\n");
else if (tp->t_pgrp == NULL)
ttyprintf(tp, "no foreground process group\n");
- else if ((p = tp->t_pgrp->pg_mem
) == NULL
)
+ else if ((p = tp->t_pgrp->pg_mem
bers.lh_first) == 0
)
ttyprintf(tp, "empty foreground process group\n");
else {
/* Pick interesting process. */
ttyprintf(tp, "empty foreground process group\n");
else {
/* Pick interesting process. */
- for (pick = NULL; p !=
NULL; p = p->p_pgrpn
xt)
+ for (pick = NULL; p !=
0; p = p->p_pglist.le_ne
xt)
if (proc_compare(pick, p))
pick = p;
if (proc_compare(pick, p))
pick = p;