diff options
| author | Tom Tromey | 2018-08-07 18:08:53 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-07 18:08:53 -0600 |
| commit | d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8 (patch) | |
| tree | 04c920acf142f686d3cac11080b17a2fb0dfc9af /src/composite.c | |
| parent | 68ebff23f7057090da260830500cb278f7b886a5 (diff) | |
| download | emacs-d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8.tar.gz emacs-d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8.zip | |
More macro renamings for bignum
* src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
src/category.c, src/ccl.c, src/character.c, src/character.h,
src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
Diffstat (limited to 'src/composite.c')
| -rw-r--r-- | src/composite.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/composite.c b/src/composite.c index f5e05d68755..39c54fcfab3 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -196,9 +196,9 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 196 | if (FIXNUMP (id)) | 196 | if (FIXNUMP (id)) |
| 197 | { | 197 | { |
| 198 | /* PROP should be Form-B. */ | 198 | /* PROP should be Form-B. */ |
| 199 | if (XINT (id) < 0 || XINT (id) >= n_compositions) | 199 | if (XFIXNUM (id) < 0 || XFIXNUM (id) >= n_compositions) |
| 200 | goto invalid_composition; | 200 | goto invalid_composition; |
| 201 | return XINT (id); | 201 | return XFIXNUM (id); |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | /* PROP should be Form-A. | 204 | /* PROP should be Form-A. |
| @@ -206,7 +206,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 206 | if (!CONSP (id)) | 206 | if (!CONSP (id)) |
| 207 | goto invalid_composition; | 207 | goto invalid_composition; |
| 208 | length = XCAR (id); | 208 | length = XCAR (id); |
| 209 | if (!FIXNUMP (length) || XINT (length) != nchars) | 209 | if (!FIXNUMP (length) || XFIXNUM (length) != nchars) |
| 210 | goto invalid_composition; | 210 | goto invalid_composition; |
| 211 | 211 | ||
| 212 | components = XCDR (id); | 212 | components = XCDR (id); |
| @@ -251,7 +251,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 251 | id = HASH_VALUE (hash_table, hash_index); | 251 | id = HASH_VALUE (hash_table, hash_index); |
| 252 | XSETCAR (prop, id); | 252 | XSETCAR (prop, id); |
| 253 | XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop)))); | 253 | XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop)))); |
| 254 | return XINT (id); | 254 | return XFIXNUM (id); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | /* This composition is a new one. We must register it. */ | 257 | /* This composition is a new one. We must register it. */ |
| @@ -332,7 +332,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 332 | for (i = 0; i < glyph_len; i++) | 332 | for (i = 0; i < glyph_len; i++) |
| 333 | { | 333 | { |
| 334 | int this_width; | 334 | int this_width; |
| 335 | ch = XINT (key_contents[i]); | 335 | ch = XFIXNUM (key_contents[i]); |
| 336 | /* TAB in a composition means display glyphs with padding | 336 | /* TAB in a composition means display glyphs with padding |
| 337 | space on the left or right. */ | 337 | space on the left or right. */ |
| 338 | this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch)); | 338 | this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch)); |
| @@ -345,7 +345,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 345 | /* Rule-base composition. */ | 345 | /* Rule-base composition. */ |
| 346 | double leftmost = 0.0, rightmost; | 346 | double leftmost = 0.0, rightmost; |
| 347 | 347 | ||
| 348 | ch = XINT (key_contents[0]); | 348 | ch = XFIXNUM (key_contents[0]); |
| 349 | rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; | 349 | rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; |
| 350 | 350 | ||
| 351 | for (i = 1; i < glyph_len; i += 2) | 351 | for (i = 1; i < glyph_len; i += 2) |
| @@ -354,8 +354,8 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 354 | int this_width; | 354 | int this_width; |
| 355 | double this_left; | 355 | double this_left; |
| 356 | 356 | ||
| 357 | rule = XINT (key_contents[i]); | 357 | rule = XFIXNUM (key_contents[i]); |
| 358 | ch = XINT (key_contents[i + 1]); | 358 | ch = XFIXNUM (key_contents[i + 1]); |
| 359 | this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; | 359 | this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; |
| 360 | 360 | ||
| 361 | /* A composition rule is specified by an integer value | 361 | /* A composition rule is specified by an integer value |
| @@ -433,7 +433,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit, | |||
| 433 | { | 433 | { |
| 434 | val = Fnext_single_property_change (make_fixnum (pos), Qcomposition, | 434 | val = Fnext_single_property_change (make_fixnum (pos), Qcomposition, |
| 435 | object, make_fixnum (limit)); | 435 | object, make_fixnum (limit)); |
| 436 | pos = XINT (val); | 436 | pos = XFIXNUM (val); |
| 437 | if (pos == limit) | 437 | if (pos == limit) |
| 438 | return 0; | 438 | return 0; |
| 439 | } | 439 | } |
| @@ -444,7 +444,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit, | |||
| 444 | return 1; | 444 | return 1; |
| 445 | val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition, | 445 | val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition, |
| 446 | object, make_fixnum (limit)); | 446 | object, make_fixnum (limit)); |
| 447 | pos = XINT (val); | 447 | pos = XFIXNUM (val); |
| 448 | if (pos == limit) | 448 | if (pos == limit) |
| 449 | return 0; | 449 | return 0; |
| 450 | pos--; | 450 | pos--; |
| @@ -836,7 +836,7 @@ fill_gstring_body (Lisp_Object gstring) | |||
| 836 | for (i = 0; i < len; i++) | 836 | for (i = 0; i < len; i++) |
| 837 | { | 837 | { |
| 838 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); | 838 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); |
| 839 | int c = XFASTINT (AREF (header, i + 1)); | 839 | int c = XFIXNAT (AREF (header, i + 1)); |
| 840 | 840 | ||
| 841 | if (NILP (g)) | 841 | if (NILP (g)) |
| 842 | { | 842 | { |
| @@ -852,7 +852,7 @@ fill_gstring_body (Lisp_Object gstring) | |||
| 852 | } | 852 | } |
| 853 | else | 853 | else |
| 854 | { | 854 | { |
| 855 | int width = XFASTINT (CHAR_TABLE_REF (Vchar_width_table, c)); | 855 | int width = XFIXNAT (CHAR_TABLE_REF (Vchar_width_table, c)); |
| 856 | 856 | ||
| 857 | LGLYPH_SET_CODE (g, c); | 857 | LGLYPH_SET_CODE (g, c); |
| 858 | LGLYPH_SET_LBEARING (g, 0); | 858 | LGLYPH_SET_LBEARING (g, 0); |
| @@ -941,7 +941,7 @@ char_composable_p (int c) | |||
| 941 | return (c > ' ' | 941 | return (c > ' ' |
| 942 | && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER | 942 | && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER |
| 943 | || (val = CHAR_TABLE_REF (Vunicode_category_table, c), | 943 | || (val = CHAR_TABLE_REF (Vunicode_category_table, c), |
| 944 | (FIXNUMP (val) && (XINT (val) <= UNICODE_CATEGORY_So))))); | 944 | (FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_So))))); |
| 945 | } | 945 | } |
| 946 | 946 | ||
| 947 | /* Update cmp_it->stop_pos to the next position after CHARPOS (and | 947 | /* Update cmp_it->stop_pos to the next position after CHARPOS (and |
| @@ -1031,10 +1031,10 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos, | |||
| 1031 | Lisp_Object elt = XCAR (val); | 1031 | Lisp_Object elt = XCAR (val); |
| 1032 | if (VECTORP (elt) && ASIZE (elt) == 3 | 1032 | if (VECTORP (elt) && ASIZE (elt) == 3 |
| 1033 | && FIXNATP (AREF (elt, 1)) | 1033 | && FIXNATP (AREF (elt, 1)) |
| 1034 | && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start) | 1034 | && charpos - 1 - XFIXNAT (AREF (elt, 1)) >= start) |
| 1035 | { | 1035 | { |
| 1036 | cmp_it->rule_idx = ridx; | 1036 | cmp_it->rule_idx = ridx; |
| 1037 | cmp_it->lookback = XFASTINT (AREF (elt, 1)); | 1037 | cmp_it->lookback = XFIXNAT (AREF (elt, 1)); |
| 1038 | cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; | 1038 | cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; |
| 1039 | cmp_it->ch = c; | 1039 | cmp_it->ch = c; |
| 1040 | return; | 1040 | return; |
| @@ -1082,9 +1082,9 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos, | |||
| 1082 | Lisp_Object elt = XCAR (val); | 1082 | Lisp_Object elt = XCAR (val); |
| 1083 | if (VECTORP (elt) && ASIZE (elt) == 3 | 1083 | if (VECTORP (elt) && ASIZE (elt) == 3 |
| 1084 | && FIXNATP (AREF (elt, 1)) | 1084 | && FIXNATP (AREF (elt, 1)) |
| 1085 | && charpos - XFASTINT (AREF (elt, 1)) > endpos) | 1085 | && charpos - XFIXNAT (AREF (elt, 1)) > endpos) |
| 1086 | { | 1086 | { |
| 1087 | ptrdiff_t back = XFASTINT (AREF (elt, 1)); | 1087 | ptrdiff_t back = XFIXNAT (AREF (elt, 1)); |
| 1088 | ptrdiff_t cpos = charpos - back, bpos; | 1088 | ptrdiff_t cpos = charpos - back, bpos; |
| 1089 | 1089 | ||
| 1090 | if (back == 0) | 1090 | if (back == 0) |
| @@ -1223,7 +1223,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos, | |||
| 1223 | if (! VECTORP (elt) || ASIZE (elt) != 3 | 1223 | if (! VECTORP (elt) || ASIZE (elt) != 3 |
| 1224 | || ! FIXNUMP (AREF (elt, 1))) | 1224 | || ! FIXNUMP (AREF (elt, 1))) |
| 1225 | continue; | 1225 | continue; |
| 1226 | if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback) | 1226 | if (XFIXNAT (AREF (elt, 1)) != cmp_it->lookback) |
| 1227 | goto no_composition; | 1227 | goto no_composition; |
| 1228 | lgstring = autocmp_chars (elt, charpos, bytepos, endpos, | 1228 | lgstring = autocmp_chars (elt, charpos, bytepos, endpos, |
| 1229 | w, face, string); | 1229 | w, face, string); |
| @@ -1262,7 +1262,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos, | |||
| 1262 | goto no_composition; | 1262 | goto no_composition; |
| 1263 | if (NILP (LGSTRING_ID (lgstring))) | 1263 | if (NILP (LGSTRING_ID (lgstring))) |
| 1264 | lgstring = composition_gstring_put_cache (lgstring, -1); | 1264 | lgstring = composition_gstring_put_cache (lgstring, -1); |
| 1265 | cmp_it->id = XINT (LGSTRING_ID (lgstring)); | 1265 | cmp_it->id = XFIXNUM (LGSTRING_ID (lgstring)); |
| 1266 | int i; | 1266 | int i; |
| 1267 | for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++) | 1267 | for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++) |
| 1268 | if (NILP (LGSTRING_GLYPH (lgstring, i))) | 1268 | if (NILP (LGSTRING_GLYPH (lgstring, i))) |
| @@ -1391,7 +1391,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff | |||
| 1391 | cmp_it->width = 0; | 1391 | cmp_it->width = 0; |
| 1392 | for (i = cmp_it->nchars - 1; i >= 0; i--) | 1392 | for (i = cmp_it->nchars - 1; i >= 0; i--) |
| 1393 | { | 1393 | { |
| 1394 | c = XINT (LGSTRING_CHAR (gstring, from + i)); | 1394 | c = XFIXNUM (LGSTRING_CHAR (gstring, from + i)); |
| 1395 | cmp_it->nbytes += CHAR_BYTES (c); | 1395 | cmp_it->nbytes += CHAR_BYTES (c); |
| 1396 | cmp_it->width += CHARACTER_WIDTH (c); | 1396 | cmp_it->width += CHARACTER_WIDTH (c); |
| 1397 | } | 1397 | } |
| @@ -1561,7 +1561,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit, | |||
| 1561 | 1561 | ||
| 1562 | if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1))) | 1562 | if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1))) |
| 1563 | { | 1563 | { |
| 1564 | EMACS_INT check_pos = cur.pos - XFASTINT (AREF (elt, 1)); | 1564 | EMACS_INT check_pos = cur.pos - XFIXNAT (AREF (elt, 1)); |
| 1565 | struct position_record check; | 1565 | struct position_record check; |
| 1566 | 1566 | ||
| 1567 | if (check_pos < head | 1567 | if (check_pos < head |
| @@ -1739,8 +1739,8 @@ should be ignored. */) | |||
| 1739 | if (NILP (BVAR (current_buffer, enable_multibyte_characters))) | 1739 | if (NILP (BVAR (current_buffer, enable_multibyte_characters))) |
| 1740 | error ("Attempt to shape unibyte text"); | 1740 | error ("Attempt to shape unibyte text"); |
| 1741 | validate_region (&from, &to); | 1741 | validate_region (&from, &to); |
| 1742 | frompos = XFASTINT (from); | 1742 | frompos = XFIXNAT (from); |
| 1743 | topos = XFASTINT (to); | 1743 | topos = XFIXNAT (to); |
| 1744 | frombyte = CHAR_TO_BYTE (frompos); | 1744 | frombyte = CHAR_TO_BYTE (frompos); |
| 1745 | } | 1745 | } |
| 1746 | else | 1746 | else |
| @@ -1785,7 +1785,7 @@ for the composition. See `compose-region' for more details. */) | |||
| 1785 | && !STRINGP (components)) | 1785 | && !STRINGP (components)) |
| 1786 | CHECK_VECTOR (components); | 1786 | CHECK_VECTOR (components); |
| 1787 | 1787 | ||
| 1788 | compose_text (XINT (start), XINT (end), components, modification_func, Qnil); | 1788 | compose_text (XFIXNUM (start), XFIXNUM (end), components, modification_func, Qnil); |
| 1789 | return Qnil; | 1789 | return Qnil; |
| 1790 | } | 1790 | } |
| 1791 | 1791 | ||
| @@ -1824,7 +1824,7 @@ See `find-composition' for more details. */) | |||
| 1824 | if (!NILP (limit)) | 1824 | if (!NILP (limit)) |
| 1825 | { | 1825 | { |
| 1826 | CHECK_FIXNUM_COERCE_MARKER (limit); | 1826 | CHECK_FIXNUM_COERCE_MARKER (limit); |
| 1827 | to = min (XINT (limit), ZV); | 1827 | to = min (XFIXNUM (limit), ZV); |
| 1828 | } | 1828 | } |
| 1829 | else | 1829 | else |
| 1830 | to = -1; | 1830 | to = -1; |
| @@ -1832,15 +1832,15 @@ See `find-composition' for more details. */) | |||
| 1832 | if (!NILP (string)) | 1832 | if (!NILP (string)) |
| 1833 | { | 1833 | { |
| 1834 | CHECK_STRING (string); | 1834 | CHECK_STRING (string); |
| 1835 | if (XINT (pos) < 0 || XINT (pos) > SCHARS (string)) | 1835 | if (XFIXNUM (pos) < 0 || XFIXNUM (pos) > SCHARS (string)) |
| 1836 | args_out_of_range (string, pos); | 1836 | args_out_of_range (string, pos); |
| 1837 | } | 1837 | } |
| 1838 | else | 1838 | else |
| 1839 | { | 1839 | { |
| 1840 | if (XINT (pos) < BEGV || XINT (pos) > ZV) | 1840 | if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) > ZV) |
| 1841 | args_out_of_range (Fcurrent_buffer (), pos); | 1841 | args_out_of_range (Fcurrent_buffer (), pos); |
| 1842 | } | 1842 | } |
| 1843 | from = XINT (pos); | 1843 | from = XFIXNUM (pos); |
| 1844 | 1844 | ||
| 1845 | if (!find_composition (from, to, &start, &end, &prop, string)) | 1845 | if (!find_composition (from, to, &start, &end, &prop, string)) |
| 1846 | { | 1846 | { |
| @@ -1851,12 +1851,12 @@ See `find-composition' for more details. */) | |||
| 1851 | return list3 (make_fixnum (start), make_fixnum (end), gstring); | 1851 | return list3 (make_fixnum (start), make_fixnum (end), gstring); |
| 1852 | return Qnil; | 1852 | return Qnil; |
| 1853 | } | 1853 | } |
| 1854 | if ((end <= XINT (pos) || start > XINT (pos))) | 1854 | if ((end <= XFIXNUM (pos) || start > XFIXNUM (pos))) |
| 1855 | { | 1855 | { |
| 1856 | ptrdiff_t s, e; | 1856 | ptrdiff_t s, e; |
| 1857 | 1857 | ||
| 1858 | if (find_automatic_composition (from, to, &s, &e, &gstring, string) | 1858 | if (find_automatic_composition (from, to, &s, &e, &gstring, string) |
| 1859 | && (e <= XINT (pos) ? e > end : s < start)) | 1859 | && (e <= XFIXNUM (pos) ? e > end : s < start)) |
| 1860 | return list3 (make_fixnum (s), make_fixnum (e), gstring); | 1860 | return list3 (make_fixnum (s), make_fixnum (e), gstring); |
| 1861 | } | 1861 | } |
| 1862 | if (!composition_valid_p (start, end, prop)) | 1862 | if (!composition_valid_p (start, end, prop)) |