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
b42887fe
Commit
b42887fe
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: adjust a couple of comments
parent
4172268b
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
+6
-6
src/chars.c
with
6 additions
and
6 deletions
+6
-6
src/chars.c
View file @
b42887fe
...
...
@@ -401,15 +401,14 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
/* Get the number of bytes in the multibyte character. */
buf_mb_len
=
mblen
(
buf
,
MB_CUR_MAX
);
/* If buf contains an invalid multibyte character, only
* interpret buf's first byte. */
/* When the multibyte sequence is invalid, only take the first byte. */
if
(
buf_mb_len
<
0
)
{
IGNORE_CALL_RESULT
(
mblen
(
NULL
,
0
));
buf_mb_len
=
1
;
}
else
if
(
buf_mb_len
==
0
)
buf_mb_len
++
;
/*
Sav
e the multibyte character in chr. */
/*
When requested, stor
e the multibyte character in chr. */
if
(
chr
!=
NULL
)
{
int
i
;
...
...
@@ -417,7 +416,7 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
chr
[
i
]
=
buf
[
i
];
}
/*
Save the column
width of the wide character in col. */
/*
When requested, store the
width of the wide character in col. */
if
(
col
!=
NULL
)
{
/* If we have a tab, get its width in columns using the
* current value of col. */
...
...
@@ -435,13 +434,14 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
}
else
#endif
{
/*
Get the number of by
te
s
i
n th
e byte
character
. */
/*
A byte charac
te
r
i
s on
e byte
long
. */
buf_mb_len
=
1
;
/*
Sav
e the byte character in chr. */
/*
When requested, stor
e the byte character in chr. */
if
(
chr
!=
NULL
)
*
chr
=
*
buf
;
/* When requested, store the width of the wide character in col. */
if
(
col
!=
NULL
)
{
/* If we have a tab, get its width in columns using the
* current value of col. */
...
...
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