Changeset 382:0d4b409996b9
- Timestamp:
- 1998-10-05 11:24:42 (10 years ago)
- Author:
- Thomas Roessler <roessler@…>
- Branch:
- HEAD
- Message:
-
Vikas' macro_function patch.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r300
|
r382
|
|
| 183 | 183 | if test "$gt_cv_func_gettext_libc" != "yes"; then |
| 184 | 184 | AC_CHECK_LIB(intl, bindtextdomain, |
| 185 | | [AC_CACHE_CHECK([for gettext in libintl], |
| 186 | | gt_cv_func_gettext_libintl, |
| 187 | | [AC_CHECK_LIB(intl, gettext, |
| 188 | | gt_cv_func_gettext_libintl=yes, |
| 189 | | gt_cv_func_gettext_libintl=no)], |
| | 185 | [AC_CHECK_LIB(intl, gettext, |
| | 186 | gt_cv_func_gettext_libintl=yes, |
| 190 | 187 | gt_cv_func_gettext_libintl=no)]) |
| 191 | 188 | fi |
-
|
r324
|
r382
|
|
| 126 | 126 | int i, done = 0; |
| 127 | 127 | char helpstr[SHORT_STRING]; |
| | 128 | int savedmenu = CurrentMenu; |
| 128 | 129 | |
| 129 | 130 | if (!aliases) |
| … |
… |
|
| 140 | 141 | menu->search = alias_search; |
| 141 | 142 | menu->tag = alias_tag; |
| 142 | | menu->menu = MENU_ALIAS; |
| | 143 | menu->menu = CurrentMenu = MENU_ALIAS; |
| 143 | 144 | menu->title = _("Aliases"); |
| 144 | 145 | menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_ALIAS, AliasHelp); |
| … |
… |
|
| 189 | 190 | |
| 190 | 191 | mutt_menuDestroy (&menu); |
| | 192 | CurrentMenu = savedmenu; |
| 191 | 193 | safe_free ((void **) &AliasTable); |
| 192 | 194 | } |
-
|
r332
|
r382
|
|
| 466 | 466 | struct stat st; |
| 467 | 467 | int i, killPrefix = 0; |
| | 468 | int savedmenu = CurrentMenu; |
| 468 | 469 | |
| 469 | 470 | memset (&state, 0, sizeof (struct browser_state)); |
| … |
… |
|
| 516 | 517 | |
| 517 | 518 | menu = mutt_new_menu (); |
| 518 | | menu->menu = MENU_FOLDER; |
| | 519 | menu->menu = CurrentMenu = MENU_FOLDER; |
| 519 | 520 | menu->make_entry = folder_entry; |
| 520 | 521 | menu->search = select_file_search; |
| … |
… |
|
| 625 | 626 | destroy_state (&state); |
| 626 | 627 | mutt_menuDestroy (&menu); |
| | 628 | CurrentMenu = savedmenu; |
| 627 | 629 | return; |
| 628 | 630 | |
| … |
… |
|
| 663 | 665 | destroy_state (&state); |
| 664 | 666 | mutt_menuDestroy (&menu); |
| | 667 | CurrentMenu = savedmenu; |
| 665 | 668 | return; |
| 666 | 669 | } |
| … |
… |
|
| 719 | 722 | mutt_error _("Error scanning directory."); |
| 720 | 723 | mutt_menuDestroy (&menu); |
| | 724 | CurrentMenu = savedmenu; |
| 721 | 725 | return; |
| 722 | 726 | } |
| … |
… |
|
| 737 | 741 | { |
| 738 | 742 | int reverse = 0; |
| | 743 | event_t ch; |
| 739 | 744 | |
| 740 | 745 | move (LINES - 1, 0); |
| … |
… |
|
| 748 | 753 | clrtoeol (); |
| 749 | 754 | |
| 750 | | while ((i = mutt_getch ()) != EOF && i != 'a' && i != 'd' && i != 'z' |
| 751 | | && i != 'n') |
| 752 | | { |
| 753 | | if (i == ERR || CI_is_return (i)) |
| | 755 | FOREVER |
| | 756 | { |
| | 757 | ch = mutt_getch(); |
| | 758 | if (ch.ch == EOF || ch.ch == 'a' || ch.ch == 'd' || ch.ch == 'z' || ch.ch == 'n') |
| | 759 | break; |
| | 760 | |
| | 761 | if (ch.ch == ERR || CI_is_return (ch.ch)) |
| 754 | 762 | break; |
| 755 | 763 | else |
| … |
… |
|
| 757 | 765 | } |
| 758 | 766 | |
| 759 | | if (i != EOF) |
| 760 | | { |
| 761 | | switch (i) |
| | 767 | if (ch.ch != EOF) |
| | 768 | { |
| | 769 | switch (ch.ch) |
| 762 | 770 | { |
| 763 | 771 | case 'a': |
| … |
… |
|
| 806 | 814 | destroy_state (&state); |
| 807 | 815 | mutt_menuDestroy (&menu); |
| | 816 | CurrentMenu = savedmenu; |
| 808 | 817 | return; |
| 809 | 818 | } |
-
|
r300
|
r382
|
|
| 222 | 222 | if (option (OPTPROMPTAFTER)) |
| 223 | 223 | { |
| 224 | | mutt_ungetch (mutt_any_key_to_continue _("Command: ")); |
| | 224 | mutt_ungetch (mutt_any_key_to_continue _("Command: "), 0); |
| 225 | 225 | rc = km_dokey (MENU_PAGER); |
| 226 | 226 | } |
| … |
… |
|
| 394 | 394 | { |
| 395 | 395 | int method = Sort; /* save the current method in case of abort */ |
| 396 | | int ch; |
| | 396 | event_t ch; |
| 397 | 397 | |
| 398 | 398 | Sort = 0; |
| … |
… |
|
| 404 | 404 | _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ")); |
| 405 | 405 | ch = mutt_getch (); |
| 406 | | if (ch == ERR || CI_is_return (ch)) |
| | 406 | if (ch.ch == -1 || CI_is_return (ch.ch)) |
| 407 | 407 | { |
| 408 | 408 | Sort = method; |
| … |
… |
|
| 410 | 410 | return (-1); |
| 411 | 411 | } |
| 412 | | switch (ch) |
| | 412 | switch (ch.ch) |
| 413 | 413 | { |
| 414 | 414 | case 'c': |
-
|
r334
|
r382
|
|
| 436 | 436 | int oldSort = Sort, oldSortAux = SortAux; |
| 437 | 437 | struct stat st; |
| | 438 | int savedmenu = CurrentMenu; |
| 438 | 439 | |
| 439 | 440 | idx = mutt_gen_attach_list (msg->content, idx, &idxlen, &idxmax, 0, 1); |
| 440 | 441 | |
| 441 | 442 | menu = mutt_new_menu (); |
| 442 | | menu->menu = MENU_COMPOSE; |
| | 443 | menu->menu = CurrentMenu = MENU_COMPOSE; |
| 443 | 444 | menu->offset = HDR_ATTACH; |
| 444 | 445 | menu->max = idxlen; |
| … |
… |
|
| 1106 | 1107 | |
| 1107 | 1108 | mutt_menuDestroy (&menu); |
| | 1109 | CurrentMenu = savedmenu; |
| 1108 | 1110 | |
| 1109 | 1111 | if (idxlen) |
-
|
r379
|
r382
|
|
| 818 | 818 | |
| 819 | 819 | |
| 820 | | ALL_LINGUAS="de" |
| | 820 | ALL_LINGUAS="de ru" |
| 821 | 821 | |
| 822 | 822 | |
| … |
… |
|
| 4325 | 4325 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4326 | 4326 | echo "$ac_t""yes" 1>&6 |
| 4327 | | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 |
| 4328 | | echo "configure:4329: checking for gettext in libintl" >&5 |
| 4329 | | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
| 4330 | | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4331 | | else |
| 4332 | 4327 | echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 |
| 4333 | | echo "configure:4334: checking for gettext in -lintl" >&5 |
| | 4328 | echo "configure:4329: checking for gettext in -lintl" >&5 |
| 4334 | 4329 | ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` |
| 4335 | 4330 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| … |
… |
|
| 4339 | 4334 | LIBS="-lintl $LIBS" |
| 4340 | 4335 | cat > conftest.$ac_ext <<EOF |
| 4341 | | #line 4342 "configure" |
| | 4336 | #line 4337 "configure" |
| 4342 | 4337 | #include "confdefs.h" |
| 4343 | 4338 | /* Override any gcc2 internal prototype to avoid an error. */ |
| … |
… |
|
| 4350 | 4345 | ; return 0; } |
| 4351 | 4346 | EOF |
| 4352 | | if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| | 4347 | if { (eval echo configure:4348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| 4353 | 4348 | rm -rf conftest* |
| 4354 | 4349 | eval "ac_cv_lib_$ac_lib_var=yes" |
| … |
… |
|
| 4371 | 4366 | fi |
| 4372 | 4367 | |
| 4373 | | fi |
| 4374 | | |
| 4375 | | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 |
| 4376 | 4368 | else |
| 4377 | 4369 | echo "$ac_t""no" 1>&6 |
| … |
… |
|
| 4389 | 4381 | set dummy msgfmt; ac_word=$2 |
| 4390 | 4382 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4391 | | echo "configure:4392: checking for $ac_word" >&5 |
| | 4383 | echo "configure:4384: checking for $ac_word" >&5 |
| 4392 | 4384 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
| 4393 | 4385 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4423 | 4415 | do |
| 4424 | 4416 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 4425 | | echo "configure:4426: checking for $ac_func" >&5 |
| | 4417 | echo "configure:4418: checking for $ac_func" >&5 |
| 4426 | 4418 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4427 | 4419 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4428 | 4420 | else |
| 4429 | 4421 | cat > conftest.$ac_ext <<EOF |
| 4430 | | #line 4431 "configure" |
| | 4422 | #line 4423 "configure" |
| 4431 | 4423 | #include "confdefs.h" |
| 4432 | 4424 | /* System header to define __stub macros and hopefully few prototypes, |
| … |
… |
|
| 4451 | 4443 | ; return 0; } |
| 4452 | 4444 | EOF |
| 4453 | | if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| | 4445 | if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| 4454 | 4446 | rm -rf conftest* |
| 4455 | 4447 | eval "ac_cv_func_$ac_func=yes" |
| … |
… |
|
| 4478 | 4470 | set dummy gmsgfmt; ac_word=$2 |
| 4479 | 4471 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4480 | | echo "configure:4481: checking for $ac_word" >&5 |
| | 4472 | echo "configure:4473: checking for $ac_word" >&5 |
| 4481 | 4473 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
| 4482 | 4474 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4510 | 4502 | set dummy xgettext; ac_word=$2 |
| 4511 | 4503 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4512 | | echo "configure:4513: checking for $ac_word" >&5 |
| | 4504 | echo "configure:4505: checking for $ac_word" >&5 |
| 4513 | 4505 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
| 4514 | 4506 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4542 | 4534 | |
| 4543 | 4535 | cat > conftest.$ac_ext <<EOF |
| 4544 | | #line 4545 "configure" |
| | 4536 | #line 4537 "configure" |
| 4545 | 4537 | #include "confdefs.h" |
| 4546 | 4538 | |
| … |
… |
|
| 4550 | 4542 | ; return 0; } |
| 4551 | 4543 | EOF |
| 4552 | | if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| | 4544 | if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| 4553 | 4545 | rm -rf conftest* |
| 4554 | 4546 | CATOBJEXT=.gmo |
| … |
… |
|
| 4573 | 4565 | if test "$CATOBJEXT" = "NONE"; then |
| 4574 | 4566 | echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 |
| 4575 | | echo "configure:4576: checking whether catgets can be used" >&5 |
| | 4567 | echo "configure:4568: checking whether catgets can be used" >&5 |
| 4576 | 4568 | # Check whether --with-catgets or --without-catgets was given. |
| 4577 | 4569 | if test "${with_catgets+set}" = set; then |
| … |
… |
|
| 4586 | 4578 | if test "$nls_cv_use_catgets" = "yes"; then |
| 4587 | 4579 | echo $ac_n "checking for main in -li""... $ac_c" 1>&6 |
| 4588 | | echo "configure:4589: checking for main in -li" >&5 |
| | 4580 | echo "configure:4581: checking for main in -li" >&5 |
| 4589 | 4581 | ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` |
| 4590 | 4582 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| … |
… |
|
| 4594 | 4586 | LIBS="-li $LIBS" |
| 4595 | 4587 | cat > conftest.$ac_ext <<EOF |
| 4596 | | #line 4597 "configure" |
| | 4588 | #line 4589 "configure" |
| 4597 | 4589 | #include "confdefs.h" |
| 4598 | 4590 | |
| … |
… |
|
| 4601 | 4593 | ; return 0; } |
| 4602 | 4594 | EOF |
| 4603 | | if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| | 4595 | if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| 4604 | 4596 | rm -rf conftest* |
| 4605 | 4597 | eval "ac_cv_lib_$ac_lib_var=yes" |
| … |
… |
|
| 4629 | 4621 | |
| 4630 | 4622 | echo $ac_n "checking for catgets""... $ac_c" 1>&6 |
| 4631 | | echo "configure:4632: checking for catgets" >&5 |
| | 4623 | echo "configure:4624: checking for catgets" >&5 |
| 4632 | 4624 | if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then |
| 4633 | 4625 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4634 | 4626 | else |
| 4635 | 4627 | cat > conftest.$ac_ext <<EOF |
| 4636 | | #line 4637 "configure" |
| | 4628 | #line 4629 "configure" |
| 4637 | 4629 | #include "confdefs.h" |
| 4638 | 4630 | /* System header to define __stub macros and hopefully few prototypes, |
| … |
… |
|
| 4657 | 4649 | ; return 0; } |
| 4658 | 4650 | EOF |
| 4659 | | if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| | 4651 | if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
| 4660 | 4652 | rm -rf conftest* |
| 4661 | 4653 | eval "ac_cv_func_catgets=yes" |
| … |
… |
|
| 4679 | 4671 | set dummy gencat; ac_word=$2 |
| 4680 | 4672 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4681 | | echo "configure:4682: checking for $ac_word" >&5 |
| | 4673 | echo "configure:4674: checking for $ac_word" >&5 |
| 4682 | 4674 | if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then |
| 4683 | 4675 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4711 | 4703 | set dummy gmsgfmt; ac_word=$2 |
| 4712 | 4704 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4713 | | echo "configure:4714: checking for $ac_word" >&5 |
| | 4705 | echo "configure:4706: checking for $ac_word" >&5 |
| 4714 | 4706 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
| 4715 | 4707 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4744 | 4736 | set dummy msgfmt; ac_word=$2 |
| 4745 | 4737 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4746 | | echo "configure:4747: checking for $ac_word" >&5 |
| | 4738 | echo "configure:4739: checking for $ac_word" >&5 |
| 4747 | 4739 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
| 4748 | 4740 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4779 | 4771 | set dummy xgettext; ac_word=$2 |
| 4780 | 4772 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4781 | | echo "configure:4782: checking for $ac_word" >&5 |
| | 4773 | echo "configure:4774: checking for $ac_word" >&5 |
| 4782 | 4774 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
| 4783 | 4775 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4837 | 4829 | set dummy msgfmt; ac_word=$2 |
| 4838 | 4830 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4839 | | echo "configure:4840: checking for $ac_word" >&5 |
| | 4831 | echo "configure:4832: checking for $ac_word" >&5 |
| 4840 | 4832 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
| 4841 | 4833 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4871 | 4863 | set dummy gmsgfmt; ac_word=$2 |
| 4872 | 4864 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4873 | | echo "configure:4874: checking for $ac_word" >&5 |
| | 4865 | echo "configure:4866: checking for $ac_word" >&5 |
| 4874 | 4866 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
| 4875 | 4867 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4903 | 4895 | set dummy xgettext; ac_word=$2 |
| 4904 | 4896 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 4905 | | echo "configure:4906: checking for $ac_word" >&5 |
| | 4897 | echo "configure:4898: checking for $ac_word" >&5 |
| 4906 | 4898 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
| 4907 | 4899 | echo $ac_n "(cached) $ac_c" 1>&6 |
| … |
… |
|
| 4996 | 4988 | else |
| 4997 | 4989 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
| 4998 | | echo "configure:4999: checking for catalogs to be installed" >&5 |
| | 4990 | echo "configure:4991: checking for catalogs to be installed" >&5 |
| 4999 | 4991 | NEW_LINGUAS= |
| 5000 | 4992 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
| … |
… |
|
| 5024 | 5016 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` |
| 5025 | 5017 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 |
| 5026 | | echo "configure:5027: checking for linux/version.h" >&5 |
| | 5018 | echo "configure:5019: checking for linux/version.h" >&5 |
| 5027 | 5019 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 5028 | 5020 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5029 | 5021 | else |
| 5030 | 5022 | cat > conftest.$ac_ext <<EOF |
| 5031 | | #line 5032 "configure" |
| | 5023 | #line 5024 "configure" |
| 5032 | 5024 | #include "confdefs.h" |
| 5033 | 5025 | #include <linux/version.h> |
| 5034 | 5026 | EOF |
| 5035 | 5027 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 5036 | | { (eval echo configure:5037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| | 5028 | { (eval echo configure:5029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 5037 | 5029 | ac_err=`grep -v '^ *+' conftest.out` |
| 5038 | 5030 | if test -z "$ac_err"; then |
-
|
r379
|
r382
|
|
| 4 | 4 | AM_INIT_AUTOMAKE(mutt, 0.94.10) |
| 5 | 5 | |
| 6 | | ALL_LINGUAS="de" |
| | 6 | ALL_LINGUAS="de ru" |
| 7 | 7 | |
| 8 | 8 | AC_CANONICAL_HOST |
-
|
r332
|
r382
|
|
| 36 | 36 | */ |
| 37 | 37 | static short UngetCount = 0; |
| 38 | | |
| 39 | 38 | #define UngetBufLen 128 |
| 40 | | static int UngetBuf[UngetBufLen]; |
| | 39 | static event_t KeyEvent[UngetBufLen] = { {0,0} }; |
| 41 | 40 | |
| 42 | 41 | void mutt_refresh (void) |
| … |
… |
|
| 47 | 46 | } |
| 48 | 47 | |
| 49 | | int mutt_getch (void) |
| | 48 | event_t mutt_getch (void) |
| 50 | 49 | { |
| 51 | 50 | int ch; |
| | 51 | event_t err = {-1,0}, ret; |
| 52 | 52 | |
| 53 | 53 | if (UngetCount) |
| 54 | | return (UngetBuf[--UngetCount]); |
| | 54 | return (KeyEvent[--UngetCount]); |
| 55 | 55 | |
| 56 | 56 | Signals &= ~S_INTERRUPT; |
| … |
… |
|
| 67 | 67 | |
| 68 | 68 | if(ch == -1) |
| 69 | | return ch; |
| | 69 | return err; |
| 70 | 70 | |
| 71 | 71 | if ((ch & 0x80) && option (OPTMETAKEY)) |
| … |
… |
|
| 73 | 73 | /* send ALT-x as ESC-x */ |
| 74 | 74 | ch &= ~0x80; |
| 75 | | mutt_ungetch (ch); |
| 76 | | return ('\033'); |
| 77 | | } |
| 78 | | |
| 79 | | return (ch == ctrl ('G') ? ERR : ch); |
| | 75 | mutt_ungetch (ch, 0); |
| | 76 | ret.ch = '\033'; |
| | 77 | ret.op = 0; |
| | 78 | return ret; |
| | 79 | } |
| | 80 | |
| | 81 | ret.ch = ch; |
| | 82 | ret.op = 0; |
| | 83 | return (ch == ctrl ('G') ? err : ret); |
| 80 | 84 | } |
| 81 | 85 | |
| … |
… |
|
| 127 | 131 | int mutt_yesorno (const char *msg, int def) |
| 128 | 132 | { |
| 129 | | int ch; |
| | 133 | event_t ch; |
| 130 | 134 | const char *yes = _("yes"); |
| 131 | 135 | const char *no = _("no"); |
| … |
… |
|
| 138 | 142 | mutt_refresh (); |
| 139 | 143 | ch = mutt_getch (); |
| 140 | | if (ch == ERR) return(-1); |
| 141 | | if (CI_is_return (ch)) |
| | 144 | if (ch.ch == ERR) return(-1); |
| | 145 | if (CI_is_return (ch.ch)) |
| 142 | 146 | break; |
| 143 | | else if (tolower(ch) == tolower(*yes)) |
| | 147 | else if (tolower(ch.ch) == tolower(*yes)) |
| 144 | 148 | { |
| 145 | 149 | def = 1; |
| 146 | 150 | break; |
| 147 | 151 | } |
| 148 | | else if (tolower(ch) == tolower(*no)) |
| | 152 | else if (tolower(ch.ch) == tolower(*no)) |
| 149 | 153 | { |
| 150 | 154 | def = 0; |
| … |
… |
|
| 298 | 302 | int mutt_enter_fname (const char *prompt, char *buf, size_t blen, int *redraw, int buffy) |
| 299 | 303 | { |
| 300 | | int i; |
| | 304 | event_t ch; |
| 301 | 305 | |
| 302 | 306 | mvaddstr (LINES-1, 0, (char *) prompt); |
| … |
… |
|
| 307 | 311 | mutt_refresh (); |
| 308 | 312 | |
| 309 | | if ((i = mutt_getch ()) == ERR) |
| | 313 | ch = mutt_getch(); |
| | 314 | if (ch.ch == -1) |
| 310 | 315 | { |
| 311 | 316 | CLEARLINE (LINES-1); |
| 312 | 317 | return (-1); |
| 313 | 318 | } |
| 314 | | else if (i == '?') |
| | 319 | else if (ch.ch == '?') |
| 315 | 320 | { |
| 316 | 321 | mutt_refresh (); |
| … |
… |
|
| 324 | 329 | |
| 325 | 330 | sprintf (pc, "%s: ", prompt); |
| 326 | | mutt_ungetch (i); |
| | 331 | mutt_ungetch (ch.ch, 0); |
| 327 | 332 | if (mutt_get_field (pc, buf, blen, (buffy ? M_EFILE : M_FILE) | M_CLEAR) |
| 328 | 333 | != 0) |
| … |
… |
|
| 338 | 343 | * instead of using a fixed array |
| 339 | 344 | */ |
| 340 | | void mutt_ungetch (int ch) |
| 341 | | { |
| | 345 | void mutt_ungetch (int ch, int op) |
| | 346 | { |
| | 347 | event_t tmp; |
| | 348 | |
| | 349 | tmp.ch = ch; |
| | 350 | tmp.op = op; |
| | 351 | |
| 342 | 352 | if (UngetCount < UngetBufLen) /* make sure not to overflow */ |
| 343 | | UngetBuf[UngetCount++] = ch; |
| | 353 | KeyEvent[UngetCount++] = tmp; |
| 344 | 354 | } |
| 345 | 355 | |
-
|
r324
|
r382
|
|
| 242 | 242 | { |
| 243 | 243 | char buf[LONG_STRING], helpstr[SHORT_STRING]; |
| 244 | | int op = OP_NULL; /* function to execute */ |
| | 244 | int op = OP_NULL; |
| | 245 | event_t event = {OP_NULL, 0}; |
| 245 | 246 | int done = 0; /* controls when to exit the "event" loop */ |
| 246 | 247 | int i = 0, j; |
| … |
… |
|
| 255 | 256 | int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */ |
| 256 | 257 | int attach_msg = option(OPTATTACHMSG); |
| | 258 | int savedmenu = CurrentMenu; |
| 257 | 259 | |
| 258 | 260 | menu = mutt_new_menu (); |
| 259 | | menu->menu = MENU_MAIN; |
| | 261 | menu->menu = CurrentMenu = MENU_MAIN; |
| 260 | 262 | menu->offset = 1; |
| 261 | 263 | menu->pagelen = LINES - 3; |
| … |
… |
|
| 475 | 477 | { |
| 476 | 478 | timeout (Timeout * 1000); /* milliseconds */ |
| 477 | | op = mutt_getch (); |
| | 479 | event = mutt_getch (); |
| 478 | 480 | timeout (-1); /* restore blocking operation */ |
| 479 | | if (op != -1) |
| 480 | | { |
| 481 | | mutt_ungetch (op); |
| | 481 | if (event.ch != -1) |
| | 482 | { |
| | 483 | mutt_ungetch (event.ch, event.op); |
| 482 | 484 | op = km_dokey (MENU_MAIN); |
| 483 |