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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:1:   //! module Calendar    - // $Id: TimeRanges.pmod,v 1.11 2000/10/18 10:05:46 mirar Exp $ + // $Id: TimeRanges.pmod,v 1.12 2000/10/18 11:01:18 mirar Exp $      #pike __REAL_VERSION__      #define zero int(0..0)      import ".";      constant CALUNKNOWN=-1000; // not calculated yet      program SuperTimeRange=cSuperTimeRange;
pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:1141:   //! which, to differ from the zero time range   //! (the zero-length time range), isn't placed   //! in time. This is the result of for instance   //! <ref>`&</ref> between two strict non-overlapping   //! timeranges - no time at all.   //!   //! It has a constant, <tt>is_nulltimerange</tt>, which   //! is non-zero. <tt>`!</tt> on this timerange is true.       - static class NullTimeRange + program NullTimeRange=cNullTimeRange; + static class cNullTimeRange   {    inherit TimeRange;       constant is_nulltimerange=1;      // overload    void create()    {    }   
pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:1237:    string _sprintf(int t)    {    switch (t)    {    case 'O': return "NullTimeRange";    default: return 0;    }    }   }    - NullTimeRange nulltimerange=NullTimeRange(); + cNullTimeRange nulltimerange=NullTimeRange();      // helper functions      static mapping(function:TimeRange) program2stuff=([]);      static TimeRange promote_program(function p)   {    TimeRange x;    if ( (x=program2stuff[p]) ) return x;    x=[object(TimeRange)]p();    if (!x->is_timerange)    error("Not a timerange program: %O\n",p);    return program2stuff[p]=x;   }