Branch: Tag:

2002-02-14

2002-02-14 17:24:27 by Martin Nilsson <mani@lysator.liu.se>

([])[0] -> UNDEFINED

Rev: lib/modules/ADT.pmod/Queue.pike:1.5
Rev: lib/modules/Calendar.pmod/Event.pmod:1.16
Rev: lib/modules/Calendar.pmod/Events.pmod:1.12
Rev: lib/modules/Calendar.pmod/Language.pmod:1.17
Rev: lib/modules/Calendar.pmod/Timezone.pmod:1.25
Rev: lib/modules/Calendar.pmod/module.pmod:1.7
Rev: lib/modules/GDK.pmod:1.11
Rev: lib/modules/Gnome.pmod:1.5
Rev: lib/modules/Remote.pmod/connection.pike:1.22

351:    [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;
451:    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);    }
462:    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);    }
1105:    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=({});