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
fc101a6d
Commit
fc101a6d
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable to be shorter and clearer
parent
eb88ad98
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/chars.c
+9
-9
src/chars.c
with
9 additions
and
9 deletions
+9
-9
src/chars.c
View file @
fc101a6d
...
...
@@ -372,27 +372,27 @@ char *make_mbchar(long chr, int *chr_mb_len)
* we expect col to have the current display width. */
int
parse_mbchar
(
const
char
*
buf
,
char
*
chr
,
size_t
*
col
)
{
int
buf_mb_
len
;
int
len
gth
;
assert
(
buf
!=
NULL
);
#ifdef ENABLE_UTF8
if
(
use_utf8
)
{
/* Get the number of bytes in the multibyte character. */
buf_mb_
len
=
mblen
(
buf
,
MB_CUR_MAX
);
len
gth
=
mblen
(
buf
,
MB_CUR_MAX
);
/* When the multibyte sequence is invalid, only take the first byte. */
if
(
buf_mb_
len
<
0
)
{
if
(
len
gth
<
0
)
{
IGNORE_CALL_RESULT
(
mblen
(
NULL
,
0
));
buf_mb_
len
=
1
;
}
else
if
(
buf_mb_
len
==
0
)
buf_mb_len
++
;
len
gth
=
1
;
}
else
if
(
len
gth
==
0
)
length
=
1
;
/* When requested, store the multibyte character in chr. */
if
(
chr
!=
NULL
)
{
int
i
;
for
(
i
=
0
;
i
<
buf_mb_
len
;
i
++
)
for
(
i
=
0
;
i
<
len
gth
;
i
++
)
chr
[
i
]
=
buf
[
i
];
}
...
...
@@ -415,7 +415,7 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
#endif
{
/* A byte character is one byte long. */
buf_mb_
len
=
1
;
len
gth
=
1
;
/* When requested, store the byte character in chr. */
if
(
chr
!=
NULL
)
...
...
@@ -437,7 +437,7 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
}
}
return
buf_mb_
len
;
return
len
gth
;
}
/* Return the index in buf of the beginning of the multibyte character
...
...
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