Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
220eeac9
Commit
220eeac9
authored
Jan 14, 2009
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix previous changes.
parent
f56a4450
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
37 deletions
+35
-37
src/coding.c
src/coding.c
+35
-37
No files found.
src/coding.c
View file @
220eeac9
...
...
@@ -744,17 +744,17 @@ static struct coding_system coding_categories[coding_category_max];
} while (0)
/* Safely get two bytes from the source text pointed by SRC which ends
at SRC_END, and set C1 and C2 to those bytes. If there are not
enough bytes in the source for C1, it jumps to `no_more_source'.
If there are not enough bytes in the source for C2, set C2 to -1.
If multibytep is nonzero and a multibyte character is found at SRC,
set C1 and/or C2 to the negative value of the character code. The
caller should declare and set these variables appropriately in
advance:
at SRC_END, and set C1 and C2 to those bytes while skipping the
heading multibyte characters. If there are not enough bytes in the
source, it jumps to `no_more_source'. If multibytep is nonzero and
a multibyte character is found for C2, set C2 to the negative value
of the character code. The caller should declare and set these
variables appropriately in advance:
src, src_end, multibytep
It is intended that this macro is used in detect_coding_utf_16. */
#define TWO_MORE_BYTES(c1, c2) \
do { \
do { \
if (src == src_end) \
goto no_more_source; \
...
...
@@ -765,14 +765,13 @@ static struct coding_system coding_categories[coding_category_max];
c1 = ((c1 & 1) << 6) | *src++; \
else \
{ \
c1 = c2 = -1;
\
break;
\
src += BYTES_BY_CHAR_HEAD (c1) - 1;
\
c1 = -1;
\
} \
} \
} while (c1 < 0); \
if (src == src_end) \
c2 = -1; \
else \
{ \
goto no_more_source; \
c2 = *src++; \
if (multibytep && (c2 & 0x80)) \
{ \
...
...
@@ -781,7 +780,6 @@ static struct coding_system coding_categories[coding_category_max];
else \
c2 = -1; \
} \
} \
} while (0)
...
...
@@ -1633,7 +1631,7 @@ detect_coding_utf_16 (coding, detect_info)
| CATEGORY_MASK_UTF_16_BE_NOSIG
| CATEGORY_MASK_UTF_16_LE_NOSIG);
}
else if (c
1 < 0 || c
2 < 0)
else if (c2 < 0)
{
detect_info->rejected |= CATEGORY_MASK_UTF_16;
return 0;
...
...
@@ -1656,7 +1654,7 @@ detect_coding_utf_16 (coding, detect_info)
while (1)
{
TWO_MORE_BYTES (c1, c2);
if (c
1 < 0 || c
2 < 0)
if (c2 < 0)
break;
if (! e[c1])
{
...
...
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