mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
* chartab.c: (sub_char_table_ref_and_range, char_table_ref_and_range):
Rename locals to avoid shadowing.
This commit is contained in:
parent
fb93dbc227
commit
5c156ace08
2 changed files with 15 additions and 13 deletions
|
|
@ -74,6 +74,8 @@
|
|||
|
||||
* chartab.c (copy_sub_char_table): Now static, since it's not used
|
||||
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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 min_char = XINT (tbl->min_char);
|
||||
int max_char = min_char + chartab_chars[depth - 1] - 1;
|
||||
int index = CHARTAB_IDX (c, depth, min_char), idx;
|
||||
int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx;
|
||||
Lisp_Object val;
|
||||
|
||||
val = tbl->contents[index];
|
||||
val = tbl->contents[chartab_idx];
|
||||
if (SUB_CHAR_TABLE_P (val))
|
||||
val = sub_char_table_ref_and_range (val, c, from, to, defalt);
|
||||
else if (NILP (val))
|
||||
val = defalt;
|
||||
|
||||
idx = index;
|
||||
idx = chartab_idx;
|
||||
while (idx > 0 && *from < min_char + idx * chartab_chars[depth])
|
||||
{
|
||||
Lisp_Object this_val;
|
||||
|
|
@ -244,13 +244,13 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp
|
|||
break;
|
||||
}
|
||||
}
|
||||
while ((c = min_char + (index + 1) * chartab_chars[depth]) <= max_char
|
||||
while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char
|
||||
&& *to >= c)
|
||||
{
|
||||
Lisp_Object this_val;
|
||||
|
||||
index++;
|
||||
this_val = tbl->contents[index];
|
||||
chartab_idx++;
|
||||
this_val = tbl->contents[chartab_idx];
|
||||
if (SUB_CHAR_TABLE_P (this_val))
|
||||
this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt);
|
||||
else if (NILP (this_val))
|
||||
|
|
@ -275,10 +275,10 @@ Lisp_Object
|
|||
char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
|
||||
{
|
||||
struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
|
||||
int index = CHARTAB_IDX (c, 0, 0), idx;
|
||||
int chartab_idx = CHARTAB_IDX (c, 0, 0), idx;
|
||||
Lisp_Object val;
|
||||
|
||||
val = tbl->contents[index];
|
||||
val = tbl->contents[chartab_idx];
|
||||
if (*from < 0)
|
||||
*from = 0;
|
||||
if (*to < 0)
|
||||
|
|
@ -288,7 +288,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
|
|||
else if (NILP (val))
|
||||
val = tbl->defalt;
|
||||
|
||||
idx = index;
|
||||
idx = chartab_idx;
|
||||
while (*from < idx * chartab_chars[0])
|
||||
{
|
||||
Lisp_Object this_val;
|
||||
|
|
@ -308,13 +308,13 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
|
|||
break;
|
||||
}
|
||||
}
|
||||
while (*to >= (index + 1) * chartab_chars[0])
|
||||
while (*to >= (chartab_idx + 1) * chartab_chars[0])
|
||||
{
|
||||
Lisp_Object this_val;
|
||||
|
||||
index++;
|
||||
c = index * chartab_chars[0];
|
||||
this_val = tbl->contents[index];
|
||||
chartab_idx++;
|
||||
c = chartab_idx * chartab_chars[0];
|
||||
this_val = tbl->contents[chartab_idx];
|
||||
if (SUB_CHAR_TABLE_P (this_val))
|
||||
this_val = sub_char_table_ref_and_range (this_val, c, from, to,
|
||||
tbl->defalt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue