Branch: Tag:

2008-02-07

2008-02-07 01:39:53 by Martin Stjernholm <mast@lysator.liu.se>

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

2:      //! This is the container class for rules.    - .Rule.Timezone timezone; - .Rule.Language language; + Calendar.Rule.Timezone timezone; + Calendar.Rule.Language language;      mapping(string:string) abbr2zone=   ([
31:   ]);      //! - this_program set_timezone(string|.Rule.Timezone t) + this_program set_timezone(string|Calendar.Rule.Timezone t)   {    if (stringp(t)) {    string name = t; -  t=.Timezone[t]; +  t=Calendar.Timezone[t];    if (!t) error("No timezone %O\n",name);    }   
48:   }      //! - this_program set_language(string|.Rule.Language lang) + this_program set_language(string|Calendar.Rule.Language lang)   {    this_program r=clone();    if (stringp(lang))
87:   }      //! - this_program set_rule(.Rule.Language|.Rule.Timezone rule) + this_program set_rule(Calendar.Rule.Language|Calendar.Rule.Timezone rule)   {    this_program r=clone();    if (rule->is_timezone) r->timezone=rule;