--- parser3/src/classes/image.C 2003/11/07 13:59:21 1.97 +++ parser3/src/classes/image.C 2003/12/02 11:55:46 1.103 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_IMAGE_C="$Date: 2003/11/07 13:59:21 $"; +static const char * const IDENT_IMAGE_C="$Date: 2003/12/02 11:55:46 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -33,7 +33,7 @@ static const char* IDENT_IMAGE_C="$Date: class MImage: public Methoded { public: // VStateless_class - Value* create_new_value(Pool& apool) { return new VImage(); } + Value* create_new_value(Pool&) { return new VImage(); } public: MImage(); @@ -161,8 +161,6 @@ public: }; class Measure_file_reader: public Measure_reader { - - ; const String& file_name; const char* fname; int f; @@ -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)(context); @@ -703,12 +701,12 @@ static void _measure(Request& r, MethodP ushort height=0; Value* exif=0; const String* file_name; - if(file_name=data.get_string()) { - File_measure_action_info info={0}; - info.width=&width; - info.height=&height; - info.exif=&exif; - info.file_name=file_name; + if((file_name=data.get_string())) { + File_measure_action_info info={ + &width, &height, + &exif, + file_name + }; file_read_action_under_lock(r.absolute(*file_name), "measure", file_measure_action, &info); } else { @@ -755,11 +753,10 @@ static void _html(Request& r, MethodPara if(params.count()) { // for backward compatibility: someday was ^html{} Value& vattribs=r.process_to_value(params[0], - /*0/*no name* /,*/ false/*don't intercept string*/); if(!vattribs.is_string()) // allow empty - if(attribs=vattribs.get_hash()) { - Attrib_info info={&tag}; + if((attribs=vattribs.get_hash())) { + Attrib_info info={&tag, 0}; attribs->for_each(append_attrib_pair, &info); } else throw Exception("parser.runtime", @@ -792,7 +789,6 @@ static gdImage* load(Request& r, throw Exception("file.missing", 0, "can not open '%s'", file_name_cstr); - return 0; } } @@ -998,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 ********************************** */