--- parser3/src/classes/image.C 2003/02/20 14:53:33 1.90.2.10 +++ parser3/src/classes/image.C 2003/02/21 08:50:01 1.90.2.11 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_IMAGE_C="$Date: 2003/02/20 14:53:33 $"; +static const char* IDENT_IMAGE_C="$Date: 2003/02/21 08:50:01 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -849,7 +849,7 @@ static void _gif(Request& r, StringPtr m VFilePtr vfile(new VFile); ValuePtr content_type(new VString(StringPtr(new String("image/gif")))); vfile->set(pool, false/*not tainted*/, - out.cstr(), out.size(), 0, content_type); + out.cstr(pool), out.size(), 0, content_type); r.write_no_lang(vfile); } @@ -1073,17 +1073,17 @@ public: // counts trailing letter_spacing, consider this OK. useful for contiuations int string_width(StringPtr s){ - const char* cstr=s->cstr(); + CharPtr cstr=s->cstr(); int result=0; - for(; *cstr; cstr++) - result+=step_width(index_of(*cstr)); + for(const char* current=cstr; *current; current++) + result+=step_width(index_of(*current)); return result; } void string_display(gdImagePtr image, int x, int y, StringPtr s){ - const char* cstr=s->cstr(); - if(cstr) for(; *cstr; cstr++) { - int index=index_of(*cstr); + CharPtr cstr=s->cstr(); + for(const char* current=cstr; *current; current++) { + int index=index_of(*current); index_display(image, x, y, index); x+=step_width(index); }