mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 08:33:20 +00:00
Reformatting, more sanity checks.
This commit is contained in:
parent
9f5f4b12f4
commit
09b58bbc77
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34604
@ -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.159 1998/03/10 13:42:04 jkh Exp $
|
||||
* $Id: menus.c,v 1.160 1998/03/13 11:30:44 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -341,35 +341,25 @@ DMenu MenuMouseType = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=auto" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
|
||||
{ "GlidePoint", "ALPS GlidePoint pad (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=glidepoint" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
|
||||
{ "Hitachi","Hitachi tablet (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmhittab" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
|
||||
{ "IntelliMouse", "Microsoft IntelliMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=intellimouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
|
||||
{ "Logitech", "Logitech protocol (old models) (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=logitech" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
|
||||
{ "Microsoft", "Microsoft protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=microsoft" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
|
||||
{ "MM Series","MM Series protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmseries" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
|
||||
{ "MouseMan", "Logitech MouseMan/TrackMan models (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mouseman" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
|
||||
{ "MouseSystems", "MouseSystems protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mousesystems" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
|
||||
{ "ThinkingMouse","Kensington ThinkingMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -381,23 +371,17 @@ DMenu MenuMousePort = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "COM1", "Serial mouse on COM1 (/dev/cuaa0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
{ "COM2", "Serial mouse on COM2 (/dev/cuaa1)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
{ "COM3", "Serial mouse on COM3 (/dev/cuaa2)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
{ "COM4", "Serial mouse on COM4 (/dev/cuaa3)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
{ "BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
{ "PS/2", "PS/2 style mouse (must enable /dev/psm0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -412,17 +396,12 @@ DMenu MenuMouse = {
|
||||
"Configuration menu).",
|
||||
"Choose 3 after selecting a protocol and a port.",
|
||||
NULL,
|
||||
{ { "1 Type", "Select mouse protocol",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon",
|
||||
NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration",
|
||||
NULL, dmenuSetVariables, NULL,
|
||||
VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)",
|
||||
NULL, dmenuExit },
|
||||
{ { "1 Type", "Select mouse protocol", NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration", NULL, dmenuSetVariables,
|
||||
NULL, VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1248,11 +1227,10 @@ DMenu MenuNTP = {
|
||||
"These are the primary open-access NTP servers",
|
||||
NULL,
|
||||
{ { "None", "No ntp server",
|
||||
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=none" },
|
||||
{ "Other", "Select a site not on this list",
|
||||
dmenuVarsCheck, configNTP, NULL,
|
||||
NULL },
|
||||
dmenuVarsCheck, configNTP, NULL, NULL },
|
||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: variable.c,v 1.21 1997/10/12 16:21:21 jkh Exp $
|
||||
* $Id: variable.c,v 1.22 1998/03/10 17:24:08 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -183,15 +183,18 @@ variable_check(char *data)
|
||||
if ((cp3 = index(cp, '"')) != NULL)
|
||||
*cp3 = '\0';
|
||||
}
|
||||
if ((cp3 = index(cp, ',')) != NULL)
|
||||
else if ((cp3 = index(cp, ',')) != NULL)
|
||||
*cp3 = '\0';
|
||||
cp2 = getenv(tmp);
|
||||
|
||||
if (cp2)
|
||||
return !strcmp(cp, cp2);
|
||||
if (cp2) {
|
||||
if (!*cp)
|
||||
return TRUE;
|
||||
else
|
||||
return !strcmp(cp, cp2);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return getenv(tmp) ? 1 : 0;
|
||||
return getenv(tmp) ? TRUE : FALSE;
|
||||
}
|
||||
|
@ -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.159 1998/03/10 13:42:04 jkh Exp $
|
||||
* $Id: menus.c,v 1.160 1998/03/13 11:30:44 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -341,35 +341,25 @@ DMenu MenuMouseType = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=auto" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
|
||||
{ "GlidePoint", "ALPS GlidePoint pad (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=glidepoint" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
|
||||
{ "Hitachi","Hitachi tablet (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmhittab" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
|
||||
{ "IntelliMouse", "Microsoft IntelliMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=intellimouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
|
||||
{ "Logitech", "Logitech protocol (old models) (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=logitech" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
|
||||
{ "Microsoft", "Microsoft protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=microsoft" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
|
||||
{ "MM Series","MM Series protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmseries" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
|
||||
{ "MouseMan", "Logitech MouseMan/TrackMan models (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mouseman" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
|
||||
{ "MouseSystems", "MouseSystems protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mousesystems" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
|
||||
{ "ThinkingMouse","Kensington ThinkingMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -381,23 +371,17 @@ DMenu MenuMousePort = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "COM1", "Serial mouse on COM1 (/dev/cuaa0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
{ "COM2", "Serial mouse on COM2 (/dev/cuaa1)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
{ "COM3", "Serial mouse on COM3 (/dev/cuaa2)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
{ "COM4", "Serial mouse on COM4 (/dev/cuaa3)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
{ "BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
{ "PS/2", "PS/2 style mouse (must enable /dev/psm0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -412,17 +396,12 @@ DMenu MenuMouse = {
|
||||
"Configuration menu).",
|
||||
"Choose 3 after selecting a protocol and a port.",
|
||||
NULL,
|
||||
{ { "1 Type", "Select mouse protocol",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon",
|
||||
NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration",
|
||||
NULL, dmenuSetVariables, NULL,
|
||||
VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)",
|
||||
NULL, dmenuExit },
|
||||
{ { "1 Type", "Select mouse protocol", NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration", NULL, dmenuSetVariables,
|
||||
NULL, VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1248,11 +1227,10 @@ DMenu MenuNTP = {
|
||||
"These are the primary open-access NTP servers",
|
||||
NULL,
|
||||
{ { "None", "No ntp server",
|
||||
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=none" },
|
||||
{ "Other", "Select a site not on this list",
|
||||
dmenuVarsCheck, configNTP, NULL,
|
||||
NULL },
|
||||
dmenuVarsCheck, configNTP, NULL, NULL },
|
||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: variable.c,v 1.21 1997/10/12 16:21:21 jkh Exp $
|
||||
* $Id: variable.c,v 1.22 1998/03/10 17:24:08 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -183,15 +183,18 @@ variable_check(char *data)
|
||||
if ((cp3 = index(cp, '"')) != NULL)
|
||||
*cp3 = '\0';
|
||||
}
|
||||
if ((cp3 = index(cp, ',')) != NULL)
|
||||
else if ((cp3 = index(cp, ',')) != NULL)
|
||||
*cp3 = '\0';
|
||||
cp2 = getenv(tmp);
|
||||
|
||||
if (cp2)
|
||||
return !strcmp(cp, cp2);
|
||||
if (cp2) {
|
||||
if (!*cp)
|
||||
return TRUE;
|
||||
else
|
||||
return !strcmp(cp, cp2);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return getenv(tmp) ? 1 : 0;
|
||||
return getenv(tmp) ? TRUE : FALSE;
|
||||
}
|
||||
|
@ -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.159 1998/03/10 13:42:04 jkh Exp $
|
||||
* $Id: menus.c,v 1.160 1998/03/13 11:30:44 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -341,35 +341,25 @@ DMenu MenuMouseType = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=auto" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
|
||||
{ "GlidePoint", "ALPS GlidePoint pad (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=glidepoint" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
|
||||
{ "Hitachi","Hitachi tablet (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmhittab" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
|
||||
{ "IntelliMouse", "Microsoft IntelliMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=intellimouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
|
||||
{ "Logitech", "Logitech protocol (old models) (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=logitech" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
|
||||
{ "Microsoft", "Microsoft protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=microsoft" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
|
||||
{ "MM Series","MM Series protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mmseries" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
|
||||
{ "MouseMan", "Logitech MouseMan/TrackMan models (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mouseman" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
|
||||
{ "MouseSystems", "MouseSystems protocol (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=mousesystems" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
|
||||
{ "ThinkingMouse","Kensington ThinkingMouse (serial)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -381,23 +371,17 @@ DMenu MenuMousePort = {
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "COM1", "Serial mouse on COM1 (/dev/cuaa0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
|
||||
{ "COM2", "Serial mouse on COM2 (/dev/cuaa1)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
|
||||
{ "COM3", "Serial mouse on COM3 (/dev/cuaa2)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" },
|
||||
{ "COM4", "Serial mouse on COM4 (/dev/cuaa3)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" },
|
||||
{ "BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
|
||||
{ "PS/2", "PS/2 style mouse (must enable /dev/psm0)",
|
||||
dmenuVarCheck, dmenuSetVariable, NULL,
|
||||
VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -412,17 +396,12 @@ DMenu MenuMouse = {
|
||||
"Configuration menu).",
|
||||
"Choose 3 after selecting a protocol and a port.",
|
||||
NULL,
|
||||
{ { "1 Type", "Select mouse protocol",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port",
|
||||
NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon",
|
||||
NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration",
|
||||
NULL, dmenuSetVariables, NULL,
|
||||
VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)",
|
||||
NULL, dmenuExit },
|
||||
{ { "1 Type", "Select mouse protocol", NULL, dmenuSubmenu, NULL, &MenuMouseType },
|
||||
{ "2 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
|
||||
{ "3 Daemon", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
|
||||
{ "4 No mouse", "Clear mouse configuration", NULL, dmenuSetVariables,
|
||||
NULL, VAR_MOUSED "=NO, " VAR_MOUSED_TYPE "=NO, " VAR_MOUSED_PORT "=" },
|
||||
{ "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1248,11 +1227,10 @@ DMenu MenuNTP = {
|
||||
"These are the primary open-access NTP servers",
|
||||
NULL,
|
||||
{ { "None", "No ntp server",
|
||||
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=NO,ntpdate_flags=none" },
|
||||
{ "Other", "Select a site not on this list",
|
||||
dmenuVarsCheck, configNTP, NULL,
|
||||
NULL },
|
||||
dmenuVarsCheck, configNTP, NULL, NULL },
|
||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: variable.c,v 1.21 1997/10/12 16:21:21 jkh Exp $
|
||||
* $Id: variable.c,v 1.22 1998/03/10 17:24:08 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -183,15 +183,18 @@ variable_check(char *data)
|
||||
if ((cp3 = index(cp, '"')) != NULL)
|
||||
*cp3 = '\0';
|
||||
}
|
||||
if ((cp3 = index(cp, ',')) != NULL)
|
||||
else if ((cp3 = index(cp, ',')) != NULL)
|
||||
*cp3 = '\0';
|
||||
cp2 = getenv(tmp);
|
||||
|
||||
if (cp2)
|
||||
return !strcmp(cp, cp2);
|
||||
if (cp2) {
|
||||
if (!*cp)
|
||||
return TRUE;
|
||||
else
|
||||
return !strcmp(cp, cp2);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return getenv(tmp) ? 1 : 0;
|
||||
return getenv(tmp) ? TRUE : FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user