Fix a small display bogon with the progress indicators.

This commit is contained in:
Jordan K. Hubbard 1996-04-29 17:59:07 +00:00
parent 24b34f097b
commit 2908ba6ad7
2 changed files with 10 additions and 2 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: dist.c,v 1.44 1996/04/28 00:37:29 jkh Exp $
* $Id: dist.c,v 1.45 1996/04/28 03:26:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -299,8 +299,10 @@ distExtract(char *parent, Distribution *me)
char *path, *dist, buf[10240];
const char *tmp;
Attribs *dist_attr;
WINDOW *w = savescr();
status = TRUE;
dialog_clear();
if (isDebug())
msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name);
@ -388,6 +390,7 @@ distExtract(char *parent, Distribution *me)
goto punt;
}
snprintf(prompt, 80, "Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
dialog_clear();
dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100));
move(0, 0); /* Get cursor out of the way - it makes gauges look strange */
while ((n = read(fd, buf, sizeof buf)) > 0) {
@ -433,6 +436,7 @@ distExtract(char *parent, Distribution *me)
if (status)
*(me[i].my_mask) &= ~(me[i].my_bit);
}
restorescr(w);
return status;
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: dist.c,v 1.44 1996/04/28 00:37:29 jkh Exp $
* $Id: dist.c,v 1.45 1996/04/28 03:26:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -299,8 +299,10 @@ distExtract(char *parent, Distribution *me)
char *path, *dist, buf[10240];
const char *tmp;
Attribs *dist_attr;
WINDOW *w = savescr();
status = TRUE;
dialog_clear();
if (isDebug())
msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name);
@ -388,6 +390,7 @@ distExtract(char *parent, Distribution *me)
goto punt;
}
snprintf(prompt, 80, "Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
dialog_clear();
dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100));
move(0, 0); /* Get cursor out of the way - it makes gauges look strange */
while ((n = read(fd, buf, sizeof buf)) > 0) {
@ -433,6 +436,7 @@ distExtract(char *parent, Distribution *me)
if (status)
*(me[i].my_mask) &= ~(me[i].my_bit);
}
restorescr(w);
return status;
}