diff options
| author | Kim F. Storm | 2008-02-27 22:48:44 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2008-02-27 22:48:44 +0000 |
| commit | 652df850a1ab6d8aeb3ab5461c75235d000cb67e (patch) | |
| tree | acd1a44d001094c6378bf12dcc5b745efebed56a | |
| parent | b6d898a2052fbad8a0e1d20251c2c082a5b52805 (diff) | |
| download | emacs-652df850a1ab6d8aeb3ab5461c75235d000cb67e.tar.gz emacs-652df850a1ab6d8aeb3ab5461c75235d000cb67e.zip | |
(CHAR_GLYPH_SPACE_P): Simplify.
(GLYPH_FROM_CHAR_GLYPH): Replace macro by ...
(SET_GLYPH_FROM_CHAR_GLYPH): ... this macro. Change users.
(GLYPH_INVALID_P): New macro.
(spec_glyph_lookup_face): Update prototype.
| -rw-r--r-- | src/dispextern.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 642bd97d6a2..f592d8752a7 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -418,7 +418,7 @@ struct glyph | |||
| 418 | /* Is GLYPH a space? */ | 418 | /* Is GLYPH a space? */ |
| 419 | 419 | ||
| 420 | #define CHAR_GLYPH_SPACE_P(GLYPH) \ | 420 | #define CHAR_GLYPH_SPACE_P(GLYPH) \ |
| 421 | (GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH) | 421 | ((GLYPH).u.ch == SPACEGLYPH) |
| 422 | 422 | ||
| 423 | /* Are glyph slices of glyphs *X and *Y equal */ | 423 | /* Are glyph slices of glyphs *X and *Y equal */ |
| 424 | 424 | ||
| @@ -465,18 +465,25 @@ struct glyph | |||
| 465 | 465 | ||
| 466 | #define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM) \ | 466 | #define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM) \ |
| 467 | SET_CHAR_GLYPH ((GLYPH), \ | 467 | SET_CHAR_GLYPH ((GLYPH), \ |
| 468 | FAST_GLYPH_CHAR ((FROM)), \ | 468 | GLYPH_CHAR ((FROM)), \ |
| 469 | FAST_GLYPH_FACE ((FROM)), \ | 469 | GLYPH_FACE ((FROM)), \ |
| 470 | 0) | 470 | 0) |
| 471 | 471 | ||
| 472 | /* Construct a glyph code from a character glyph GLYPH. If the | 472 | /* Construct a glyph code from a character glyph GLYPH. If the |
| 473 | character is multibyte, return -1 as we can't use glyph table for a | 473 | character is multibyte, return -1 as we can't use glyph table for a |
| 474 | multibyte character. */ | 474 | multibyte character. */ |
| 475 | 475 | ||
| 476 | #define GLYPH_FROM_CHAR_GLYPH(GLYPH) \ | 476 | #define SET_GLYPH_FROM_CHAR_GLYPH(G, GLYPH) \ |
| 477 | ((GLYPH).u.ch < 256 \ | 477 | do \ |
| 478 | ? ((GLYPH).u.ch | ((GLYPH).face_id << CHARACTERBITS)) \ | 478 | { \ |
| 479 | : -1) | 479 | if ((GLYPH).u.ch < 256) \ |
| 480 | SET_GLYPH ((G), (GLYPH).u.ch, ((GLYPH).face_id)); \ | ||
| 481 | else \ | ||
| 482 | SET_GLYPH ((G), -1, 0); \ | ||
| 483 | } \ | ||
| 484 | while (0) | ||
| 485 | |||
| 486 | #define GLYPH_INVALID_P(GLYPH) (GLYPH_CHAR (GLYPH) < 0) | ||
| 480 | 487 | ||
| 481 | /* Is GLYPH a padding glyph? */ | 488 | /* Is GLYPH a padding glyph? */ |
| 482 | 489 | ||
| @@ -3017,7 +3024,7 @@ void bitch_at_user P_ ((void)); | |||
| 3017 | void init_display P_ ((void)); | 3024 | void init_display P_ ((void)); |
| 3018 | void syms_of_display P_ ((void)); | 3025 | void syms_of_display P_ ((void)); |
| 3019 | extern Lisp_Object Qredisplay_dont_pause; | 3026 | extern Lisp_Object Qredisplay_dont_pause; |
| 3020 | GLYPH spec_glyph_lookup_face P_ ((struct window *, GLYPH)); | 3027 | void spec_glyph_lookup_face P_ ((struct window *, GLYPH *)); |
| 3021 | 3028 | ||
| 3022 | /* Defined in terminal.c */ | 3029 | /* Defined in terminal.c */ |
| 3023 | 3030 | ||