OLD | NEW |
1 /* signals.c -- signal handling support for readline. */ | 1 /* signals.c -- signal handling support for readline. */ |
2 | 2 |
3 /* Copyright (C) 1987-2009 Free Software Foundation, Inc. | 3 /* Copyright (C) 1987-2009 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of the GNU Readline Library (Readline), a library | 5 This file is part of the GNU Readline Library (Readline), a library |
6 for reading lines of text with interactive input and history editing. | 6 for reading lines of text with interactive input and history editing. |
7 | 7 |
8 Readline is free software: you can redistribute it and/or modify | 8 Readline is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 # else /* !HAVE_BSD_SIGNALS */ | 573 # else /* !HAVE_BSD_SIGNALS */ |
574 # if defined (HAVE_USG_SIGHOLD) | 574 # if defined (HAVE_USG_SIGHOLD) |
575 sigrelse (SIGINT); | 575 sigrelse (SIGINT); |
576 # endif /* HAVE_USG_SIGHOLD */ | 576 # endif /* HAVE_USG_SIGHOLD */ |
577 # endif /* !HAVE_BSD_SIGNALS */ | 577 # endif /* !HAVE_BSD_SIGNALS */ |
578 #endif /* !HAVE_POSIX_SIGNALS */ | 578 #endif /* !HAVE_POSIX_SIGNALS */ |
579 | 579 |
580 sigint_blocked = 0; | 580 sigint_blocked = 0; |
581 } | 581 } |
582 | 582 |
| 583 #ifdef SIGWINCH |
583 /* Cause SIGWINCH to not be delivered until the corresponding call to | 584 /* Cause SIGWINCH to not be delivered until the corresponding call to |
584 release_sigwinch(). */ | 585 release_sigwinch(). */ |
585 void | 586 void |
586 _rl_block_sigwinch () | 587 _rl_block_sigwinch () |
587 { | 588 { |
588 if (sigwinch_blocked) | 589 if (sigwinch_blocked) |
589 return; | 590 return; |
590 | 591 |
591 #if defined (HAVE_POSIX_SIGNALS) | 592 #if defined (HAVE_POSIX_SIGNALS) |
592 sigemptyset (&sigwinch_set); | 593 sigemptyset (&sigwinch_set); |
(...skipping 27 matching lines...) Expand all Loading... |
620 sigsetmask (sigwinch_oldmask); | 621 sigsetmask (sigwinch_oldmask); |
621 # else /* !HAVE_BSD_SIGNALS */ | 622 # else /* !HAVE_BSD_SIGNALS */ |
622 # if defined (HAVE_USG_SIGHOLD) | 623 # if defined (HAVE_USG_SIGHOLD) |
623 sigrelse (SIGWINCH); | 624 sigrelse (SIGWINCH); |
624 # endif /* HAVE_USG_SIGHOLD */ | 625 # endif /* HAVE_USG_SIGHOLD */ |
625 # endif /* !HAVE_BSD_SIGNALS */ | 626 # endif /* !HAVE_BSD_SIGNALS */ |
626 #endif /* !HAVE_POSIX_SIGNALS */ | 627 #endif /* !HAVE_POSIX_SIGNALS */ |
627 | 628 |
628 sigwinch_blocked = 0; | 629 sigwinch_blocked = 0; |
629 } | 630 } |
| 631 #endif /* SIGWINCH */ |
630 | 632 |
631 /* **************************************************************** */ | 633 /* **************************************************************** */ |
632 /* */ | 634 /* */ |
633 /* Echoing special control characters */ | 635 /* Echoing special control characters */ |
634 /* */ | 636 /* */ |
635 /* **************************************************************** */ | 637 /* **************************************************************** */ |
636 void | 638 void |
637 rl_echo_signal_char (sig) | 639 rl_echo_signal_char (sig) |
638 int sig; | 640 int sig; |
639 { | 641 { |
(...skipping 22 matching lines...) Expand all Loading... |
662 cstr[cslen = 2] = '\0'; | 664 cstr[cslen = 2] = '\0'; |
663 } | 665 } |
664 else | 666 else |
665 { | 667 { |
666 cstr[0] = c; | 668 cstr[0] = c; |
667 cstr[cslen = 1] = '\0'; | 669 cstr[cslen = 1] = '\0'; |
668 } | 670 } |
669 | 671 |
670 _rl_output_some_chars (cstr, cslen); | 672 _rl_output_some_chars (cstr, cslen); |
671 } | 673 } |
OLD | NEW |