--- parser3/src/classes/image.C 2003/01/28 15:42:39 1.90.2.2 +++ parser3/src/classes/image.C 2003/01/31 12:34:26 1.90.2.3 @@ -1,11 +1,11 @@ /** @file Parser: @b image parser class. - Copyright(c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright(c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_IMAGE_C="$Date: 2003/01/28 15:42:39 $"; +static const char* IDENT_IMAGE_C="$Date: 2003/01/31 12:34:26 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -43,7 +43,7 @@ public: // Methoded // helpers /// value of exif tag -> it's value -Hash exif_tag_value2name; +Hash exif_tag_value2name; #ifndef DOXYGEN @@ -56,7 +56,7 @@ public: class Measure_file_reader: public Measure_reader { public: - Measure_file_reader(Pool& apool, int af, const String& afile_name, const char *afname): + Measure_file_reader(Pool& apool, int af, const String& afile_name, const char* afname): pool(apool), file_name(afile_name), fname(afname), f(af) { } @@ -87,7 +87,7 @@ public: private: Pool& pool; - const String& file_name; const char *fname; + const String& file_name; const char* fname; int f; }; @@ -290,7 +290,7 @@ static Value *parse_IFD_entry_formatted_ size_t component_size, uint components_count, const uchar *value) { if(format==2) { // ascii string, exception: the only type with varying size - const char *cstr=(const char *)value; + const char* cstr=(const char* )value; size_t size=components_count; // Data format is "YYYY:MM:DD HH:MM:SS"+0x00, total 20bytes if(size==JPEG_EXIF_DATE_CHARS @@ -304,7 +304,7 @@ static Value *parse_IFD_entry_formatted_ return new(pool) VDate(pool, t); } - if(const char *premature_zero_pos=(const char *)memchr(cstr, 0, size)) + if(const char* premature_zero_pos=(const char* )memchr(cstr, 0, size)) size=premature_zero_pos-cstr; return new(pool) VString(*new(pool) String(pool, cstr, size, true/*tainted*/)); } @@ -412,7 +412,7 @@ static void parse_IFD_entry(Pool& pool, skey << buf; } - if(const char *name=(const char *)exif_tag_value2name->get(skey)) + if(const char* name=(const char* )exif_tag_value2name->get(skey)) hash.put(*new(pool) String(pool, name), value); else hash.put(skey, value); @@ -560,7 +560,7 @@ static void measure_png(Pool& pool, cons static void measure(Pool& pool, const String& file_name, Measure_reader& reader, ushort& width, ushort& height, Value ** exif) { - if(const char *cext=strrchr(file_name.cstr(String::UL_FILE_SPEC), '.')) { + if(const char* cext=strrchr(file_name.cstr(String::UL_FILE_SPEC), '.')) { cext++; if(strcasecmp(cext, "GIF")==0) measure_gif(pool, &file_name, reader, width, height); @@ -590,7 +590,7 @@ struct File_measure_action_info { #endif static void file_measure_action(Pool& pool, struct stat& finfo, int f, - const String& file_spec, const char *fname, bool as_text, + const String& file_spec, const char* fname, bool as_text, void *context) { File_measure_action_info& info=*static_cast(context); @@ -680,7 +680,7 @@ static gdImage *load(Request& r, const S const String& file_name){ Pool& pool=r.pool(); - const char *file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_SPEC); + const char* file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_SPEC); if(FILE *f=fopen(file_name_cstr, "rb")) { gdImage& image=*new(pool) gdImage(pool); bool ok=image.CreateFromGif(f); @@ -966,7 +966,7 @@ public: // counts trailing letter_spacing, consider this OK. useful for contiuations int string_width(const String& s){ - const char *cstr=s.cstr(); + const char* cstr=s.cstr(); int result=0; for(; *cstr; cstr++) result+=step_width(index_of(*cstr)); @@ -974,7 +974,7 @@ public: } void string_display(gdImage& image, int x, int y, const String& s){ - const char *cstr=s.cstr(); + const char* cstr=s.cstr(); if(cstr) for(; *cstr; cstr++) { int index=index_of(*cstr); index_display(image, x, y, index); @@ -1115,7 +1115,7 @@ static void _circle(Request& r, const St } gdImage& as_image(Pool& pool, const String& method_name, MethodParams *params, - int index, const char *msg) { + int index, const char* msg) { gdImage *src=0; Value& value=params->as_no_junction(index, msg);