Mercurial > hg > xemacs-beta
comparison src/toolbar-msw.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 308d34e9f07d |
children | 68639fb08af8 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
63 allocate_toolbar_item_id (struct frame *f, struct toolbar_button *button, | 63 allocate_toolbar_item_id (struct frame *f, struct toolbar_button *button, |
64 enum edge_pos UNUSED (pos)) | 64 enum edge_pos UNUSED (pos)) |
65 { | 65 { |
66 /* hmm what do we generate an id based on */ | 66 /* hmm what do we generate an id based on */ |
67 int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0, 0)); | 67 int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0, 0)); |
68 while (!NILP (Fgethash (make_int (id), | 68 while (!NILP (Fgethash (make_fixnum (id), |
69 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil))) | 69 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil))) |
70 { | 70 { |
71 id = TOOLBAR_ITEM_ID_BITS (id + 1); | 71 id = TOOLBAR_ITEM_ID_BITS (id + 1); |
72 } | 72 } |
73 return id; | 73 return id; |
88 i = qxeSendMessage (toolbarwnd, TB_BUTTONCOUNT, 0, 0); | 88 i = qxeSendMessage (toolbarwnd, TB_BUTTONCOUNT, 0, 0); |
89 for (i--; i >= 0; i--) | 89 for (i--; i >= 0; i--) |
90 { | 90 { |
91 qxeSendMessage (toolbarwnd, TB_GETBUTTON, (WPARAM) i, | 91 qxeSendMessage (toolbarwnd, TB_GETBUTTON, (WPARAM) i, |
92 (LPARAM) &info); | 92 (LPARAM) &info); |
93 Fremhash (make_int (info.idCommand), | 93 Fremhash (make_fixnum (info.idCommand), |
94 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); | 94 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); |
95 qxeSendMessage (toolbarwnd, TB_DELETEBUTTON, (WPARAM) i, 0); | 95 qxeSendMessage (toolbarwnd, TB_DELETEBUTTON, (WPARAM) i, 0); |
96 } | 96 } |
97 | 97 |
98 /* finally get rid of the image list assuming it clears up its | 98 /* finally get rid of the image list assuming it clears up its |
319 DeleteObject (bitmap); | 319 DeleteObject (bitmap); |
320 DeleteObject (mask); | 320 DeleteObject (mask); |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 Fputhash (make_int (tbbutton->idCommand), | 324 Fputhash (make_fixnum (tbbutton->idCommand), |
325 button, FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); | 325 button, FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f)); |
326 } | 326 } |
327 | 327 |
328 /* now fix up the button size */ | 328 /* now fix up the button size */ |
329 tb->x = x; | 329 tb->x = x; |
561 } | 561 } |
562 | 562 |
563 Lisp_Object | 563 Lisp_Object |
564 mswindows_get_toolbar_button_text (struct frame *f, int command_id) | 564 mswindows_get_toolbar_button_text (struct frame *f, int command_id) |
565 { | 565 { |
566 Lisp_Object button = Fgethash (make_int (command_id), | 566 Lisp_Object button = Fgethash (make_fixnum (command_id), |
567 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil); | 567 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil); |
568 | 568 |
569 if (!NILP (button)) | 569 if (!NILP (button)) |
570 { | 570 { |
571 struct toolbar_button *tb = XTOOLBAR_BUTTON (button); | 571 struct toolbar_button *tb = XTOOLBAR_BUTTON (button); |
585 WORD id) | 585 WORD id) |
586 { | 586 { |
587 /* Try to map the command id through the proper hash table */ | 587 /* Try to map the command id through the proper hash table */ |
588 Lisp_Object button, data, fn, arg, frame; | 588 Lisp_Object button, data, fn, arg, frame; |
589 | 589 |
590 button = Fgethash (make_int (id), | 590 button = Fgethash (make_fixnum (id), |
591 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil); | 591 FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil); |
592 | 592 |
593 if (NILP (button)) | 593 if (NILP (button)) |
594 return Qnil; | 594 return Qnil; |
595 | 595 |