diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-08-15 22:09:45 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-08-15 22:09:45 -0400 |
commit | 0eae931d4f0fd1194dfcd978c3d94079b710923f (patch) | |
tree | 5713fc8c66fffb144192357464fe616522c6c7fe /src/LYForms.c | |
parent | d7e8d7e419ae58610a9988ff09910670a59526ff (diff) | |
download | lynx-snapshots-0eae931d4f0fd1194dfcd978c3d94079b710923f.tar.gz |
snapshot of project "lynx", label v2-8-1dev_21
Diffstat (limited to 'src/LYForms.c')
-rw-r--r-- | src/LYForms.c | 72 |
1 files changed, 16 insertions, 56 deletions
diff --git a/src/LYForms.c b/src/LYForms.c index 4935e2f1..eb44fa14 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -12,9 +12,6 @@ #include <LYGlobalDefs.h> #include <LYKeymap.h> #include <LYSignal.h> -#ifdef DJGPP_KEYHANDLER -#include <keys.h> -#endif /* DJGPP_KEYHANDLER */ #include <LYLeaks.h> @@ -140,9 +137,7 @@ PUBLIC int change_form_link ARGS5( * 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; /* @@ -203,8 +198,7 @@ PUBLIC int change_form_link ARGS5( 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) { @@ -305,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); @@ -383,20 +376,6 @@ again: if (keymap[ch + 1] == LYK_REFRESH) break; switch (ch) { -#ifdef DJGPP_KEYHANDLER - case K_Down: - case K_EDown: - case K_Up: - case K_EUp: - case K_PageUp: - case K_EPageUp: - case K_PageDown: - case K_EPageDown: - case K_Home: - case K_EHome: - case K_End: - case K_EEnd: -#else case DNARROW: case UPARROW: case PGUP: @@ -407,19 +386,13 @@ again: case FIND_KEY: case SELECT_KEY: #endif /* NOTDEFINED */ -#endif /* DJGPP_KEYHANDLER */ goto breakfor; /* * Left arrrow in column 0 deserves special treatment here, * else you can get trapped in a form without submit button! */ -#ifdef DJGPP_KEYHANDLER - case K_Left: - case K_ELeft: -#else case LTARROW: -#endif /* DJGPP_KEYHANDLER */ if (MyEdit.pos == 0) { int c = 'Y'; /* Go back immediately if no changes */ if (strcmp(MyEdit.buffer, value)) { @@ -476,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); } /* @@ -529,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); } @@ -893,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 { @@ -918,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 { @@ -946,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 { @@ -997,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 { @@ -1036,8 +1003,7 @@ redraw: /* * Not in range. - FM */ - _statusline(BAD_OPTION_NUM_ENTERED); - sleep(MessageSecs); + HTUserMsg(BAD_OPTION_NUM_ENTERED); } } @@ -1272,8 +1238,7 @@ redraw: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } } @@ -1284,8 +1249,7 @@ check_recall: /* * No entry. Simply break. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } @@ -1338,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; @@ -1395,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; @@ -1442,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; } @@ -1481,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: /* |