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.14 2001/07/18 10:03:38 nilsson Exp $ + // $Id: TimeRanges.pmod,v 1.15 2001/08/31 14:14:48 grubba Exp $      #pike __REAL_VERSION__      #define zero int(0..0)      import ".";      program SuperTimeRange=cSuperTimeRange;      string calendar_name() { return "TimeRanges"; }
pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:158:   // virtual    static TimeRange _set_size(int n,TimeRange x);       TimeRange set_size(function|TimeRange|int(0..0x7fffffff) a,    void|function|TimeRange b)    {    function|object(TimeRange) x;    int(0..0x7fffffff) n;    if (!b)    if (intp(a)) -  x=[function|object(TimeRange)]this_object(), +  x=[function|object(TimeRange)](mixed)this_object(),    n=[int(0..0x7fffffff)]a;    else    x=a,n=1;    else    x=b,n=a;    if (functionp(x)) x=promote_program(x);    if (n<0)    error("Negative size (%d)\n",n);    return _set_size(n,[object(TimeRange)]x);    }
pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:203:   // virtual    static this_program _add(int n,this_program step);       this_program add(function|this_program|int a,    void|function|this_program b)    {    function|object(this_program) x;    int n;    if (!b)    if (intp(a)) -  x=[function|object(this_program)]this_object(), +  x=[function|object(this_program)](mixed)this_object(),    n=[int]a;    else    x=a,n=1;    else    x=b,n=a;    if (functionp(x)) x=promote_program(x);    return _add(n,[object(this_program)]x);    }      //! method TimeRange place(TimeRange this)