From 3cd31ab7391ff026b20d11cd4ccb3b406ccea85a Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Thu, 12 Dec 1996 22:38:41 +0000 Subject: [PATCH] Add some additional smarts for XFree86 configuration. Fix a bogon I thought I fixed in the last commit. --- release/sysinstall/config.c | 5 ++++- release/sysinstall/menus.c | 6 +++--- release/sysinstall/misc.c | 6 +++--- usr.sbin/sade/config.c | 5 ++++- usr.sbin/sade/menus.c | 6 +++--- usr.sbin/sade/misc.c | 6 +++--- usr.sbin/sysinstall/config.c | 5 ++++- usr.sbin/sysinstall/menus.c | 6 +++--- usr.sbin/sysinstall/misc.c | 6 +++--- 9 files changed, 30 insertions(+), 21 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index aa15e2a8766b..f432c478867f 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.62 1996/12/09 08:22:11 jkh Exp $ + * $Id: config.c,v 1.63 1996/12/11 09:34:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -358,6 +358,9 @@ int configXFree86(dialogMenuItem *self) { if (file_executable("/usr/X11R6/bin/XF86Setup")) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); dialog_clear(); systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); systemExecute("/usr/X11R6/bin/XF86Setup"); diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index 348c6b4a0e4d..bb461de9771d 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.99 1996/12/08 12:27:57 jkh Exp $ + * $Id: menus.c,v 1.100 1996/12/09 06:02:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -1276,8 +1276,8 @@ DMenu MenuUsermgmt = { "login accounts.\n", "Configure your user groups and users", NULL, - { { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, - { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, { "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c index af88fe3b2d1f..6508fc7634fc 100644 --- a/release/sysinstall/misc.c +++ b/release/sysinstall/misc.c @@ -1,7 +1,7 @@ /* * Miscellaneous support routines.. * - * $Id: misc.c,v 1.23 1996/12/09 08:22:15 jkh Exp $ + * $Id: misc.c,v 1.24 1996/12/11 18:23:18 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -80,8 +80,8 @@ string_concat(char *one, char *two) char * sstrncpy(char *dst, const char *src, int size) { - dst[size - 1] = '\0'; - return strncpy(dst, src, size - 1); + dst[--size] = '\0'; + return strncpy(dst, src, size); } /* Concatenate three strings into static storage */ diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index aa15e2a8766b..f432c478867f 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.62 1996/12/09 08:22:11 jkh Exp $ + * $Id: config.c,v 1.63 1996/12/11 09:34:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -358,6 +358,9 @@ int configXFree86(dialogMenuItem *self) { if (file_executable("/usr/X11R6/bin/XF86Setup")) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); dialog_clear(); systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); systemExecute("/usr/X11R6/bin/XF86Setup"); diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index 348c6b4a0e4d..bb461de9771d 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.99 1996/12/08 12:27:57 jkh Exp $ + * $Id: menus.c,v 1.100 1996/12/09 06:02:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -1276,8 +1276,8 @@ DMenu MenuUsermgmt = { "login accounts.\n", "Configure your user groups and users", NULL, - { { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, - { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, { "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c index af88fe3b2d1f..6508fc7634fc 100644 --- a/usr.sbin/sade/misc.c +++ b/usr.sbin/sade/misc.c @@ -1,7 +1,7 @@ /* * Miscellaneous support routines.. * - * $Id: misc.c,v 1.23 1996/12/09 08:22:15 jkh Exp $ + * $Id: misc.c,v 1.24 1996/12/11 18:23:18 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -80,8 +80,8 @@ string_concat(char *one, char *two) char * sstrncpy(char *dst, const char *src, int size) { - dst[size - 1] = '\0'; - return strncpy(dst, src, size - 1); + dst[--size] = '\0'; + return strncpy(dst, src, size); } /* Concatenate three strings into static storage */ diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index aa15e2a8766b..f432c478867f 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.62 1996/12/09 08:22:11 jkh Exp $ + * $Id: config.c,v 1.63 1996/12/11 09:34:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -358,6 +358,9 @@ int configXFree86(dialogMenuItem *self) { if (file_executable("/usr/X11R6/bin/XF86Setup")) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); dialog_clear(); systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); systemExecute("/usr/X11R6/bin/XF86Setup"); diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 348c6b4a0e4d..bb461de9771d 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.99 1996/12/08 12:27:57 jkh Exp $ + * $Id: menus.c,v 1.100 1996/12/09 06:02:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -1276,8 +1276,8 @@ DMenu MenuUsermgmt = { "login accounts.\n", "Configure your user groups and users", NULL, - { { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, - { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { { "Add user", "Add a new user to the system.", NULL, userAddUser }, + { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, { "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c index af88fe3b2d1f..6508fc7634fc 100644 --- a/usr.sbin/sysinstall/misc.c +++ b/usr.sbin/sysinstall/misc.c @@ -1,7 +1,7 @@ /* * Miscellaneous support routines.. * - * $Id: misc.c,v 1.23 1996/12/09 08:22:15 jkh Exp $ + * $Id: misc.c,v 1.24 1996/12/11 18:23:18 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -80,8 +80,8 @@ string_concat(char *one, char *two) char * sstrncpy(char *dst, const char *src, int size) { - dst[size - 1] = '\0'; - return strncpy(dst, src, size - 1); + dst[--size] = '\0'; + return strncpy(dst, src, size); } /* Concatenate three strings into static storage */