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
Open sidebar
emacs
emacs
Commits
c1621a49
Commit
c1621a49
authored
Oct 14, 2014
by
Eli Zaretskii
Browse files
Increase 'level' in glyph struct; convert bad type aborts into assertions.
parent
a3c88bc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
18 deletions
+13
-18
src/bidi.c
src/bidi.c
+3
-0
src/dispextern.h
src/dispextern.h
+2
-2
src/term.c
src/term.c
+3
-6
src/xdisp.c
src/xdisp.c
+5
-10
No files found.
src/bidi.c
View file @
c1621a49
...
...
@@ -3161,6 +3161,9 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
bidi_cache_iterator_state
(
bidi_it
,
1
,
0
);
}
eassert
(
bidi_it
->
resolved_level
>=
0
&&
bidi_it
->
resolved_level
<=
BIDI_MAXDEPTH
+
2
);
if
(
STRINGP
(
bidi_it
->
string
.
lstring
))
UNGCPRO
;
}
...
...
src/dispextern.h
View file @
c1621a49
...
...
@@ -445,8 +445,8 @@ struct glyph
/* True means don't display cursor here. */
bool_bf
avoid_cursor_p
:
1
;
/* Resolved bidirectional level of this character [0..
63
]. */
unsigned
resolved_level
:
5
;
/* Resolved bidirectional level of this character [0..
127
]. */
unsigned
resolved_level
:
7
;
/* Resolved bidirectional type of this character, see enum
bidi_type_t below. Note that according to UAX#9, only some
...
...
src/term.c
View file @
c1621a49
...
...
@@ -1514,8 +1514,7 @@ append_glyph (struct it *it)
if
(
it
->
bidi_p
)
{
glyph
->
resolved_level
=
it
->
bidi_it
.
resolved_level
;
if
((
it
->
bidi_it
.
type
&
7
)
!=
it
->
bidi_it
.
type
)
emacs_abort
();
eassert
((
it
->
bidi_it
.
type
&
7
)
==
it
->
bidi_it
.
type
);
glyph
->
bidi_type
=
it
->
bidi_it
.
type
;
}
else
...
...
@@ -1711,8 +1710,7 @@ append_composite_glyph (struct it *it)
if
(
it
->
bidi_p
)
{
glyph
->
resolved_level
=
it
->
bidi_it
.
resolved_level
;
if
((
it
->
bidi_it
.
type
&
7
)
!=
it
->
bidi_it
.
type
)
emacs_abort
();
eassert
((
it
->
bidi_it
.
type
&
7
)
==
it
->
bidi_it
.
type
);
glyph
->
bidi_type
=
it
->
bidi_it
.
type
;
}
else
...
...
@@ -1796,8 +1794,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
if
(
it
->
bidi_p
)
{
glyph
->
resolved_level
=
it
->
bidi_it
.
resolved_level
;
if
((
it
->
bidi_it
.
type
&
7
)
!=
it
->
bidi_it
.
type
)
emacs_abort
();
eassert
((
it
->
bidi_it
.
type
&
7
)
==
it
->
bidi_it
.
type
);
glyph
->
bidi_type
=
it
->
bidi_it
.
type
;
}
else
...
...
src/xdisp.c
View file @
c1621a49
...
...
@@ -25166,8 +25166,7 @@ append_glyph (struct it *it)
if (it->bidi_p)
{
glyph->resolved_level = it->bidi_it.resolved_level;
if ((it->bidi_it.type & 7) != it->bidi_it.type)
emacs_abort ();
eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
glyph->bidi_type = it->bidi_it.type;
}
else
...
...
@@ -25250,8 +25249,7 @@ append_composite_glyph (struct it *it)
if (it->bidi_p)
{
glyph->resolved_level = it->bidi_it.resolved_level;
if ((it->bidi_it.type & 7) != it->bidi_it.type)
emacs_abort ();
eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
glyph->bidi_type = it->bidi_it.type;
}
++it->glyph_row->used[area];
...
...
@@ -25439,8 +25437,7 @@ produce_image_glyph (struct it *it)
if (it->bidi_p)
{
glyph->resolved_level = it->bidi_it.resolved_level;
if ((it->bidi_it.type & 7) != it->bidi_it.type)
emacs_abort ();
eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
glyph->bidi_type = it->bidi_it.type;
}
++it->glyph_row->used[area];
...
...
@@ -25528,8 +25525,7 @@ append_stretch_glyph (struct it *it, Lisp_Object object,
if (it->bidi_p)
{
glyph->resolved_level = it->bidi_it.resolved_level;
if ((it->bidi_it.type & 7) != it->bidi_it.type)
emacs_abort ();
eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
glyph->bidi_type = it->bidi_it.type;
}
else
...
...
@@ -25989,8 +25985,7 @@ append_glyphless_glyph (struct it *it, int face_id, int for_no_font, int len,
if (it->bidi_p)
{
glyph->resolved_level = it->bidi_it.resolved_level;
if ((it->bidi_it.type & 7) != it->bidi_it.type)
emacs_abort ();
eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
glyph->bidi_type = it->bidi_it.type;
}
++it->glyph_row->used[area];
...
...
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