Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5c156ace
Commit
5c156ace
authored
Mar 08, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* chartab.c: (sub_char_table_ref_and_range, char_table_ref_and_range):
Rename locals to avoid shadowing.
parent
fb93dbc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
src/ChangeLog
src/ChangeLog
+2
-0
src/chartab.c
src/chartab.c
+13
-13
No files found.
src/ChangeLog
View file @
5c156ace
...
@@ -74,6 +74,8 @@
...
@@ -74,6 +74,8 @@
* chartab.c (copy_sub_char_table): Now static, since it's not used
* chartab.c (copy_sub_char_table): Now static, since it's not used
elsewhere.
elsewhere.
(sub_char_table_ref_and_range, char_table_ref_and_range):
Rename locals to avoid shadowing.
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
src/chartab.c
View file @
5c156ace
...
@@ -216,16 +216,16 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp
...
@@ -216,16 +216,16 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp
int
depth
=
XINT
(
tbl
->
depth
);
int
depth
=
XINT
(
tbl
->
depth
);
int
min_char
=
XINT
(
tbl
->
min_char
);
int
min_char
=
XINT
(
tbl
->
min_char
);
int
max_char
=
min_char
+
chartab_chars
[
depth
-
1
]
-
1
;
int
max_char
=
min_char
+
chartab_chars
[
depth
-
1
]
-
1
;
int
inde
x
=
CHARTAB_IDX
(
c
,
depth
,
min_char
),
idx
;
int
chartab_id
x
=
CHARTAB_IDX
(
c
,
depth
,
min_char
),
idx
;
Lisp_Object
val
;
Lisp_Object
val
;
val
=
tbl
->
contents
[
inde
x
];
val
=
tbl
->
contents
[
chartab_id
x
];
if
(
SUB_CHAR_TABLE_P
(
val
))
if
(
SUB_CHAR_TABLE_P
(
val
))
val
=
sub_char_table_ref_and_range
(
val
,
c
,
from
,
to
,
defalt
);
val
=
sub_char_table_ref_and_range
(
val
,
c
,
from
,
to
,
defalt
);
else
if
(
NILP
(
val
))
else
if
(
NILP
(
val
))
val
=
defalt
;
val
=
defalt
;
idx
=
inde
x
;
idx
=
chartab_id
x
;
while
(
idx
>
0
&&
*
from
<
min_char
+
idx
*
chartab_chars
[
depth
])
while
(
idx
>
0
&&
*
from
<
min_char
+
idx
*
chartab_chars
[
depth
])
{
{
Lisp_Object
this_val
;
Lisp_Object
this_val
;
...
@@ -244,13 +244,13 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp
...
@@ -244,13 +244,13 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp
break
;
break
;
}
}
}
}
while
((
c
=
min_char
+
(
inde
x
+
1
)
*
chartab_chars
[
depth
])
<=
max_char
while
((
c
=
min_char
+
(
chartab_id
x
+
1
)
*
chartab_chars
[
depth
])
<=
max_char
&&
*
to
>=
c
)
&&
*
to
>=
c
)
{
{
Lisp_Object
this_val
;
Lisp_Object
this_val
;
inde
x
++
;
chartab_id
x
++
;
this_val
=
tbl
->
contents
[
inde
x
];
this_val
=
tbl
->
contents
[
chartab_id
x
];
if
(
SUB_CHAR_TABLE_P
(
this_val
))
if
(
SUB_CHAR_TABLE_P
(
this_val
))
this_val
=
sub_char_table_ref_and_range
(
this_val
,
c
,
from
,
to
,
defalt
);
this_val
=
sub_char_table_ref_and_range
(
this_val
,
c
,
from
,
to
,
defalt
);
else
if
(
NILP
(
this_val
))
else
if
(
NILP
(
this_val
))
...
@@ -275,10 +275,10 @@ Lisp_Object
...
@@ -275,10 +275,10 @@ Lisp_Object
char_table_ref_and_range
(
Lisp_Object
table
,
int
c
,
int
*
from
,
int
*
to
)
char_table_ref_and_range
(
Lisp_Object
table
,
int
c
,
int
*
from
,
int
*
to
)
{
{
struct
Lisp_Char_Table
*
tbl
=
XCHAR_TABLE
(
table
);
struct
Lisp_Char_Table
*
tbl
=
XCHAR_TABLE
(
table
);
int
inde
x
=
CHARTAB_IDX
(
c
,
0
,
0
),
idx
;
int
chartab_id
x
=
CHARTAB_IDX
(
c
,
0
,
0
),
idx
;
Lisp_Object
val
;
Lisp_Object
val
;
val
=
tbl
->
contents
[
inde
x
];
val
=
tbl
->
contents
[
chartab_id
x
];
if
(
*
from
<
0
)
if
(
*
from
<
0
)
*
from
=
0
;
*
from
=
0
;
if
(
*
to
<
0
)
if
(
*
to
<
0
)
...
@@ -288,7 +288,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
...
@@ -288,7 +288,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
else
if
(
NILP
(
val
))
else
if
(
NILP
(
val
))
val
=
tbl
->
defalt
;
val
=
tbl
->
defalt
;
idx
=
inde
x
;
idx
=
chartab_id
x
;
while
(
*
from
<
idx
*
chartab_chars
[
0
])
while
(
*
from
<
idx
*
chartab_chars
[
0
])
{
{
Lisp_Object
this_val
;
Lisp_Object
this_val
;
...
@@ -308,13 +308,13 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
...
@@ -308,13 +308,13 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
break
;
break
;
}
}
}
}
while
(
*
to
>=
(
inde
x
+
1
)
*
chartab_chars
[
0
])
while
(
*
to
>=
(
chartab_id
x
+
1
)
*
chartab_chars
[
0
])
{
{
Lisp_Object
this_val
;
Lisp_Object
this_val
;
inde
x
++
;
chartab_id
x
++
;
c
=
inde
x
*
chartab_chars
[
0
];
c
=
chartab_id
x
*
chartab_chars
[
0
];
this_val
=
tbl
->
contents
[
inde
x
];
this_val
=
tbl
->
contents
[
chartab_id
x
];
if
(
SUB_CHAR_TABLE_P
(
this_val
))
if
(
SUB_CHAR_TABLE_P
(
this_val
))
this_val
=
sub_char_table_ref_and_range
(
this_val
,
c
,
from
,
to
,
this_val
=
sub_char_table_ref_and_range
(
this_val
,
c
,
from
,
to
,
tbl
->
defalt
);
tbl
->
defalt
);
...
...
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