aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2015-01-16 22:29:10 +0100
committerJoakim Verona2015-01-16 22:29:10 +0100
commit5e2255017323c54feeaaee220175d7761a3b6ed1 (patch)
tree3f843af60b826b63e12482301ce20745a95ede3e /src
parentb64675500decba1c707bc5d5c6d57f633934778f (diff)
parent78e6ccc4a5006272b14f352e459a6d3bf52ed07b (diff)
downloademacs-5e2255017323c54feeaaee220175d7761a3b6ed1.tar.gz
emacs-5e2255017323c54feeaaee220175d7761a3b6ed1.zip
merge master
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog56
-rw-r--r--src/alloc.c64
-rw-r--r--src/decompress.c3
-rw-r--r--src/fileio.c50
-rw-r--r--src/fns.c9
-rw-r--r--src/font.c20
-rw-r--r--src/font.h113
-rw-r--r--src/frame.c7
-rw-r--r--src/ftfont.c9
-rw-r--r--src/gnutls.c20
-rw-r--r--src/gtkutil.h2
-rw-r--r--src/lisp.h37
-rw-r--r--src/macfont.m10
-rw-r--r--src/process.c15
-rw-r--r--src/terminal.c9
-rw-r--r--src/w32uniscribe.c8
-rw-r--r--src/window.c11
-rw-r--r--src/xdisp.c3
-rw-r--r--src/xftfont.c6
-rw-r--r--src/xmenu.c2
20 files changed, 300 insertions, 154 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b2588f1451f..16e2fa19626 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,59 @@
12015-01-16 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Tune pseudovector allocation assuming Qnil == 0.
4 * alloc.c (allocate_pseudovector): Use memset for both
5 Lisp_Objects and regular slots. Add zerolen arg.
6 * lisp.h (allocate_pseudovector): Adjust prototype.
7 (ALLOCATE_PSEUDOVECTOR): Adjust user.
8 (ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
9 (allocate_hash_table, allocate_window, allocate_frame)
10 (allocate_process, allocate_terminal): Remove prototypes.
11 * fns.c (allocate_hash_table): Now static here.
12 * frame.c (allocate_frame):
13 * process.c (allocate_process):
14 * terminal.c (allocate_terminal):
15 * window.c (allocate_window): Now static here.
16 Use ALLOCATE_ZEROED_PSEUDOVECTOR. Add comment.
17
18 * lisp.h (XTERMINAL): Add eassert.
19 * process.c (make_lisp_proc): Now static here.
20
21 Prefer INLINE functions in font.h to match style used in lisp.h.
22 * font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
23 (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
24 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
25 Now functions.
26 * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
27 * ftfont.c (ftfont_shape):
28 * macfont.m (macfont_shape):
29 * w32uniscribe.c (uniscribe_shape):
30 * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
31
322015-01-16 Paul Eggert <eggert@cs.ucla.edu>
33
34 Give up on -Wsuggest-attribute=const
35 * decompress.c (Fzlib_available_p):
36 * gnutls.c (Fgnutls_available_p):
37 * gtkutil.h (xg_uses_old_file_dialog):
38 * xdisp.c (Ftool_bar_height):
39 * xmenu.c (popup_activated):
40 No longer const, since it's not const on at lest some
41 configurations, and we shouldn't lie to the compiler.
42
432015-01-15 Eli Zaretskii <eliz@gnu.org>
44
45 * fileio.c: Include binary-io.h.
46 (Fset_binary_mode): New function.
47 (syms_of_fileio): Defsubr it.
48 (syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.
49
502015-01-15 Teodor Zlatanov <tzz@lifelogs.com>
51
52 * gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
53 (Fgnutls_peer_status): Use it to set the :self-signed flag.
54 Rename the previous :self-signed to :unknown-ca. (Bug#19404)
55 (Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.
56
12015-01-14 Eli Zaretskii <eliz@gnu.org> 572015-01-14 Eli Zaretskii <eliz@gnu.org>
2 58
3 * w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data 59 * w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
diff --git a/src/alloc.c b/src/alloc.c
index 7c937332407..22a15b4ac59 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3163,19 +3163,19 @@ allocate_vector (EMACS_INT len)
3163/* Allocate other vector-like structures. */ 3163/* Allocate other vector-like structures. */
3164 3164
3165struct Lisp_Vector * 3165struct Lisp_Vector *
3166allocate_pseudovector (int memlen, int lisplen, enum pvec_type tag) 3166allocate_pseudovector (int memlen, int lisplen,
3167 int zerolen, enum pvec_type tag)
3167{ 3168{
3168 struct Lisp_Vector *v = allocate_vectorlike (memlen); 3169 struct Lisp_Vector *v = allocate_vectorlike (memlen);
3169 int i;
3170 3170
3171 /* Catch bogus values. */ 3171 /* Catch bogus values. */
3172 eassert (tag <= PVEC_FONT); 3172 eassert (tag <= PVEC_FONT);
3173 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1); 3173 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1);
3174 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); 3174 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
3175 3175
3176 /* Only the first lisplen slots will be traced normally by the GC. */ 3176 /* Only the first lisplen slots will be traced normally by the GC.
3177 for (i = 0; i < lisplen; ++i) 3177 But since Qnil == 0, we can memset Lisp_Object slots as well. */
3178 v->contents[i] = Qnil; 3178 memset (v->contents, 0, zerolen * word_size);
3179 3179
3180 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); 3180 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen);
3181 return v; 3181 return v;
@@ -3194,60 +3194,6 @@ allocate_buffer (void)
3194 return b; 3194 return b;
3195} 3195}
3196 3196
3197struct Lisp_Hash_Table *
3198allocate_hash_table (void)
3199{
3200 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Hash_Table, count, PVEC_HASH_TABLE);
3201}
3202
3203struct window *
3204allocate_window (void)
3205{
3206 struct window *w;
3207
3208 w = ALLOCATE_PSEUDOVECTOR (struct window, current_matrix, PVEC_WINDOW);
3209 /* Users assumes that non-Lisp data is zeroed. */
3210 memset (&w->current_matrix, 0,
3211 sizeof (*w) - offsetof (struct window, current_matrix));
3212 return w;
3213}
3214
3215struct terminal *
3216allocate_terminal (void)
3217{
3218 struct terminal *t;
3219
3220 t = ALLOCATE_PSEUDOVECTOR (struct terminal, next_terminal, PVEC_TERMINAL);
3221 /* Users assumes that non-Lisp data is zeroed. */
3222 memset (&t->next_terminal, 0,
3223 sizeof (*t) - offsetof (struct terminal, next_terminal));
3224 return t;
3225}
3226
3227struct frame *
3228allocate_frame (void)
3229{
3230 struct frame *f;
3231
3232 f = ALLOCATE_PSEUDOVECTOR (struct frame, face_cache, PVEC_FRAME);
3233 /* Users assumes that non-Lisp data is zeroed. */
3234 memset (&f->face_cache, 0,
3235 sizeof (*f) - offsetof (struct frame, face_cache));
3236 return f;
3237}
3238
3239struct Lisp_Process *
3240allocate_process (void)
3241{
3242 struct Lisp_Process *p;
3243
3244 p = ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS);
3245 /* Users assumes that non-Lisp data is zeroed. */
3246 memset (&p->pid, 0,
3247 sizeof (*p) - offsetof (struct Lisp_Process, pid));
3248 return p;
3249}
3250
3251DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, 3197DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0,
3252 doc: /* Return a newly created vector of length LENGTH, with each element being INIT. 3198 doc: /* Return a newly created vector of length LENGTH, with each element being INIT.
3253See also the function `vector'. */) 3199See also the function `vector'. */)
diff --git a/src/decompress.c b/src/decompress.c
index b78dacee207..b14f0a2cd79 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -88,8 +88,7 @@ unwind_decompress (void *ddata)
88} 88}
89 89
90DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, 90DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
91 doc: /* Return t if zlib decompression is available in this instance of Emacs. */ 91 doc: /* Return t if zlib decompression is available in this instance of Emacs. */)
92 attributes: const)
93 (void) 92 (void)
94{ 93{
95#ifdef WINDOWSNT 94#ifdef WINDOWSNT
diff --git a/src/fileio.c b/src/fileio.c
index 6c443c91db7..dc67a00ed2a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -86,6 +86,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
86#include <careadlinkat.h> 86#include <careadlinkat.h>
87#include <stat-time.h> 87#include <stat-time.h>
88 88
89#include <binary-io.h>
90
89#ifdef HPUX 91#ifdef HPUX
90#include <netio.h> 92#include <netio.h>
91#endif 93#endif
@@ -5754,6 +5756,48 @@ before any other event (mouse or keypress) is handled. */)
5754 return Qnil; 5756 return Qnil;
5755} 5757}
5756 5758
5759
5760DEFUN ("set-binary-mode", Fset_binary_mode, Sset_binary_mode, 2, 2, 0,
5761 doc: /* Switch STREAM to binary I/O mode or text I/O mode.
5762STREAM can be one of the symbols `stdin', `stdout', or `stderr'.
5763If MODE is non-nil, switch STREAM to binary mode, otherwise switch
5764it to text mode.
5765
5766As a side effect, this function flushes any pending STREAM's data.
5767
5768Value is the previous value of STREAM's I/O mode, nil for text mode,
5769non-nil for binary mode.
5770
5771On MS-Windows and MS-DOS, binary mode is needed to read or write
5772arbitrary binary data, and for disabling translation between CR-LF
5773pairs and a single newline character. Examples include generation
5774of text files with Unix-style end-of-line format using `princ' in
5775batch mode, with standard output redirected to a file.
5776
5777On Posix systems, this function always returns non-nil, and has no
5778effect except for flushing STREAM's data. */)
5779 (Lisp_Object stream, Lisp_Object mode)
5780{
5781 FILE *fp = NULL;
5782 int binmode;
5783
5784 CHECK_SYMBOL (stream);
5785 if (EQ (stream, Qstdin))
5786 fp = stdin;
5787 else if (EQ (stream, Qstdout))
5788 fp = stdout;
5789 else if (EQ (stream, Qstderr))
5790 fp = stderr;
5791 else
5792 xsignal2 (Qerror, build_string ("unsupported stream"), stream);
5793
5794 binmode = NILP (mode) ? O_TEXT : O_BINARY;
5795 if (fp != stdin)
5796 fflush (fp);
5797
5798 return (set_binary_mode (fileno (fp), binmode) == O_BINARY) ? Qt : Qnil;
5799}
5800
5757void 5801void
5758init_fileio (void) 5802init_fileio (void)
5759{ 5803{
@@ -6040,6 +6084,10 @@ This includes interactive calls to `delete-file' and
6040 DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name"); 6084 DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name");
6041 DEFSYM (Qget_buffer_window_list, "get-buffer-window-list"); 6085 DEFSYM (Qget_buffer_window_list, "get-buffer-window-list");
6042 6086
6087 DEFSYM (Qstdin, "stdin");
6088 DEFSYM (Qstdout, "stdout");
6089 DEFSYM (Qstderr, "stderr");
6090
6043 defsubr (&Sfind_file_name_handler); 6091 defsubr (&Sfind_file_name_handler);
6044 defsubr (&Sfile_name_directory); 6092 defsubr (&Sfile_name_directory);
6045 defsubr (&Sfile_name_nondirectory); 6093 defsubr (&Sfile_name_nondirectory);
@@ -6089,6 +6137,8 @@ This includes interactive calls to `delete-file' and
6089 6137
6090 defsubr (&Snext_read_file_uses_dialog_p); 6138 defsubr (&Snext_read_file_uses_dialog_p);
6091 6139
6140 defsubr (&Sset_binary_mode);
6141
6092#ifdef HAVE_SYNC 6142#ifdef HAVE_SYNC
6093 defsubr (&Sunix_sync); 6143 defsubr (&Sunix_sync);
6094#endif 6144#endif
diff --git a/src/fns.c b/src/fns.c
index 91cd5132546..ca3d98b23dd 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3814,6 +3814,15 @@ hashfn_user_defined (struct hash_table_test *ht, Lisp_Object key)
3814 return hashfn_eq (ht, hash); 3814 return hashfn_eq (ht, hash);
3815} 3815}
3816 3816
3817/* Allocate basically initialized hash table. */
3818
3819static struct Lisp_Hash_Table *
3820allocate_hash_table (void)
3821{
3822 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Hash_Table,
3823 count, PVEC_HASH_TABLE);
3824}
3825
3817/* An upper bound on the size of a hash table index. It must fit in 3826/* An upper bound on the size of a hash table index. It must fit in
3818 ptrdiff_t and be a valid Emacs fixnum. */ 3827 ptrdiff_t and be a valid Emacs fixnum. */
3819#define INDEX_SIZE_BOUND \ 3828#define INDEX_SIZE_BOUND \
diff --git a/src/font.c b/src/font.c
index a68c3c707c8..56a27821718 100644
--- a/src/font.c
+++ b/src/font.c
@@ -156,7 +156,7 @@ font_make_spec (void)
156 struct font_spec *spec 156 struct font_spec *spec
157 = ((struct font_spec *) 157 = ((struct font_spec *)
158 allocate_pseudovector (VECSIZE (struct font_spec), 158 allocate_pseudovector (VECSIZE (struct font_spec),
159 FONT_SPEC_MAX, PVEC_FONT)); 159 FONT_SPEC_MAX, FONT_SPEC_MAX, PVEC_FONT));
160 XSETFONT (font_spec, spec); 160 XSETFONT (font_spec, spec);
161 return font_spec; 161 return font_spec;
162} 162}
@@ -168,7 +168,7 @@ font_make_entity (void)
168 struct font_entity *entity 168 struct font_entity *entity
169 = ((struct font_entity *) 169 = ((struct font_entity *)
170 allocate_pseudovector (VECSIZE (struct font_entity), 170 allocate_pseudovector (VECSIZE (struct font_entity),
171 FONT_ENTITY_MAX, PVEC_FONT)); 171 FONT_ENTITY_MAX, FONT_ENTITY_MAX, PVEC_FONT));
172 XSETFONT (font_entity, entity); 172 XSETFONT (font_entity, entity);
173 return font_entity; 173 return font_entity;
174} 174}
@@ -181,7 +181,8 @@ font_make_object (int size, Lisp_Object entity, int pixelsize)
181{ 181{
182 Lisp_Object font_object; 182 Lisp_Object font_object;
183 struct font *font 183 struct font *font
184 = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT); 184 = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX,
185 FONT_OBJECT_MAX, PVEC_FONT);
185 int i; 186 int i;
186 187
187 /* GC can happen before the driver is set up, 188 /* GC can happen before the driver is set up,
@@ -4532,12 +4533,11 @@ character code corresponding to the glyph or nil if there's no
4532corresponding character. */) 4533corresponding character. */)
4533 (Lisp_Object font_object, Lisp_Object character, Lisp_Object otf_features) 4534 (Lisp_Object font_object, Lisp_Object character, Lisp_Object otf_features)
4534{ 4535{
4535 struct font *font; 4536 struct font *font = CHECK_FONT_GET_OBJECT (font_object);
4536 Lisp_Object gstring_in, gstring_out, g; 4537 Lisp_Object gstring_in, gstring_out, g;
4537 Lisp_Object alternates; 4538 Lisp_Object alternates;
4538 int i, num; 4539 int i, num;
4539 4540
4540 CHECK_FONT_GET_OBJECT (font_object, font);
4541 if (! font->driver->otf_drive) 4541 if (! font->driver->otf_drive)
4542 error ("Font backend %s can't drive OpenType GSUB table", 4542 error ("Font backend %s can't drive OpenType GSUB table",
4543 SDATA (SYMBOL_NAME (font->driver->type))); 4543 SDATA (SYMBOL_NAME (font->driver->type)));
@@ -4647,12 +4647,9 @@ FEATURE is a symbol representing OpenType feature tag.
4647If the font is not OpenType font, CAPABILITY is nil. */) 4647If the font is not OpenType font, CAPABILITY is nil. */)
4648 (Lisp_Object font_object) 4648 (Lisp_Object font_object)
4649{ 4649{
4650 struct font *font; 4650 struct font *font = CHECK_FONT_GET_OBJECT (font_object);
4651 Lisp_Object val; 4651 Lisp_Object val = make_uninit_vector (9);
4652 4652
4653 CHECK_FONT_GET_OBJECT (font_object, font);
4654
4655 val = make_uninit_vector (9);
4656 ASET (val, 0, AREF (font_object, FONT_NAME_INDEX)); 4653 ASET (val, 0, AREF (font_object, FONT_NAME_INDEX));
4657 ASET (val, 1, AREF (font_object, FONT_FILE_INDEX)); 4654 ASET (val, 1, AREF (font_object, FONT_FILE_INDEX));
4658 ASET (val, 2, make_number (font->pixel_size)); 4655 ASET (val, 2, make_number (font->pixel_size));
@@ -4691,12 +4688,11 @@ the corresponding element is nil. */)
4691 (Lisp_Object font_object, Lisp_Object from, Lisp_Object to, 4688 (Lisp_Object font_object, Lisp_Object from, Lisp_Object to,
4692 Lisp_Object object) 4689 Lisp_Object object)
4693{ 4690{
4694 struct font *font; 4691 struct font *font = CHECK_FONT_GET_OBJECT (font_object);
4695 ptrdiff_t i, len; 4692 ptrdiff_t i, len;
4696 Lisp_Object *chars, vec; 4693 Lisp_Object *chars, vec;
4697 USE_SAFE_ALLOCA; 4694 USE_SAFE_ALLOCA;
4698 4695
4699 CHECK_FONT_GET_OBJECT (font_object, font);
4700 if (NILP (object)) 4696 if (NILP (object))
4701 { 4697 {
4702 ptrdiff_t charpos, bytepos; 4698 ptrdiff_t charpos, bytepos;
diff --git a/src/font.h b/src/font.h
index 5a3e38a2a6e..efc184eef77 100644
--- a/src/font.h
+++ b/src/font.h
@@ -413,46 +413,91 @@ struct font_bitmap
413/* Predicates to check various font-related objects. */ 413/* Predicates to check various font-related objects. */
414 414
415/* True iff X is one of font-spec, font-entity, and font-object. */ 415/* True iff X is one of font-spec, font-entity, and font-object. */
416#define FONTP(x) PSEUDOVECTORP (x, PVEC_FONT) 416INLINE bool
417FONTP (Lisp_Object x)
418{
419 return PSEUDOVECTORP (x, PVEC_FONT);
420}
421
417/* True iff X is font-spec. */ 422/* True iff X is font-spec. */
418#define FONT_SPEC_P(x) \ 423INLINE bool
419 (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX) 424FONT_SPEC_P (Lisp_Object x)
425{
426 return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX;
427}
428
420/* True iff X is font-entity. */ 429/* True iff X is font-entity. */
421#define FONT_ENTITY_P(x) \ 430INLINE bool
422 (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX) 431FONT_ENTITY_P (Lisp_Object x)
432{
433 return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX;
434}
435
423/* True iff X is font-object. */ 436/* True iff X is font-object. */
424#define FONT_OBJECT_P(x) \ 437INLINE bool
425 (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX) 438FONT_OBJECT_P (Lisp_Object x)
426 439{
427/* Check macros for various font-related objects. */ 440 return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX;
428 441}
429#define CHECK_FONT(x) \ 442
430 do { if (! FONTP (x)) wrong_type_argument (Qfont, x); } while (false) 443/* Type checking functions for various font-related objects. */
431#define CHECK_FONT_SPEC(x) \ 444
432 do { if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont_spec, x); } \ 445INLINE void
433 while (false) 446CHECK_FONT (Lisp_Object x)
434#define CHECK_FONT_ENTITY(x) \ 447{
435 do { if (! FONT_ENTITY_P (x)) wrong_type_argument (Qfont_entity, x); } \ 448 CHECK_TYPE (FONTP (x), Qfont, x);
436 while (false) 449}
437#define CHECK_FONT_OBJECT(x) \ 450
438 do { if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont_object, x); } \ 451INLINE void
439 while (false) 452CHECK_FONT_SPEC (Lisp_Object x)
440 453{
441#define CHECK_FONT_GET_OBJECT(x, font) \ 454 CHECK_TYPE (FONT_SPEC_P (x), Qfont_spec, x);
442 do { \ 455}
443 CHECK_FONT_OBJECT (x); \ 456
444 font = XFONT_OBJECT (x); \ 457INLINE void
445 } while (false) 458CHECK_FONT_ENTITY (Lisp_Object x)
459{
460 CHECK_TYPE (FONT_ENTITY_P (x), Qfont_entity, x);
461}
462
463INLINE void
464CHECK_FONT_OBJECT (Lisp_Object x)
465{
466 CHECK_TYPE (FONT_OBJECT_P (x), Qfont_object, x);
467}
468
469/* C pointer extraction functions for various font-related objects. */
470
471INLINE struct font_spec *
472XFONT_SPEC (Lisp_Object p)
473{
474 eassert (FONT_SPEC_P (p));
475 return XUNTAG (p, Lisp_Vectorlike);
476}
477
478INLINE struct font_entity *
479XFONT_ENTITY (Lisp_Object p)
480{
481 eassert (FONT_ENTITY_P (p));
482 return XUNTAG (p, Lisp_Vectorlike);
483}
484
485INLINE struct font *
486XFONT_OBJECT (Lisp_Object p)
487{
488 eassert (FONT_OBJECT_P (p));
489 return XUNTAG (p, Lisp_Vectorlike);
490}
446 491
447#define XFONT_SPEC(p) \
448 (eassert (FONT_SPEC_P (p)), (struct font_spec *) XUNTAG (p, Lisp_Vectorlike))
449#define XFONT_ENTITY(p) \
450 (eassert (FONT_ENTITY_P (p)), \
451 (struct font_entity *) XUNTAG (p, Lisp_Vectorlike))
452#define XFONT_OBJECT(p) \
453 (eassert (FONT_OBJECT_P (p)), (struct font *) XUNTAG (p, Lisp_Vectorlike))
454#define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT)) 492#define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT))
455 493
494INLINE struct font *
495CHECK_FONT_GET_OBJECT (Lisp_Object x)
496{
497 CHECK_FONT_OBJECT (x);
498 return XFONT_OBJECT (x);
499}
500
456/* Number of pt per inch (from the TeXbook). */ 501/* Number of pt per inch (from the TeXbook). */
457#define PT_PER_INCH 72.27 502#define PT_PER_INCH 72.27
458 503
diff --git a/src/frame.c b/src/frame.c
index ec580f37c5b..2ce5a623853 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -570,6 +570,13 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
570 run_window_configuration_change_hook (f); 570 run_window_configuration_change_hook (f);
571} 571}
572 572
573/* Allocate basically initialized frame. */
574
575static struct frame *
576allocate_frame (void)
577{
578 return ALLOCATE_ZEROED_PSEUDOVECTOR (struct frame, face_cache, PVEC_FRAME);
579}
573 580
574struct frame * 581struct frame *
575make_frame (bool mini_p) 582make_frame (bool mini_p)
diff --git a/src/ftfont.c b/src/ftfont.c
index 9707b6c1b71..053b95fc69f 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2576,13 +2576,10 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
2576Lisp_Object 2576Lisp_Object
2577ftfont_shape (Lisp_Object lgstring) 2577ftfont_shape (Lisp_Object lgstring)
2578{ 2578{
2579 struct font *font; 2579 struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
2580 struct ftfont_info *ftfont_info; 2580 struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
2581 OTF *otf; 2581 OTF *otf = ftfont_get_otf (ftfont_info);
2582 2582
2583 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
2584 ftfont_info = (struct ftfont_info *) font;
2585 otf = ftfont_get_otf (ftfont_info);
2586 if (! otf) 2583 if (! otf)
2587 return make_number (0); 2584 return make_number (0);
2588 return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf, 2585 return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf,
diff --git a/src/gnutls.c b/src/gnutls.c
index 5e6c6353b45..35f0eb48bc1 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -122,6 +122,8 @@ DEF_DLL_FN (void, gnutls_transport_set_push_function,
122 (gnutls_session_t, gnutls_push_func)); 122 (gnutls_session_t, gnutls_push_func));
123DEF_DLL_FN (int, gnutls_x509_crt_check_hostname, 123DEF_DLL_FN (int, gnutls_x509_crt_check_hostname,
124 (gnutls_x509_crt_t, const char *)); 124 (gnutls_x509_crt_t, const char *));
125DEF_DLL_FN (int, gnutls_x509_crt_check_issuer,
126 (gnutls_x509_crt_t, gnutls_x509_crt_t));
125DEF_DLL_FN (void, gnutls_x509_crt_deinit, (gnutls_x509_crt_t)); 127DEF_DLL_FN (void, gnutls_x509_crt_deinit, (gnutls_x509_crt_t));
126DEF_DLL_FN (int, gnutls_x509_crt_import, 128DEF_DLL_FN (int, gnutls_x509_crt_import,
127 (gnutls_x509_crt_t, const gnutls_datum_t *, 129 (gnutls_x509_crt_t, const gnutls_datum_t *,
@@ -236,6 +238,7 @@ init_gnutls_functions (void)
236 LOAD_DLL_FN (library, gnutls_transport_set_pull_function); 238 LOAD_DLL_FN (library, gnutls_transport_set_pull_function);
237 LOAD_DLL_FN (library, gnutls_transport_set_push_function); 239 LOAD_DLL_FN (library, gnutls_transport_set_push_function);
238 LOAD_DLL_FN (library, gnutls_x509_crt_check_hostname); 240 LOAD_DLL_FN (library, gnutls_x509_crt_check_hostname);
241 LOAD_DLL_FN (library, gnutls_x509_crt_check_issuer);
239 LOAD_DLL_FN (library, gnutls_x509_crt_deinit); 242 LOAD_DLL_FN (library, gnutls_x509_crt_deinit);
240 LOAD_DLL_FN (library, gnutls_x509_crt_import); 243 LOAD_DLL_FN (library, gnutls_x509_crt_import);
241 LOAD_DLL_FN (library, gnutls_x509_crt_init); 244 LOAD_DLL_FN (library, gnutls_x509_crt_init);
@@ -329,6 +332,7 @@ init_gnutls_functions (void)
329# define gnutls_transport_set_pull_function fn_gnutls_transport_set_pull_function 332# define gnutls_transport_set_pull_function fn_gnutls_transport_set_pull_function
330# define gnutls_transport_set_push_function fn_gnutls_transport_set_push_function 333# define gnutls_transport_set_push_function fn_gnutls_transport_set_push_function
331# define gnutls_x509_crt_check_hostname fn_gnutls_x509_crt_check_hostname 334# define gnutls_x509_crt_check_hostname fn_gnutls_x509_crt_check_hostname
335# define gnutls_x509_crt_check_issuer fn_gnutls_x509_crt_check_issuer
332# define gnutls_x509_crt_deinit fn_gnutls_x509_crt_deinit 336# define gnutls_x509_crt_deinit fn_gnutls_x509_crt_deinit
333# define gnutls_x509_crt_get_activation_time fn_gnutls_x509_crt_get_activation_time 337# define gnutls_x509_crt_get_activation_time fn_gnutls_x509_crt_get_activation_time
334# define gnutls_x509_crt_get_dn fn_gnutls_x509_crt_get_dn 338# define gnutls_x509_crt_get_dn fn_gnutls_x509_crt_get_dn
@@ -982,6 +986,10 @@ DEFUN ("gnutls-peer-status-warning-describe", Fgnutls_peer_status_warning_descri
982 if (EQ (status_symbol, intern (":self-signed"))) 986 if (EQ (status_symbol, intern (":self-signed")))
983 return build_string ("certificate signer was not found (self-signed)"); 987 return build_string ("certificate signer was not found (self-signed)");
984 988
989 if (EQ (status_symbol, intern (":unknown-ca")))
990 return build_string ("the certificate was signed by an unknown "
991 "and therefore untrusted authority");
992
985 if (EQ (status_symbol, intern (":not-ca"))) 993 if (EQ (status_symbol, intern (":not-ca")))
986 return build_string ("certificate signer is not a CA"); 994 return build_string ("certificate signer is not a CA");
987 995
@@ -1026,7 +1034,7 @@ The return value is a property list with top-level keys :warnings and
1026 warnings = Fcons (intern (":revoked"), warnings); 1034 warnings = Fcons (intern (":revoked"), warnings);
1027 1035
1028 if (verification & GNUTLS_CERT_SIGNER_NOT_FOUND) 1036 if (verification & GNUTLS_CERT_SIGNER_NOT_FOUND)
1029 warnings = Fcons (intern (":self-signed"), warnings); 1037 warnings = Fcons (intern (":unknown-ca"), warnings);
1030 1038
1031 if (verification & GNUTLS_CERT_SIGNER_NOT_CA) 1039 if (verification & GNUTLS_CERT_SIGNER_NOT_CA)
1032 warnings = Fcons (intern (":not-ca"), warnings); 1040 warnings = Fcons (intern (":not-ca"), warnings);
@@ -1044,6 +1052,13 @@ The return value is a property list with top-level keys :warnings and
1044 CERTIFICATE_NOT_MATCHING) 1052 CERTIFICATE_NOT_MATCHING)
1045 warnings = Fcons (intern (":no-host-match"), warnings); 1053 warnings = Fcons (intern (":no-host-match"), warnings);
1046 1054
1055 /* This could get called in the INIT stage, when the certificate is
1056 not yet set. */
1057 if (XPROCESS (proc)->gnutls_certificate != NULL &&
1058 gnutls_x509_crt_check_issuer(XPROCESS (proc)->gnutls_certificate,
1059 XPROCESS (proc)->gnutls_certificate))
1060 warnings = Fcons (intern (":self-signed"), warnings);
1061
1047 if (!NILP (warnings)) 1062 if (!NILP (warnings))
1048 result = list2 (intern (":warnings"), warnings); 1063 result = list2 (intern (":warnings"), warnings);
1049 1064
@@ -1604,8 +1619,7 @@ This function may also return `gnutls-e-again', or
1604#endif /* HAVE_GNUTLS */ 1619#endif /* HAVE_GNUTLS */
1605 1620
1606DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, 1621DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
1607 doc: /* Return t if GnuTLS is available in this instance of Emacs. */ 1622 doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
1608 attributes: const)
1609 (void) 1623 (void)
1610{ 1624{
1611#ifdef HAVE_GNUTLS 1625#ifdef HAVE_GNUTLS
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 7d712c92e0d..0ac49ca7db5 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -78,7 +78,7 @@ typedef struct xg_menu_item_cb_data_
78 78
79} xg_menu_item_cb_data; 79} xg_menu_item_cb_data;
80 80
81extern bool xg_uses_old_file_dialog (void) ATTRIBUTE_CONST; 81extern bool xg_uses_old_file_dialog (void);
82 82
83extern char *xg_get_file_name (struct frame *f, 83extern char *xg_get_file_name (struct frame *f,
84 char *prompt, 84 char *prompt,
diff --git a/src/lisp.h b/src/lisp.h
index b6608daa20e..e94e39a5d01 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -608,6 +608,7 @@ INLINE bool SUBRP (Lisp_Object);
608INLINE bool (SYMBOLP) (Lisp_Object); 608INLINE bool (SYMBOLP) (Lisp_Object);
609INLINE bool (VECTORLIKEP) (Lisp_Object); 609INLINE bool (VECTORLIKEP) (Lisp_Object);
610INLINE bool WINDOWP (Lisp_Object); 610INLINE bool WINDOWP (Lisp_Object);
611INLINE bool TERMINALP (Lisp_Object);
611INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); 612INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
612INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object); 613INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object);
613INLINE void *(XUNTAG) (Lisp_Object, int); 614INLINE void *(XUNTAG) (Lisp_Object, int);
@@ -1003,6 +1004,7 @@ XWINDOW (Lisp_Object a)
1003INLINE struct terminal * 1004INLINE struct terminal *
1004XTERMINAL (Lisp_Object a) 1005XTERMINAL (Lisp_Object a)
1005{ 1006{
1007 eassert (TERMINALP (a));
1006 return XUNTAG (a, Lisp_Vectorlike); 1008 return XUNTAG (a, Lisp_Vectorlike);
1007} 1009}
1008 1010
@@ -1065,12 +1067,6 @@ builtin_lisp_symbol (int index)
1065 return make_lisp_symbol (lispsym + index); 1067 return make_lisp_symbol (lispsym + index);
1066} 1068}
1067 1069
1068INLINE Lisp_Object
1069make_lisp_proc (struct Lisp_Process *p)
1070{
1071 return make_lisp_ptr (p, Lisp_Vectorlike);
1072}
1073
1074#define XSETINT(a, b) ((a) = make_number (b)) 1070#define XSETINT(a, b) ((a) = make_number (b))
1075#define XSETFASTINT(a, b) ((a) = make_natnum (b)) 1071#define XSETFASTINT(a, b) ((a) = make_natnum (b))
1076#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) 1072#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons))
@@ -3785,16 +3781,25 @@ make_uninit_sub_char_table (int depth, int min_char)
3785 return v; 3781 return v;
3786} 3782}
3787 3783
3788extern struct Lisp_Vector *allocate_pseudovector (int, int, enum pvec_type); 3784extern struct Lisp_Vector *allocate_pseudovector (int, int, int,
3789#define ALLOCATE_PSEUDOVECTOR(typ,field,tag) \ 3785 enum pvec_type);
3790 ((typ*) \ 3786
3791 allocate_pseudovector \ 3787/* Allocate partially initialized pseudovector where all Lisp_Object
3792 (VECSIZE (typ), PSEUDOVECSIZE (typ, field), tag)) 3788 slots are set to Qnil but the rest (if any) is left uninitialized. */
3793extern struct Lisp_Hash_Table *allocate_hash_table (void); 3789
3794extern struct window *allocate_window (void); 3790#define ALLOCATE_PSEUDOVECTOR(type, field, tag) \
3795extern struct frame *allocate_frame (void); 3791 ((type *) allocate_pseudovector (VECSIZE (type), \
3796extern struct Lisp_Process *allocate_process (void); 3792 PSEUDOVECSIZE (type, field), \
3797extern struct terminal *allocate_terminal (void); 3793 PSEUDOVECSIZE (type, field), tag))
3794
3795/* Allocate fully initialized pseudovector where all Lisp_Object
3796 slots are set to Qnil and the rest (if any) is zeroed. */
3797
3798#define ALLOCATE_ZEROED_PSEUDOVECTOR(type, field, tag) \
3799 ((type *) allocate_pseudovector (VECSIZE (type), \
3800 PSEUDOVECSIZE (type, field), \
3801 VECSIZE (type), tag))
3802
3798extern bool gc_in_progress; 3803extern bool gc_in_progress;
3799extern bool abort_on_gc; 3804extern bool abort_on_gc;
3800extern Lisp_Object make_float (double); 3805extern Lisp_Object make_float (double);
diff --git a/src/macfont.m b/src/macfont.m
index f569934128f..cbf1b07bc94 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2788,9 +2788,9 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
2788static Lisp_Object 2788static Lisp_Object
2789macfont_shape (Lisp_Object lgstring) 2789macfont_shape (Lisp_Object lgstring)
2790{ 2790{
2791 struct font *font; 2791 struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
2792 struct macfont_info *macfont_info; 2792 struct macfont_info *macfont_info = (struct macfont_info *) font;
2793 FontRef macfont; 2793 FontRef macfont = macfont_info->macfont;
2794 ptrdiff_t glyph_len, len, i, j; 2794 ptrdiff_t glyph_len, len, i, j;
2795 CFIndex nonbmp_len; 2795 CFIndex nonbmp_len;
2796 UniChar *unichars; 2796 UniChar *unichars;
@@ -2799,10 +2799,6 @@ macfont_shape (Lisp_Object lgstring)
2799 CFIndex used = 0; 2799 CFIndex used = 0;
2800 struct mac_glyph_layout *glyph_layouts; 2800 struct mac_glyph_layout *glyph_layouts;
2801 2801
2802 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
2803 macfont_info = (struct macfont_info *) font;
2804 macfont = macfont_info->macfont;
2805
2806 glyph_len = LGSTRING_GLYPH_LEN (lgstring); 2802 glyph_len = LGSTRING_GLYPH_LEN (lgstring);
2807 nonbmp_len = 0; 2803 nonbmp_len = 0;
2808 for (i = 0; i < glyph_len; i++) 2804 for (i = 0; i < glyph_len; i++)
diff --git a/src/process.c b/src/process.c
index 77c94f29211..0789f20f1d2 100644
--- a/src/process.c
+++ b/src/process.c
@@ -422,6 +422,11 @@ pset_write_queue (struct Lisp_Process *p, Lisp_Object val)
422} 422}
423 423
424 424
425static Lisp_Object
426make_lisp_proc (struct Lisp_Process *p)
427{
428 return make_lisp_ptr (p, Lisp_Vectorlike);
429}
425 430
426static struct fd_callback_data 431static struct fd_callback_data
427{ 432{
@@ -687,7 +692,15 @@ allocate_pty (char pty_name[PTY_NAME_SIZE])
687#endif /* HAVE_PTYS */ 692#endif /* HAVE_PTYS */
688 return -1; 693 return -1;
689} 694}
690 695
696/* Allocate basically initialized process. */
697
698static struct Lisp_Process *
699allocate_process (void)
700{
701 return ALLOCATE_ZEROED_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS);
702}
703
691static Lisp_Object 704static Lisp_Object
692make_process (Lisp_Object name) 705make_process (Lisp_Object name)
693{ 706{
diff --git a/src/terminal.c b/src/terminal.c
index 92befd28543..b48d0623e12 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -254,6 +254,15 @@ get_named_terminal (const char *name)
254 return NULL; 254 return NULL;
255} 255}
256 256
257/* Allocate basically initialized terminal. */
258
259static struct terminal *
260allocate_terminal (void)
261{
262 return ALLOCATE_ZEROED_PSEUDOVECTOR
263 (struct terminal, next_terminal, PVEC_TERMINAL);
264}
265
257/* Create a new terminal object of TYPE and add it to the terminal list. RIF 266/* Create a new terminal object of TYPE and add it to the terminal list. RIF
258 may be NULL if this terminal type doesn't support window-based redisplay. */ 267 may be NULL if this terminal type doesn't support window-based redisplay. */
259 268
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 2a7fe2e6f91..9cd97e28616 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -183,8 +183,9 @@ uniscribe_otf_capability (struct font *font)
183static Lisp_Object 183static Lisp_Object
184uniscribe_shape (Lisp_Object lgstring) 184uniscribe_shape (Lisp_Object lgstring)
185{ 185{
186 struct font * font; 186 struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
187 struct uniscribe_font_info * uniscribe_font; 187 struct uniscribe_font_info *uniscribe_font
188 = (struct uniscribe_font_info *) font;
188 EMACS_UINT nchars; 189 EMACS_UINT nchars;
189 int nitems, max_items, i, max_glyphs, done_glyphs; 190 int nitems, max_items, i, max_glyphs, done_glyphs;
190 wchar_t *chars; 191 wchar_t *chars;
@@ -199,9 +200,6 @@ uniscribe_shape (Lisp_Object lgstring)
199 HDC context = NULL; 200 HDC context = NULL;
200 HFONT old_font = NULL; 201 HFONT old_font = NULL;
201 202
202 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
203 uniscribe_font = (struct uniscribe_font_info *) font;
204
205 /* Get the chars from lgstring in a form we can use with uniscribe. */ 203 /* Get the chars from lgstring in a form we can use with uniscribe. */
206 max_glyphs = nchars = LGSTRING_GLYPH_LEN (lgstring); 204 max_glyphs = nchars = LGSTRING_GLYPH_LEN (lgstring);
207 done_glyphs = 0; 205 done_glyphs = 0;
diff --git a/src/window.c b/src/window.c
index 60ba3750f5b..d14a0f74fa0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3645,7 +3645,16 @@ temp_output_buffer_show (register Lisp_Object buf)
3645 } 3645 }
3646 } 3646 }
3647} 3647}
3648 3648
3649/* Allocate basically initialized window. */
3650
3651static struct window *
3652allocate_window (void)
3653{
3654 return ALLOCATE_ZEROED_PSEUDOVECTOR
3655 (struct window, current_matrix, PVEC_WINDOW);
3656}
3657
3649/* Make new window, have it replace WINDOW in window-tree, and make 3658/* Make new window, have it replace WINDOW in window-tree, and make
3650 WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only 3659 WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only
3651 horizontal child). */ 3660 horizontal child). */
diff --git a/src/xdisp.c b/src/xdisp.c
index a37575778e8..b38e8a64c5d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12332,8 +12332,7 @@ DEFUN ("tool-bar-height", Ftool_bar_height, Stool_bar_height,
12332 0, 2, 0, 12332 0, 2, 0,
12333 doc: /* Return the number of lines occupied by the tool bar of FRAME. 12333 doc: /* Return the number of lines occupied by the tool bar of FRAME.
12334If FRAME is nil or omitted, use the selected frame. Optional argument 12334If FRAME is nil or omitted, use the selected frame. Optional argument
12335PIXELWISE non-nil means return the height of the tool bar in pixels. */ 12335PIXELWISE non-nil means return the height of the tool bar in pixels. */)
12336 attributes: const)
12337 (Lisp_Object frame, Lisp_Object pixelwise) 12336 (Lisp_Object frame, Lisp_Object pixelwise)
12338{ 12337{
12339 int height = 0; 12338 int height = 0;
diff --git a/src/xftfont.c b/src/xftfont.c
index c587d814efa..054b38e120f 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -640,13 +640,11 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y,
640static Lisp_Object 640static Lisp_Object
641xftfont_shape (Lisp_Object lgstring) 641xftfont_shape (Lisp_Object lgstring)
642{ 642{
643 struct font *font; 643 struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
644 struct xftfont_info *xftfont_info; 644 struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
645 FT_Face ft_face; 645 FT_Face ft_face;
646 Lisp_Object val; 646 Lisp_Object val;
647 647
648 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
649 xftfont_info = (struct xftfont_info *) font;
650 ft_face = XftLockFace (xftfont_info->xftfont); 648 ft_face = XftLockFace (xftfont_info->xftfont);
651 xftfont_info->ft_size = ft_face->size; 649 xftfont_info->ft_size = ft_face->size;
652 val = ftfont_driver.shape (lgstring); 650 val = ftfont_driver.shape (lgstring);
diff --git a/src/xmenu.c b/src/xmenu.c
index 9063a8a2a52..fdf1f6f4d84 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2288,7 +2288,7 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
2288/* Detect if a dialog or menu has been posted. MSDOS has its own 2288/* Detect if a dialog or menu has been posted. MSDOS has its own
2289 implementation on msdos.c. */ 2289 implementation on msdos.c. */
2290 2290
2291int ATTRIBUTE_CONST 2291int
2292popup_activated (void) 2292popup_activated (void)
2293{ 2293{
2294 return popup_activated_flag; 2294 return popup_activated_flag;