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
48643cbd
Commit
48643cbd
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: elide a small intermediate buffer
parent
aa013aa0
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+5
-8
src/winio.c
with
5 additions
and
8 deletions
+5
-8
src/winio.c
View file @
48643cbd
...
...
@@ -1500,7 +1500,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
* Unicode value, and put back the corresponding byte(s). */
else
{
char
*
uni_mb
;
int
*
seq
,
i
;
int
onebyte
,
i
;
while
(
uni
==
ERR
)
{
free
(
kbinput
);
...
...
@@ -1512,15 +1512,12 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
/* Convert the Unicode value to a multibyte sequence. */
uni_mb
=
make_mbchar
(
uni
,
(
int
*
)
count
);
seq
=
(
int
*
)
nmalloc
(
*
count
*
sizeof
(
int
));
for
(
i
=
0
;
i
<
*
count
;
i
++
)
seq
[
i
]
=
(
unsigned
char
)
uni_mb
[
i
];
/* Insert the multibyte sequence into the input buffer. */
unget_input
(
seq
,
*
count
);
for
(
i
=
*
count
;
i
>
0
;
i
--
)
{
onebyte
=
(
unsigned
char
)
uni_mb
[
i
-
1
];
unget_input
(
&
onebyte
,
1
);
}
free
(
seq
);
free
(
uni_mb
);
}
}
else
...
...
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