Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
0c613cb1
Commit
0c613cb1
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable, to be more clear and to match another
parent
1e5064ef
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nano.c
+1
-1
src/nano.c
src/text.c
+5
-5
src/text.c
with
6 additions
and
6 deletions
+6
-6
src/nano.c
View file @
0c613cb1
...
...
@@ -1099,7 +1099,7 @@ bool scoop_stdin(void)
struct
sigaction
oldaction
,
newaction
;
/* Original and temporary handlers for SIGINT. */
bool
setup_failed
=
FALSE
;
/* Whether setting up the SIGINT handler failed. */
/* Whether setting up the
temporary
SIGINT handler failed. */
FILE
*
stream
;
int
thetty
;
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
0c613cb1
...
...
@@ -1087,8 +1087,8 @@ bool execute_command(const char *command)
const
char
*
shellenv
;
struct
sigaction
oldaction
,
newaction
;
/* Original and temporary handlers for SIGINT. */
bool
s
ig
_failed
=
FALSE
;
/*
Did sigaction() fail without changing the signal handlers?
*/
bool
s
etup
_failed
=
FALSE
;
/*
Whether setting up the temporary SIGINT handler failed.
*/
/* Make our pipes. */
if
(
pipe
(
fd
)
==
-
1
)
{
...
...
@@ -1128,12 +1128,12 @@ bool execute_command(const char *command)
/* Set things up so that Ctrl-C will terminate the forked process. */
if
(
sigaction
(
SIGINT
,
NULL
,
&
newaction
)
==
-
1
)
{
s
ig
_failed
=
TRUE
;
s
etup
_failed
=
TRUE
;
nperror
(
"sigaction"
);
}
else
{
newaction
.
sa_handler
=
cancel_command
;
if
(
sigaction
(
SIGINT
,
&
newaction
,
&
oldaction
)
==
-
1
)
{
s
ig
_failed
=
TRUE
;
s
etup
_failed
=
TRUE
;
nperror
(
"sigaction"
);
}
}
...
...
@@ -1148,7 +1148,7 @@ bool execute_command(const char *command)
nperror
(
"wait"
);
/* If it was changed, restore the handler for SIGINT. */
if
(
!
s
ig
_failed
&&
sigaction
(
SIGINT
,
&
oldaction
,
NULL
)
==
-
1
)
if
(
!
s
etup
_failed
&&
sigaction
(
SIGINT
,
&
oldaction
,
NULL
)
==
-
1
)
nperror
(
"sigaction"
);
/* Restore the terminal to its desired state, and disable
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help