Mercurial > hg > xemacs-beta
comparison src/file-coding.c @ 416:ebe98a74bd68 r21-2-16
Import from CVS: tag r21-2-16
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:22:23 +0200 |
parents | da8ed4261e83 |
children | e804706bfb8c |
comparison
equal
deleted
inserted
replaced
415:a27f76b40c83 | 416:ebe98a74bd68 |
---|---|
53 This describes a permutation of the possible coding categories. */ | 53 This describes a permutation of the possible coding categories. */ |
54 int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; | 54 int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; |
55 | 55 |
56 Lisp_Object Qcoding_system_p; | 56 Lisp_Object Qcoding_system_p; |
57 | 57 |
58 Lisp_Object Qno_conversion, Qccl, Qiso2022; | 58 Lisp_Object Qraw_text, Qno_conversion, Qccl, Qiso2022; |
59 /* Qinternal in general.c */ | 59 /* Qinternal in general.c */ |
60 | 60 |
61 Lisp_Object Qmnemonic, Qeol_type; | 61 Lisp_Object Qmnemonic, Qeol_type; |
62 Lisp_Object Qcr, Qcrlf, Qlf; | 62 Lisp_Object Qcr, Qcrlf, Qlf; |
63 Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf; | 63 Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf; |
1529 "Invalid `default-buffer-file-coding-system', set to nil"); | 1529 "Invalid `default-buffer-file-coding-system', set to nil"); |
1530 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system = Qnil; | 1530 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system = Qnil; |
1531 } | 1531 } |
1532 } | 1532 } |
1533 if (NILP (retval)) | 1533 if (NILP (retval)) |
1534 retval = Fget_coding_system (Qno_conversion); | 1534 retval = Fget_coding_system (Qraw_text); |
1535 return retval; | 1535 return retval; |
1536 } | 1536 } |
1537 else | 1537 else |
1538 { | 1538 { |
1539 int i; | 1539 int i; |
1551 break; | 1551 break; |
1552 } | 1552 } |
1553 if (cat >= 0) | 1553 if (cat >= 0) |
1554 return coding_category_system[cat]; | 1554 return coding_category_system[cat]; |
1555 else | 1555 else |
1556 return Fget_coding_system (Qno_conversion); | 1556 return Fget_coding_system (Qraw_text); |
1557 } | 1557 } |
1558 } | 1558 } |
1559 | 1559 |
1560 /* Given a seekable read stream and potential coding system and EOL type | 1560 /* Given a seekable read stream and potential coding system and EOL type |
1561 as specified, do any autodetection that is called for. If the | 1561 as specified, do any autodetection that is called for. If the |
5445 DEFSUBR (Fset_char_ucs); | 5445 DEFSUBR (Fset_char_ucs); |
5446 DEFSUBR (Fchar_ucs); | 5446 DEFSUBR (Fchar_ucs); |
5447 #endif /* MULE */ | 5447 #endif /* MULE */ |
5448 defsymbol (&Qcoding_system_p, "coding-system-p"); | 5448 defsymbol (&Qcoding_system_p, "coding-system-p"); |
5449 defsymbol (&Qno_conversion, "no-conversion"); | 5449 defsymbol (&Qno_conversion, "no-conversion"); |
5450 defsymbol (&Qraw_text, "raw-text"); | |
5450 #ifdef MULE | 5451 #ifdef MULE |
5451 defsymbol (&Qbig5, "big5"); | 5452 defsymbol (&Qbig5, "big5"); |
5452 defsymbol (&Qshift_jis, "shift-jis"); | 5453 defsymbol (&Qshift_jis, "shift-jis"); |
5453 defsymbol (&Qucs4, "ucs-4"); | 5454 defsymbol (&Qucs4, "ucs-4"); |
5454 defsymbol (&Qutf8, "utf-8"); | 5455 defsymbol (&Qutf8, "utf-8"); |
5641 | 5642 |
5642 DEFINE_CODESYS_PROP (CODESYS_PROP_CCL, Qencode); | 5643 DEFINE_CODESYS_PROP (CODESYS_PROP_CCL, Qencode); |
5643 DEFINE_CODESYS_PROP (CODESYS_PROP_CCL, Qdecode); | 5644 DEFINE_CODESYS_PROP (CODESYS_PROP_CCL, Qdecode); |
5644 #endif /* MULE */ | 5645 #endif /* MULE */ |
5645 /* Need to create this here or we're really screwed. */ | 5646 /* Need to create this here or we're really screwed. */ |
5646 Fmake_coding_system (Qno_conversion, Qno_conversion, build_string ("No conversion"), | 5647 Fmake_coding_system |
5647 list2 (Qmnemonic, build_string ("Noconv"))); | 5648 (Qraw_text, Qno_conversion, |
5648 | 5649 build_string ("Raw text, which means it converts only line-break-codes."), |
5649 Fcopy_coding_system (Fcoding_system_property (Qno_conversion, Qeol_lf), | 5650 list2 (Qmnemonic, build_string ("Raw"))); |
5650 Qbinary); | 5651 |
5652 Fmake_coding_system | |
5653 (Qbinary, Qno_conversion, | |
5654 build_string ("Binary, which means it does not convert anything."), | |
5655 list4 (Qeol_type, Qlf, | |
5656 Qmnemonic, build_string ("Binary"))); | |
5657 | |
5658 Fdefine_coding_system_alias (Qno_conversion, Qraw_text); | |
5651 | 5659 |
5652 /* Need this for bootstrapping */ | 5660 /* Need this for bootstrapping */ |
5653 coding_category_system[CODING_CATEGORY_NO_CONVERSION] = | 5661 coding_category_system[CODING_CATEGORY_NO_CONVERSION] = |
5654 Fget_coding_system (Qno_conversion); | 5662 Fget_coding_system (Qraw_text); |
5655 | 5663 |
5656 #ifdef MULE | 5664 #ifdef MULE |
5657 { | 5665 { |
5658 unsigned int i; | 5666 unsigned int i; |
5659 | 5667 |