diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
commit | d3f9d5478df478427c2aa5db4507ddd0a38f0eb6 (patch) | |
tree | e27eacd6bbda653dd77f11cc020b9e0a59f7f4fc /src/LYForms.c | |
parent | 18024037b515bfff83e0230b35151babe6005e18 (diff) | |
download | lynx-snapshots-d3f9d5478df478427c2aa5db4507ddd0a38f0eb6.tar.gz |
snapshot of project "lynx", label v2-8-2dev_2
Diffstat (limited to 'src/LYForms.c')
-rw-r--r-- | src/LYForms.c | 57 |
1 files changed, 19 insertions, 38 deletions
diff --git a/src/LYForms.c b/src/LYForms.c index 7a66897b..ff64cb2d 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -1,5 +1,4 @@ #include <HTUtils.h> -#include <tcp.h> #include <HTCJK.h> #include <HTTP.h> #include <HTAlert.h> @@ -34,9 +33,8 @@ PRIVATE int popup_options PARAMS(( int i_length, int disabled)); -PUBLIC int change_form_link ARGS6( +PUBLIC int change_form_link ARGS5( struct link *, form_link, - int, mode, document *, newdoc, BOOLEAN *, refresh_screen, char *, link_name, @@ -139,9 +137,7 @@ PUBLIC int change_form_link ARGS6( * only one down at a time! */ if (form->num_value) { - _statusline(NEED_CHECKED_RADIO_BUTTON); - sleep(MessageSecs); - + HTUserMsg(NEED_CHECKED_RADIO_BUTTON); } else { int i; /* @@ -202,8 +198,7 @@ PUBLIC int change_form_link ARGS6( if (c == '\r' || c == '\n') { form_link->hightext = form->value; if (!form->submit_action || *form->submit_action == '\0') { - _statusline(NO_FORM_ACTION); - sleep(MessageSecs); + HTUserMsg(NO_FORM_ACTION); c = DO_NOTHING; break; } else if (form->submit_method == URL_MAIL_METHOD && no_mail) { @@ -304,8 +299,7 @@ PRIVATE int form_getstr ARGS1( /* * If we can edit it, report that we are using the tail. - FM */ - _statusline(FORM_VALUE_TOO_LONG); - sleep(MessageSecs); + HTUserMsg(FORM_VALUE_TOO_LONG); switch(form->type) { case F_PASSWORD_TYPE: statusline(FORM_LINK_PASSWORD_MESSAGE); @@ -388,7 +382,7 @@ again: case PGDOWN: #ifdef NOTDEFINED case HOME: - case END: + case END_KEY: case FIND_KEY: case SELECT_KEY: #endif /* NOTDEFINED */ @@ -455,8 +449,7 @@ breakfor: */ form->value[(strlen(form->value) - strlen(value))] = '\0'; StrAllocCat(form->value, MyEdit.buffer); - _statusline(FORM_TAIL_COMBINED_WITH_HEAD); - sleep(MessageSecs); + HTUserMsg(FORM_TAIL_COMBINED_WITH_HEAD); } /* @@ -508,8 +501,7 @@ PRIVATE int get_popup_option_number ARGS1( * Get the number, possibly with a suffix, from the user. */ if (LYgetstr(temp, VISIBLE, sizeof(temp), NORECALL) < 0 || *temp == 0) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); *c = '\0'; return(0); } @@ -812,8 +804,8 @@ redraw: SLsmg_gotorc((LYlines - 1), (LYcols - 1)); SLsmg_refresh(); #else - wstart_reverse(form_window); wmove(form_window, ((i + 1) - window_offset), 2); + wstart_reverse(form_window); paddstr(form_window, width, opt_ptr->name); wstop_reverse(form_window); /* @@ -872,8 +864,7 @@ redraw: */ if (number <= 1) { if (window_offset == 0) { - _statusline(ALREADY_AT_OPTION_BEGIN); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_OPTION_BEGIN); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -897,8 +888,7 @@ redraw: */ if (number >= npages) { if (window_offset >= ((num_options - length) + 1)) { - _statusline(ALREADY_AT_OPTION_END); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_OPTION_END); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -925,8 +915,7 @@ redraw: */ if (((number - 1) * length) == window_offset) { sprintf(buffer, ALREADY_AT_OPTION_PAGE, number); - _statusline(buffer); - sleep(MessageSecs); + HTUserMsg(buffer); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -976,8 +965,7 @@ redraw: */ sprintf(buffer, OPTION_ALREADY_CURRENT, (number + 1)); - _statusline(buffer); - sleep(MessageSecs); + HTUserMsg(buffer); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -1015,8 +1003,7 @@ redraw: /* * Not in range. - FM */ - _statusline(BAD_OPTION_NUM_ENTERED); - sleep(MessageSecs); + HTUserMsg(BAD_OPTION_NUM_ENTERED); } } @@ -1251,8 +1238,7 @@ redraw: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } } @@ -1263,8 +1249,7 @@ check_recall: /* * No entry. Simply break. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } @@ -1317,8 +1302,7 @@ check_recall: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -1374,8 +1358,7 @@ check_recall: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -1421,8 +1404,7 @@ check_recall: * If we started at the beginning, it can't be present. - FM */ if (cur_selection == 0) { - _user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); goto restore_popup_statusline; } @@ -1460,8 +1442,7 @@ check_recall: /* * Didn't find it in the preceding options either. - FM */ - _user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); restore_popup_statusline: /* |