Mercurial > emacs
comparison src/coding.c @ 88430:6418a272b97e
* coding.c: Delete unused variables.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Tue, 05 Mar 2002 00:08:50 +0000 |
| parents | d29ddd7d50f9 |
| children | 3a34b722dd71 |
comparison
equal
deleted
inserted
replaced
| 88429:89eaf88b37b4 | 88430:6418a272b97e |
|---|---|
| 1269 decode_coding_utf_16 (coding) | 1269 decode_coding_utf_16 (coding) |
| 1270 struct coding_system *coding; | 1270 struct coding_system *coding; |
| 1271 { | 1271 { |
| 1272 unsigned char *src = coding->source + coding->consumed; | 1272 unsigned char *src = coding->source + coding->consumed; |
| 1273 unsigned char *src_end = coding->source + coding->src_bytes; | 1273 unsigned char *src_end = coding->source + coding->src_bytes; |
| 1274 unsigned char *src_base, *surrogate_high_base; | 1274 unsigned char *src_base; |
| 1275 int *charbuf = coding->charbuf; | 1275 int *charbuf = coding->charbuf; |
| 1276 int *charbuf_end = charbuf + coding->charbuf_size; | 1276 int *charbuf_end = charbuf + coding->charbuf_size; |
| 1277 int consumed_chars = 0, consumed_chars_base; | 1277 int consumed_chars = 0, consumed_chars_base; |
| 1278 int multibytep = coding->src_multibyte; | 1278 int multibytep = coding->src_multibyte; |
| 1279 enum utf_16_bom_type bom = CODING_UTF_16_BOM (coding); | 1279 enum utf_16_bom_type bom = CODING_UTF_16_BOM (coding); |
| 1941 int *charbuf = coding->charbuf; | 1941 int *charbuf = coding->charbuf; |
| 1942 int *charbuf_end = charbuf + coding->charbuf_used; | 1942 int *charbuf_end = charbuf + coding->charbuf_used; |
| 1943 unsigned char *dst = coding->destination + coding->produced; | 1943 unsigned char *dst = coding->destination + coding->produced; |
| 1944 unsigned char *dst_end = coding->destination + coding->dst_bytes; | 1944 unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 1945 int safe_room = 8; | 1945 int safe_room = 8; |
| 1946 unsigned char *adjusted_dst_end =dst_end - 8; | |
| 1947 int produced_chars = 0; | 1946 int produced_chars = 0; |
| 1948 Lisp_Object attrs, eol_type, charset_list; | 1947 Lisp_Object attrs, eol_type, charset_list; |
| 1949 int c; | 1948 int c; |
| 1950 | 1949 |
| 1951 CODING_GET_INFO (coding, attrs, eol_type, charset_list); | 1950 CODING_GET_INFO (coding, attrs, eol_type, charset_list); |
| 4411 void | 4410 void |
| 4412 setup_coding_system (coding_system, coding) | 4411 setup_coding_system (coding_system, coding) |
| 4413 Lisp_Object coding_system; | 4412 Lisp_Object coding_system; |
| 4414 struct coding_system *coding; | 4413 struct coding_system *coding; |
| 4415 { | 4414 { |
| 4416 int id; | |
| 4417 Lisp_Object attrs; | 4415 Lisp_Object attrs; |
| 4418 Lisp_Object eol_type; | 4416 Lisp_Object eol_type; |
| 4419 Lisp_Object coding_type; | 4417 Lisp_Object coding_type; |
| 4420 Lisp_Object val; | 4418 Lisp_Object val; |
| 4421 | 4419 |
| 4579 | 4577 |
| 4580 Lisp_Object | 4578 Lisp_Object |
| 4581 raw_text_coding_system (coding_system) | 4579 raw_text_coding_system (coding_system) |
| 4582 Lisp_Object coding_system; | 4580 Lisp_Object coding_system; |
| 4583 { | 4581 { |
| 4584 Lisp_Object spec, attrs, coding_type; | 4582 Lisp_Object spec, attrs; |
| 4585 Lisp_Object eol_type, raw_text_eol_type; | 4583 Lisp_Object eol_type, raw_text_eol_type; |
| 4586 | 4584 |
| 4587 spec = CODING_SYSTEM_SPEC (coding_system); | 4585 spec = CODING_SYSTEM_SPEC (coding_system); |
| 4588 attrs = AREF (spec, 0); | 4586 attrs = AREF (spec, 0); |
| 4589 | 4587 |
| 4614 attrs = AREF (spec, 0); | 4612 attrs = AREF (spec, 0); |
| 4615 eol_type = AREF (spec, 2); | 4613 eol_type = AREF (spec, 2); |
| 4616 if (VECTORP (eol_type)) | 4614 if (VECTORP (eol_type)) |
| 4617 { | 4615 { |
| 4618 Lisp_Object parent_spec; | 4616 Lisp_Object parent_spec; |
| 4619 Lisp_Object parent_attrs; | |
| 4620 Lisp_Object parent_eol_type; | 4617 Lisp_Object parent_eol_type; |
| 4621 | 4618 |
| 4622 parent_spec | 4619 parent_spec |
| 4623 = CODING_SYSTEM_SPEC (buffer_defaults.buffer_file_coding_system); | 4620 = CODING_SYSTEM_SPEC (buffer_defaults.buffer_file_coding_system); |
| 4624 parent_eol_type = AREF (parent_spec, 2); | 4621 parent_eol_type = AREF (parent_spec, 2); |
| 4761 Lisp_Object attrs, coding_type; | 4758 Lisp_Object attrs, coding_type; |
| 4762 unsigned char *src = source, *src_end = src + src_bytes; | 4759 unsigned char *src = source, *src_end = src + src_bytes; |
| 4763 unsigned char c; | 4760 unsigned char c; |
| 4764 int total = 0; | 4761 int total = 0; |
| 4765 int eol_seen = EOL_SEEN_NONE; | 4762 int eol_seen = EOL_SEEN_NONE; |
| 4766 int first_eol_seen; | |
| 4767 | 4763 |
| 4768 attrs = CODING_ID_ATTRS (coding->id); | 4764 attrs = CODING_ID_ATTRS (coding->id); |
| 4769 coding_type = CODING_ATTR_TYPE (attrs); | 4765 coding_type = CODING_ATTR_TYPE (attrs); |
| 4770 | 4766 |
| 4771 if (EQ (coding_type, Qccl)) | 4767 if (EQ (coding_type, Qccl)) |
| 4843 static void | 4839 static void |
| 4844 adjust_coding_eol_type (coding, eol_seen) | 4840 adjust_coding_eol_type (coding, eol_seen) |
| 4845 struct coding_system *coding; | 4841 struct coding_system *coding; |
| 4846 int eol_seen; | 4842 int eol_seen; |
| 4847 { | 4843 { |
| 4848 Lisp_Object eol_type, coding_system; | 4844 Lisp_Object eol_type; |
| 4849 | 4845 |
| 4850 eol_type = CODING_ID_EOL_TYPE (coding->id); | 4846 eol_type = CODING_ID_EOL_TYPE (coding->id); |
| 4851 if (eol_seen & EOL_SEEN_LF) | 4847 if (eol_seen & EOL_SEEN_LF) |
| 4852 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 0)); | 4848 coding->id = CODING_SYSTEM_ID (AREF (eol_type, 0)); |
| 4853 else if (eol_type & EOL_SEEN_CRLF) | 4849 else if (eol_type & EOL_SEEN_CRLF) |
| 5574 | 5570 |
| 5575 static int | 5571 static int |
| 5576 encode_coding (coding) | 5572 encode_coding (coding) |
| 5577 struct coding_system *coding; | 5573 struct coding_system *coding; |
| 5578 { | 5574 { |
| 5579 int error = 0; | |
| 5580 Lisp_Object attrs; | 5575 Lisp_Object attrs; |
| 5581 | 5576 |
| 5582 attrs = CODING_ID_ATTRS (coding->id); | 5577 attrs = CODING_ID_ATTRS (coding->id); |
| 5583 | 5578 |
| 5584 if (BUFFERP (coding->dst_object)) | 5579 if (BUFFERP (coding->dst_object)) |
| 6284 char_encodable_p (c, attrs) | 6279 char_encodable_p (c, attrs) |
| 6285 int c; | 6280 int c; |
| 6286 Lisp_Object attrs; | 6281 Lisp_Object attrs; |
| 6287 { | 6282 { |
| 6288 Lisp_Object tail; | 6283 Lisp_Object tail; |
| 6289 int id; | |
| 6290 struct charset *charset; | 6284 struct charset *charset; |
| 6291 | 6285 |
| 6292 for (tail = CODING_ATTR_CHARSET_LIST (attrs); | 6286 for (tail = CODING_ATTR_CHARSET_LIST (attrs); |
| 6293 CONSP (tail); tail = XCDR (tail)) | 6287 CONSP (tail); tail = XCDR (tail)) |
| 6294 { | 6288 { |
| 6691 Lisp_Object | 6685 Lisp_Object |
| 6692 code_convert_string_norecord (string, coding_system, encodep) | 6686 code_convert_string_norecord (string, coding_system, encodep) |
| 6693 Lisp_Object string, coding_system; | 6687 Lisp_Object string, coding_system; |
| 6694 int encodep; | 6688 int encodep; |
| 6695 { | 6689 { |
| 6696 code_convert_string (string, coding_system, Qt, encodep, 0, 1); | 6690 return code_convert_string (string, coding_system, Qt, encodep, 0, 1); |
| 6697 } | 6691 } |
| 6698 | 6692 |
| 6699 | 6693 |
| 6700 DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, | 6694 DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, |
| 6701 2, 4, 0, | 6695 2, 4, 0, |
| 7347 } | 7341 } |
| 7348 else if (EQ (coding_type, Qiso_2022)) | 7342 else if (EQ (coding_type, Qiso_2022)) |
| 7349 { | 7343 { |
| 7350 Lisp_Object initial, reg_usage, request, flags; | 7344 Lisp_Object initial, reg_usage, request, flags; |
| 7351 struct charset *charset; | 7345 struct charset *charset; |
| 7352 int i, id, max_id = -1; | 7346 int i, id; |
| 7353 | 7347 |
| 7354 if (nargs < coding_arg_iso2022_max) | 7348 if (nargs < coding_arg_iso2022_max) |
| 7355 goto short_args; | 7349 goto short_args; |
| 7356 | 7350 |
| 7357 initial = Fcopy_sequence (args[coding_arg_iso2022_initial]); | 7351 initial = Fcopy_sequence (args[coding_arg_iso2022_initial]); |
