Patches against latest CVS for IRIX 6.5

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Patches against latest CVS for IRIX 6.5

Albert Chin-69
Needed as ino_t and off_t are 'unsigned long long' and 'long long',
respectively.

--
albert chin ([hidden email])

-- snip snip
Index: src/ov.h
===================================================================
RCS file: /cvs/octave/src/ov.h,v
retrieving revision 1.67
diff -u -3 -p -r1.67 ov.h
--- src/ov.h 2003/02/20 16:46:37 1.67
+++ src/ov.h 2003/02/20 19:04:43
@@ -165,6 +165,8 @@ public:
   octave_value (unsigned int i);
   octave_value (long int i);
   octave_value (unsigned long int i);
+  octave_value (unsigned long long i);
+  octave_value (long long i);
   octave_value (octave_time t);
   octave_value (double d);
   octave_value (const Cell& m);


Reply | Threaded
Open this post in threaded view
|

Patches against latest CVS for IRIX 6.5

John W. Eaton-6
On 20-Feb-2003, Albert Chin <[hidden email]> wrote:

| Needed as ino_t and off_t are 'unsigned long long' and 'long long',
| respectively.
|
| --
| albert chin ([hidden email])
|
| -- snip snip
| Index: src/ov.h
| ===================================================================
| RCS file: /cvs/octave/src/ov.h,v
| retrieving revision 1.67
| diff -u -3 -p -r1.67 ov.h
| --- src/ov.h 2003/02/20 16:46:37 1.67
| +++ src/ov.h 2003/02/20 19:04:43
| @@ -165,6 +165,8 @@ public:
|    octave_value (unsigned int i);
|    octave_value (long int i);
|    octave_value (unsigned long int i);
| +  octave_value (unsigned long long i);
| +  octave_value (long long i);
|    octave_value (octave_time t);
|    octave_value (double d);
|    octave_value (const Cell& m);

The declarations look great, but how do you plan to implement these
functions?

jwe


Reply | Threaded
Open this post in threaded view
|

Re: Patches against latest CVS for IRIX 6.5

Albert Chin-69
On Thu, Feb 20, 2003 at 01:32:47PM -0600, John W. Eaton wrote:

> On 20-Feb-2003, Albert Chin <[hidden email]> wrote:
>
> | Needed as ino_t and off_t are 'unsigned long long' and 'long long',
> | respectively.
> |
> | --
> | albert chin ([hidden email])
> |
> | -- snip snip
> | Index: src/ov.h
> | ===================================================================
> | RCS file: /cvs/octave/src/ov.h,v
> | retrieving revision 1.67
> | diff -u -3 -p -r1.67 ov.h
> | --- src/ov.h 2003/02/20 16:46:37 1.67
> | +++ src/ov.h 2003/02/20 19:04:43
> | @@ -165,6 +165,8 @@ public:
> |    octave_value (unsigned int i);
> |    octave_value (long int i);
> |    octave_value (unsigned long int i);
> | +  octave_value (unsigned long long i);
> | +  octave_value (long long i);
> |    octave_value (octave_time t);
> |    octave_value (double d);
> |    octave_value (const Cell& m);
>
> The declarations look great, but how do you plan to implement these
> functions?

Good question. Can I just duplicate the definition for the others in
ov.cc:
  octave_value::octave_value (long int i)
    : rep (new octave_scalar (i))
  {
    rep->count = 1;
  }

So I'd do:
  octave_value::octave_value (unsigned long long i)
    : rep (new octave_scalar (i))
  {
    rep->count = 1;
  }
  octave_value::octave_value (long long i)
    : rep (new octave_scalar (i))
  {
    rep->count = 1;
  }

--
albert chin ([hidden email])


Reply | Threaded
Open this post in threaded view
|

Re: Patches against latest CVS for IRIX 6.5

John W. Eaton-6
On 20-Feb-2003, Albert Chin <[hidden email]> wrote:

| Good question. Can I just duplicate the definition for the others in
| ov.cc:
|   octave_value::octave_value (long int i)
|     : rep (new octave_scalar (i))
|   {
|     rep->count = 1;
|   }
|
| So I'd do:
|   octave_value::octave_value (unsigned long long i)
|     : rep (new octave_scalar (i))
|   {
|     rep->count = 1;
|   }
|   octave_value::octave_value (long long i)
|     : rep (new octave_scalar (i))
|   {
|     rep->count = 1;
|   }

No, because octave_scalar doesn't have a constructor for "long long"
types.  Do we want to add a new "long long" type to Octave (on systems
taht support such types)?  If so, should it just be a container, or
should it have useful operations?  If it has useful operations, we end
up with a potential explosion in the number of functions that must be
defined to handle various arithmetic operations.

jwe