Branch: Tag:

2003-03-12

2003-03-12 19:44:37 by Martin Nilsson <mani@lysator.liu.se>

Ruleset.Timezone -> Rule.Timezone

Rev: lib/modules/Calendar.pmod/mkrules.pike:1.8

10:   // and zic(8) is the usual compiler.      // pike mkrules.pike ../data/{africa,antarctica,asia,australasia,backward,etcetera,europe,northamerica,pacificnew,southamerica,systemv} - // $Id: mkrules.pike,v 1.7 2003/01/20 17:44:00 nilsson Exp $ + // $Id: mkrules.pike,v 1.8 2003/03/12 19:44:37 nilsson Exp $      #pike __REAL_VERSION__   
264:    }   }    - class Rule + class MyRule   {    string id;   
491:    FIXID(a[1]),-a[0],a[2]);    else // simple timezone    return sprintf( -  "Ruleset.Timezone(%d,%O)", +  "Rule.Timezone(%d,%O)",    -(roff+a[0]),a[2]);    }   
574:       if (sizeof(rules)==1) // simple zone    { -  res+=("Ruleset.Timezone "+cid+"="+ +  res+=("Rule.Timezone "+cid+"="+    rules[0][4]+";\n");    return res;    }
589:    res+=("class "+cid+"\n"    "{\n"    " inherit TZHistory;\n" -  " Ruleset.Timezone "+ +  " Rule.Timezone "+    sort(values(rname))*","+";\n" -  " Ruleset.Timezone whatrule(int ux)\n" +  " Rule.Timezone whatrule(int ux)\n"    " {\n"    );   
644:    }       Zone lastz; -  Rule lastr; +  MyRule lastr;       foreach (s/"\n",string line)    {
660:    else if (sscanf(line,"Rule%*[ \t]%[^ \t]%*[ \t]%s",s,t)==4)    {    if (rules[s]) rules[s]->add(t); -  else (lastr=rules[s]=Rule(s))->add(t),arules+=({lastr}); +  else (lastr=rules[s]=MyRule(s))->add(t),arules+=({lastr});    lastz=0;    }    else if (sscanf(line,"Link%*[ \t]%[^ \t]%*[ \t]%[^ \t]",s,t)==4)
702:       string t=TZrules_base;    -  foreach (arules,Rule r) +  foreach (arules,MyRule r)    t+=r->dump();       tzrules=compile_string(t)();
732:    t+=z->dump();    if (links[z->id])    foreach(links[z->id],string s) -  t+="Ruleset.Timezone "+FIXID(s)+"="+ +  t+="Rule.Timezone "+FIXID(s)+"="+    FIXID(z->id)+";\n";    }    };