Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst In command execution displays, only dr...
details: https://anonhg.NetBSD.org/src/rev/8642c3bdefe4
branches: trunk
changeset: 480477:8642c3bdefe4
user: mycroft <mycroft%NetBSD.org@localhost>
date: Thu Jan 13 18:52:21 2000 +0000
description:
In command execution displays, only draw a single line between the status
display and the output window, not a whole box. This looks better, and it
works much better on terminals.
diffstat:
distrib/utils/sysinst/defs.h | 5 ++++-
distrib/utils/sysinst/run.c | 20 ++++++++++++--------
2 files changed, 16 insertions(+), 9 deletions(-)
diffs (75 lines):
diff -r 63aa3f48ee21 -r 8642c3bdefe4 distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h Thu Jan 13 18:00:51 2000 +0000
+++ b/distrib/utils/sysinst/defs.h Thu Jan 13 18:52:21 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.49 2000/01/04 08:33:51 itojun Exp $ */
+/* $NetBSD: defs.h,v 1.50 2000/01/13 18:52:21 mycroft Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -45,6 +45,9 @@
#include "msg_defs.h"
+#define min(a,b) (a < b ? a : b)
+#define max(a,b) (a > b ? a : b)
+
/* Define for external varible use */
#ifdef MAIN
#define EXTERN
diff -r 63aa3f48ee21 -r 8642c3bdefe4 distrib/utils/sysinst/run.c
--- a/distrib/utils/sysinst/run.c Thu Jan 13 18:00:51 2000 +0000
+++ b/distrib/utils/sysinst/run.c Thu Jan 13 18:52:21 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: run.c,v 1.25 2000/01/07 02:02:05 jeremy Exp $ */
+/* $NetBSD: run.c,v 1.26 2000/01/13 18:52:21 mycroft Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -456,20 +456,19 @@
if (display) {
wclear(stdscr); /* XXX shouldn't be needed */
wrefresh(stdscr);
- statuswin = subwin(stdscr, win.ws_row, win.ws_col, 0, 0);
+ statuswin = subwin(stdscr, 3, win.ws_col, 0, 0);
if (statuswin == NULL) {
fprintf(stderr, "sysinst: failed to allocate"
" status window.\n");
exit(1);
}
- boxwin = subwin(statuswin, win.ws_row - 3, win.ws_col, 3, 0);
+ boxwin = subwin(stdscr, win.ws_row - 3, win.ws_col, 3, 0);
if (boxwin == NULL) {
fprintf(stderr, "sysinst: failed to allocate"
" status box.\n");
exit(1);
}
- actionwin = subwin(statuswin, win.ws_row - 5, win.ws_col - 2,
- 4, 1);
+ actionwin = subwin(stdscr, win.ws_row - 4, win.ws_col, 4, 0);
if (actionwin == NULL) {
fprintf(stderr, "sysinst: failed to allocate"
" output window.\n");
@@ -477,14 +476,19 @@
}
scrollok(actionwin, TRUE);
- win.ws_col -= 2;
- win.ws_row -= 5;
+ win.ws_row -= 4;
wclear(statuswin);
wrefresh(statuswin);
wclear(boxwin);
- box(boxwin, 124, 45);
+ wmove(boxwin, 0, 0);
+ {
+ int n, m;
+ for (n = win.ws_col; (m = min(n, 30)) > 0; n -= m)
+ waddstr(boxwin,
+ "------------------------------" + 30 - m);
+ }
wrefresh(boxwin);
wclear(actionwin);
Home |
Main Index |
Thread Index |
Old Index