--- parser3/src/classes/image.C 2003/11/20 16:34:23 1.99 +++ parser3/src/classes/image.C 2004/02/19 15:38:00 1.107 @@ -1,11 +1,11 @@ /** @file Parser: @b image parser class. - Copyright(c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright(c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_IMAGE_C="$Date: 2003/11/20 16:34:23 $"; +static const char * const IDENT_IMAGE_C="$Date: 2004/02/19 15:38:00 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -161,8 +161,6 @@ public: }; class Measure_file_reader: public Measure_reader { - - ; const String& file_name; const char* fname; int f; @@ -180,7 +178,7 @@ public: if(ssize_t(read_size)<0 || read_size>limit) throw Exception(0, &file_name, - "measure failed: actually read %lu bytes count not in [0..%lu] valid range", + "measure failed: actually read %u bytes count not in [0..%u] valid range", read_size, limit); return read_size; @@ -331,7 +329,7 @@ static void measure_gif(const String& or Measure_reader& reader, ushort& width, ushort& height) { const char* buf; - const int head_size=sizeof(GIF_Header); + const size_t head_size=sizeof(GIF_Header); if(reader.read(buf, head_size)=0) - return new VDate(t); + try { + return new VDate(cstr_to_time_t(cstr_writable)); + } + catch(...) { /*ignore bad date times*/ } } if(const char* premature_zero_pos=(const char* )memchr(cstr, 0, length)) @@ -637,7 +635,7 @@ static void measure_png(const String& or Measure_reader& reader, ushort& width, ushort& height) { const char* buf; - const int head_size=sizeof(PNG_Header); + const size_t head_size=sizeof(PNG_Header); if(reader.read(buf, head_size)for_each(append_attrib_pair, &info); } else throw Exception("parser.runtime", @@ -997,9 +994,9 @@ const int Font::letter_spacing=1; Font::Font(//, const String& aalphabet, gdImage* aifont, int aheight, int amonospace, int aspacebarspace): - alphabet(aalphabet), height(aheight), monospace(amonospace), spacebarspace(aspacebarspace), - ifont(aifont) { + ifont(aifont), + alphabet(aalphabet) { } /* ******************************** char ********************************** */