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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Events.pmod:60:    return Event.Julian_Fixed(id,s,md,month2n[mn]);    error("Events: rule error; unknown rule format:\n%O\n",source);       case "Islamic_Fixed":    case "Coptic_Fixed":    // not supported yet    return Event.NullEvent(id,s);       case "WDRel":    // WDRel May Fri 1st +  days=1;    if (sscanf(rule,    "WDRel%*[ \t]%s%*[ \t]%s%*[ \t]%d%*[a-z]%*[ \t]%d days", -  mn,wd,n,days)>=5 && +  mn,wd,n,days)>=7 &&    month2n[mn] && wd2n[wd] && n>0)    {    Event.Event e=    Event.Monthday_Weekday_Relative(    id,s,1,month2n[mn],wd2n[wd],n,1);    e->nd=days;    return e;    }    // WDRel May Fri last -  +  days=1;    if (sscanf(rule,    "WDRel%*[ \t]%s%*[ \t]%s%*[ \t]%s%*[ \t]%d days", -  mn,wd,a,days)>=5 && a=="last" && +  mn,wd,a,days)>=6 && a=="last" &&    (m=month2n[mn]) && wd2n[wd])    {    m=(m%12)+1;    Event.Event e=    Event.Monthday_Weekday_Relative(    id,s,1,m,wd2n[wd],-1,0);    e->nd=days;    return e;    }    // WDRel May 17 Fri +17 excl -  days=a=0; +  a=0; +  days=1;    if (sscanf(rule,    "WDRel%*[ \t]%[A-z]%*[ \t]%d%*[ \t]%s%*[ \t]"    "%d%*[ \t]%[a-z]%*[ \t]%d days", -  mn,md,wd,n,a,days)>=9 && a && a!="" && +  mn,md,wd,n,a,days)>=10 && a && a!="" &&    (m=month2n[mn]) && wd2n[wd])    {    if (!(<"incl","excl">)[a])    error("Events: rule error; expected incl or excl, not %O"    ":\n%O\n",a,source);       m=(m%12)+1;    Event.Event e=    Event.Monthday_Weekday_Relative(    id,s,md,month2n[mn],wd2n[wd],n,a!="excl");    e->nd=days;    return e;    }    // WDRel May 17 Fri +17 -  +  days=1;    if (sscanf(rule,    "WDRel%*[ \t]%[A-z]%*[ \t]%d%*[ \t]%[^ \t]%*[ \t]"    "%d%*[ \t]%d days", -  mn,md,wd,n,days)>=7 && +  mn,md,wd,n,days)>=8 &&    (m=month2n[mn]) && wd2n[wd])    {    m=(m%12)+1;    Event.Event e=    Event.Monthday_Weekday_Relative(    id,s,md,month2n[mn],wd2n[wd],n,1);    e->nd=days;    return e;    }    error("Events: rule error; unknown rule format:\n%O\n",source);