diff --git a/usr.sbin/sushi/C.msg b/usr.sbin/sushi/C.msg index 16ee19f197bc..71179a5648d1 100644 --- a/usr.sbin/sushi/C.msg +++ b/usr.sbin/sushi/C.msg @@ -56,6 +56,8 @@ $set 3 run.c stuff 15 with the spacebar. Press the ENTER key to return from the list popup. 16 No help is available for this screen. 17 Are you sure? (Y/n) +18 The data entered in this field is invalid. +19 Please enter the correct information before continuing. $set 4 menu titles and stuff 1 Select choice 2 Generating form data, please wait diff --git a/usr.sbin/sushi/scanform.c b/usr.sbin/sushi/scanform.c index 89dcadb2b8f8..6b6d76b9ea20 100644 --- a/usr.sbin/sushi/scanform.c +++ b/usr.sbin/sushi/scanform.c @@ -1,4 +1,4 @@ -/* $NetBSD: scanform.c,v 1.38 2004/03/24 22:03:17 garbled Exp $ */ +/* $NetBSD: scanform.c,v 1.39 2004/04/05 10:25:12 wiz Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -1623,6 +1623,27 @@ tab_help(FORM *form) curs_set(1); } +static void +invalid_field_help(void) +{ + CDKLABEL *label; + char *msg[2]; + + msg[0] = catgets(catalog, 3, 18, "The data entered in this field is " + "invalid."); + msg[1] = catgets(catalog, 3, 19, "Please enter the correct " + "information before continuing."); + + curs_set(0); + label = newCDKLabel(cdkscreen, CENTER, CENTER, msg, 2, TRUE, FALSE); + activateCDKLabel(label, NULL); + waitCDKLabel(label, 0); + destroyCDKLabel(label); + touchwin(stdscr); + wrefresh(stdscr); + curs_set(1); +} + int handle_form(char *basedir, char *path, char **args) { @@ -1692,6 +1713,9 @@ handle_form(char *basedir, char *path, char **args) case E_REQUEST_DENIED: tab_help(menuform); break; + case E_INVALID_FIELD: + invalid_field_help(); + break; default: break; } @@ -1796,6 +1820,9 @@ handle_preform(char *basedir, char *path) case E_REQUEST_DENIED: tab_help(menuform); break; + case E_INVALID_FIELD: + invalid_field_help(); + break; default: break; }