comparison src/glyphs-eimage.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 0be6ff2356c8
children ecf1ebac70d8
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
116 file_or_data_must_be_present (instantiator); 116 file_or_data_must_be_present (instantiator);
117 } 117 }
118 118
119 static Lisp_Object 119 static Lisp_Object
120 jpeg_normalize (Lisp_Object inst, Lisp_Object console_type, 120 jpeg_normalize (Lisp_Object inst, Lisp_Object console_type,
121 Lisp_Object dest_mask) 121 Lisp_Object UNUSED (dest_mask))
122 { 122 {
123 return simple_image_type_normalize (inst, console_type, Qjpeg); 123 return simple_image_type_normalize (inst, console_type, Qjpeg);
124 } 124 }
125 125
126 static int 126 static int
194 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) 194 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61)
195 METHODDEF(void) 195 METHODDEF(void)
196 #else 196 #else
197 METHODDEF void 197 METHODDEF void
198 #endif 198 #endif
199 our_init_source (j_decompress_ptr cinfo) 199 our_init_source (j_decompress_ptr UNUSED (cinfo))
200 { 200 {
201 } 201 }
202 202
203 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) 203 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61)
204 METHODDEF(boolean) 204 METHODDEF(boolean)
245 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) 245 #if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61)
246 METHODDEF(void) 246 METHODDEF(void)
247 #else 247 #else
248 METHODDEF void 248 METHODDEF void
249 #endif 249 #endif
250 our_term_source (j_decompress_ptr cinfo) 250 our_term_source (j_decompress_ptr UNUSED (cinfo))
251 { 251 {
252 } 252 }
253 253
254 typedef struct 254 typedef struct
255 { 255 {
311 311
312 /* The code in this routine is based on example.c from the JPEG library 312 /* The code in this routine is based on example.c from the JPEG library
313 source code and from gif_instantiate() */ 313 source code and from gif_instantiate() */
314 static void 314 static void
315 jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 315 jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
316 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 316 Lisp_Object UNUSED (pointer_fg),
317 Lisp_Object UNUSED (pointer_bg),
317 int dest_mask, Lisp_Object domain) 318 int dest_mask, Lisp_Object domain)
318 { 319 {
319 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); 320 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
320 /* It is OK for the unwind data to be local to this function, 321 /* It is OK for the unwind data to be local to this function,
321 because the unwind-protect is always executed when this 322 because the unwind-protect is always executed when this
515 file_or_data_must_be_present (instantiator); 516 file_or_data_must_be_present (instantiator);
516 } 517 }
517 518
518 static Lisp_Object 519 static Lisp_Object
519 gif_normalize (Lisp_Object inst, Lisp_Object console_type, 520 gif_normalize (Lisp_Object inst, Lisp_Object console_type,
520 Lisp_Object dest_mask) 521 Lisp_Object UNUSED (dest_mask))
521 { 522 {
522 return simple_image_type_normalize (inst, console_type, Qgif); 523 return simple_image_type_normalize (inst, console_type, Qgif);
523 } 524 }
524 525
525 static int 526 static int
575 mem->index = mem->index + size; 576 mem->index = mem->index + size;
576 return size; 577 return size;
577 } 578 }
578 579
579 static int 580 static int
580 gif_memory_close (VoidPtr data) 581 gif_memory_close (VoidPtr UNUSED (data))
581 { 582 {
582 return 0; 583 return 0;
583 } 584 }
584 585
585 struct gif_error_struct 586 struct gif_error_struct
598 longjmp (error_data->setjmp_buffer, 1); 599 longjmp (error_data->setjmp_buffer, 1);
599 } 600 }
600 601
601 static void 602 static void
602 gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 603 gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
603 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 604 Lisp_Object UNUSED (pointer_fg),
605 Lisp_Object UNUSED (pointer_bg),
604 int dest_mask, Lisp_Object domain) 606 int dest_mask, Lisp_Object domain)
605 { 607 {
606 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); 608 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
607 /* It is OK for the unwind data to be local to this function, 609 /* It is OK for the unwind data to be local to this function,
608 because the unwind-protect is always executed when this 610 because the unwind-protect is always executed when this
761 file_or_data_must_be_present (instantiator); 763 file_or_data_must_be_present (instantiator);
762 } 764 }
763 765
764 static Lisp_Object 766 static Lisp_Object
765 png_normalize (Lisp_Object inst, Lisp_Object console_type, 767 png_normalize (Lisp_Object inst, Lisp_Object console_type,
766 Lisp_Object dest_mask) 768 Lisp_Object UNUSED (dest_mask))
767 { 769 {
768 return simple_image_type_normalize (inst, console_type, Qpng); 770 return simple_image_type_normalize (inst, console_type, Qpng);
769 } 771 }
770 772
771 static int 773 static int
807 passed in the png_ptr to them. This is an ugly hack and must 809 passed in the png_ptr to them. This is an ugly hack and must
808 go away when the lisp engine is threaded! */ 810 go away when the lisp engine is threaded! */
809 static struct png_error_struct png_err_stct; 811 static struct png_error_struct png_err_stct;
810 812
811 static void 813 static void
812 png_error_func (png_structp png_ptr, png_const_charp msg) 814 png_error_func (png_structp UNUSED (png_ptr), png_const_charp msg)
813 { 815 {
814 png_err_stct.err_str = msg; 816 png_err_stct.err_str = msg;
815 longjmp (png_err_stct.setjmp_buffer, 1); 817 longjmp (png_err_stct.setjmp_buffer, 1);
816 } 818 }
817 819
818 static void 820 static void
819 png_warning_func (png_structp png_ptr, png_const_charp msg) 821 png_warning_func (png_structp UNUSED (png_ptr), png_const_charp msg)
820 { 822 {
821 warn_when_safe (Qpng, Qinfo, "%s", msg); 823 warn_when_safe (Qpng, Qinfo, "%s", msg);
822 } 824 }
823 825
824 struct png_unwind_data 826 struct png_unwind_data
847 return Qnil; 849 return Qnil;
848 } 850 }
849 851
850 static void 852 static void
851 png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 853 png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
852 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 854 Lisp_Object UNUSED (pointer_fg),
855 Lisp_Object UNUSED (pointer_bg),
853 int dest_mask, Lisp_Object domain) 856 int dest_mask, Lisp_Object domain)
854 { 857 {
855 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); 858 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
856 struct png_unwind_data unwind; 859 struct png_unwind_data unwind;
857 int speccount = specpdl_depth (); 860 int speccount = specpdl_depth ();
1051 file_or_data_must_be_present (instantiator); 1054 file_or_data_must_be_present (instantiator);
1052 } 1055 }
1053 1056
1054 static Lisp_Object 1057 static Lisp_Object
1055 tiff_normalize (Lisp_Object inst, Lisp_Object console_type, 1058 tiff_normalize (Lisp_Object inst, Lisp_Object console_type,
1056 Lisp_Object dest_mask) 1059 Lisp_Object UNUSED (dest_mask))
1057 { 1060 {
1058 return simple_image_type_normalize (inst, console_type, Qtiff); 1061 return simple_image_type_normalize (inst, console_type, Qtiff);
1059 } 1062 }
1060 1063
1061 static int 1064 static int
1106 mem->index = mem->index + size; 1109 mem->index = mem->index + size;
1107 return size; 1110 return size;
1108 } 1111 }
1109 1112
1110 static size_t 1113 static size_t
1111 tiff_memory_write (thandle_t data, tdata_t buf, tsize_t size) 1114 tiff_memory_write (thandle_t UNUSED (data), tdata_t UNUSED (buf),
1115 tsize_t UNUSED (size))
1112 { 1116 {
1113 abort(); 1117 abort();
1114 return 0; 1118 return 0;
1115 } 1119 }
1116 1120
1141 mem->index = newidx; 1145 mem->index = newidx;
1142 return newidx; 1146 return newidx;
1143 } 1147 }
1144 1148
1145 static int 1149 static int
1146 tiff_memory_close (thandle_t data) 1150 tiff_memory_close (thandle_t UNUSED (data))
1147 { 1151 {
1148 return 0; 1152 return 0;
1149 } 1153 }
1150 1154
1151 static int 1155 static int
1152 tiff_map_noop (thandle_t data, tdata_t* pbase, toff_t* psize) 1156 tiff_map_noop (thandle_t UNUSED (data), tdata_t* UNUSED (pbase),
1157 toff_t* UNUSED (psize))
1153 { 1158 {
1154 return 0; 1159 return 0;
1155 } 1160 }
1156 1161
1157 static void 1162 static void
1158 tiff_unmap_noop (thandle_t data, tdata_t pbase, toff_t psize) 1163 tiff_unmap_noop (thandle_t UNUSED (data), tdata_t UNUSED (pbase),
1164 toff_t UNUSED (psize))
1159 { 1165 {
1160 return; 1166 return;
1161 } 1167 }
1162 1168
1163 static toff_t 1169 static toff_t
1182 have any place to store error func data. This should be rectified 1188 have any place to store error func data. This should be rectified
1183 before XEmacs gets threads! */ 1189 before XEmacs gets threads! */
1184 static struct tiff_error_struct tiff_err_data; 1190 static struct tiff_error_struct tiff_err_data;
1185 1191
1186 static void 1192 static void
1187 tiff_error_func (const char *module, const char *fmt, ...) 1193 tiff_error_func (const char *UNUSED (module), const char *fmt, ...)
1188 { 1194 {
1189 va_list vargs; 1195 va_list vargs;
1190 1196
1191 va_start (vargs, fmt); 1197 va_start (vargs, fmt);
1192 #ifdef HAVE_VSNPRINTF 1198 #ifdef HAVE_VSNPRINTF
1221 module, warn_str); 1227 module, warn_str);
1222 } 1228 }
1223 1229
1224 static void 1230 static void
1225 tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 1231 tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
1226 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 1232 Lisp_Object UNUSED (pointer_fg),
1233 Lisp_Object UNUSED (pointer_bg),
1227 int dest_mask, Lisp_Object domain) 1234 int dest_mask, Lisp_Object domain)
1228 { 1235 {
1229 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); 1236 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
1230 tiff_memory_storage mem_struct; 1237 tiff_memory_storage mem_struct;
1231 /* It is OK for the unwind data to be local to this function, 1238 /* It is OK for the unwind data to be local to this function,