comparison src/glyphs-x.c @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 27bc7f280385
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
1879 }; 1879 };
1880 1880
1881 static void png_read_from_memory(png_structp png_ptr, png_bytep data, 1881 static void png_read_from_memory(png_structp png_ptr, png_bytep data,
1882 png_uint_32 length) 1882 png_uint_32 length)
1883 { 1883 {
1884 png_uint_32 check;
1885 struct png_memory_storage *tbr = 1884 struct png_memory_storage *tbr =
1886 (struct png_memory_storage *) png_get_io_ptr (png_ptr); 1885 (struct png_memory_storage *) png_get_io_ptr (png_ptr);
1887 1886
1888 if (length > (tbr->len - tbr->index)) 1887 if (length > (tbr->len - tbr->index))
1889 png_error(png_ptr, "Read Error"); 1888 png_error (png_ptr, (png_const_charp) "Read Error");
1890 memcpy(data,tbr->bytes + tbr->index,length); 1889 memcpy(data,tbr->bytes + tbr->index,length);
1891 tbr->index = tbr->index + length; 1890 tbr->index = tbr->index + length;
1892 } 1891 }
1893 #endif /* !USE_TEMP_FILES_FOR_IMAGESS || PNG_LIBPNG_VER >= 87 */ 1892 #endif /* !USE_TEMP_FILES_FOR_IMAGESS || PNG_LIBPNG_VER >= 87 */
1894 1893
1937 } 1936 }
1938 1937
1939 return Qnil; 1938 return Qnil;
1940 } 1939 }
1941 1940
1941 /* This doesn't appear to be used. */
1942 #if 0
1942 #define get_png_val(p) _get_png_val (&(p), info_ptr.bit_depth) 1943 #define get_png_val(p) _get_png_val (&(p), info_ptr.bit_depth)
1943 png_uint_16 1944 png_uint_16
1944 _get_png_val (png_byte **pp, int bit_depth) 1945 _get_png_val (png_byte **pp, int bit_depth)
1945 { 1946 {
1946 png_uint_16 c = 0; 1947 png_uint_16 c = 0;
1950 } 1951 }
1951 c |= (*((*pp)++)); 1952 c |= (*((*pp)++));
1952 1953
1953 return c; 1954 return c;
1954 } 1955 }
1956 #endif
1955 1957
1956 static void 1958 static void
1957 png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 1959 png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
1958 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 1960 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
1959 int dest_mask) 1961 int dest_mask)