2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

A blank line shouldn't quit the program. Also print a meaningful

message when unimplemented (from bind 8) commands are run, rather than
looking them up.
This commit is contained in:
Brian Wellington
2000-09-01 22:45:16 +00:00
parent f38a84ce83
commit 5f01e77fc2

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.39 2000/09/01 22:17:53 bwelling Exp $ */
/* $Id: nslookup.c,v 1.40 2000/09/01 22:45:16 bwelling Exp $ */
#include <config.h>
@@ -740,10 +740,8 @@ get_next_command(void) {
return;
}
ptr = strtok(input, " \t\r\n");
if (ptr == NULL) {
in_use = ISC_FALSE;
if (ptr == NULL)
return;
}
arg = strtok(NULL, " \t\r\n");
if ((strcasecmp(ptr, "set") == 0) &&
(arg != NULL))
@@ -755,6 +753,18 @@ get_next_command(void) {
} else if (strcasecmp(ptr, "exit") == 0) {
in_use = ISC_FALSE;
return;
} else if (strcasecmp(ptr, "help") == 0 ||
strcasecmp(ptr, "?") == 0)
{
printf("The '%s' command is not yet implemented.\n", ptr);
return;
} else if (strcasecmp(ptr, "finger") == 0 ||
strcasecmp(ptr, "root") == 0 ||
strcasecmp(ptr, "ls") == 0 ||
strcasecmp(ptr, "view") == 0)
{
printf("The '%s' command is not implemented.\n", ptr);
return;
} else
addlookup(ptr);
}