aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/dist.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-05-29 03:27:31 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-05-29 03:27:31 +0000
commit8e2068180c00845891090d624017bceba317eabf (patch)
treee0687b87820ff977fecfb1045e8235d806e38626 /usr.sbin/sysinstall/dist.c
parentb53e8a34e61271929b3bb6bd1d96451465ab11b8 (diff)
downloadsrc-8e2068180c00845891090d624017bceba317eabf.tar.gz
src-8e2068180c00845891090d624017bceba317eabf.zip
Fix some minor formatting dreck.
Notes
Notes: svn path=/head/; revision=15973
Diffstat (limited to 'usr.sbin/sysinstall/dist.c')
-rw-r--r--usr.sbin/sysinstall/dist.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 297483a0295e..6df410108d56 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -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.54 1996/05/28 23:31:20 jkh Exp $
+ * $Id: dist.c,v 1.55 1996/05/29 01:35:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -474,10 +474,9 @@ distExtract(char *parent, Distribution *me)
}
static void
-printSelected(char *buf, int selected, Distribution *me)
+printSelected(char *buf, int selected, Distribution *me, int *col)
{
int i;
- static int col = 0;
/* Loop through to see if we're in our parent's plans */
for (i = 0; me[i].my_name; i++) {
@@ -490,15 +489,15 @@ printSelected(char *buf, int selected, Distribution *me)
if (!me[i].my_dir)
continue;
- col += strlen(me[i].my_name);
- if (col > 50) {
- col = 0;
+ *col += strlen(me[i].my_name);
+ if (*col > 50) {
+ *col = 0;
strcat(buf, "\n");
}
sprintf(&buf[strlen(buf)], " %s", me[i].my_name);
/* Recurse if have a sub-distribution */
if (me[i].my_dist)
- printSelected(buf, *(me[i].my_mask), me[i].my_dist);
+ printSelected(buf, *(me[i].my_mask), me[i].my_dist, col);
}
}
@@ -525,8 +524,10 @@ distExtractAll(dialogMenuItem *self)
distExtract(NULL, DistTable);
if (Dists) {
+ int col = 0;
+
buf[0] = '\0';
- printSelected(buf, Dists, DistTable);
+ printSelected(buf, Dists, DistTable, &col);
dialog_clear();
msgConfirm("Couldn't extract the following distributions. This may\n"
"be because they were not available on the installation\n"