Mercurial > hg > xemacs-beta
comparison src/scrollbar-x.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 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
451 (double) window_displayed_height (XWINDOW (win)); | 451 (double) window_displayed_height (XWINDOW (win)); |
452 | 452 |
453 if (line > -1.0) | 453 if (line > -1.0) |
454 line = -1.0; | 454 line = -1.0; |
455 signal_special_Xt_user_event (frame, Qscrollbar_page_up, | 455 signal_special_Xt_user_event (frame, Qscrollbar_page_up, |
456 Fcons (win, make_int ((int) line))); | 456 Fcons (win, make_fixnum ((int) line))); |
457 } | 457 } |
458 #else | 458 #else |
459 signal_special_Xt_user_event (frame, Qscrollbar_page_up, | 459 signal_special_Xt_user_event (frame, Qscrollbar_page_up, |
460 Fcons (win, Qnil)); | 460 Fcons (win, Qnil)); |
461 #endif | 461 #endif |
475 { | 475 { |
476 if (line < 1.0) | 476 if (line < 1.0) |
477 line = 1.0; | 477 line = 1.0; |
478 signal_special_Xt_user_event (frame, Qscrollbar_page_down, | 478 signal_special_Xt_user_event (frame, Qscrollbar_page_down, |
479 Fcons (win, | 479 Fcons (win, |
480 make_int ((int) line))); | 480 make_fixnum ((int) line))); |
481 } | 481 } |
482 } | 482 } |
483 #else | 483 #else |
484 signal_special_Xt_user_event (frame, Qscrollbar_page_down, | 484 signal_special_Xt_user_event (frame, Qscrollbar_page_down, |
485 Fcons (win, Qnil)); | 485 Fcons (win, Qnil)); |
499 inhibit_slider_size_change = 0; | 499 inhibit_slider_size_change = 0; |
500 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) | 500 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) |
501 vertical_drag_in_progress = 0; | 501 vertical_drag_in_progress = 0; |
502 SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) = data->slider_value; | 502 SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) = data->slider_value; |
503 SCROLLBAR_X_VDRAG_ORIG_WINDOW_START (instance) = | 503 SCROLLBAR_X_VDRAG_ORIG_WINDOW_START (instance) = |
504 XINT (Fwindow_start (win)); | 504 XFIXNUM (Fwindow_start (win)); |
505 #else | 505 #else |
506 stupid_vertical_scrollbar_drag_hack = 0; | 506 stupid_vertical_scrollbar_drag_hack = 0; |
507 #endif | 507 #endif |
508 break; | 508 break; |
509 | 509 |
525 | 525 |
526 if (SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) < 0) | 526 if (SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) < 0) |
527 { | 527 { |
528 SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) = data->slider_value; | 528 SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) = data->slider_value; |
529 SCROLLBAR_X_VDRAG_ORIG_WINDOW_START (instance) = | 529 SCROLLBAR_X_VDRAG_ORIG_WINDOW_START (instance) = |
530 XINT (Fwindow_start (win)); | 530 XFIXNUM (Fwindow_start (win)); |
531 } | 531 } |
532 | 532 |
533 /* Could replace this piecewise linear scrolling with a | 533 /* Could replace this piecewise linear scrolling with a |
534 quadratic through the three points, but I'm not sure that | 534 quadratic through the three points, but I'm not sure that |
535 would feel any nicer in practice. */ | 535 would feel any nicer in practice. */ |
592 value = SCROLLBAR_X_POS_DATA (instance).maximum - 1; | 592 value = SCROLLBAR_X_POS_DATA (instance).maximum - 1; |
593 if (value < SCROLLBAR_X_POS_DATA (instance).minimum) | 593 if (value < SCROLLBAR_X_POS_DATA (instance).minimum) |
594 value = SCROLLBAR_X_POS_DATA (instance).minimum; | 594 value = SCROLLBAR_X_POS_DATA (instance).minimum; |
595 | 595 |
596 signal_special_Xt_user_event (frame, Qscrollbar_vertical_drag, | 596 signal_special_Xt_user_event (frame, Qscrollbar_vertical_drag, |
597 Fcons (win, make_int (value))); | 597 Fcons (win, make_fixnum (value))); |
598 } | 598 } |
599 break; | 599 break; |
600 | 600 |
601 } | 601 } |
602 } | 602 } |
661 /* #### Fix the damn toolkit code so they all work the same way. | 661 /* #### Fix the damn toolkit code so they all work the same way. |
662 Lucid is the one mostly wrong.*/ | 662 Lucid is the one mostly wrong.*/ |
663 #if defined (LWLIB_SCROLLBARS_LUCID) || defined (LWLIB_SCROLLBARS_ATHENA3D) | 663 #if defined (LWLIB_SCROLLBARS_LUCID) || defined (LWLIB_SCROLLBARS_ATHENA3D) |
664 signal_special_Xt_user_event (frame, Qscrollbar_horizontal_drag, | 664 signal_special_Xt_user_event (frame, Qscrollbar_horizontal_drag, |
665 (Fcons | 665 (Fcons |
666 (win, make_int (data->slider_value)))); | 666 (win, make_fixnum (data->slider_value)))); |
667 #else | 667 #else |
668 signal_special_Xt_user_event (frame, Qscrollbar_horizontal_drag, | 668 signal_special_Xt_user_event (frame, Qscrollbar_horizontal_drag, |
669 (Fcons | 669 (Fcons |
670 (win, | 670 (win, |
671 make_int (data->slider_value - 1)))); | 671 make_fixnum (data->slider_value - 1)))); |
672 #endif | 672 #endif |
673 break; | 673 break; |
674 default: | 674 default: |
675 break; | 675 break; |
676 } | 676 } |