Diff for /parser3/src/classes/math.C between versions 1.77 and 1.80

version 1.77, 2015/09/22 23:53:56 version 1.80, 2015/10/26 01:21:54
Line 1 Line 1
 /** @file  /** @file
         Parser: @b math parser class.          Parser: @b math parser class.
   
         Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)          Copyright (c) 2001-2015 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)
   
         portions from gen_uuid.c,          portions from gen_uuid.c,
Line 508  static void _crc32(Request& r, MethodPar Line 508  static void _crc32(Request& r, MethodPar
         r.write_no_lang(*new VInt(pa_crc32(string, strlen(string))));          r.write_no_lang(*new VInt(pa_crc32(string, strlen(string))));
 }  }
   
 static void toBase(unsigned int value, unsigned int base, char*& ptr){  static void toBase(unsigned long long int value, unsigned int base, char*& ptr){
         static const char* hex="0123456789ABCDEF";          static const char* hex="0123456789ABCDEF";
         int rest = value % base;          unsigned int rest = (unsigned int)(value % base);
         if(value >= base)          if(value >= base)
                 toBase( (value-rest)/base, base, ptr);                  toBase( (value-rest)/base, base, ptr);
         *ptr++=(char)hex[rest];          *ptr++=(char)hex[rest];
Line 541  static void _convert(Request& r, MethodP Line 541  static void _convert(Request& r, MethodP
                 str++;                  str++;
         }          }
   
         unsigned int value=pa_atoui(str, base_from);          unsigned long long int value=pa_atoul(str, base_from);
   
         char result_cstr[sizeof(unsigned int)*8+1/*minus for negative number*/+1/*terminator*/];          char result_cstr[sizeof(unsigned long long int)*8+1/*minus for negative number*/+1/*terminator*/];
         char* ptr=result_cstr;          char* ptr=result_cstr;
         if(negative)          if(negative)
                 *ptr++='-';                  *ptr++='-';

Removed from v.1.77  
changed lines
  Added in v.1.80


E-mail: