--- parser3/src/classes/inet.C 2008/06/16 13:09:22 1.2 +++ parser3/src/classes/inet.C 2012/04/19 19:41:29 1.6 @@ -1,21 +1,18 @@ /** @file Parser: @b inet parser class. - Copyright(c) 2001-2005 ArtLebedev Group(http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_INET_C="$Date: 2008/06/16 13:09:22 $"; - #include "pa_vmethod_frame.h" #include "pa_request.h" +volatile const char * IDENT_INET_C="$Id: inet.C,v 1.6 2012/04/19 19:41:29 moko Exp $"; + class MInet: public Methoded { public: MInet(); - -public: // Methoded - bool used_directly() { return true; } }; // global variables @@ -52,10 +49,10 @@ static void _aton(Request& r, MethodPara bool err=false; const char* p=ip_cstr; while(char c=*p++){ - uint digit=(uint)(c-'0'); // assume ascii + int digit=(int)(c-'0'); // assume ascii if(digit>=0 && digit<=9){ byte_start=false; - if((byte_value=byte_value*10+digit) > 255){ + if((byte_value=byte_value*10+(uint)digit) > 255){ err=true; break; } @@ -90,5 +87,5 @@ MInet::MInet(): Methoded("inet") { add_native_method("ntoa", Method::CT_STATIC, _ntoa, 1, 1); add_native_method("aton", Method::CT_STATIC, _aton, 1, 1); - // todo: gethostbyname, gethostbyaddr + // @todo: gethostbyname, gethostbyaddr }