Mercurial > emacs
changeset 10652:f6a41cb94a75
[MULTI_PERDISPLAY] (x_term_init): Initialize perdisplay.
[MULTI_PERDISPLAY] (x_delete_display): Destroy perdisplay.
(x_delete_display): Use xfree, not free.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 04 Feb 1995 00:12:17 +0000 |
parents | 47e4c51a0e43 |
children | 8178d81bdebd |
files | src/xterm.c |
diffstat | 1 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Fri Feb 03 23:40:57 1995 +0000 +++ b/src/xterm.c Sat Feb 04 00:12:17 1995 +0000 @@ -5580,6 +5580,12 @@ dpyinfo = (struct x_display_info *) xmalloc (sizeof (struct x_display_info)); +#ifdef MULTI_PERDISPLAY + init_perdisplay (&dpyinfo->perdisplay); + dpyinfo->perdisplay.next_perdisplay = all_perdisplays; + all_perdisplays = &dpyinfo->perdisplay; +#endif + /* Put this display on the chain. */ dpyinfo->next = x_display_list; x_display_list = dpyinfo; @@ -5755,9 +5761,20 @@ /* I'm told Xt does this itself. */ XrmDestroyDatabase (dpyinfo->xrdb); #endif - free (dpyinfo->font_table); - free (dpyinfo->x_id_name); - free (dpyinfo); +#ifdef MULTI_PERDISPLAY + { + PERDISPLAY **perdp; + for (perdp = &all_perdisplays; *perdp != &dpyinfo->perdisplay; + perdp = &(*perdp)->next_perdisplay) + if (*perdp == NULL) + abort (); + *perdp = dpyinfo->perdisplay.next_perdisplay; + } + wipe_perdisplay (&dpyinfo->perdisplay); +#endif + xfree (dpyinfo->font_table); + xfree (dpyinfo->x_id_name); + xfree (dpyinfo); } /* Set up use of X before we make the first connection. */