Commit bfc183ba authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

more cosmetic fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2659 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 5 additions and 13 deletions
+5 -13
...@@ -1193,36 +1193,28 @@ bool open_pipe(const char *command) ...@@ -1193,36 +1193,28 @@ bool open_pipe(const char *command)
int fd[2]; int fd[2];
FILE *f; FILE *f;
struct sigaction oldaction, newaction; struct sigaction oldaction, newaction;
/* Original and temporary handlers for /* Original and temporary handlers for SIGINT. */
* SIGINT. */
bool sig_failed = FALSE; bool sig_failed = FALSE;
/* sig_failed means that sigaction() failed without changing the /* Did sigaction() fail without changing the signal handlers? */
* signal handlers.
*
* We use this variable since it is important to put things back
* when we finish, even if we get errors. */
/* Make our pipes. */ /* Make our pipes. */
if (pipe(fd) == -1) { if (pipe(fd) == -1) {
statusbar(_("Could not pipe")); statusbar(_("Could not pipe"));
return FALSE; return FALSE;
} }
/* Fork a child. */ /* Fork a child. */
if ((pid = fork()) == 0) { if ((pid = fork()) == 0) {
close(fd[0]); close(fd[0]);
dup2(fd[1], fileno(stdout)); dup2(fd[1], fileno(stdout));
dup2(fd[1], fileno(stderr)); dup2(fd[1], fileno(stderr));
/* If execl() returns at all, there was an error. */
/* If execl() returns at all, there was an error. */
execl("/bin/sh", "sh", "-c", command, NULL); execl("/bin/sh", "sh", "-c", command, NULL);
exit(0); exit(0);
} }
/* Else continue as parent. */ /* Else continue as parent. */
close(fd[1]); close(fd[1]);
if (pid == -1) { if (pid == -1) {
...@@ -1232,7 +1224,7 @@ bool open_pipe(const char *command) ...@@ -1232,7 +1224,7 @@ bool open_pipe(const char *command)
} }
/* Before we start reading the forked command's output, we set /* Before we start reading the forked command's output, we set
* things up so that ^C will cancel the new process. */ * things up so that Ctrl-C will cancel the new process. */
/* Enable interpretation of the special control keys so that we get /* Enable interpretation of the special control keys so that we get
* SIGINT when Ctrl-C is pressed. */ * SIGINT when Ctrl-C is pressed. */
...@@ -1282,7 +1274,7 @@ void do_verbatim_input(void) ...@@ -1282,7 +1274,7 @@ void do_verbatim_input(void)
size_t kbinput_len, i; size_t kbinput_len, i;
char *output; char *output;
statusbar(_("Verbatim input")); statusbar(_("Verbatim Input"));
/* Read in all the verbatim characters. */ /* Read in all the verbatim characters. */
kbinput = get_verbatim_kbinput(edit, &kbinput_len); kbinput = get_verbatim_kbinput(edit, &kbinput_len);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment