Diff for /parser3/src/classes/inet.C between versions 1.3 and 1.6

version 1.3, 2009/04/10 11:31:06 version 1.6, 2012/04/19 19:41:29
Line 1 Line 1
 /** @file  /** @file
         Parser: @b inet parser class.          Parser: @b inet parser class.
   
         Copyright(c) 2001-2009 ArtLebedev Group(http://www.artlebedev.com)          Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru)
 */  */
   
 static const char * const IDENT_INET_C="$Date$";  
   
 #include "pa_vmethod_frame.h"  #include "pa_vmethod_frame.h"
 #include "pa_request.h"  #include "pa_request.h"
   
   volatile const char * IDENT_INET_C="$Id$";
   
 class MInet: public Methoded {  class MInet: public Methoded {
 public:  public:
         MInet();          MInet();
   
 public: // Methoded  
         bool used_directly() { return true; }  
 };  };
   
 // global variables  // global variables
Line 52  static void _aton(Request& r, MethodPara Line 49  static void _aton(Request& r, MethodPara
         bool err=false;          bool err=false;
         const char* p=ip_cstr;          const char* p=ip_cstr;
         while(char c=*p++){          while(char c=*p++){
                 uint digit=(uint)(c-'0');       // assume ascii                  int digit=(int)(c-'0'); // assume ascii
                 if(digit>=0 && digit<=9){                  if(digit>=0 && digit<=9){
                         byte_start=false;                          byte_start=false;
                         if((byte_value=byte_value*10+digit) > 255){                          if((byte_value=byte_value*10+(uint)digit) > 255){
                                 err=true;                                  err=true;
                                 break;                                  break;
                         }                          }

Removed from v.1.3  
changed lines
  Added in v.1.6


E-mail: