comparison src/file-coding.c @ 2286:04bc9d2f42c7

[xemacs-hg @ 2004-09-20 19:18:55 by james] Mark all unused parameters as unused. Also eliminate some unneeded local variables.
author james
date Mon, 20 Sep 2004 19:20:08 +0000
parents 34ca43a57692
children 13a418960a88
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
534 1, Fcoding_system_property (obj, Qeol_type)); 534 1, Fcoding_system_property (obj, Qeol_type));
535 } 535 }
536 536
537 static void 537 static void
538 print_coding_system (Lisp_Object obj, Lisp_Object printcharfun, 538 print_coding_system (Lisp_Object obj, Lisp_Object printcharfun,
539 int escapeflag) 539 int UNUSED (escapeflag))
540 { 540 {
541 Lisp_Coding_System *c = XCODING_SYSTEM (obj); 541 Lisp_Coding_System *c = XCODING_SYSTEM (obj);
542 if (print_readably) 542 if (print_readably)
543 printing_unreadable_object 543 printing_unreadable_object
544 ("printing unreadable object #<coding-system 0x%x>", c->header.uid); 544 ("printing unreadable object #<coding-system 0x%x>", c->header.uid);
551 /* Print an abbreviated version of a coding system (but still containing 551 /* Print an abbreviated version of a coding system (but still containing
552 all the information), for use within a coding system print method. */ 552 all the information), for use within a coding system print method. */
553 553
554 static void 554 static void
555 print_coding_system_in_print_method (Lisp_Object cs, Lisp_Object printcharfun, 555 print_coding_system_in_print_method (Lisp_Object cs, Lisp_Object printcharfun,
556 int escapeflag) 556 int UNUSED (escapeflag))
557 { 557 {
558 write_fmt_string_lisp (printcharfun, "%s[", 1, XCODING_SYSTEM_NAME (cs)); 558 write_fmt_string_lisp (printcharfun, "%s[", 1, XCODING_SYSTEM_NAME (cs));
559 print_coding_system_properties (cs, printcharfun); 559 print_coding_system_properties (cs, printcharfun);
560 write_c_string (printcharfun, "]"); 560 write_c_string (printcharfun, "]");
561 } 561 }
892 int normal; 892 int normal;
893 int internal; 893 int internal;
894 }; 894 };
895 895
896 static int 896 static int
897 add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object value, 897 add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object UNUSED (value),
898 void *coding_system_list_closure) 898 void *coding_system_list_closure)
899 { 899 {
900 /* This function can GC */ 900 /* This function can GC */
901 struct coding_system_list_closure *cscl = 901 struct coding_system_list_closure *cscl =
902 (struct coding_system_list_closure *) coding_system_list_closure; 902 (struct coding_system_list_closure *) coding_system_list_closure;
1693 RETURN_NOT_REACHED (Qnil); 1693 RETURN_NOT_REACHED (Qnil);
1694 } 1694 }
1695 1695
1696 /* A maphash function, for removing dangling coding system aliases. */ 1696 /* A maphash function, for removing dangling coding system aliases. */
1697 static int 1697 static int
1698 dangling_coding_system_alias_p (Lisp_Object alias, 1698 dangling_coding_system_alias_p (Lisp_Object UNUSED (alias),
1699 Lisp_Object aliasee, 1699 Lisp_Object aliasee,
1700 void *dangling_aliases) 1700 void *dangling_aliases)
1701 { 1701 {
1702 if (SYMBOLP (aliasee) 1702 if (SYMBOLP (aliasee)
1703 && NILP (Fgethash (aliasee, Vcoding_system_hash_table, Qnil))) 1703 && NILP (Fgethash (aliasee, Vcoding_system_hash_table, Qnil)))
1727 See also `coding-system-alias-p', `coding-system-aliasee', 1727 See also `coding-system-alias-p', `coding-system-aliasee',
1728 and `coding-system-canonical-name-p'. 1728 and `coding-system-canonical-name-p'.
1729 */ 1729 */
1730 (alias, aliasee)) 1730 (alias, aliasee))
1731 { 1731 {
1732 Lisp_Object real_coding_system, probe; 1732 Lisp_Object probe;
1733 1733
1734 CHECK_SYMBOL (alias); 1734 CHECK_SYMBOL (alias);
1735 1735
1736 if (!NILP (Fcoding_system_canonical_name_p (alias))) 1736 if (!NILP (Fcoding_system_canonical_name_p (alias)))
1737 invalid_change 1737 invalid_change
1774 1774
1775 if (CODING_SYSTEMP (aliasee)) 1775 if (CODING_SYSTEMP (aliasee))
1776 aliasee = XCODING_SYSTEM_NAME (aliasee); 1776 aliasee = XCODING_SYSTEM_NAME (aliasee);
1777 1777
1778 /* Checks that aliasee names a coding-system */ 1778 /* Checks that aliasee names a coding-system */
1779 real_coding_system = Fget_coding_system (aliasee); 1779 (void) Fget_coding_system (aliasee);
1780 1780
1781 /* Check for coding system alias loops */ 1781 /* Check for coding system alias loops */
1782 if (EQ (alias, aliasee)) 1782 if (EQ (alias, aliasee))
1783 alias_loop: invalid_operation_2 1783 alias_loop: invalid_operation_2
1784 ("Attempt to create a coding system alias loop", alias, aliasee); 1784 ("Attempt to create a coding system alias loop", alias, aliasee);
3004 { 3004 {
3005 int dummy; 3005 int dummy;
3006 }; 3006 };
3007 3007
3008 static void 3008 static void
3009 no_conversion_detect (struct detection_state *st, const UExtbyte *src, 3009 no_conversion_detect (struct detection_state *st, const UExtbyte *UNUSED (src),
3010 Bytecount n) 3010 Bytecount UNUSED (n))
3011 { 3011 {
3012 /* Hack until we get better handling of this stuff! */ 3012 /* Hack until we get better handling of this stuff! */
3013 DET_RESULT (st, no_conversion) = DET_SLIGHTLY_LIKELY; 3013 DET_RESULT (st, no_conversion) = DET_SLIGHTLY_LIKELY;
3014 } 3014 }
3015 3015
3054 }; 3054 };
3055 3055
3056 DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (convert_eol); 3056 DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (convert_eol);
3057 3057
3058 static void 3058 static void
3059 convert_eol_print (Lisp_Object cs, Lisp_Object printcharfun, int escapeflag) 3059 convert_eol_print (Lisp_Object cs, Lisp_Object printcharfun,
3060 int UNUSED (escapeflag))
3060 { 3061 {
3061 struct convert_eol_coding_system *data = 3062 struct convert_eol_coding_system *data =
3062 XCODING_SYSTEM_TYPE_DATA (cs, convert_eol); 3063 XCODING_SYSTEM_TYPE_DATA (cs, convert_eol);
3063 3064
3064 write_fmt_string (printcharfun, "(%s)", 3065 write_fmt_string (printcharfun, "(%s)",
3068 data->subtype == EOL_AUTODETECT ? "nil" : 3069 data->subtype == EOL_AUTODETECT ? "nil" :
3069 (abort(), "")); 3070 (abort(), ""));
3070 } 3071 }
3071 3072
3072 static enum source_sink_type 3073 static enum source_sink_type
3073 convert_eol_conversion_end_type (Lisp_Object codesys) 3074 convert_eol_conversion_end_type (Lisp_Object UNUSED (codesys))
3074 { 3075 {
3075 return DECODES_CHARACTER_TO_CHARACTER; 3076 return DECODES_CHARACTER_TO_CHARACTER;
3076 } 3077 }
3077 3078
3078 static int 3079 static int
4310 4311
4311 /* Raw (internally-formatted) data. */ 4312 /* Raw (internally-formatted) data. */
4312 DEFINE_CODING_SYSTEM_TYPE (internal); 4313 DEFINE_CODING_SYSTEM_TYPE (internal);
4313 4314
4314 static Bytecount 4315 static Bytecount
4315 internal_convert (struct coding_stream *str, const UExtbyte *src, 4316 internal_convert (struct coding_stream *UNUSED (str), const UExtbyte *src,
4316 unsigned_char_dynarr *dst, Bytecount n) 4317 unsigned_char_dynarr *dst, Bytecount n)
4317 { 4318 {
4318 Bytecount orign = n; 4319 Bytecount orign = n;
4319 Dynarr_add_many (dst, src, n); 4320 Dynarr_add_many (dst, src, n);
4320 return orign; 4321 return orign;