Mercurial > hg > xemacs-beta
comparison src/select-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 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
76 | 76 |
77 /* Test if this is an X symbol that we understand */ | 77 /* Test if this is an X symbol that we understand */ |
78 static int | 78 static int |
79 x_sym_p (Lisp_Object value) | 79 x_sym_p (Lisp_Object value) |
80 { | 80 { |
81 if (NILP (value) || INTP (value)) | 81 if (NILP (value) || FIXNUMP (value)) |
82 return 0; | 82 return 0; |
83 | 83 |
84 /* Check for some of the X symbols */ | 84 /* Check for some of the X symbols */ |
85 if (EQ (value, QSTRING)) return 1; | 85 if (EQ (value, QSTRING)) return 1; |
86 if (EQ (value, QTEXT)) return 1; | 86 if (EQ (value, QTEXT)) return 1; |
99 { | 99 { |
100 /* If it's NIL, we're in trouble. */ | 100 /* If it's NIL, we're in trouble. */ |
101 if (NILP (value)) return 0; | 101 if (NILP (value)) return 0; |
102 | 102 |
103 /* If it's an integer, assume it's a format ID */ | 103 /* If it's an integer, assume it's a format ID */ |
104 if (INTP (value)) return (UINT) (XINT (value)); | 104 if (FIXNUMP (value)) return (UINT) (XFIXNUM (value)); |
105 | 105 |
106 /* If it's a string, register the format(!) */ | 106 /* If it's a string, register the format(!) */ |
107 if (STRINGP (value)) | 107 if (STRINGP (value)) |
108 { | 108 { |
109 Extbyte *valext; | 109 Extbyte *valext; |
169 case CF_OWNERDISPLAY: return QCF_OWNERDISPLAY; | 169 case CF_OWNERDISPLAY: return QCF_OWNERDISPLAY; |
170 case CF_DSPTEXT: return QCF_DSPTEXT; | 170 case CF_DSPTEXT: return QCF_DSPTEXT; |
171 case CF_DSPBITMAP: return QCF_DSPBITMAP; | 171 case CF_DSPBITMAP: return QCF_DSPBITMAP; |
172 case CF_DSPMETAFILEPICT: return QCF_DSPMETAFILEPICT; | 172 case CF_DSPMETAFILEPICT: return QCF_DSPMETAFILEPICT; |
173 case CF_DSPENHMETAFILE: return QCF_DSPENHMETAFILE; | 173 case CF_DSPENHMETAFILE: return QCF_DSPENHMETAFILE; |
174 default: return make_int ((int) format); | 174 default: return make_fixnum ((int) format); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 /* Test if the specified clipboard format is auto-released by the OS. If | 178 /* Test if the specified clipboard format is auto-released by the OS. If |
179 not, we must remember the handle on Vhandle_alist, and free it if | 179 not, we must remember the handle on Vhandle_alist, and free it if |
360 SetClipboardData (cfType, hValue); | 360 SetClipboardData (cfType, hValue); |
361 | 361 |
362 if (!cf_is_autofreed (cfType)) | 362 if (!cf_is_autofreed (cfType)) |
363 { | 363 { |
364 Lisp_Object alist_elt = Qnil, rest; | 364 Lisp_Object alist_elt = Qnil, rest; |
365 Lisp_Object cfType_int = make_int (cfType); | 365 Lisp_Object cfType_int = make_fixnum (cfType); |
366 | 366 |
367 /* First check if there's an element in the alist for this type | 367 /* First check if there's an element in the alist for this type |
368 already. */ | 368 already. */ |
369 alist_elt = assq_no_quit (cfType_int, Vhandle_alist); | 369 alist_elt = assq_no_quit (cfType_int, Vhandle_alist); |
370 | 370 |
438 | 438 |
439 nameext = LISP_STRING_TO_TSTR (type_name); | 439 nameext = LISP_STRING_TO_TSTR (type_name); |
440 format = qxeRegisterClipboardFormat (nameext); | 440 format = qxeRegisterClipboardFormat (nameext); |
441 | 441 |
442 if (format) | 442 if (format) |
443 return make_int ((int) format); | 443 return make_fixnum ((int) format); |
444 else | 444 else |
445 return Qnil; | 445 return Qnil; |
446 } | 446 } |
447 | 447 |
448 static Lisp_Object | 448 static Lisp_Object |
451 UINT format; | 451 UINT format; |
452 Extbyte *namebuf; | 452 Extbyte *namebuf; |
453 int numchars; | 453 int numchars; |
454 | 454 |
455 /* If it's an integer, convert to a symbol if appropriate */ | 455 /* If it's an integer, convert to a symbol if appropriate */ |
456 if (INTP (type_id)) | 456 if (FIXNUMP (type_id)) |
457 type_id = ms_cf_to_symbol (XINT (type_id)); | 457 type_id = ms_cf_to_symbol (XFIXNUM (type_id)); |
458 | 458 |
459 /* If this is a symbol, return it */ | 459 /* If this is a symbol, return it */ |
460 if (SYMBOLP (type_id)) | 460 if (SYMBOLP (type_id)) |
461 return type_id; | 461 return type_id; |
462 | 462 |