diff options
| author | Karoly Lorentey | 2003-12-28 16:05:28 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2003-12-28 16:05:28 +0000 |
| commit | 8ed48c277afad174675b3d6dcb8e7b00a4bcc97d (patch) | |
| tree | 53d9baa35f9420264e2f53ad4db850c400c3e2c6 /src/xfaces.c | |
| parent | 2e7f2ec031f1708b80df9dc1f60f6b1cb24a5c02 (diff) | |
| parent | 69348b2a71cbabeb23e3b7d5dce354c5bc4bd311 (diff) | |
| download | emacs-8ed48c277afad174675b3d6dcb8e7b00a4bcc97d.tar.gz emacs-8ed48c277afad174675b3d6dcb8e7b00a4bcc97d.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-1
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-2
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-3
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-17
Diffstat (limited to 'src/xfaces.c')
| -rw-r--r-- | src/xfaces.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index fecd8e546cf..84d49e30a9b 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5579,12 +5579,19 @@ cache_face (c, face, hash) | |||
| 5579 | face->id = i; | 5579 | face->id = i; |
| 5580 | 5580 | ||
| 5581 | /* Maybe enlarge C->faces_by_id. */ | 5581 | /* Maybe enlarge C->faces_by_id. */ |
| 5582 | if (i == c->used && c->used == c->size) | 5582 | if (i == c->used) |
| 5583 | { | 5583 | { |
| 5584 | int new_size = 2 * c->size; | 5584 | if (c->used == c->size) |
| 5585 | int sz = new_size * sizeof *c->faces_by_id; | 5585 | { |
| 5586 | c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz); | 5586 | int new_size, sz; |
| 5587 | c->size = new_size; | 5587 | new_size = min (2 * c->size, MAX_FACE_ID); |
| 5588 | if (new_size == c->size) | ||
| 5589 | abort (); /* Alternatives? ++kfs */ | ||
| 5590 | sz = new_size * sizeof *c->faces_by_id; | ||
| 5591 | c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz); | ||
| 5592 | c->size = new_size; | ||
| 5593 | } | ||
| 5594 | c->used++; | ||
| 5588 | } | 5595 | } |
| 5589 | 5596 | ||
| 5590 | #if GLYPH_DEBUG | 5597 | #if GLYPH_DEBUG |
| @@ -5603,8 +5610,6 @@ cache_face (c, face, hash) | |||
| 5603 | #endif /* GLYPH_DEBUG */ | 5610 | #endif /* GLYPH_DEBUG */ |
| 5604 | 5611 | ||
| 5605 | c->faces_by_id[i] = face; | 5612 | c->faces_by_id[i] = face; |
| 5606 | if (i == c->used) | ||
| 5607 | ++c->used; | ||
| 5608 | } | 5613 | } |
| 5609 | 5614 | ||
| 5610 | 5615 | ||