/[emacs]/emacs/src/xfaces.c
ViewVC logotype

Diff of /emacs/src/xfaces.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.278 by gm, Thu May 29 17:08:16 2003 UTC revision 1.278.2.1 by fx, Wed Jun 11 11:46:51 2003 UTC
# Line 195  Boston, MA 02111-1307, USA.  */ Line 195  Boston, MA 02111-1307, USA.  */
195  #include <sys/types.h>  #include <sys/types.h>
196  #include <sys/stat.h>  #include <sys/stat.h>
197    
198    #ifdef BOEHM_GC
199    #include <gc.h>
200    #endif
201    
202  #include "lisp.h"  #include "lisp.h"
203  #include "charset.h"  #include "charset.h"
204  #include "keyboard.h"  #include "keyboard.h"
# Line 5007  static struct face * Line 5011  static struct face *
5011  make_realized_face (attr)  make_realized_face (attr)
5012       Lisp_Object *attr;       Lisp_Object *attr;
5013  {  {
5014    struct face *face = (struct face *) xmalloc (sizeof *face);    struct face *face = (struct face *) XGC_CALLOC (1, sizeof *face);
   bzero (face, sizeof *face);  
5015    face->ascii_face = face;    face->ascii_face = face;
5016    bcopy (attr, face->lface, sizeof face->lface);    bcopy (attr, face->lface, sizeof face->lface);
5017    return face;    return face;
# Line 5042  free_realized_face (f, face) Line 5045  free_realized_face (f, face)
5045          }          }
5046  #endif /* HAVE_WINDOW_SYSTEM */  #endif /* HAVE_WINDOW_SYSTEM */
5047    
5048        xfree (face);        XGC_FREE (face);
5049      }      }
5050  }  }
5051    
# Line 5356  make_face_cache (f) Line 5359  make_face_cache (f)
5359    struct face_cache *c;    struct face_cache *c;
5360    int size;    int size;
5361    
5362    c = (struct face_cache *) xmalloc (sizeof *c);    c = (struct face_cache *) XGC_CALLOC (1, sizeof *c);
   bzero (c, sizeof *c);  
5363    size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;    size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
5364    c->buckets = (struct face **) xmalloc (size);    c->buckets = (struct face **) XGC_MALLOC_ATOMIC (size);
5365    bzero (c->buckets, size);    bzero (c->buckets, size);
5366    c->size = 50;    c->size = 50;
5367    c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id);    c->faces_by_id = (struct face **) XGC_MALLOC (c->size * sizeof *c->faces_by_id);
5368    c->f = f;    c->f = f;
5369    c->menu_face_changed_p = menu_face_changed_default;    c->menu_face_changed_p = menu_face_changed_default;
5370    return c;    return c;
# Line 5510  free_face_cache (c) Line 5512  free_face_cache (c)
5512    if (c)    if (c)
5513      {      {
5514        free_realized_faces (c);        free_realized_faces (c);
5515        xfree (c->buckets);        XGC_FREE (c->buckets);
5516        xfree (c->faces_by_id);        XGC_FREE (c->faces_by_id);
5517        xfree (c);        XGC_FREE (c);
5518      }      }
5519  }  }
5520    
# Line 5571  cache_face (c, face, hash) Line 5573  cache_face (c, face, hash)
5573      {      {
5574        int new_size = 2 * c->size;        int new_size = 2 * c->size;
5575        int sz = new_size * sizeof *c->faces_by_id;        int sz = new_size * sizeof *c->faces_by_id;
5576        c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz);        c->faces_by_id = (struct face **) XGC_REALLOC (c->faces_by_id, sz);
5577        c->size = new_size;        c->size = new_size;
5578      }      }
5579    

Legend:
Removed from v.1.278  
changed lines
  Added in v.1.278.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26