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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Event.pmod:344:    if (direction==1 && first_year!=-1 && y<first_year)    [y,yjd,leap]=gregorian_year(first_year),jd=yjd;       for (;;)    {    if (jd>=yjd+365+leap || jd<yjd) // year shift    {    [y,yjd,leap]=gregorian_yjd(jd);    if (y<leapdayshift) ld=55-1; // 24 feb    else ld=60-1; // 29 feb -  if (last_year!=-1 && y>last_year) return ([])[0]; -  if (first_year!=-1 && y<first_year) return ([])[0]; +  if (last_year!=-1 && y>last_year) return UNDEFINED; +  if (first_year!=-1 && y<first_year) return UNDEFINED;    }       array(string) n;    int d=jd-yjd;    if (leap)    {    if (d<ld) n=namelist[d];    else if (d>ld) n=namelist[d-1];    else n=namelist[-1];    }
pike.git/lib/modules/Calendar.pmod/Event.pmod:444:    mapping(TimeRange:Event) scan_events(TimeRange in)    {    return predef::`|(@map(namedayss,"scan_events",in));    }       TimeRange next(TimeRange from,void|int(0..1) including)    {    array(TimeRange) a=map(namedayss,"next",from,including)-({0});    switch (sizeof(a))    { -  case 0: return ([])[0]; +  case 0: return UNDEFINED;    case 1: return a[0];    default: return min(@a);    }    }       TimeRange previous(TimeRange from,void|int(0..1) including)    {    array(TimeRange) a=map(namedayss,"previous",from,including)-({0});    switch (sizeof(a))    { -  case 0: return ([])[0]; +  case 0: return UNDEFINED;    case 1: return a[0];    default: return max(@a);    }    }       mapping(TimeRange:array(string)) namedays(TimeRange t)    {    return predef::`|(@map(namedayss,"namedays",t));    }   
pike.git/lib/modules/Calendar.pmod/Event.pmod:1098:   class SuperEvent   {    inherit Event;       constant is_superevent=1;    string name="SuperEvent";       mapping(Event:multiset(string)) flags=([]);       array(Event) events=({}); -  mapping(string:Event) id2event=([])[0]; +  mapping(string:Event) id2event=UNDEFINED;       array(Event) day_events=({});    array(Namedays) namedays=({});    array(Event) other_events=({});          static void create(array(Event) _events,    void|mapping(Event:multiset(string)) _flags,    void|string _id)    {