Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst handle CRs properly when running cmds ...
details: https://anonhg.NetBSD.org/src/rev/3dd7dc6f4d94
branches: trunk
changeset: 473901:3dd7dc6f4d94
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Jun 21 02:31:17 1999 +0000
description:
handle CRs properly when running cmds w/output to subwin
diffstat:
distrib/utils/sysinst/run.c | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diffs (45 lines):
diff -r 6d67b4467a80 -r 3dd7dc6f4d94 distrib/utils/sysinst/run.c
--- a/distrib/utils/sysinst/run.c Mon Jun 21 02:30:53 1999 +0000
+++ b/distrib/utils/sysinst/run.c Mon Jun 21 02:31:17 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: run.c,v 1.17 1999/06/20 20:26:42 cgd Exp $ */
+/* $NetBSD: run.c,v 1.18 1999/06/21 02:31:17 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -353,21 +353,22 @@
(void)write(master, ibuf, n);
for (j=0; j < n; j++) {
if (display) {
- if (ibuf[j] == '\n' || ibuf[j] == '\r') {
- if (ibuf[j] == '\n') {
- getyx(actionwin, ycor, xcor);
- if (ycor + 1 >= actionwin->maxy) {
- scroll(actionwin);
- wmove(actionwin, actionwin->maxy - 1, 1);
- } else
- wmove(actionwin, ycor + 1, 1);
- if (logging)
- fprintf(log, "\n");
- }
+ getyx(actionwin, ycor, xcor);
+ if (ibuf[j] == '\n') {
+ if (ycor + 1 >= actionwin->maxy) {
+ scroll(actionwin);
+ wmove(actionwin, actionwin->maxy - 1, 1);
+ } else
+ wmove(actionwin, ycor + 1, 1);
+ if (logging)
+ fprintf(log, "\n");
+ } else if (ibuf[j] == '\r') {
+ wmove(actionwin, ycor, 1);
+ if (logging)
+ fprintf(log, "\r");
} else {
- getyx(actionwin, ycor, xcor);
if (xcor == 0)
- wmove(actionwin, ycor, xcor + 1);
+ wmove(actionwin, ycor, xcor + 1);
waddch(actionwin, ibuf[j]);
wrefresh(actionwin);
if (logging) {
Home |
Main Index |
Thread Index |
Old Index