Normalizing some whitespace, removing an old comment,
and placing another one better. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
52d1c20973
commit
3345e3407d
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-20 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/nao.c (finish_stdin_pager, cancel_stdin_pager, stdin_pager):
|
||||||
|
Normalize the whitespace, remove an old comment, and place another
|
||||||
|
one better.
|
||||||
|
|
||||||
2015-03-17 Benno Schulenberg <bensberg@justemail.net>
|
2015-03-17 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (do_alt_speller): Do not set the modified flag when
|
* src/text.c (do_alt_speller): Do not set the modified flag when
|
||||||
an external spell checker didn't make any changes. This fixes
|
an external spell checker didn't make any changes. This fixes
|
||||||
|
|
11
src/nano.c
11
src/nano.c
|
@ -1180,20 +1180,20 @@ void finish_stdin_pager(void)
|
||||||
|
|
||||||
/* Read whatever we did get from stdin. */
|
/* Read whatever we did get from stdin. */
|
||||||
f = fopen("/dev/stdin", "rb");
|
f = fopen("/dev/stdin", "rb");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
nperror("fopen");
|
nperror("fopen");
|
||||||
|
|
||||||
read_file(f, 0, "stdin", TRUE, FALSE);
|
read_file(f, 0, "stdin", TRUE, FALSE);
|
||||||
ttystdin = open("/dev/tty", O_RDONLY);
|
ttystdin = open("/dev/tty", O_RDONLY);
|
||||||
if (!ttystdin)
|
if (!ttystdin)
|
||||||
die(_("Couldn't reopen stdin from keyboard, sorry\n"));
|
die(_("Couldn't reopen stdin from keyboard, sorry\n"));
|
||||||
|
|
||||||
dup2(ttystdin,0);
|
dup2(ttystdin,0);
|
||||||
close(ttystdin);
|
close(ttystdin);
|
||||||
if (!pager_input_aborted)
|
if (!pager_input_aborted)
|
||||||
tcgetattr(0, &oldterm);
|
tcgetattr(0, &oldterm);
|
||||||
if (!pager_sig_failed && sigaction(SIGINT, &pager_oldaction, NULL) == -1)
|
if (!pager_sig_failed && sigaction(SIGINT, &pager_oldaction, NULL) == -1)
|
||||||
nperror("sigaction");
|
nperror("sigaction");
|
||||||
terminal_init();
|
terminal_init();
|
||||||
doupdate();
|
doupdate();
|
||||||
}
|
}
|
||||||
|
@ -1201,7 +1201,6 @@ void finish_stdin_pager(void)
|
||||||
/* Cancel reading from stdin like a pager. */
|
/* Cancel reading from stdin like a pager. */
|
||||||
RETSIGTYPE cancel_stdin_pager(int signal)
|
RETSIGTYPE cancel_stdin_pager(int signal)
|
||||||
{
|
{
|
||||||
/* Currently do nothing, just handle the intr silently. */
|
|
||||||
pager_input_aborted = TRUE;
|
pager_input_aborted = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1213,13 +1212,13 @@ void stdin_pager(void)
|
||||||
tcsetattr(0, TCSANOW, &oldterm);
|
tcsetattr(0, TCSANOW, &oldterm);
|
||||||
fprintf(stderr, _("Reading from stdin, ^C to abort\n"));
|
fprintf(stderr, _("Reading from stdin, ^C to abort\n"));
|
||||||
|
|
||||||
/* Set things up so that Ctrl-C will cancel the new process. */
|
|
||||||
/* Enable interpretation of the special control keys so that
|
/* Enable interpretation of the special control keys so that
|
||||||
* we get SIGINT when Ctrl-C is pressed. */
|
* we get SIGINT when Ctrl-C is pressed. */
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
enable_signals();
|
enable_signals();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Set things up so that SIGINT will cancel the new process. */
|
||||||
if (sigaction(SIGINT, NULL, &pager_newaction) == -1) {
|
if (sigaction(SIGINT, NULL, &pager_newaction) == -1) {
|
||||||
pager_sig_failed = TRUE;
|
pager_sig_failed = TRUE;
|
||||||
nperror("sigaction");
|
nperror("sigaction");
|
||||||
|
|
Loading…
Reference in New Issue