User: james
Date: 05/02/03 17:14:15
Modified: xemacs/src ChangeLog alloc.c buffer.c bytecode.c console.c
data.c device.c dumper.c elhash.c eval.c events.c
extents.c file-coding.c frame.c glyphs.c lrecord.h
lstream.c marker.c mule-charset.c mule-coding.c
number-gmp.h number.c objects.c profile.c
rangetab.c redisplay.c specifier.c unicode.c
window.c
Log:
Commit Olivier Galibert's dumper updates for bignums and use them.
See xemacs-patches message with ID <ps8y685c6p.fsf(a)diannao.ittc.ku.edu>.
Revision Changes Path
1.785 +39 -0 XEmacs/xemacs/src/ChangeLog
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.784
retrieving revision 1.785
diff -u -b -r1.784 -r1.785
--- ChangeLog 2005/02/03 07:11:26 1.784
+++ ChangeLog 2005/02/03 16:14:02 1.785
@@ -1,3 +1,42 @@
+2005-02-01 Jerry James <james(a)xemacs.org>
+
+ * dumper.c: Olivier Galibert's changes to enable dumping data via
+ a Java-like serialization/deserialization process.
+
+ * number.c: OG's bignum conversion functions. Also, use the
+ dumping capability to initialize bigfloat-max-prec sanely.
+
+ * alloc.c:
+ * buffer.c:
+ * bytecode.c:
+ * console.c:
+ * data.c:
+ * device.c:
+ * elhash.c:
+ * eval.c:
+ * events.c:
+ * extents.c:
+ * file-coding.c:
+ * frame.c:
+ * glyphs.c:
+ * lstream.c:
+ * marker.c:
+ * mule-charset.c:
+ * mule-coding.c:
+ * objects.c:
+ * profile.c:
+ * rangetab.c:
+ * redisplay.c:
+ * specifier.c:
+ * unicode.c:
+ * window.c:
+ Add curly braces to the data2 arg of each memory_description
+ initializer. Add a union member name to each reference to data2.
+
+ * lrecord.h: Ditto. OG changes to add and document
+ XD_OPAQUE_PTR_CONVERTIBLE and XD_OPAQUE_DATA_CONVERTIBLE. Add
+ memory_contents_description to solve pointer aliasing problems.
+
2005-02-02 Ben Wing <ben(a)xemacs.org>
* lread.c:
1.106 +8 -7 XEmacs/xemacs/src/alloc.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/alloc.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- alloc.c 2005/01/29 09:15:58 1.105
+++ alloc.c 2005/02/03 16:14:04 1.106
@@ -2662,7 +2662,7 @@
*/
const struct memory_description free_description[] = {
- { XD_LISP_OBJECT, offsetof (struct free_lcrecord_header, chain), 0, 0,
+ { XD_LISP_OBJECT, offsetof (struct free_lcrecord_header, chain), 0, { 0 },
XD_FLAG_FREE_LISP_OBJECT },
{ XD_END }
};
@@ -2674,7 +2674,7 @@
struct free_lcrecord_header);
const struct memory_description lcrecord_list_description[] = {
- { XD_LISP_OBJECT, offsetof (struct lcrecord_list, free), 0, 0,
+ { XD_LISP_OBJECT, offsetof (struct lcrecord_list, free), 0, { 0 },
XD_FLAG_FREE_LISP_OBJECT },
{ XD_END }
};
@@ -3152,7 +3152,8 @@
return (val *
lispdesc_block_size
- (rdata, lispdesc_indirect_description (obj, desc1->data2)));
+ (rdata,
+ lispdesc_indirect_description (obj, desc1->data2.descr)));
}
case XD_OPAQUE_DATA_PTR:
return sizeof (void *);
@@ -3162,7 +3163,7 @@
description, use it; else compute size based on current union
constant. */
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (obj, desc1->data2);
+ lispdesc_indirect_description (obj, desc1->data2.descr);
if (sdesc->size)
return sdesc->size;
else
@@ -3179,7 +3180,7 @@
description, use it; else compute size based on maximum of all
possible structures. */
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (obj, desc1->data2);
+ lispdesc_indirect_description (obj, desc1->data2.descr);
if (sdesc->size)
return sdesc->size;
else
@@ -3520,7 +3521,7 @@
EMACS_INT count = lispdesc_indirect_count (desc1->data1, desc,
data);
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (data, desc1->data2);
+ lispdesc_indirect_description (data, desc1->data2.descr);
const char *dobj = * (const char **) rdata;
if (dobj)
mark_struct_contents (dobj, sdesc, count);
@@ -3531,7 +3532,7 @@
EMACS_INT count = lispdesc_indirect_count (desc1->data1, desc,
data);
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (data, desc1->data2);
+ lispdesc_indirect_description (data, desc1->data2.descr);
mark_struct_contents (rdata, sdesc, count);
break;
1.70 +2 -2 XEmacs/xemacs/src/buffer.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: buffer.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/buffer.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- buffer.c 2005/01/24 23:33:47 1.69
+++ buffer.c 2005/02/03 16:14:04 1.70
@@ -245,9 +245,9 @@
{ XD_LISP_OBJECT, offsetof (struct buffer, extent_info) },
{ XD_BLOCK_PTR, offsetof (struct buffer, text),
- 1, &buffer_text_description },
+ 1, { &buffer_text_description } },
{ XD_BLOCK_PTR, offsetof (struct buffer, syntax_cache),
- 1, &syntax_cache_description },
+ 1, { &syntax_cache_description } },
{ XD_LISP_OBJECT, offsetof (struct buffer, indirect_children) },
{ XD_LISP_OBJECT, offsetof (struct buffer, base_buffer) },
1.46 +1 -1 XEmacs/xemacs/src/bytecode.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: bytecode.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/bytecode.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- bytecode.c 2005/01/29 09:15:59 1.45
+++ bytecode.c 2005/02/03 16:14:04 1.46
@@ -2180,7 +2180,7 @@
static const struct memory_description compiled_function_description[] = {
{ XD_INT, offsetof (Lisp_Compiled_Function, args_in_array) },
{ XD_BLOCK_PTR, offsetof (Lisp_Compiled_Function, args),
- XD_INDIRECT (0, 0), &lisp_object_description },
+ XD_INDIRECT (0, 0), { &lisp_object_description } },
{ XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, instructions) },
{ XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, constants) },
{ XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, arglist) },
1.40 +6 -5 XEmacs/xemacs/src/console.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: console.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- console.c 2005/01/24 23:33:48 1.39
+++ console.c 2005/02/03 16:14:04 1.40
@@ -115,9 +115,9 @@
static const struct memory_description console_data_description_1 []= {
#ifdef HAVE_TTY
- { XD_BLOCK_PTR, tty_console, 1, &tty_console_data_description},
+ { XD_BLOCK_PTR, tty_console, 1, { &tty_console_data_description} },
#endif
- { XD_BLOCK_PTR, stream_console, 1, &stream_console_data_description},
+ { XD_BLOCK_PTR, stream_console, 1, { &stream_console_data_description} },
{ XD_END }
};
@@ -130,9 +130,9 @@
#define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (struct console, x) },
#include "conslots.h"
{ XD_BLOCK_PTR, offsetof (struct console, conmeths), 1,
- &console_methods_description },
+ { &console_methods_description } },
{ XD_UNION, offsetof (struct console, console_data),
- XD_INDIRECT (0, 0), &console_data_description },
+ XD_INDIRECT (0, 0), { &console_data_description } },
{ XD_END }
};
@@ -1227,7 +1227,8 @@
static const struct memory_description cte_description_1[] = {
{ XD_LISP_OBJECT, offsetof (console_type_entry, symbol) },
- { XD_BLOCK_PTR, offsetof (console_type_entry, meths), 1, &console_methods_description },
+ { XD_BLOCK_PTR, offsetof (console_type_entry, meths), 1,
+ { &console_methods_description } },
{ XD_END }
};
1.62 +5 -5 XEmacs/xemacs/src/data.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: data.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/data.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- data.c 2005/01/24 23:33:49 1.61
+++ data.c 2005/02/03 16:14:04 1.62
@@ -2589,9 +2589,9 @@
static const struct memory_description weak_list_description[] = {
{ XD_LISP_OBJECT, offsetof (struct weak_list, list),
- 0, 0, XD_FLAG_NO_KKCC },
+ 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_LO_LINK, offsetof (struct weak_list, next_weak),
- 0, 0, XD_FLAG_NO_KKCC },
+ 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_END }
};
@@ -3299,11 +3299,11 @@
is marked here. */
static const struct memory_description ephemeron_description[] = {
{ XD_LISP_OBJECT, offsetof(struct ephemeron, key),
- 0, 0, XD_FLAG_NO_KKCC },
+ 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_LISP_OBJECT, offsetof(struct ephemeron, cons_chain),
- 0, 0, XD_FLAG_NO_KKCC },
+ 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_LISP_OBJECT, offsetof(struct ephemeron, value),
- 0, 0, XD_FLAG_NO_KKCC },
+ 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_END }
};
1.33 +6 -6 XEmacs/xemacs/src/device.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: device.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- device.c 2004/11/04 23:06:20 1.32
+++ device.c 2005/02/03 16:14:04 1.33
@@ -93,14 +93,14 @@
static const struct memory_description device_data_description_1 []= {
#ifdef HAVE_GTK
- { XD_BLOCK_PTR, gtk_console, 1, >k_device_data_description},
+ { XD_BLOCK_PTR, gtk_console, 1, { >k_device_data_description} },
#endif
#ifdef HAVE_MS_WINDOWS
- { XD_BLOCK_PTR, mswindows_console, 1, &mswindows_device_data_description},
- { XD_BLOCK_PTR, msprinter_console, 1, &msprinter_device_data_description},
+ { XD_BLOCK_PTR, mswindows_console, 1, { &mswindows_device_data_description} },
+ { XD_BLOCK_PTR, msprinter_console, 1, { &msprinter_device_data_description} },
#endif
#ifdef HAVE_X_WINDOWS
- { XD_BLOCK_PTR, x_console, 1, &x_device_data_description},
+ { XD_BLOCK_PTR, x_console, 1, { &x_device_data_description} },
#endif
{ XD_END }
};
@@ -115,9 +115,9 @@
#include "devslots.h"
{ XD_BLOCK_PTR, offsetof (struct device, devmeths), 1,
- &console_methods_description },
+ { &console_methods_description } },
{ XD_UNION, offsetof (struct device, device_data),
- XD_INDIRECT (0, 0), &device_data_description },
+ XD_INDIRECT (0, 0), { &device_data_description } },
{ XD_END }
};
1.23 +260 -9 XEmacs/xemacs/src/dumper.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: dumper.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dumper.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- dumper.c 2005/01/24 23:33:50 1.22
+++ dumper.c 2005/02/03 16:14:05 1.23
@@ -1,5 +1,5 @@
/* Portable data dumper for XEmacs.
- Copyright (C) 1999-2000 Olivier Galibert
+ Copyright (C) 1999-2000,2004 Olivier Galibert
Copyright (C) 2001 Martin Buchholz
Copyright (C) 2001, 2002, 2003, 2004 Ben Wing.
@@ -78,6 +78,57 @@
typedef struct
{
+ const void *object;
+ void *data;
+ Bytecount size;
+ EMACS_INT offset;
+ EMACS_INT dest_offset;
+ EMACS_INT save_offset;
+ const struct opaque_convert_functions *fcts;
+} pdump_cv_data_info;
+
+typedef struct
+{
+ Dynarr_declare (pdump_cv_data_info);
+} pdump_cv_data_info_dynarr;
+
+typedef struct
+{
+ EMACS_INT dest_offset;
+ EMACS_INT save_offset;
+ Bytecount size;
+} pdump_cv_data_dump_info;
+
+typedef struct
+{
+ const void *object;
+ void *data;
+ Bytecount size;
+ EMACS_INT index;
+ EMACS_INT save_offset;
+ const struct opaque_convert_functions *fcts;
+} pdump_cv_ptr_info;
+
+typedef struct
+{
+ Dynarr_declare (pdump_cv_ptr_info);
+} pdump_cv_ptr_info_dynarr;
+
+typedef struct
+{
+ EMACS_INT save_offset;
+ Bytecount size;
+} pdump_cv_ptr_dump_info;
+
+typedef struct
+{
+ EMACS_INT save_offset;
+ Bytecount size;
+ void *adr;
+} pdump_cv_ptr_load_info;
+
+typedef struct
+{
Lisp_Object *address;
Lisp_Object value;
} pdump_static_Lisp_Object;
@@ -92,6 +143,8 @@
static pdump_root_block_ptr_dynarr *pdump_root_block_ptrs;
static Lisp_Object_ptr_dynarr *pdump_root_lisp_objects;
static Lisp_Object_ptr_dynarr *pdump_weak_object_chains;
+static pdump_cv_data_info_dynarr *pdump_cv_data;
+static pdump_cv_ptr_info_dynarr *pdump_cv_ptr;
/* Mark SIZE bytes at non-heap address BLOCKADDR for dumping, described
by DESC. Called by outside callers during XEmacs initialization. */
@@ -210,7 +263,10 @@
/* The structure of the dump file looks like this:
0 - header
- dumped objects
- stab_offset - nb_root_block_ptrs*struct(void *, adr)
+ stab_offset - nb_cv_data*struct(dest, adr) for in-object externally
+ represented data
+ - nb_cv_ptr*(adr) for pointed-to externally represented data
+ - nb_root_block_ptrs*struct(void *, adr)
for global pointers to heap blocks
- nb_root_blocks*struct(void *, size, info) for global
data-segment blocks to restore
@@ -231,12 +287,17 @@
EMACS_UINT reloc_address;
int nb_root_block_ptrs;
int nb_root_blocks;
+ int nb_cv_data;
+ int nb_cv_ptr;
} pdump_header;
Rawbyte *pdump_start;
Rawbyte *pdump_end;
static Bytecount pdump_length;
+static pdump_cv_data_dump_info *pdump_loaded_cv_data;
+static pdump_cv_ptr_load_info *pdump_loaded_cv_ptr;
+
#ifdef WIN32_NATIVE
/* Handle for the dump file */
static HANDLE pdump_hFile = INVALID_HANDLE_VALUE;
@@ -449,6 +510,16 @@
return &pdump_desc_table.list[pdump_desc_table.count++].list;
}
+static pdump_cv_ptr_info *
+pdump_find_in_cv_ptr_dynarr(const void *object)
+{
+ int i;
+ for (i = 0; i < Dynarr_length (pdump_cv_ptr); i++)
+ if (Dynarr_at (pdump_cv_ptr, i).object == object)
+ return Dynarr_atp (pdump_cv_ptr, i);
+ return 0;
+}
+
static struct
{
struct lrecord_header *obj;
@@ -608,7 +679,7 @@
EMACS_INT count = lispdesc_indirect_count (desc1->data1, desc,
data);
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (data, desc1->data2);
+ lispdesc_indirect_description (data, desc1->data2.descr);
const Rawbyte *dobj = *(const Rawbyte **)rdata;
if (dobj)
pdump_register_block (dobj, sdesc->size, sdesc->description,
@@ -620,7 +691,7 @@
EMACS_INT count = lispdesc_indirect_count (desc1->data1, desc,
data);
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (data, desc1->data2);
+ lispdesc_indirect_description (data, desc1->data2.descr);
pdump_register_block_contents (rdata, sdesc->size,
sdesc->description, count);
@@ -632,6 +703,29 @@
if (desc1)
goto union_switcheroo;
break;
+ case XD_OPAQUE_PTR_CONVERTIBLE:
+ {
+ pdump_cv_ptr_info info;
+ info.object = *(void **)rdata;
+ info.fcts = desc1->data2.funcs;
+ if (!pdump_find_in_cv_ptr_dynarr (info.object))
+ {
+ info.fcts->convert(info.object, &info.data, &info.size);
+ Dynarr_add (pdump_cv_ptr, info);
+ }
+ break;
+ }
+ case XD_OPAQUE_DATA_CONVERTIBLE:
+ {
+ pdump_cv_data_info info;
+ info.object = data;
+ info.offset = offset;
+ info.fcts = desc1->data2.funcs;
+
+ info.fcts->convert(rdata, &info.data, &info.size);
+ Dynarr_add (pdump_cv_data, info);
+ break;
+ }
default:
pdump_unsupported_dump_type (desc1->type, 1);
@@ -726,6 +820,7 @@
}
}
+
/* Store the already-calculated new pointer offsets for all pointers in the
COUNT contiguous blocks of memory, each described by DESC and of size
SIZE, whose original is located at ORIG_DATA and the modifiable copy at
@@ -876,7 +971,7 @@
EMACS_INT num = lispdesc_indirect_count (desc1->data1, desc,
orig_data);
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (orig_data, desc1->data2);
+ lispdesc_indirect_description (orig_data, desc1->data2.descr);
pdump_store_new_pointer_offsets
(num, rdata,
@@ -895,6 +990,14 @@
goto union_switcheroo;
break;
+ case XD_OPAQUE_PTR_CONVERTIBLE:
+ *(EMACS_INT *)rdata = pdump_find_in_cv_ptr_dynarr (*(void **)rdata)->index;
+ break;
+
+ case XD_OPAQUE_DATA_CONVERTIBLE:
+ /* in-object, nothing to do */
+ break;
+
default:
pdump_unsupported_dump_type (desc1->type, 0);
}
@@ -1015,7 +1118,7 @@
data);
int j;
const struct sized_memory_description *sdesc =
- lispdesc_indirect_description (data, desc1->data2);
+ lispdesc_indirect_description (data, desc1->data2.descr);
Bytecount size = lispdesc_block_size (rdata, sdesc);
/* Note: We are recursing over data in the block itself */
@@ -1032,6 +1135,28 @@
goto union_switcheroo;
break;
+ case XD_OPAQUE_PTR_CONVERTIBLE:
+ {
+ pdump_cv_ptr_load_info *p = pdump_loaded_cv_ptr + *(EMACS_INT *)rdata;
+ if (!p->adr)
+ p->adr = desc1->data2.funcs->deconvert(0, pdump_start +
+ p->save_offset, p->size);
+ *(void **)rdata = p->adr;
+ break;
+ }
+
+ case XD_OPAQUE_DATA_CONVERTIBLE:
+ {
+ EMACS_INT dest_offset = (Rawbyte *)rdata - pdump_start;
+ pdump_cv_data_dump_info *p;
+
+ for(p = pdump_loaded_cv_data; p->dest_offset != dest_offset; p++);
+
+ desc1->data2.funcs->deconvert(rdata, pdump_start + p->save_offset,
+ p->size);
+ break;
+ }
+
default:
pdump_unsupported_dump_type (desc1->type, 0);
}
@@ -1049,6 +1174,39 @@
cur_offset += size;
}
+/* Write out to global file descriptor PDUMP_OUT the result of an
+ external element. It's just opaque data. */
+
+static void
+pdump_dump_cv_data (pdump_cv_data_info *elt)
+{
+ retry_fwrite (elt->data, elt->size, 1, pdump_out);
+}
+
+static void
+pdump_dump_cv_ptr (pdump_cv_ptr_info *elt)
+{
+ retry_fwrite (elt->data, elt->size, 1, pdump_out);
+}
+
+static void
+pdump_allocate_offset_cv_data (pdump_cv_data_info *elt)
+{
+ elt->save_offset = cur_offset;
+ if (elt->size>max_size)
+ max_size = elt->size;
+ cur_offset += elt->size;
+}
+
+static void
+pdump_allocate_offset_cv_ptr (pdump_cv_ptr_info *elt)
+{
+ elt->save_offset = cur_offset;
+ if (elt->size>max_size)
+ max_size = elt->size;
+ cur_offset += elt->size;
+}
+
/* Traverse through all the heap blocks, once the "register" stage of
dumping has finished. To compress space as much as possible, we
logically sort all blocks by alignment, hitting all blocks with
@@ -1081,7 +1239,9 @@
static void
pdump_scan_by_alignment (void (*f)(pdump_block_list_elt *,
- const struct memory_description *))
+ const struct memory_description *),
+ void (*g)(pdump_cv_data_info *),
+ void (*h)(pdump_cv_ptr_info *))
{
int align;
@@ -1106,7 +1266,32 @@
for (elt = pdump_opaque_data_list.first; elt; elt = elt->next)
if (pdump_size_to_align (elt->size) == align)
f (elt, 0);
+
+ for (i=0; i < Dynarr_length (pdump_cv_data); i++)
+ if (pdump_size_to_align (Dynarr_atp (pdump_cv_data, i)->size) == align)
+ g (Dynarr_atp (pdump_cv_data, i));
+
+ for (i=0; i < Dynarr_length (pdump_cv_ptr); i++)
+ if (pdump_size_to_align (Dynarr_atp (pdump_cv_ptr, i)->size) == align)
+ h (Dynarr_atp (pdump_cv_ptr, i));
+ }
+}
+
+static void
+pdump_dump_cv_data_info (void)
+{
+ int i;
+ Elemcount count = Dynarr_length (pdump_cv_data);
+ pdump_cv_data_dump_info *data = alloca_array (pdump_cv_data_dump_info, count);
+ for (i = 0; i < count; i++)
+ {
+ data[i].dest_offset = Dynarr_at (pdump_cv_data, i).dest_offset;
+ data[i].save_offset = Dynarr_at (pdump_cv_data, i).save_offset;
+ data[i].size = Dynarr_at (pdump_cv_data, i).size;
}
+
+ PDUMP_ALIGN_OUTPUT (pdump_cv_data_dump_info);
+ retry_fwrite (data, sizeof (pdump_cv_data_dump_info), count, pdump_out);
}
/* Dump out the root block pointers, part of stage 3 (the "WRITE" stage) of
@@ -1115,6 +1300,22 @@
offset into the dumped data. */
static void
+pdump_dump_cv_ptr_info (void)
+{
+ int i;
+ Elemcount count = Dynarr_length (pdump_cv_ptr);
+ pdump_cv_ptr_dump_info *data = alloca_array (pdump_cv_ptr_dump_info, count);
+ for (i = 0; i < count; i++)
+ {
+ data[i].save_offset = Dynarr_at (pdump_cv_ptr, i).save_offset;
+ data[i].size = Dynarr_at (pdump_cv_ptr, i).size;
+ }
+
+ PDUMP_ALIGN_OUTPUT (pdump_cv_ptr_dump_info);
+ retry_fwrite (data, sizeof (pdump_cv_ptr_dump_info), count, pdump_out);
+}
+
+static void
pdump_dump_root_block_ptrs (void)
{
int i;
@@ -1436,6 +1637,9 @@
pdump_opaque_data_list.count = 0;
pdump_depth = 0;
+ pdump_cv_data = Dynarr_new2 (pdump_cv_data_info_dynarr, pdump_cv_data_info);
+ pdump_cv_ptr = Dynarr_new2 (pdump_cv_ptr_info_dynarr, pdump_cv_ptr_info);
+
/* (I) The "register" stage: Note all heap memory blocks to be relocated
*/
@@ -1495,13 +1699,17 @@
header.reloc_address = 0;
header.nb_root_block_ptrs = Dynarr_length (pdump_root_block_ptrs);
header.nb_root_blocks = Dynarr_length (pdump_root_blocks);
+ header.nb_cv_data = Dynarr_length (pdump_cv_data);
+ header.nb_cv_ptr = Dynarr_length (pdump_cv_ptr);
cur_offset = MAX_ALIGN_SIZE (sizeof (header));
max_size = 0;
/* (2) Traverse all heap blocks and compute their offsets; keep track
of maximum block size seen */
- pdump_scan_by_alignment (pdump_allocate_offset);
+ pdump_scan_by_alignment (pdump_allocate_offset,
+ pdump_allocate_offset_cv_data,
+ pdump_allocate_offset_cv_ptr);
cur_offset = MAX_ALIGN_SIZE (cur_offset);
header.stab_offset = cur_offset;
@@ -1536,11 +1744,37 @@
retry_fwrite (&header, sizeof (header), 1, pdump_out);
PDUMP_ALIGN_OUTPUT (max_align_t);
+
+ for (i = 0; i < Dynarr_length (pdump_cv_data); i++)
+ {
+ pdump_cv_data_info *elt = Dynarr_atp (pdump_cv_data, i);
+ elt->dest_offset =
+ pdump_get_block (elt->object)->save_offset + elt->offset;
+ }
+
+ for (i = 0; i < Dynarr_length (pdump_cv_ptr); i++)
+ Dynarr_at (pdump_cv_ptr, i).index = i;
+
+ pdump_scan_by_alignment (pdump_dump_data, pdump_dump_cv_data, pdump_dump_cv_ptr);
- pdump_scan_by_alignment (pdump_dump_data);
+ for (i = 0; i < Dynarr_length (pdump_cv_data); i++)
+ {
+ pdump_cv_data_info *elt = Dynarr_atp (pdump_cv_data, i);
+ if(elt->fcts->convert_free)
+ elt->fcts->convert_free(elt->object, elt->data, elt->size);
+ }
+ for (i = 0; i < Dynarr_length (pdump_cv_ptr); i++)
+ {
+ pdump_cv_ptr_info *elt = Dynarr_atp (pdump_cv_ptr, i);
+ if(elt->fcts->convert_free)
+ elt->fcts->convert_free(elt->object, elt->data, elt->size);
+ }
+
fseek (pdump_out, header.stab_offset, SEEK_SET);
+ pdump_dump_cv_data_info ();
+ pdump_dump_cv_ptr_info ();
pdump_dump_root_block_ptrs ();
pdump_dump_root_blocks ();
pdump_dump_rtables ();
@@ -1583,6 +1817,23 @@
delta = ((EMACS_INT) pdump_start) - header->reloc_address;
p = pdump_start + header->stab_offset;
+
+ /* Get the cv_data array */
+ p = (char *) ALIGN_PTR (p, pdump_cv_data_dump_info);
+ pdump_loaded_cv_data = (pdump_cv_data_dump_info *)p;
+ p += header->nb_cv_data*sizeof(pdump_cv_data_dump_info);
+
+ /* Build the cv_ptr array */
+ p = (char *) ALIGN_PTR (p, pdump_cv_ptr_dump_info);
+ pdump_loaded_cv_ptr =
+ alloca_array (pdump_cv_ptr_load_info, header->nb_cv_ptr);
+ for (i = 0; i < header->nb_cv_ptr; i++)
+ {
+ pdump_cv_ptr_dump_info info = PDUMP_READ (p, pdump_cv_ptr_dump_info);
+ pdump_loaded_cv_ptr[i].save_offset = info.save_offset;
+ pdump_loaded_cv_ptr[i].size = info.size;
+ pdump_loaded_cv_ptr[i].adr = 0;
+ }
/* Put back the pdump_root_block_ptrs */
p = (Rawbyte *) ALIGN_PTR (p, pdump_static_pointer);
1.40 +3 -3 XEmacs/xemacs/src/elhash.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: elhash.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/elhash.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- elhash.c 2005/01/24 23:33:51 1.39
+++ elhash.c 2005/02/03 16:14:05 1.40
@@ -452,8 +452,8 @@
/* Note: XD_INDIRECT in this table refers to the surrounding table,
and so this will work. */
{ XD_BLOCK_PTR, HASH_TABLE_NON_WEAK, XD_INDIRECT (0, 1),
- &htentry_description },
- { XD_BLOCK_PTR, 0, XD_INDIRECT (0, 1), &htentry_description,
+ { &htentry_description } },
+ { XD_BLOCK_PTR, 0, XD_INDIRECT (0, 1), { &htentry_description },
XD_FLAG_UNION_DEFAULT_ENTRY | XD_FLAG_NO_KKCC },
{ XD_END }
};
@@ -467,7 +467,7 @@
{ XD_ELEMCOUNT, offsetof (Lisp_Hash_Table, size) },
{ XD_INT, offsetof (Lisp_Hash_Table, weakness) },
{ XD_UNION, offsetof (Lisp_Hash_Table, hentries), XD_INDIRECT (1, 0),
- &htentry_union_description },
+ { &htentry_union_description } },
{ XD_LO_LINK, offsetof (Lisp_Hash_Table, next_weak) },
{ XD_END }
};
1.87 +1 -1 XEmacs/xemacs/src/eval.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: eval.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- eval.c 2005/01/29 09:15:59 1.86
+++ eval.c 2005/02/03 16:14:05 1.87
@@ -429,7 +429,7 @@
}
static const struct memory_description subr_description[] = {
- { XD_DOC_STRING, offsetof (Lisp_Subr, doc), 0, 0, XD_FLAG_NO_KKCC },
+ { XD_DOC_STRING, offsetof (Lisp_Subr, doc), 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_END }
};
1.65 +11 -11 XEmacs/xemacs/src/events.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: events.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/events.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- events.c 2005/01/24 23:33:53 1.64
+++ events.c 2005/02/03 16:14:05 1.65
@@ -189,16 +189,16 @@
};
static const struct memory_description event_data_description_1 [] = {
- { XD_BLOCK_ARRAY, key_press_event, 1, &key_data_description },
- { XD_BLOCK_ARRAY, button_press_event, 1, &button_data_description },
- { XD_BLOCK_ARRAY, button_release_event, 1, &button_data_description },
- { XD_BLOCK_ARRAY, pointer_motion_event, 1, &motion_data_description },
- { XD_BLOCK_ARRAY, process_event, 1, &process_data_description },
- { XD_BLOCK_ARRAY, timeout_event, 1, &timeout_data_description },
- { XD_BLOCK_ARRAY, magic_event, 1, &magic_data_description },
- { XD_BLOCK_ARRAY, magic_eval_event, 1, &magic_eval_data_description },
- { XD_BLOCK_ARRAY, eval_event, 1, &eval_data_description },
- { XD_BLOCK_ARRAY, misc_user_event, 1, &misc_user_data_description },
+ { XD_BLOCK_ARRAY, key_press_event, 1, { &key_data_description } },
+ { XD_BLOCK_ARRAY, button_press_event, 1, { &button_data_description } },
+ { XD_BLOCK_ARRAY, button_release_event, 1, { &button_data_description } },
+ { XD_BLOCK_ARRAY, pointer_motion_event, 1, { &motion_data_description } },
+ { XD_BLOCK_ARRAY, process_event, 1, { &process_data_description } },
+ { XD_BLOCK_ARRAY, timeout_event, 1, { &timeout_data_description } },
+ { XD_BLOCK_ARRAY, magic_event, 1, { &magic_data_description } },
+ { XD_BLOCK_ARRAY, magic_eval_event, 1, { &magic_eval_data_description } },
+ { XD_BLOCK_ARRAY, eval_event, 1, { &eval_data_description } },
+ { XD_BLOCK_ARRAY, misc_user_event, 1, { &misc_user_data_description } },
{ XD_END }
};
@@ -211,7 +211,7 @@
{ XD_LISP_OBJECT, offsetof (struct Lisp_Event, next) },
{ XD_LISP_OBJECT, offsetof (struct Lisp_Event, channel) },
{ XD_UNION, offsetof (struct Lisp_Event, event),
- XD_INDIRECT (0, 0), &event_data_description },
+ XD_INDIRECT (0, 0), { &event_data_description } },
{ XD_END }
};
1.56 +16 -12 XEmacs/xemacs/src/extents.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: extents.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- extents.c 2005/01/26 05:11:11 1.55
+++ extents.c 2005/02/03 16:14:06 1.56
@@ -1029,7 +1029,7 @@
static const struct memory_description gap_array_marker_description_1[] = {
{ XD_BLOCK_PTR, offsetof (Gap_Array_Marker, next), 1,
- &gap_array_marker_description },
+ { &gap_array_marker_description } },
{ XD_END }
};
@@ -1043,11 +1043,11 @@
{ XD_INT, offsetof (Gap_Array, offset_past_gap) },
{ XD_INT, offsetof (Gap_Array, els_past_gap) },
{ XD_BLOCK_PTR, offsetof (Gap_Array, markers), 1,
- &gap_array_marker_description, XD_FLAG_NO_KKCC },
+ { &gap_array_marker_description }, XD_FLAG_NO_KKCC },
{ XD_BLOCK_ARRAY, offsetof (Gap_Array, array), XD_INDIRECT (0, 0),
- &lisp_object_description },
+ { &lisp_object_description } },
{ XD_BLOCK_ARRAY, XD_INDIRECT (1, offsetof (Gap_Array, array)),
- XD_INDIRECT (2, 0), &lisp_object_description },
+ XD_INDIRECT (2, 0), { &lisp_object_description } },
{ XD_END }
};
@@ -1060,9 +1060,9 @@
static const struct memory_description extent_list_marker_description_1[] = {
{ XD_BLOCK_PTR, offsetof (Extent_List_Marker, m), 1,
- &gap_array_marker_description },
+ { &gap_array_marker_description } },
{ XD_BLOCK_PTR, offsetof (Extent_List_Marker, next), 1,
- &extent_list_marker_description },
+ { &extent_list_marker_description } },
{ XD_END }
};
@@ -1072,9 +1072,12 @@
};
static const struct memory_description extent_list_description_1[] = {
- { XD_BLOCK_PTR, offsetof (Extent_List, start), 1, &lispobj_gap_array_description },
- { XD_BLOCK_PTR, offsetof (Extent_List, end), 1, &lispobj_gap_array_description, XD_FLAG_NO_KKCC },
- { XD_BLOCK_PTR, offsetof (Extent_List, markers), 1, &extent_list_marker_description, XD_FLAG_NO_KKCC },
+ { XD_BLOCK_PTR, offsetof (Extent_List, start), 1,
+ { &lispobj_gap_array_description } },
+ { XD_BLOCK_PTR, offsetof (Extent_List, end), 1,
+ { &lispobj_gap_array_description }, XD_FLAG_NO_KKCC },
+ { XD_BLOCK_PTR, offsetof (Extent_List, markers), 1,
+ { &extent_list_marker_description }, XD_FLAG_NO_KKCC },
{ XD_END }
};
@@ -1084,7 +1087,8 @@
};
static const struct memory_description stack_of_extents_description_1[] = {
- { XD_BLOCK_PTR, offsetof (Stack_Of_Extents, extents), 1, &extent_list_description },
+ { XD_BLOCK_PTR, offsetof (Stack_Of_Extents, extents), 1,
+ { &extent_list_description } },
{ XD_END }
};
@@ -1095,9 +1099,9 @@
static const struct memory_description extent_info_description [] = {
{ XD_BLOCK_PTR, offsetof (struct extent_info, extents), 1,
- &extent_list_description },
+ { &extent_list_description } },
{ XD_BLOCK_PTR, offsetof (struct extent_info, soe), 1,
- &stack_of_extents_description, XD_FLAG_NO_KKCC },
+ { &stack_of_extents_description }, XD_FLAG_NO_KKCC },
{ XD_END }
};
1.44 +13 -10 XEmacs/xemacs/src/file-coding.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: file-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/file-coding.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- file-coding.c 2005/01/29 09:06:40 1.43
+++ file-coding.c 2005/02/03 16:14:06 1.44
@@ -106,7 +106,8 @@
static coding_system_type_entry_dynarr *the_coding_system_type_entry_dynarr;
static const struct memory_description cste_description_1[] = {
- { XD_BLOCK_PTR, offsetof (coding_system_type_entry, meths), 1, &coding_system_methods_description },
+ { XD_BLOCK_PTR, offsetof (coding_system_type_entry, meths), 1,
+ { &coding_system_methods_description } },
{ XD_END }
};
@@ -171,7 +172,7 @@
=
{
{ XD_BLOCK_PTR, offsetof (struct detector, cats), 1,
- &detector_category_dynarr_description },
+ { &detector_category_dynarr_description } },
{ XD_END }
};
@@ -346,13 +347,13 @@
static const struct memory_description coding_system_description[] =
{
{ XD_BLOCK_PTR, offsetof (Lisp_Coding_System, methods), 1,
- &coding_system_methods_description },
+ { &coding_system_methods_description } },
#define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, x) },
#define MARKED_SLOT_ARRAY(slot, size) \
{ XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Coding_System, slot), size },
#include "coding-system-slots.h"
{ XD_BLOCK_ARRAY, offsetof (Lisp_Coding_System, data), 1,
- coding_system_extra_description_map },
+ { coding_system_extra_description_map } },
{ XD_END }
};
@@ -1727,8 +1728,10 @@
extern const struct sized_memory_description undecided_coding_stream_description;
static const struct memory_description coding_stream_data_description_1 []= {
- { XD_BLOCK_PTR, chain_coding_system, 1, &chain_coding_stream_description},
- { XD_BLOCK_PTR, undecided_coding_system, 1, &undecided_coding_stream_description},
+ { XD_BLOCK_PTR, chain_coding_system, 1,
+ { &chain_coding_stream_description } },
+ { XD_BLOCK_PTR, undecided_coding_system, 1,
+ { &undecided_coding_stream_description } },
{ XD_END }
};
@@ -1742,7 +1745,7 @@
{ XD_LISP_OBJECT, offsetof (struct coding_stream, codesys) },
{ XD_LISP_OBJECT, offsetof (struct coding_stream, other_end) },
{ XD_UNION, offsetof (struct coding_stream, data),
- XD_INDIRECT (0, 0), &coding_stream_data_description },
+ XD_INDIRECT (0, 0), { &coding_stream_data_description } },
{ XD_END }
};
@@ -2330,7 +2333,7 @@
static const struct memory_description chain_coding_system_description[] = {
{ XD_INT, offsetof (struct chain_coding_system, count) },
{ XD_BLOCK_PTR, offsetof (struct chain_coding_system, chain),
- XD_INDIRECT (0, 0), &lisp_object_description },
+ XD_INDIRECT (0, 0), { &lisp_object_description } },
{ XD_LISP_OBJECT, offsetof (struct chain_coding_system,
canonicalize_after_coding) },
{ XD_END }
@@ -2339,7 +2342,7 @@
static const struct memory_description chain_coding_stream_description_1 [] = {
{ XD_INT, offsetof (struct chain_coding_stream, lstream_count) },
{ XD_BLOCK_PTR, offsetof (struct chain_coding_stream, lstreams),
- XD_INDIRECT (0, 0), &lisp_object_description },
+ XD_INDIRECT (0, 0), { &lisp_object_description } },
{ XD_END }
};
@@ -3085,7 +3088,7 @@
static const struct memory_description undecided_coding_stream_description_1 [] = {
{ XD_LISP_OBJECT, offsetof (struct undecided_coding_stream, actual) },
{ XD_BLOCK_ARRAY, offsetof (struct undecided_coding_stream, c),
- 1, &chain_coding_stream_description },
+ 1, { &chain_coding_stream_description } },
{ XD_END }
};
1.67 +11 -11 XEmacs/xemacs/src/frame.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: frame.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- frame.c 2005/01/24 23:33:56 1.66
+++ frame.c 2005/02/03 16:14:06 1.67
@@ -144,13 +144,13 @@
static const struct memory_description frame_data_description_1 []= {
#ifdef HAVE_GTK
- { XD_BLOCK_PTR, gtk_console, 1, >k_frame_data_description},
+ { XD_BLOCK_PTR, gtk_console, 1, { >k_frame_data_description} },
#endif
#ifdef HAVE_MS_WINDOWS
- { XD_BLOCK_PTR, mswindows_console, 1, &mswindows_frame_data_description},
+ { XD_BLOCK_PTR, mswindows_console, 1, { &mswindows_frame_data_description} },
#endif
#ifdef HAVE_X_WINDOWS
- { XD_BLOCK_PTR, x_console, 1, &x_frame_data_description},
+ { XD_BLOCK_PTR, x_console, 1, { &x_frame_data_description} },
#endif
{ XD_END }
};
@@ -163,7 +163,7 @@
static const struct memory_description expose_ignore_description_1 [] = {
{ XD_BLOCK_PTR, offsetof (struct expose_ignore, next),
- 1, &expose_ignore_description },
+ 1, { &expose_ignore_description } },
{ XD_END }
};
@@ -173,7 +173,7 @@
};
static const struct memory_description display_line_dynarr_pointer_description_1 []= {
- { XD_BLOCK_PTR, 0, 1, &display_line_dynarr_description},
+ { XD_BLOCK_PTR, 0, 1, { &display_line_dynarr_description} },
{ XD_END }
};
@@ -189,9 +189,9 @@
#include "frameslots.h"
{ XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures),
- 1, &expose_ignore_description },
+ 1, { &expose_ignore_description } },
{ XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures_tail),
- 1, &expose_ignore_description },
+ 1, { &expose_ignore_description } },
#ifdef HAVE_SCROLLBARS
{ XD_LISP_OBJECT, offsetof (struct frame, sb_vcache) },
@@ -199,14 +199,14 @@
#endif /* HAVE_SCROLLBARS */
{ XD_BLOCK_ARRAY, offsetof (struct frame, current_display_lines),
- 4, &display_line_dynarr_pointer_description },
+ 4, { &display_line_dynarr_pointer_description } },
{ XD_BLOCK_ARRAY, offsetof (struct frame, desired_display_lines),
- 4, &display_line_dynarr_pointer_description },
+ 4, { &display_line_dynarr_pointer_description } },
{ XD_BLOCK_PTR, offsetof (struct frame, framemeths), 1,
- &console_methods_description },
+ { &console_methods_description } },
{ XD_UNION, offsetof (struct frame, frame_data),
- XD_INDIRECT (0, 0), &frame_data_description },
+ XD_INDIRECT (0, 0), { &frame_data_description } },
{ XD_END }
};
1.51 +11 -8 XEmacs/xemacs/src/glyphs.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- glyphs.c 2005/01/28 02:36:25 1.50
+++ glyphs.c 2005/02/03 16:14:06 1.51
@@ -876,13 +876,13 @@
static const struct memory_description image_instance_data_description_1 [] = {
{ XD_BLOCK_ARRAY, IMAGE_TEXT,
- 1, &text_image_instance_description },
+ 1, { &text_image_instance_description } },
{ XD_BLOCK_ARRAY, IMAGE_MONO_PIXMAP,
- 1, &pixmap_image_instance_description },
+ 1, { &pixmap_image_instance_description } },
{ XD_BLOCK_ARRAY, IMAGE_COLOR_PIXMAP,
- 1, &pixmap_image_instance_description },
+ 1, { &pixmap_image_instance_description } },
{ XD_BLOCK_ARRAY, IMAGE_WIDGET,
- 1, &subwindow_image_instance_description },
+ 1, { &subwindow_image_instance_description } },
{ XD_END }
};
@@ -898,7 +898,7 @@
{ XD_LISP_OBJECT, offsetof (Lisp_Image_Instance, parent) },
{ XD_LISP_OBJECT, offsetof (Lisp_Image_Instance, instantiator) },
{ XD_UNION, offsetof (struct Lisp_Image_Instance, u),
- XD_INDIRECT (0, 0), &image_instance_data_description },
+ XD_INDIRECT (0, 0), { &image_instance_data_description } },
{ XD_END }
};
@@ -5264,7 +5264,8 @@
static const struct memory_description iife_description_1[] = {
{ XD_LISP_OBJECT, offsetof (image_instantiator_format_entry, symbol) },
{ XD_LISP_OBJECT, offsetof (image_instantiator_format_entry, device) },
- { XD_BLOCK_PTR, offsetof (image_instantiator_format_entry, meths), 1, &iim_description },
+ { XD_BLOCK_PTR, offsetof (image_instantiator_format_entry, meths), 1,
+ { &iim_description } },
{ XD_END }
};
@@ -5286,8 +5287,10 @@
static const struct memory_description iim_description_1[] = {
{ XD_LISP_OBJECT, offsetof (struct image_instantiator_methods, symbol) },
{ XD_LISP_OBJECT, offsetof (struct image_instantiator_methods, device) },
- { XD_BLOCK_PTR, offsetof (struct image_instantiator_methods, keywords), 1, &iiked_description },
- { XD_BLOCK_PTR, offsetof (struct image_instantiator_methods, consoles), 1, &cted_description },
+ { XD_BLOCK_PTR, offsetof (struct image_instantiator_methods, keywords), 1,
+ { &iiked_description } },
+ { XD_BLOCK_PTR, offsetof (struct image_instantiator_methods, consoles), 1,
+ { &cted_description } },
{ XD_END }
};
1.36 +60 -8 XEmacs/xemacs/src/lrecord.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: lrecord.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lrecord.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- lrecord.h 2005/01/26 10:22:26 1.35
+++ lrecord.h 2005/02/03 16:14:07 1.36
@@ -505,7 +505,7 @@
...
{ XD_INT, offsetof (Lisp_Foo, count) },
{ XD_BLOCK_PTR, offsetof (Lisp_Foo, objects),
- XD_INDIRECT (0, 0), &lisp_object_description },
+ XD_INDIRECT (0, 0), { &lisp_object_description } },
...
};
@@ -560,7 +560,7 @@
const struct memory_description hash_table_description[] = {
{ XD_ELEMCOUNT, offsetof (Lisp_Hash_Table, size) },
{ XD_BLOCK_PTR, offsetof (Lisp_Hash_Table, hentries), XD_INDIRECT (0, 1),
- &htentry_description },
+ { &htentry_description } },
{ XD_LO_LINK, offsetof (Lisp_Hash_Table, next_weak) },
{ XD_END }
};
@@ -580,7 +580,7 @@
const struct memory_description specifier_description[] = {
...
{ XD_BLOCK_ARRAY, offset (Lisp_Specifier, data), 1,
- specifier_extra_description_map },
+ { specifier_extra_description_map } },
...
{ XD_END }
};
@@ -648,6 +648,18 @@
Pointer to undumpable data. Must be NULL when dumping.
+ XD_OPAQUE_PTR_CONVERTIBLE
+
+ Pointer to data which is not directly dumpable but can be converted
+ to a dumpable, opaque external representation. The parameter is
+ a pointer to an opaque_convert_functions struct.
+
+ XD_OPAQUE_DATA_CONVERTIBLE
+
+ Data which is not directly dumpable but can be converted to a
+ dumpable, opaque external representation. The parameter is a
+ pointer to an opaque_convert_functions struct.
+
XD_BLOCK_PTR
Pointer to block of described memory. (This is misnamed: It is NOT
@@ -786,9 +798,11 @@
XD_LISP_OBJECT,
XD_LO_LINK,
XD_OPAQUE_PTR,
+ XD_OPAQUE_PTR_CONVERTIBLE,
+ XD_OPAQUE_DATA_CONVERTIBLE,
+ XD_OPAQUE_DATA_PTR,
XD_BLOCK_PTR,
XD_BLOCK_ARRAY,
- XD_OPAQUE_DATA_PTR,
XD_UNION,
XD_UNION_DYNAMIC_SIZE,
XD_ASCII_STRING,
@@ -847,12 +861,21 @@
#endif
};
+union memory_contents_description
+{
+ /* The first element is used by static initializers only. We always read
+ from one of the other two pointers. */
+ const void *write_only;
+ const struct sized_memory_description *descr;
+ const struct opaque_convert_functions *funcs;
+};
+
struct memory_description
{
enum memory_description_type type;
Bytecount offset;
EMACS_INT data1;
- const struct sized_memory_description *data2;
+ union memory_contents_description data2;
/* Indicates which subsystems process this entry, plus (potentially) other
flags that apply to this entry. */
int flags;
@@ -864,6 +887,36 @@
const struct memory_description *description;
};
+
+struct opaque_convert_functions
+{
+ /* Used by XD_OPAQUE_PTR_CONVERTIBLE and
+ XD_OPAQUE_DATA_CONVERTIBLE */
+
+ /* Converter to external representation, for those objects from
+ external libraries that can't be directly dumped as opaque data
+ because they contain pointers. This is called at dump time to
+ convert to an opaque, pointer-less representation.
+
+ This function must put a pointer to the opaque result in *data
+ and its size in *size. */
+ void (*convert)(const void *object, void **data, Bytecount *size);
+
+ /* Post-conversion cleanup. Optional (null if not provided).
+
+ When provided it will be called post-dumping to free any storage
+ allocated for the conversion results. */
+ void (*convert_free)(const void *object, void *data, Bytecount size);
+
+ /* De-conversion.
+
+ At reload time, rebuilds the object from the converted form.
+ "object" is 0 for the PTR case, return is ignored in the DATA
+ case. */
+ void *(*deconvert)(void *object, void *data, Bytecount size);
+
+};
+
extern const struct sized_memory_description lisp_object_description;
#define XD_INDIRECT(val, delta) (-1 - (Bytecount) ((val) | ((delta) << 8)))
@@ -873,11 +926,10 @@
#define XD_INDIRECT_DELTA(code) ((-1 - (code)) >> 8)
#define XD_DYNARR_DESC(base_type, sub_desc) \
- { XD_BLOCK_PTR, offsetof (base_type, base), XD_INDIRECT(1, 0), sub_desc }, \
+ { XD_BLOCK_PTR, offsetof (base_type, base), XD_INDIRECT(1, 0), {sub_desc} },\
{ XD_INT, offsetof (base_type, cur) }, \
{ XD_INT_RESET, offsetof (base_type, max), XD_INDIRECT(1, 0) } \
-
/* DEFINE_LRECORD_IMPLEMENTATION is for objects with constant size.
DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION is for objects whose size varies.
*/
@@ -1605,7 +1657,7 @@
EMACS_INT variant = lispdesc_indirect_count (desc1->data1, desc,
data);
desc1 =
- lispdesc_indirect_description (data, desc1->data2)->description;
+ lispdesc_indirect_description (data, desc1->data2.descr)->description;
for (count = 0; desc1[count].type != XD_END; count++)
{
1.33 +2 -2 XEmacs/xemacs/src/lstream.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: lstream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lstream.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- lstream.c 2005/01/24 23:34:02 1.32
+++ lstream.c 2005/02/03 16:14:07 1.33
@@ -135,9 +135,9 @@
static const struct memory_description lstream_description[] =
{
{ XD_BLOCK_PTR, offsetof (Lstream, imp), 1,
- &lstream_implementation_description },
+ { &lstream_implementation_description } },
{ XD_BLOCK_ARRAY, offsetof (Lstream, data), 1,
- lstream_extra_description_map },
+ { lstream_extra_description_map } },
{ XD_END }
};
1.16 +2 -2 XEmacs/xemacs/src/marker.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: marker.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/marker.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- marker.c 2005/01/26 10:22:26 1.15
+++ marker.c 2005/02/03 16:14:07 1.16
@@ -98,8 +98,8 @@
}
static const struct memory_description marker_description[] = {
- { XD_LISP_OBJECT, offsetof (Lisp_Marker, next), 0, 0, XD_FLAG_NO_KKCC },
- { XD_LISP_OBJECT, offsetof (Lisp_Marker, prev), 0, 0, XD_FLAG_NO_KKCC },
+ { XD_LISP_OBJECT, offsetof (Lisp_Marker, next), 0, { 0 }, XD_FLAG_NO_KKCC },
+ { XD_LISP_OBJECT, offsetof (Lisp_Marker, prev), 0, { 0 }, XD_FLAG_NO_KKCC },
{ XD_LISP_OBJECT, offsetof (Lisp_Marker, buffer) },
{ XD_END }
};
1.41 +2 -2 XEmacs/xemacs/src/mule-charset.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: mule-charset.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-charset.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- mule-charset.c 2004/11/04 23:06:42 1.40
+++ mule-charset.c 2005/02/03 16:14:07 1.41
@@ -173,9 +173,9 @@
{ XD_LISP_OBJECT, offsetof (Lisp_Charset, reverse_direction_charset) },
{ XD_LISP_OBJECT, offsetof (Lisp_Charset, ccl_program) },
{ XD_UNION, offsetof (Lisp_Charset, to_unicode_table),
- XD_INDIRECT (0, 0), &to_unicode_description },
+ XD_INDIRECT (0, 0), { &to_unicode_description } },
{ XD_UNION, offsetof (Lisp_Charset, from_unicode_table),
- XD_INDIRECT (1, 0), &from_unicode_description },
+ XD_INDIRECT (1, 0), { &from_unicode_description } },
{ XD_END }
};
1.34 +2 -2 XEmacs/xemacs/src/mule-coding.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: mule-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-coding.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- mule-coding.c 2005/01/24 23:34:04 1.33
+++ mule-coding.c 2005/02/03 16:14:07 1.34
@@ -953,9 +953,9 @@
{ XD_LISP_OBJECT_ARRAY, offsetof (struct iso2022_coding_system,
initial_charset), 4 },
{ XD_BLOCK_PTR, offsetof (struct iso2022_coding_system, input_conv),
- 1, &ccsd_description },
+ 1, { &ccsd_description } },
{ XD_BLOCK_PTR, offsetof (struct iso2022_coding_system, output_conv),
- 1, &ccsd_description },
+ 1, { &ccsd_description } },
{ XD_END }
};
1.3 +1 -0 XEmacs/xemacs/src/number-gmp.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: number-gmp.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/number-gmp.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- number-gmp.h 2004/09/20 19:19:53 1.2
+++ number-gmp.h 2005/02/03 16:14:07 1.3
@@ -152,6 +152,7 @@
#define ratio_set_bigfloat(r,f) mpq_set_f (r, f)
#define ratio_set_long_ulong(r,num,den) mpq_set_si (r, num, den)
#define ratio_set_ulong_ulong(r,num,den) mpq_set_ui (r, num, den)
+/* FIXME: Why does this canonicalize, but the previous 2 don't? */
#define ratio_set_bignum_bignum(r,num,den) do { \
mpz_set (mpq_numref (r), num); \
mpz_set (mpq_denref (r), den); \
1.14 +33 -7 XEmacs/xemacs/src/number.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: number.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/number.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- number.c 2005/01/24 23:34:04 1.13
+++ number.c 2005/02/03 16:14:07 1.14
@@ -64,12 +64,43 @@
return bignum_hashcode (XBIGNUM_DATA (obj));
}
+static void
+bignum_convert (const void *object, void **data, Bytecount *size)
+{
+ CIbyte *bstr = bignum_to_string (*(bignum *)object, 10);
+ *data = bstr;
+ *size = strlen(bstr)+1;
+}
+
+static void
+bignum_convfree (const void * UNUSED (object), void *data,
+ Bytecount UNUSED (size))
+{
+ xfree (data, void *);
+}
+
+static void *
+bignum_deconvert (void *object, void *data, Bytecount UNUSED (size))
+{
+ bignum *b = (bignum *) object;
+ bignum_init(*b);
+ bignum_set_string(*b, (const char *) data, 10);
+ return object;
+}
+
+static const struct opaque_convert_functions bignum_opc = {
+ bignum_convert,
+ bignum_convfree,
+ bignum_deconvert
+};
+
static const struct memory_description bignum_description[] = {
- { XD_OPAQUE_PTR, offsetof (Lisp_Bignum, data) },
+ { XD_OPAQUE_DATA_CONVERTIBLE, offsetof (Lisp_Bignum, data),
+ 0, { &bignum_opc }, XD_FLAG_NO_KKCC },
{ XD_END }
};
-DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bignum", bignum, 0, 0, bignum_print,
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bignum", bignum, 1, 0, bignum_print,
0, bignum_equal, bignum_hash,
bignum_description, Lisp_Bignum);
@@ -770,13 +801,8 @@
#ifdef HAVE_BIGFLOAT
#ifdef HAVE_BIGNUM
- /* Uncomment the next two lines and remove the line below them when dumping
- bignums becomes possible. */
- /*
Vbigfloat_max_prec = make_bignum (0L);
bignum_set_ulong (XBIGNUM_DATA (Vbigfloat_max_prec), ULONG_MAX);
- */
- Vbigfloat_max_prec = make_int (EMACS_INT_MAX);
#else
Vbigfloat_max_prec = make_int (EMACS_INT_MAX);
#endif
1.27 +4 -4 XEmacs/xemacs/src/objects.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: objects.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- objects.c 2005/01/28 02:58:52 1.26
+++ objects.c 2005/02/03 16:14:07 1.27
@@ -63,7 +63,7 @@
static const struct memory_description color_instance_data_description_1 []= {
#ifdef HAVE_TTY
- { XD_BLOCK_PTR, tty_console, 1, &tty_color_instance_data_description},
+ { XD_BLOCK_PTR, tty_console, 1, { &tty_color_instance_data_description } },
#endif
{ XD_END }
};
@@ -77,7 +77,7 @@
{ XD_LISP_OBJECT, offsetof (Lisp_Color_Instance, name)},
{ XD_LISP_OBJECT, offsetof (Lisp_Color_Instance, device)},
{ XD_UNION, offsetof (Lisp_Color_Instance, data),
- XD_INDIRECT (0, 0), &color_instance_data_description },
+ XD_INDIRECT (0, 0), { &color_instance_data_description } },
{XD_END}
};
@@ -272,7 +272,7 @@
static const struct memory_description font_instance_data_description_1 []= {
#ifdef HAVE_TTY
- { XD_BLOCK_PTR, tty_console, 1, &tty_font_instance_data_description},
+ { XD_BLOCK_PTR, tty_console, 1, { &tty_font_instance_data_description} },
#endif
{ XD_END }
};
@@ -287,7 +287,7 @@
{ XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, truename)},
{ XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, device)},
{ XD_UNION, offsetof (Lisp_Font_Instance, data),
- XD_INDIRECT (0, 0), &font_instance_data_description },
+ XD_INDIRECT (0, 0), { &font_instance_data_description } },
{ XD_END }
};
1.24 +1 -1 XEmacs/xemacs/src/profile.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: profile.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/profile.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- profile.c 2005/01/26 10:09:20 1.23
+++ profile.c 2005/02/03 16:14:08 1.24
@@ -109,7 +109,7 @@
static const struct memory_description plain_hash_table_description_1[] = {
{ XD_ELEMCOUNT, offsetof (struct hash_table, size) },
{ XD_BLOCK_PTR, offsetof (struct hash_table, harray), XD_INDIRECT (0, 0),
- &hentry_description },
+ { &hentry_description } },
{ XD_END }
};
1.22 +2 -1 XEmacs/xemacs/src/rangetab.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: rangetab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/rangetab.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- rangetab.c 2005/01/26 10:22:28 1.21
+++ rangetab.c 2005/02/03 16:14:08 1.22
@@ -214,7 +214,8 @@
};
static const struct memory_description range_table_description[] = {
- { XD_BLOCK_PTR, offsetof (Lisp_Range_Table, entries), 1, &rted_description },
+ { XD_BLOCK_PTR, offsetof (Lisp_Range_Table, entries), 1,
+ { &rted_description } },
{ XD_END }
};
1.95 +6 -6 XEmacs/xemacs/src/redisplay.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: redisplay.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- redisplay.c 2005/01/26 10:33:41 1.94
+++ redisplay.c 2005/02/03 16:14:08 1.95
@@ -522,7 +522,7 @@
};
static const struct memory_description rune_object_description_1[] = {
- { XD_BLOCK_ARRAY, RUNE_DGLYPH, 1, &rune_dglyph_description },
+ { XD_BLOCK_ARRAY, RUNE_DGLYPH, 1, { &rune_dglyph_description } },
{ XD_END }
};
@@ -533,7 +533,7 @@
static const struct memory_description rune_description_1[] = {
{ XD_INT, offsetof (rune, type) },
{ XD_UNION, offsetof (rune, object),
- XD_INDIRECT (0, 0), &rune_object_description },
+ XD_INDIRECT (0, 0), { &rune_object_description } },
{ XD_END }
};
@@ -554,7 +554,7 @@
static const struct memory_description display_block_description_1[] = {
{ XD_BLOCK_PTR, offsetof (display_block, runes),
- 1, &rune_dynarr_description },
+ 1, { &rune_dynarr_description } },
{ XD_END }
};
@@ -596,11 +596,11 @@
static const struct memory_description display_line_description_1[] = {
{ XD_BLOCK_PTR, offsetof (display_line, display_blocks),
- 1, &display_block_dynarr_description },
+ 1, { &display_block_dynarr_description } },
{ XD_BLOCK_PTR, offsetof (display_line, left_glyphs),
- 1, &glyph_block_dynarr_description },
+ 1, { &glyph_block_dynarr_description } },
{ XD_BLOCK_PTR, offsetof (display_line, right_glyphs),
- 1, &glyph_block_dynarr_description },
+ 1, { &glyph_block_dynarr_description } },
{ XD_END }
};
1.39 +4 -4 XEmacs/xemacs/src/specifier.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: specifier.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/specifier.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- specifier.c 2005/01/26 10:22:28 1.38
+++ specifier.c 2005/02/03 16:14:08 1.39
@@ -66,7 +66,7 @@
static const struct memory_description ste_description_1[] = {
{ XD_LISP_OBJECT, offsetof (specifier_type_entry, symbol) },
{ XD_BLOCK_PTR, offsetof (specifier_type_entry, meths), 1,
- &specifier_methods_description },
+ { &specifier_methods_description } },
{ XD_END }
};
@@ -397,7 +397,7 @@
const struct memory_description specifier_description[] = {
{ XD_BLOCK_PTR, offsetof (Lisp_Specifier, methods), 1,
- &specifier_methods_description },
+ { &specifier_methods_description } },
{ XD_LO_LINK, offsetof (Lisp_Specifier, next_specifier) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, global_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, device_specs) },
@@ -405,11 +405,11 @@
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, window_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, buffer_specs) },
{ XD_BLOCK_PTR, offsetof (Lisp_Specifier, caching), 1,
- &specifier_caching_description },
+ { &specifier_caching_description } },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, magic_parent) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, fallback) },
{ XD_BLOCK_ARRAY, offsetof (Lisp_Specifier, data), 1,
- specifier_extra_description_map },
+ { specifier_extra_description_map } },
{ XD_END }
};
1.25 +12 -12 XEmacs/xemacs/src/unicode.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: unicode.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unicode.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- unicode.c 2005/01/24 23:34:13 1.24
+++ unicode.c 2005/02/03 16:14:08 1.25
@@ -224,7 +224,7 @@
};
static const struct memory_description to_unicode_level_1_desc_1[] = {
- { XD_BLOCK_PTR, 0, 96, &to_unicode_level_0_desc },
+ { XD_BLOCK_PTR, 0, 96, { &to_unicode_level_0_desc } },
{ XD_END }
};
@@ -233,8 +233,8 @@
};
static const struct memory_description to_unicode_description_1[] = {
- { XD_BLOCK_PTR, 1, 96, &to_unicode_level_0_desc },
- { XD_BLOCK_PTR, 2, 96, &to_unicode_level_1_desc },
+ { XD_BLOCK_PTR, 1, 96, { &to_unicode_level_0_desc } },
+ { XD_BLOCK_PTR, 2, 96, { &to_unicode_level_1_desc } },
{ XD_END }
};
@@ -246,7 +246,7 @@
/* Used only for to_unicode_blank_2 */
static const struct memory_description to_unicode_level_2_desc_1[] = {
- { XD_BLOCK_PTR, 0, 96, &to_unicode_level_1_desc },
+ { XD_BLOCK_PTR, 0, 96, { &to_unicode_level_1_desc } },
{ XD_END }
};
@@ -259,7 +259,7 @@
};
static const struct memory_description from_unicode_level_1_desc_1[] = {
- { XD_BLOCK_PTR, 0, 256, &from_unicode_level_0_desc },
+ { XD_BLOCK_PTR, 0, 256, { &from_unicode_level_0_desc } },
{ XD_END }
};
@@ -268,7 +268,7 @@
};
static const struct memory_description from_unicode_level_2_desc_1[] = {
- { XD_BLOCK_PTR, 0, 256, &from_unicode_level_1_desc },
+ { XD_BLOCK_PTR, 0, 256, { &from_unicode_level_1_desc } },
{ XD_END }
};
@@ -277,7 +277,7 @@
};
static const struct memory_description from_unicode_level_3_desc_1[] = {
- { XD_BLOCK_PTR, 0, 256, &from_unicode_level_2_desc },
+ { XD_BLOCK_PTR, 0, 256, { &from_unicode_level_2_desc } },
{ XD_END }
};
@@ -286,10 +286,10 @@
};
static const struct memory_description from_unicode_description_1[] = {
- { XD_BLOCK_PTR, 1, 256, &from_unicode_level_0_desc },
- { XD_BLOCK_PTR, 2, 256, &from_unicode_level_1_desc },
- { XD_BLOCK_PTR, 3, 256, &from_unicode_level_2_desc },
- { XD_BLOCK_PTR, 4, 256, &from_unicode_level_3_desc },
+ { XD_BLOCK_PTR, 1, 256, { &from_unicode_level_0_desc } },
+ { XD_BLOCK_PTR, 2, 256, { &from_unicode_level_1_desc } },
+ { XD_BLOCK_PTR, 3, 256, { &from_unicode_level_2_desc } },
+ { XD_BLOCK_PTR, 4, 256, { &from_unicode_level_3_desc } },
{ XD_END }
};
@@ -301,7 +301,7 @@
/* Used only for from_unicode_blank_4 */
static const struct memory_description from_unicode_level_4_desc_1[] = {
- { XD_BLOCK_PTR, 0, 256, &from_unicode_level_3_desc },
+ { XD_BLOCK_PTR, 0, 256, { &from_unicode_level_3_desc } },
{ XD_END }
};
1.83 +6 -6 XEmacs/xemacs/src/window.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: window.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- window.c 2005/01/24 23:34:13 1.82
+++ window.c 2005/02/03 16:14:08 1.83
@@ -171,7 +171,7 @@
static const struct memory_description face_cachel_description_1[] = {
{ XD_BLOCK_PTR, offsetof (face_cachel, merged_faces),
- 1, &int_dynarr_description },
+ 1, { &int_dynarr_description } },
{ XD_LISP_OBJECT, offsetof (face_cachel, face) },
{ XD_LISP_OBJECT, offsetof (face_cachel, foreground) },
{ XD_LISP_OBJECT, offsetof (face_cachel, background) },
@@ -242,11 +242,11 @@
#include "winslots.h"
{ XD_BLOCK_PTR, offsetof (struct window, face_cachels),
- 1, &face_cachel_dynarr_description },
+ 1, { &face_cachel_dynarr_description } },
{ XD_BLOCK_PTR, offsetof (struct window, glyph_cachels),
- 1, &glyph_cachel_dynarr_description },
+ 1, { &glyph_cachel_dynarr_description } },
{ XD_BLOCK_PTR, offsetof (struct window, line_start_cache),
- 1, &line_start_cache_dynarr_description },
+ 1, { &line_start_cache_dynarr_description } },
{ XD_END }
};
@@ -423,9 +423,9 @@
{ XD_LISP_OBJECT, offsetof (struct window_mirror, vchild) },
{ XD_BLOCK_PTR, offsetof (struct window_mirror, current_display_lines),
- 1, &display_line_dynarr_description },
+ 1, { &display_line_dynarr_description } },
{ XD_BLOCK_PTR, offsetof (struct window_mirror, desired_display_lines),
- 1, &display_line_dynarr_description },
+ 1, { &display_line_dynarr_description } },
{ XD_LISP_OBJECT, offsetof (struct window_mirror, buffer) },