projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update.
[chise/xemacs-chise.git-]
/
src
/
rangetab.c
diff --git
a/src/rangetab.c
b/src/rangetab.c
index
8d5bdba
..
fc29885
100644
(file)
--- a/
src/rangetab.c
+++ b/
src/rangetab.c
@@
-43,7
+43,7
@@
Lisp_Object Qrange_table;
static Lisp_Object
mark_range_table (Lisp_Object obj)
{
static Lisp_Object
mark_range_table (Lisp_Object obj)
{
- struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+ Lisp_Range_Table *rt = XRANGE_TABLE (obj);
int i;
for (i = 0; i < Dynarr_length (rt->entries); i++)
int i;
for (i = 0; i < Dynarr_length (rt->entries); i++)
@@
-54,7
+54,7
@@
mark_range_table (Lisp_Object obj)
static void
print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
static void
print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
- struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+ Lisp_Range_Table *rt = XRANGE_TABLE (obj);
char buf[200];
int i;
char buf[200];
int i;
@@
-77,8
+77,8
@@
print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
static int
range_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
{
static int
range_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
{
- struct Lisp_Range_Table *rt1 = XRANGE_TABLE (obj1);
- struct Lisp_Range_Table *rt2 = XRANGE_TABLE (obj2);
+ Lisp_Range_Table *rt1 = XRANGE_TABLE (obj1);
+ Lisp_Range_Table *rt2 = XRANGE_TABLE (obj2);
int i;
if (Dynarr_length (rt1->entries) != Dynarr_length (rt2->entries))
int i;
if (Dynarr_length (rt1->entries) != Dynarr_length (rt2->entries))
@@
-107,7
+107,7
@@
range_table_entry_hash (struct range_table_entry *rte, int depth)
static unsigned long
range_table_hash (Lisp_Object obj, int depth)
{
static unsigned long
range_table_hash (Lisp_Object obj, int depth)
{
- struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+ Lisp_Range_Table *rt = XRANGE_TABLE (obj);
int i;
int size = Dynarr_length (rt->entries);
unsigned long hash = size;
int i;
int size = Dynarr_length (rt->entries);
unsigned long hash = size;
@@
-133,27
+133,27
@@
range_table_hash (Lisp_Object obj, int depth)
}
static const struct lrecord_description rte_description_1[] = {
}
static const struct lrecord_description rte_description_1[] = {
- { XD_LISP_OBJECT, offsetof(range_table_entry, val), 1 },
+ { XD_LISP_OBJECT, offsetof (range_table_entry, val) },
{ XD_END }
};
static const struct struct_description rte_description = {
{ XD_END }
};
static const struct struct_description rte_description = {
- sizeof(range_table_entry),
+ sizeof (range_table_entry),
rte_description_1
};
static const struct lrecord_description rted_description_1[] = {
rte_description_1
};
static const struct lrecord_description rted_description_1[] = {
- XD_DYNARR_DESC(range_table_entry_dynarr, &rte_description),
+ XD_DYNARR_DESC (range_table_entry_dynarr, &rte_description),
{ XD_END }
};
static const struct struct_description rted_description = {
{ XD_END }
};
static const struct struct_description rted_description = {
- sizeof(range_table_entry_dynarr),
+ sizeof (range_table_entry_dynarr),
rted_description_1
};
static const struct lrecord_description range_table_description[] = {
rted_description_1
};
static const struct lrecord_description range_table_description[] = {
- { XD_STRUCT_PTR, offsetof(struct Lisp_Range_Table, entries), 1, &rted_description },
+ { XD_STRUCT_PTR, offsetof (Lisp_Range_Table, entries), 1, &rted_description },
{ XD_END }
};
{ XD_END }
};
@@
-161,7
+161,7
@@
DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
mark_range_table, print_range_table, 0,
range_table_equal, range_table_hash,
range_table_description,
mark_range_table, print_range_table, 0,
range_table_equal, range_table_hash,
range_table_description,
- struct Lisp_Range_Table);
+ Lisp_Range_Table);
\f
/************************************************************************/
/* Range table operations */
\f
/************************************************************************/
/* Range table operations */
@@
-170,7
+170,7
@@
DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
#ifdef ERROR_CHECK_TYPECHECK
static void
#ifdef ERROR_CHECK_TYPECHECK
static void
-verify_range_table (struct Lisp_Range_Table *rt)
+verify_range_table (Lisp_Range_Table *rt)
{
int i;
{
int i;
@@
-233,8
+233,8
@@
You can manipulate it using `put-range-table', `get-range-table',
())
{
Lisp_Object obj;
())
{
Lisp_Object obj;
- struct Lisp_Range_Table *rt = alloc_lcrecord_type (struct Lisp_Range_Table,
- &lrecord_range_table);
+ Lisp_Range_Table *rt = alloc_lcrecord_type (Lisp_Range_Table,
+ &lrecord_range_table);
rt->entries = Dynarr_new (range_table_entry);
XSETRANGE_TABLE (obj, rt);
return obj;
rt->entries = Dynarr_new (range_table_entry);
XSETRANGE_TABLE (obj, rt);
return obj;
@@
-246,13
+246,13
@@
ranges as the given table. The values will not themselves be copied.
*/
(old_table))
{
*/
(old_table))
{
- struct Lisp_Range_Table *rt, *rtnew;
+ Lisp_Range_Table *rt, *rtnew;
Lisp_Object obj;
CHECK_RANGE_TABLE (old_table);
rt = XRANGE_TABLE (old_table);
Lisp_Object obj;
CHECK_RANGE_TABLE (old_table);
rt = XRANGE_TABLE (old_table);
- rtnew = alloc_lcrecord_type (struct Lisp_Range_Table, &lrecord_range_table);
+ rtnew = alloc_lcrecord_type (Lisp_Range_Table, &lrecord_range_table);
rtnew->entries = Dynarr_new (range_table_entry);
Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0),
rtnew->entries = Dynarr_new (range_table_entry);
Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0),
@@
-267,7
+267,7
@@
If there is no corresponding value, return DEFAULT (defaults to nil).
*/
(pos, table, default_))
{
*/
(pos, table, default_))
{
- struct Lisp_Range_Table *rt;
+ Lisp_Range_Table *rt;
CHECK_RANGE_TABLE (table);
rt = XRANGE_TABLE (table);
CHECK_RANGE_TABLE (table);
rt = XRANGE_TABLE (table);
@@
-284,7
+284,7
@@
put_range_table (Lisp_Object table, EMACS_INT first,
{
int i;
int insert_me_here = -1;
{
int i;
int insert_me_here = -1;
- struct Lisp_Range_Table *rt = XRANGE_TABLE (table);
+ Lisp_Range_Table *rt = XRANGE_TABLE (table);
/* Now insert in the proper place. This gets tricky because
we may be overlapping one or more existing ranges and need
/* Now insert in the proper place. This gets tricky because
we may be overlapping one or more existing ranges and need
@@
-704,6
+704,8
@@
unified_range_table_get_range (void *unrangetab, int offset,
void
syms_of_rangetab (void)
{
void
syms_of_rangetab (void)
{
+ INIT_LRECORD_IMPLEMENTATION (range_table);
+
defsymbol (&Qrange_tablep, "range-table-p");
defsymbol (&Qrange_table, "range-table");
defsymbol (&Qrange_tablep, "range-table-p");
defsymbol (&Qrange_table, "range-table");