~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/time.cc

  • Committer: Brian Aker
  • Date: 2008-07-07 14:25:25 UTC
  • mto: (77.1.25 codestyle)
  • mto: This revision was merged to the branch mainline in revision 82.
  • Revision ID: brian@tangent.org-20080707142525-xzy2nl3ie2ebwfln
LL() cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
795
795
    sec=((ltime->day-1)*3600*24L+ltime->hour*3600+ltime->minute*60+
796
796
         ltime->second +
797
797
         sign* (longlong) (interval.day*3600*24L +
798
 
                           interval.hour*LL(3600)+interval.minute*LL(60)+
 
798
                           interval.hour*3600LL+interval.minute*60LL+
799
799
                           interval.second))+ extra_sec;
800
800
    if (microseconds < 0)
801
801
    {
802
 
      microseconds+= LL(1000000);
 
802
      microseconds+= 1000000LL;
803
803
      sec--;
804
804
    }
805
 
    days= sec/(3600*LL(24));
806
 
    sec-= days*3600*LL(24);
 
805
    days= sec/(3600*24LL);
 
806
    sec-= days*3600*24LL;
807
807
    if (sec < 0)
808
808
    {
809
809
      days--;
810
 
      sec+= 3600*LL(24);
 
810
      sec+= 3600*24LL;
811
811
    }
812
812
    ltime->second_part= (uint) microseconds;
813
813
    ltime->second= (uint) (sec % 60);
925
925
                               (uint) l_time2->day);
926
926
  }
927
927
 
928
 
  microseconds= ((longlong)days*LL(86400) +
 
928
  microseconds= ((longlong)days*86400LL +
929
929
                 (longlong)(l_time1->hour*3600L +
930
930
                            l_time1->minute*60L +
931
931
                            l_time1->second) -
932
932
                 l_sign*(longlong)(l_time2->hour*3600L +
933
933
                                   l_time2->minute*60L +
934
 
                                   l_time2->second)) * LL(1000000) +
 
934
                                   l_time2->second)) * 1000000LL +
935
935
                (longlong)l_time1->second_part -
936
936
                l_sign*(longlong)l_time2->second_part;
937
937