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
bc796a59
Commit
bc796a59
authored
Sep 13, 2002
by
Kenichi Handa
Browse files
(skip_chars): Fix previous change.
(skip_syntaxes): Fix previous change.
parent
b028bdcb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
src/ChangeLog
src/ChangeLog
+5
-0
src/syntax.c
src/syntax.c
+18
-21
No files found.
src/ChangeLog
View file @
bc796a59
2002-09-13 Kenichi Handa <handa@etl.go.jp>
* syntax.c (skip_chars): Fix previous change.
(skip_syntaxes): Fix previous change.
2002-09-06 Dave Love <fx@gnu.org>
* config.in: Restore it.
...
...
src/syntax.c
View file @
bc796a59
...
...
@@ -1420,6 +1420,9 @@ skip_chars (forwardp, string, lim)
if
(
multibyte
)
char_ranges
=
(
int
*
)
alloca
(
XSTRING
(
string
)
->
size
*
(
sizeof
(
int
))
*
2
);
str
=
XSTRING
(
string
)
->
data
;
size_byte
=
STRING_BYTES
(
XSTRING
(
string
));
i_byte
=
0
;
if
(
i_byte
<
size_byte
&&
XSTRING
(
string
)
->
data
[
0
]
==
'^'
)
...
...
@@ -1433,9 +1436,6 @@ skip_chars (forwardp, string, lim)
If STRING contains non-ASCII characters, setup char_ranges for
them and use fastmap only for their leading codes. */
str
=
XSTRING
(
string
)
->
data
;
size_byte
=
STRING_BYTES
(
XSTRING
(
string
));
if
(
!
string_multibyte
)
{
int
string_has_eight_bit
=
0
;
...
...
@@ -1662,9 +1662,8 @@ skip_chars (forwardp, string, lim)
}
else
{
while
(
pos
<
XINT
(
lim
)
&&
fastmap
[
FETCH_BYTE
(
pos
)])
pos
++
;
pos_byte
=
pos
;
while
(
pos
<
XINT
(
lim
)
&&
fastmap
[
FETCH_BYTE
(
pos_byte
)])
pos
++
,
pos_byte
++
;
}
}
else
...
...
@@ -1693,9 +1692,8 @@ skip_chars (forwardp, string, lim)
}
else
{
while
(
pos
>
XINT
(
lim
)
&&
fastmap
[
FETCH_BYTE
(
pos
-
1
)])
pos
--
;
pos_byte
=
pos
;
while
(
pos
>
XINT
(
lim
)
&&
fastmap
[
FETCH_BYTE
(
pos_byte
-
1
)])
pos
--
,
pos_byte
--
;
}
}
...
...
@@ -1738,6 +1736,13 @@ skip_syntaxes (forwardp, string, lim)
bzero
(
fastmap
,
sizeof
fastmap
);
if
(
STRING_BYTES
(
XSTRING
(
string
))
>
XSTRING
(
string
)
->
size
)
/* As this is very rare case, don't consider efficiency. */
string
=
string_make_unibyte
(
string
);
str
=
XSTRING
(
string
)
->
data
;
size_byte
=
STRING_BYTES
(
XSTRING
(
string
));
i_byte
=
0
;
if
(
i_byte
<
size_byte
&&
XSTRING
(
string
)
->
data
[
0
]
==
'^'
)
...
...
@@ -1745,12 +1750,6 @@ skip_syntaxes (forwardp, string, lim)
negate
=
1
;
i_byte
++
;
}
if
(
STRING_BYTES
(
XSTRING
(
string
))
>
XSTRING
(
string
)
->
size
)
/* As this is very rare case, don't consider efficiency. */
string
=
string_make_unibyte
(
string
);
str
=
XSTRING
(
string
)
->
data
;
size_byte
=
STRING_BYTES
(
XSTRING
(
string
));
/* Find the syntaxes specified and set their elements of fastmap. */
while
(
i_byte
<
size_byte
)
...
...
@@ -1791,14 +1790,13 @@ skip_syntaxes (forwardp, string, lim)
{
while
(
pos
<
XINT
(
lim
))
{
c
=
FETCH_BYTE
(
pos
);
c
=
FETCH_BYTE
(
pos
_byte
);
MAKE_CHAR_MULTIBYTE
(
c
);
if
(
fastmap
[(
int
)
SYNTAX
(
c
)])
break
;
pos
++
;
pos
++
,
pos_byte
++
;
UPDATE_SYNTAX_TABLE_FORWARD
(
pos
);
}
pos_byte
=
pos
;
}
}
else
...
...
@@ -1826,16 +1824,15 @@ skip_syntaxes (forwardp, string, lim)
if
(
pos
>
XINT
(
lim
))
while
(
1
)
{
c
=
FETCH_BYTE
(
pos
-
1
);
c
=
FETCH_BYTE
(
pos
_byte
-
1
);
MAKE_CHAR_MULTIBYTE
(
c
);
if
(
!
fastmap
[(
int
)
SYNTAX
(
c
)])
break
;
pos
--
;
pos
--
,
pos_byte
--
;
if
(
pos
<=
XINT
(
lim
))
break
;
UPDATE_SYNTAX_TABLE_BACKWARD
(
pos
-
1
);
}
pos_byte
=
pos
;
}
}
...
...
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