pike.git / lib / modules / Calendar.pmod / Event.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Event.pmod:1259:    return values(id2event);    }   }      class TZShift_Event   {    inherit Event;       constant is_tzshift_event=1;    -  Ruleset.Timezone timezone; +  Rule.Timezone timezone;    -  void create(void|Ruleset.Timezone _tz) +  void create(void|Rule.Timezone _tz)    {    timezone=_tz;    }       TimeRange next(void|TimeRange from,void|int(0..1) including)    {    if (!from) from=std_second();    return scan_shift(timezone||from->timezone(),    from,1,including);    }    TimeRange previous(void|TimeRange from,void|int(0..1) including)    {    if (!from) from=std_second();    return scan_shift(timezone||from->timezone(),    from,-1,including);    }    -  static TimeRange scan_shift(Ruleset.Timezone tz, +  static TimeRange scan_shift(Rule.Timezone tz,    TimeRange from,    int direction,int including)    {    if (tz->whatrule)    return scan_history(tz,from,direction,including);    return scan_rule(tz,from,direction,including);    }    -  static TimeRange scan_history(Ruleset.Timezone tz, +  static TimeRange scan_history(Rule.Timezone tz,    TimeRange from,    int direction,int(0..1) including)    {    int ux;       if ((direction==1) ^ (!!including))    ux=(from=from->end())->unix_time();    else    ux=from->unix_time();   
pike.git/lib/modules/Calendar.pmod/Event.pmod:1316:    foreach (reverse(tz->shifts),int z)    if (z<=ux) { nextshift=z; break; }       TimeRange btr=0;    if (nextshift!=-1)    btr=from->calendar()->Second("unix_r",nextshift,from->ruleset());       TimeRange atr=from;    for (;;)    { -  Ruleset.Timezone atz=tz->whatrule(ux); +  Rule.Timezone atz=tz->whatrule(ux);    atr=scan_rule(atz,atr,direction,including);    if (!atr) break;    if (direction==1)    { if (atr>=from) break; }    else    if (atr<=from) break;    }       if (!btr)    return atr;    if (!atr)    return btr;    if ( (direction==1)^(btr>atr) )    return btr;    else    return atr;    }    -  static TimeRange scan_rule(Ruleset.Timezone tz, +  static TimeRange scan_rule(Rule.Timezone tz,    TimeRange from,    int direction,int including)    {    if (!tz->jd_year_periods)    return 0; // non-shifting timezone       int jd;    if ((direction==1) ^ (!!including))    jd=(int)(from=from->end())->julian_day();    else