Skip to content
GitLab
Menu
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
f33d8cae
Commit
f33d8cae
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: don't use a function call when reference to the variable will do
parent
e471e2d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+6
-6
src/winio.c
with
6 additions
and
6 deletions
+6
-6
src/winio.c
View file @
f33d8cae
...
...
@@ -367,7 +367,7 @@ int parse_kbinput(WINDOW *win)
/* If there are four consecutive escapes, discard three of them. */
if
(
escapes
>
3
)
escapes
=
1
;
solitary
=
(
escapes
==
1
&&
get_
key_buffer_len
()
==
0
);
solitary
=
(
escapes
==
1
&&
key_buffer_len
==
0
);
return
ERR
;
}
...
...
@@ -380,7 +380,7 @@ int parse_kbinput(WINDOW *win)
/* Reset the escape counter. */
escapes
=
0
;
if
((
keycode
!=
'O'
&&
keycode
!=
'o'
&&
keycode
!=
'['
)
||
get_
key_buffer_len
()
==
0
||
*
key_buffer
==
0x1B
)
{
key_buffer_len
==
0
||
*
key_buffer
==
0x1B
)
{
/* One escape followed by a single non-escape:
* meta key sequence mode. */
if
(
!
solitary
||
(
keycode
>=
0x20
&&
keycode
<
0x7F
))
...
...
@@ -412,7 +412,7 @@ int parse_kbinput(WINDOW *win)
}
double_esc
=
FALSE
;
escapes
=
0
;
}
else
if
(
get_
key_buffer_len
()
==
0
)
{
}
else
if
(
key_buffer_len
==
0
)
{
if
((
'0'
<=
keycode
&&
keycode
<=
'2'
&&
byte_digits
==
0
)
||
(
'0'
<=
keycode
&&
keycode
<=
'9'
&&
byte_digits
>
0
))
{
...
...
@@ -487,7 +487,7 @@ int parse_kbinput(WINDOW *win)
case
3
:
/* Reset the escape counter. */
escapes
=
0
;
if
(
get_
key_buffer_len
()
==
0
)
if
(
key_buffer_len
==
0
)
/* Three escapes followed by a non-escape, and no
* other codes are waiting: normal input mode. */
retval
=
keycode
;
...
...
@@ -1067,7 +1067,7 @@ int parse_escape_sequence(WINDOW *win, int kbinput)
* sequence, translate the sequence into its corresponding key
* value, and save that as the result. */
unget_input
(
&
kbinput
,
1
);
seq_len
=
get_
key_buffer_len
()
;
seq_len
=
key_buffer_len
;
seq
=
get_input
(
NULL
,
seq_len
);
retval
=
convert_sequence
(
seq
,
seq_len
);
...
...
@@ -1413,7 +1413,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
/* Get the complete sequence, and save the characters in it as the
* result. */
*
kbinput_len
=
get_
key_buffer_len
()
;
*
kbinput_len
=
key_buffer_len
;
retval
=
get_input
(
NULL
,
*
kbinput_len
);
return
retval
;
...
...
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