Cambiata integer() dei real: adesso ritorna long. Sistemati files dipendenti

(ma non erano tutti questi. Boh.)


git-svn-id: svn://10.65.10.50/trunk@264 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-09-19 09:50:07 +00:00
parent 867ca4bd7d
commit 0178369ee6
33 changed files with 2475 additions and 2475 deletions

View File

@ -426,9 +426,9 @@ update_keydef (int key, const char *desc)
_rec->Ky[key].FieldSeq[n] += MaxFields; _rec->Ky[key].FieldSeq[n] += MaxFields;
else if (sym == _number) else if (sym == _number)
{ {
_rec->Ky[key].FromCh[n] = inst.number ().integer () - 1; _rec->Ky[key].FromCh[n] = (int)inst.number().integer() - 1;
inst = c.step (); inst = c.step ();
_rec->Ky[key].ToCh[n] = _rec->Ky[key].FromCh[n] + inst.number ().integer () - 1; _rec->Ky[key].ToCh[n] = _rec->Ky[key].FromCh[n] + (int)inst.number ().integer () - 1;
inst = c.step (); inst = c.step ();
} }
else else

View File

@ -1,4 +1,4 @@
// $Id: mailbox.cpp,v 1.1.1.1 1994-08-12 10:52:01 alex Exp $ // $Id: mailbox.cpp,v 1.2 1994-09-19 09:49:41 villa Exp $
#include <stdlib.h> #include <stdlib.h>
#include <fstream.h> #include <fstream.h>

View File

@ -1,4 +1,4 @@
// $Id: mailbox.h,v 1.1.1.1 1994-08-12 10:52:01 alex Exp $ // $Id: mailbox.h,v 1.2 1994-09-19 09:49:42 villa Exp $
/* si', trattasi di -*-c++-*- */ /* si', trattasi di -*-c++-*- */
// Mailbox.h // Mailbox.h

View File

@ -14,8 +14,8 @@
#include <mask.h> #include <mask.h>
#include <utility.h> #include <utility.h>
#include <viswin.h> #include <viswin.h>
#include <printapp.h>
#include <extcdecl.h> #include <extcdecl.h>
#include <applicat.h>
#include <printer.h> #include <printer.h>
#include <execp.h> #include <execp.h>

View File

@ -14,17 +14,17 @@ HIDDEN real __tmp_real;
HIDDEN char __string[80]; HIDDEN char __string[80];
const real ZERO (0.0); const real ZERO (0.0);
real ::real () real::real ()
{ {
dzero (ptr ()); dzero (ptr ());
} }
real ::real (const real & b) real::real (const real & b)
{ {
dcpy (ptr (), b.ptr ()); dcpy (ptr (), b.ptr ());
} }
real ::real (double a) real::real (double a)
{ {
dftodr (ptr (), a, 9); // Round the number (1.0 is NOT 0.999999999) dftodr (ptr (), a, 9); // Round the number (1.0 is NOT 0.999999999)
@ -32,7 +32,7 @@ real ::real (double a)
} }
char *real ::eng2ita (char *s) char *real::eng2ita (char *s)
{ {
if (s) if (s)
{ {
@ -43,7 +43,7 @@ char *real ::eng2ita (char *s)
return s; return s;
} }
char *real ::ita2eng (const char *s) char *real::ita2eng (const char *s)
{ {
int j = 0; int j = 0;
if (s) if (s)
@ -66,7 +66,7 @@ char *real ::ita2eng (const char *s)
return __string; return __string;
} }
bool real ::is_real (const char *s) bool real::is_real (const char *s)
{ {
bool ok = FALSE; bool ok = FALSE;
if (s) if (s)
@ -79,7 +79,7 @@ bool real ::is_real (const char *s)
return ok; return ok;
} }
real ::real (const char *s) real::real (const char *s)
{ {
if (s) if (s)
while (*s == ' ') while (*s == ' ')
@ -91,46 +91,46 @@ real ::real (const char *s)
dzero (ptr ()); dzero (ptr ());
} }
real & real ::operator = (const real & b) real & real::operator = (const real & b)
{ {
dcpy (ptr (), b.ptr ()); dcpy (ptr (), b.ptr ());
return *this; return *this;
} }
real & real ::operator = (double a) real & real::operator = (double a)
{ {
const real n (a); const real n (a);
operator = (n); operator = (n);
return *this; return *this;
} }
real & real ::operator += (const real & b) real & real::operator += (const real & b)
{ {
dadd (ptr (), ptr (), b.ptr ()); dadd (ptr (), ptr (), b.ptr ());
return *this; return *this;
} }
real & real ::operator += (double a) real & real::operator += (double a)
{ {
__tmp_real = *this; __tmp_real = *this;
adddfd (ptr (), __tmp_real.ptr (), a); adddfd (ptr (), __tmp_real.ptr (), a);
return *this; return *this;
} }
real & real ::operator -= (const real & b) real & real::operator -= (const real & b)
{ {
__tmp_real = *this; __tmp_real = *this;
dsub (ptr (), __tmp_real.ptr (), b.ptr ()); dsub (ptr (), __tmp_real.ptr (), b.ptr ());
return *this; return *this;
} }
real & real ::operator *= (const real & b) real & real::operator *= (const real & b)
{ {
dmul (ptr (), ptr (), b.ptr ()); dmul (ptr (), ptr (), b.ptr ());
return *this; return *this;
} }
real & real ::operator /= (const real & b) real & real::operator /= (const real & b)
{ {
const DEC *dst = ddiv (ptr (), ptr (), b.ptr ()); const DEC *dst = ddiv (ptr (), ptr (), b.ptr ());
@ -145,35 +145,35 @@ real & real ::operator /= (const real & b)
return *this; return *this;
} }
TObject *real :: dup () const TObject *real:: dup () const
{ {
return new real (*this); return new real (*this);
} }
bool real ::is_zero () const bool real::is_zero () const
{ {
return diszero (ptr ()); return diszero (ptr ());
} }
int real ::sign () const int real::sign () const
{ {
return dsign (ptr ()); return dsign (ptr ());
} }
real real ::operator - () const real real::operator - () const
{ {
real n; real n;
dchgs (n.ptr (), ptr ()); dchgs (n.ptr (), ptr ());
return n; return n;
} }
int real ::integer () const long real::integer () const
{ {
return dtoi (ptr ()); return (long)dtodf(ptr ());
} }
// Certified 91% // Certified 91%
char *real ::string (int len, int dec, char pad) const char *real::string (int len, int dec, char pad) const
{ {
__tmp_real = *this; __tmp_real = *this;
if (dec != UNDEFINED) if (dec != UNDEFINED)

View File

@ -48,7 +48,7 @@ public:
int precision() ; int precision() ;
bool is_zero() const; bool is_zero() const;
int sign() const; int sign() const;
int integer() const; // operator int is too dangerous long integer() const; // operator int is too dangerous
real& round(int prec = 0) ; real& round(int prec = 0) ;
real& trunc(int prec = 0) ; real& trunc(int prec = 0) ;