Diff for /parser3/src/classes/image.C between versions 1.59 and 1.63

version 1.59, 2001/10/23 14:43:44 version 1.63, 2001/12/17 14:02:44
Line 1 Line 1
   123
 /** @file  /** @file
         Parser: @b image parser class.          Parser: @b image parser class.
   
         Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)          Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)
         Author: Alexander Petrosyan <paf@design.ru>(http://design.ru/paf)          Author: Alexander Petrosyan <paf@design.ru>(http://paf.design.ru)
   
         $Id$          $Id$
 */  */
Line 203  void measure_jpeg(Pool& pool, const Stri Line 204  void measure_jpeg(Pool& pool, const Stri
   
 void measure(Pool& pool, const String& file_name,   void measure(Pool& pool, const String& file_name, 
                          Measure_reader& reader, int& width, int& height) {                           Measure_reader& reader, int& width, int& height) {
         if(const char *cext=strrchr(file_name.cstr(), '.')) {          if(const char *cext=strrchr(file_name.cstr(String::UL_FILE_SPEC), '.')) {
                 cext++;                  cext++;
                 if(strcasecmp(cext, "GIF")==0)                  if(strcasecmp(cext, "GIF")==0)
                         measure_gif(pool, &file_name, reader, width, height);                          measure_gif(pool, &file_name, reader, width, height);
Line 397  static void _gif(Request& r, const Strin Line 398  static void _gif(Request& r, const Strin
         VFile& vfile=*new(pool) VFile(pool);          VFile& vfile=*new(pool) VFile(pool);
         Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif"));          Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif"));
         vfile.set(false/*not tainted*/,           vfile.set(false/*not tainted*/, 
                 out.cstr(String::UL_AS_IS), out.size(), 0, content_type);                  out.cstr(), out.size(), 0, content_type);
   
         r.write_no_lang(vfile);          r.write_no_lang(vfile);
 }  }
Line 618  public: Line 619  public:
         /* ******************************** string ********************************** */          /* ******************************** string ********************************** */
                   
         int string_width(const String& s){          int string_width(const String& s){
                 const char *cstr=s.cstr(String::UL_AS_IS);                  const char *cstr=s.cstr();
                 int result=0;                  int result=0;
                 for(; *cstr; cstr++)                  for(; *cstr; cstr++)
                         result+=index_width(index_of(*cstr));                          result+=index_width(index_of(*cstr));
Line 626  public: Line 627  public:
         }          }
                   
         void string_display(gdImage& image, int x, int y, const String& s){          void string_display(gdImage& image, int x, int y, const String& s){
                 const char *cstr=s.cstr(String::UL_AS_IS);                  const char *cstr=s.cstr();
                 if(cstr) for(; *cstr; cstr++) {                  if(cstr) for(; *cstr; cstr++) {
                         int index=index_of(*cstr);                          int index=index_of(*cstr);
                         index_display(image, x, y, index);                          index_display(image, x, y, index);

Removed from v.1.59  
changed lines
  Added in v.1.63


E-mail: