diff options
author | jkh <jkh@FreeBSD.org> | 1996-09-01 08:17:14 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-09-01 08:17:14 +0000 |
commit | 4470be7e2af132530dc472559a6b4b96b00bfafa (patch) | |
tree | 44f8daef43774f9f1680e212ebc4d73dc8fac549 | |
parent | caca6152f0af9041e8fa64d01d0a7783222ceb41 (diff) | |
download | FreeBSD-src-4470be7e2af132530dc472559a6b4b96b00bfafa.zip FreeBSD-src-4470be7e2af132530dc472559a6b4b96b00bfafa.tar.gz |
Simplify some dialogs on the basis of my changes to ui_objects.c in libdialog.
Also update copyright notices.
-rw-r--r-- | release/sysinstall/anonFTP.c | 37 | ||||
-rw-r--r-- | release/sysinstall/apache.c | 37 | ||||
-rw-r--r-- | release/sysinstall/tcpip.c | 45 | ||||
-rw-r--r-- | usr.sbin/sysinstall/anonFTP.c | 37 | ||||
-rw-r--r-- | usr.sbin/sysinstall/tcpip.c | 45 |
5 files changed, 43 insertions, 158 deletions
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c index 92affb9..5f0381d 100644 --- a/release/sysinstall/anonFTP.c +++ b/release/sysinstall/anonFTP.c @@ -4,10 +4,12 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: anonFTP.c,v 1.14 1996/04/28 03:26:42 jkh Exp $ + * $Id: anonFTP.c,v 1.15 1996/08/03 10:10:29 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. + * Copyright (c) 1996 + * Jordan K. Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,10 +22,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY CORANTH GRYPHON ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CORANTH GRYPHON OR HIS PETS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR THEIR PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) @@ -325,26 +327,8 @@ anonftpOpenDialog(void) awkward for the user to go back and correct screw up's in the per-interface section */ - case KEY_UP: - if (obj->prev !=NULL ) { - obj = obj->prev; - --n; - } else { - obj = last; - n = max; - } - break; - case KEY_DOWN: - if (obj->next != NULL) { - obj = obj->next; - ++n; - } else { - obj = first; - n = 0; - } - break; - + case SEL_CR: case SEL_TAB: if (n < max) ++n; @@ -359,14 +343,7 @@ anonftpOpenDialog(void) cancel = TRUE; break; - /* Generic CR handler */ - case SEL_CR: - if (n < max) - ++n; - else - n = 0; - break; - + case KEY_UP: case SEL_BACKTAB: if (n) --n; diff --git a/release/sysinstall/apache.c b/release/sysinstall/apache.c index 7c52af9..ffd053c 100644 --- a/release/sysinstall/apache.c +++ b/release/sysinstall/apache.c @@ -4,10 +4,12 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: apache.c,v 1.25 1996/07/13 06:05:42 jkh Exp $ + * $Id: apache.c,v 1.26 1996/08/03 10:10:35 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. + * Copyright (c) 1996 + * Jordan K. Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,10 +22,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY CORANTH GRYPHON ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CORANTH GRYPHON OR HIS PETS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR THEIR PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) @@ -323,27 +325,9 @@ apacheOpenDialog(void) awkward for the user to go back and correct screw up's in the per-interface section */ - case KEY_UP: - if (obj->prev !=NULL ) { - obj = obj->prev; - --n; - } else { - obj = last; - n = max; - } - break; - case KEY_DOWN: - if (obj->next != NULL) { - obj = obj->next; - ++n; - } else { - obj = first; - n = 0; - } - break; - case SEL_TAB: + case SEL_CR: if (n < max) ++n; else @@ -357,14 +341,7 @@ apacheOpenDialog(void) cancel = TRUE; break; - /* Generic CR handler */ - case SEL_CR: - if (n < max) - ++n; - else - n = 0; - break; - + case KEY_UP: case SEL_BACKTAB: if (n) --n; diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c index ddff8b7..5116af6 100644 --- a/release/sysinstall/tcpip.c +++ b/release/sysinstall/tcpip.c @@ -1,8 +1,10 @@ /* - * $Id: tcpip.c,v 1.44 1996/07/08 10:08:22 jkh Exp $ + * $Id: tcpip.c,v 1.45 1996/08/03 10:11:56 jkh Exp $ * * Copyright (c) 1995 * Gary J Palmer. All rights reserved. + * Copyright (c) 1996 + * Jordan K. Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -15,10 +17,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS OR + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY DIRECT, INDIRECT, + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED @@ -78,11 +80,11 @@ typedef struct _layout { static Layout layout[] = { { 1, 2, 25, HOSTNAME_FIELD_LEN - 1, - "Host name:", "Your fully-qualified hostname, e.g. foo.bar.com", + "Host:", "Your fully-qualified hostname, e.g. foo.bar.com", hostname, STRINGOBJ, NULL }, #define LAYOUT_HOSTNAME 0 { 1, 35, 20, HOSTNAME_FIELD_LEN - 1, - "Domain name:", + "Domain:", "The name of the domain that your machine is in, e.g. bar.com", domainname, STRINGOBJ, NULL }, #define LAYOUT_DOMAINNAME 1 @@ -107,7 +109,7 @@ static Layout layout[] = { #define LAYOUT_NETMASK 5 { 14, 10, 37, HOSTNAME_FIELD_LEN - 1, "Extra options to ifconfig:", - "Any interface-specific options to ifconfig you would like to use", + "Any interface-specific options to ifconfig you would like to add", extras, STRINGOBJ, NULL }, #define LAYOUT_EXTRAS 6 { 19, 15, 0, 0, @@ -397,27 +399,9 @@ tcpOpenDialog(Device *devp) awkward for the user to go back and correct screw up's in the per-interface section */ - case KEY_UP: - if (obj->prev !=NULL ) { - obj = obj->prev; - --n; - } else { - obj = last; - n = max; - } - break; - case KEY_DOWN: - if (obj->next != NULL) { - obj = obj->next; - ++n; - } else { - obj = first; - n = 0; - } - break; - case SEL_TAB: + case SEL_CR: if (n < max) ++n; else @@ -434,14 +418,7 @@ tcpOpenDialog(Device *devp) } break; - /* Generic CR handler */ - case SEL_CR: - if (n < max) - ++n; - else - n = 0; - break; - + case KEY_UP: case SEL_BACKTAB: if (n) --n; @@ -546,7 +523,7 @@ tcpDeviceSelect(void) } else if (cnt == 1 || (!RunningAsInit && !Fake)) { /* If we're running in user mode, assume network already up */ - if (RunningAsInit) { + if (!RunningAsInit) { if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE)) return FALSE; } diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c index 92affb9..5f0381d 100644 --- a/usr.sbin/sysinstall/anonFTP.c +++ b/usr.sbin/sysinstall/anonFTP.c @@ -4,10 +4,12 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: anonFTP.c,v 1.14 1996/04/28 03:26:42 jkh Exp $ + * $Id: anonFTP.c,v 1.15 1996/08/03 10:10:29 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. + * Copyright (c) 1996 + * Jordan K. Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -20,10 +22,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY CORANTH GRYPHON ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CORANTH GRYPHON OR HIS PETS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR THEIR PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) @@ -325,26 +327,8 @@ anonftpOpenDialog(void) awkward for the user to go back and correct screw up's in the per-interface section */ - case KEY_UP: - if (obj->prev !=NULL ) { - obj = obj->prev; - --n; - } else { - obj = last; - n = max; - } - break; - case KEY_DOWN: - if (obj->next != NULL) { - obj = obj->next; - ++n; - } else { - obj = first; - n = 0; - } - break; - + case SEL_CR: case SEL_TAB: if (n < max) ++n; @@ -359,14 +343,7 @@ anonftpOpenDialog(void) cancel = TRUE; break; - /* Generic CR handler */ - case SEL_CR: - if (n < max) - ++n; - else - n = 0; - break; - + case KEY_UP: case SEL_BACKTAB: if (n) --n; diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c index ddff8b7..5116af6 100644 --- a/usr.sbin/sysinstall/tcpip.c +++ b/usr.sbin/sysinstall/tcpip.c @@ -1,8 +1,10 @@ /* - * $Id: tcpip.c,v 1.44 1996/07/08 10:08:22 jkh Exp $ + * $Id: tcpip.c,v 1.45 1996/08/03 10:11:56 jkh Exp $ * * Copyright (c) 1995 * Gary J Palmer. All rights reserved. + * Copyright (c) 1996 + * Jordan K. Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -15,10 +17,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS OR + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY DIRECT, INDIRECT, + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED @@ -78,11 +80,11 @@ typedef struct _layout { static Layout layout[] = { { 1, 2, 25, HOSTNAME_FIELD_LEN - 1, - "Host name:", "Your fully-qualified hostname, e.g. foo.bar.com", + "Host:", "Your fully-qualified hostname, e.g. foo.bar.com", hostname, STRINGOBJ, NULL }, #define LAYOUT_HOSTNAME 0 { 1, 35, 20, HOSTNAME_FIELD_LEN - 1, - "Domain name:", + "Domain:", "The name of the domain that your machine is in, e.g. bar.com", domainname, STRINGOBJ, NULL }, #define LAYOUT_DOMAINNAME 1 @@ -107,7 +109,7 @@ static Layout layout[] = { #define LAYOUT_NETMASK 5 { 14, 10, 37, HOSTNAME_FIELD_LEN - 1, "Extra options to ifconfig:", - "Any interface-specific options to ifconfig you would like to use", + "Any interface-specific options to ifconfig you would like to add", extras, STRINGOBJ, NULL }, #define LAYOUT_EXTRAS 6 { 19, 15, 0, 0, @@ -397,27 +399,9 @@ tcpOpenDialog(Device *devp) awkward for the user to go back and correct screw up's in the per-interface section */ - case KEY_UP: - if (obj->prev !=NULL ) { - obj = obj->prev; - --n; - } else { - obj = last; - n = max; - } - break; - case KEY_DOWN: - if (obj->next != NULL) { - obj = obj->next; - ++n; - } else { - obj = first; - n = 0; - } - break; - case SEL_TAB: + case SEL_CR: if (n < max) ++n; else @@ -434,14 +418,7 @@ tcpOpenDialog(Device *devp) } break; - /* Generic CR handler */ - case SEL_CR: - if (n < max) - ++n; - else - n = 0; - break; - + case KEY_UP: case SEL_BACKTAB: if (n) --n; @@ -546,7 +523,7 @@ tcpDeviceSelect(void) } else if (cnt == 1 || (!RunningAsInit && !Fake)) { /* If we're running in user mode, assume network already up */ - if (RunningAsInit) { + if (!RunningAsInit) { if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE)) return FALSE; } |