comparison src/coding.c @ 89394:6ffca50f25b9

(Fcheck_coding_systems_region): Fix type errors.
author Dave Love <fx@gnu.org>
date Thu, 13 Feb 2003 22:23:01 +0000
parents 4cc9e57fcabc
children 3e1d187b52c3
comparison
equal deleted inserted replaced
89393:09b0941c8b91 89394:6ffca50f25b9
5438 else 5438 else
5439 *dst++ = CHAR_TO_BYTE8 (c); 5439 *dst++ = CHAR_TO_BYTE8 (c);
5440 produced_chars++; 5440 produced_chars++;
5441 } 5441 }
5442 else 5442 else
5443 /* This is an annotation data. */ 5443 /* This is an annotation datum. */
5444 buf -= c + 1; 5444 buf -= c + 1;
5445 } 5445 }
5446 } 5446 }
5447 else 5447 else
5448 { 5448 {
5814 5814
5815 return coding->result; 5815 return coding->result;
5816 } 5816 }
5817 5817
5818 5818
5819 /* Extract an annotation data from a composition starting at POS and 5819 /* Extract an annotation datum from a composition starting at POS and
5820 ending before LIMIT of CODING->src_object (buffer or string), store 5820 ending before LIMIT of CODING->src_object (buffer or string), store
5821 the data in BUF, set *STOP to a starting position of the next 5821 the data in BUF, set *STOP to a starting position of the next
5822 composition (if any) or to LIMIT, and return the address of the 5822 composition (if any) or to LIMIT, and return the address of the
5823 next element of BUF. 5823 next element of BUF.
5824 5824
5900 } 5900 }
5901 return buf; 5901 return buf;
5902 } 5902 }
5903 5903
5904 5904
5905 /* Extract an annotation data from a text property `charset' at POS of 5905 /* Extract an annotation datum from a text property `charset' at POS of
5906 CODING->src_object (buffer of string), store the data in BUF, set 5906 CODING->src_object (buffer of string), store the data in BUF, set
5907 *STOP to the position where the value of `charset' property changes 5907 *STOP to the position where the value of `charset' property changes
5908 (limiting by LIMIT), and return the address of the next element of 5908 (limiting by LIMIT), and return the address of the next element of
5909 BUF. 5909 BUF.
5910 5910
6898 start_byte = CHAR_TO_BYTE (XINT (start)); 6898 start_byte = CHAR_TO_BYTE (XINT (start));
6899 end_byte = CHAR_TO_BYTE (XINT (end)); 6899 end_byte = CHAR_TO_BYTE (XINT (end));
6900 if (XINT (end) - XINT (start) == end_byte - start_byte) 6900 if (XINT (end) - XINT (start) == end_byte - start_byte)
6901 return Qt; 6901 return Qt;
6902 6902
6903 if (start < GPT && end > GPT) 6903 if (XINT (start) < GPT && XINT (end) > GPT)
6904 { 6904 {
6905 if ((GPT - start) < (end - GPT)) 6905 if ((GPT - XINT (start)) < (XINT (end) - GPT))
6906 move_gap_both (start, start_byte); 6906 move_gap_both (XINT (start), start_byte);
6907 else 6907 else
6908 move_gap_both (end, end_byte); 6908 move_gap_both (XINT (end), end_byte);
6909 } 6909 }
6910 } 6910 }
6911 6911
6912 coding_attrs_list = Qnil; 6912 coding_attrs_list = Qnil;
6913 for (tail = Vcoding_system_list; CONSP (tail); tail = XCDR (tail)) 6913 for (tail = Vcoding_system_list; CONSP (tail); tail = XCDR (tail))
7029 start_byte = CHAR_TO_BYTE (XINT (start)); 7029 start_byte = CHAR_TO_BYTE (XINT (start));
7030 end_byte = CHAR_TO_BYTE (XINT (end)); 7030 end_byte = CHAR_TO_BYTE (XINT (end));
7031 if (XINT (end) - XINT (start) == end_byte - start_byte) 7031 if (XINT (end) - XINT (start) == end_byte - start_byte)
7032 return Qt; 7032 return Qt;
7033 7033
7034 if (start < GPT && end > GPT) 7034 if (XINT (start) < GPT && XINT (end) > GPT)
7035 { 7035 {
7036 if ((GPT - start) < (end - GPT)) 7036 if ((GPT - XINT (start)) < (XINT (end) - GPT))
7037 move_gap_both (start, start_byte); 7037 move_gap_both (XINT (start), start_byte);
7038 else 7038 else
7039 move_gap_both (end, end_byte); 7039 move_gap_both (XINT (end), end_byte);
7040 } 7040 }
7041 pos = start; 7041 pos = XINT (start);
7042 } 7042 }
7043 7043
7044 list = Qnil; 7044 list = Qnil;
7045 for (tail = coding_system_list; CONSP (tail); tail = XCDR (tail)) 7045 for (tail = coding_system_list; CONSP (tail); tail = XCDR (tail))
7046 { 7046 {
8185 Fcons (intern ("define-coding-system-internal"), 8185 Fcons (intern ("define-coding-system-internal"),
8186 make_number (nargs))); 8186 make_number (nargs)));
8187 } 8187 }
8188 8188
8189 /* Fixme: should this record the alias relationships for 8189 /* Fixme: should this record the alias relationships for
8190 diagnostics? */ 8190 diagnostics? Should it update coding-system-list? */
8191 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, 8191 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias,
8192 Sdefine_coding_system_alias, 2, 2, 0, 8192 Sdefine_coding_system_alias, 2, 2, 0,
8193 doc: /* Define ALIAS as an alias for CODING-SYSTEM. */) 8193 doc: /* Define ALIAS as an alias for CODING-SYSTEM. */)
8194 (alias, coding_system) 8194 (alias, coding_system)
8195 Lisp_Object alias, coding_system; 8195 Lisp_Object alias, coding_system;