Branch: Tag:


2008-02-07 01:39:53 by Martin Stjernholm <>

Fixes to make it possible to write a compat wrapper for this module: Did
away with all .Foo style identifiers since they _always_ result in a lookup
in the same directory as the current file, even when it's included from
somewhere else.

So if e.g. lib/modules/Calendar.pmod/Time.pmod is #include'd from
lib/7.6/modules/Calendar.pmod/Time.pmod (which we must do to compile it
all in #pike 7.6 mode), and the included Time.pmod contains a reference
.Ruleset, that reference will be resolved in lib/modules/Calendar.pmod.
That's odd and probably buggy, since one would reasonably expect cpp stuff
like #include to be completely transparent for the resolver.

Rev: lib/modules/Calendar.pmod/Austrian.pmod:1.7
Rev: lib/modules/Calendar.pmod/Badi.pmod:1.7
Rev: lib/modules/Calendar.pmod/Calendar.pike:1.7
Rev: lib/modules/Calendar.pmod/Coptic.pmod:1.7
Rev: lib/modules/Calendar.pmod/Discordian.pmod:1.11
Rev: lib/modules/Calendar.pmod/Event.pmod:1.23
Rev: lib/modules/Calendar.pmod/Gregorian.pmod:1.10
Rev: lib/modules/Calendar.pmod/ISO.pmod:1.9
Rev: lib/modules/Calendar.pmod/Islamic.pmod:1.10
Rev: lib/modules/Calendar.pmod/Julian.pmod:1.10
Rev: lib/modules/Calendar.pmod/Language.pmod:1.24
Rev: lib/modules/Calendar.pmod/Ruleset.pike:1.15
Rev: lib/modules/Calendar.pmod/Stardate.pmod:1.16
Rev: lib/modules/Calendar.pmod/Swedish.pmod:1.8
Rev: lib/modules/Calendar.pmod/Time.pmod:1.41
Rev: lib/modules/Calendar.pmod/TimeRanges.pmod:1.34
Rev: lib/modules/Calendar.pmod/Timezone.pmod:1.40
Rev: lib/modules/Calendar.pmod/YMD.pike:1.29

10:      // #pragma strict_types    - inherit .Time:Time; + inherit Calendar.Time:Time;      #include "constants.h"   
75:       // [*]: might be uninitialized (CALUNKNOWN)    -  .Ruleset rules; +  Calendar.Ruleset rules;    constant is_ymd=1;      // ----------------------------------------
1391:    return ::week(@mp);    }    -  cYear set_ruleset(.Ruleset r) +  cYear set_ruleset(Calendar.Ruleset r)    {    return Year("ymd_y",r,y,yjd,n);    }
1655:    return n;    }    -  cMonth set_ruleset(.Ruleset r) +  cMonth set_ruleset(Calendar.Ruleset r)    {    return Month("ymd_yjmw",r,y,yjd,jd,m,n,wd,w,wy);    }
1995:    return ::day(@mp);    }    -  cWeek set_ruleset(.Ruleset r) +  cWeek set_ruleset(Calendar.Ruleset r)    {    return Week("ymd_yjwm",r,y,yjd,jd,w,n,md,m,mnd);    }
2355:    ->number_of_weeks();    }    -  cDay set_ruleset(.Ruleset r) +  cDay set_ruleset(Calendar.Ruleset r)    {    return Day("ymd_ydmw",r,y,yjd,jd,yd,n,m,md,wy,w,wd,mnd);    }
2642:    if (origin->rules->abbr2zone[zonename])    zonename=origin->rules->abbr2zone[zonename];    -  .Rule.Timezone zone=.Timezone[zonename]; +  Calendar.Rule.Timezone zone=Calendar.Timezone[zonename];    if (!zone)    {    if (sscanf(zonename,"%[^-+]%s",string a,string b)==2 && a!="" && b!="")
2652:       return    dwim_tod(origin->set_timezone( -  .Timezone.make_new_timezone( +  Calendar.Timezone.make_new_timezone(    tr->timezone(), -  .Timezone.decode_timeskew(b))), +  Calendar.Timezone.decode_timeskew(b))),    whut,@args);    }    if(!abbr2zones)
2729:       TimeRange low;    -  .Calendar cal=this; +  Calendar.Calendar cal=this;         // #define NOCATCH