Patch level : 2.1 nopatch

Files correlati     : agalib.lib
Ricompilazione Demo : [ ]
Commento            :

csort.*       Tolte tutte dipendenze dalle librerie e sostituite con chiamate a xvt
currency.cpp  Tolti vecchi riferimenti a LIT e sostituiti con _firm_val
maskfld.h     Indentazioni e commenti
varrec.*      Indentazioni e commenti
xml.*         Aggiunta gestione attributi booleani (oltre alle stringhe)


git-svn-id: svn://10.65.10.50/trunk@11807 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-03-05 08:50:18 +00:00
parent 25a91f6837
commit e78b03e4da
8 changed files with 57 additions and 53 deletions

View File

@ -1,4 +1,5 @@
#include <checks.h>
#include "xvt.h"
#include <cfiles.h>
#include <csort.h>
@ -59,8 +60,8 @@ void dummy(void);
@(FD)
*/
int init_sort(prms)
struct s_prm *prms; /* struttura di descrizione del sort */
/* struttura di descrizione del sort */
int init_sort(struct s_prm *prms)
{
sp = prms;
if ((bf = appr_mem(&bspace)) != NULL) {
@ -394,7 +395,7 @@ static FILE *wopen(char* name) /* nome del file temporaneo */
fp = fopen(name, "wb+");
if (fp == NULL)
fatal_box("Can't open SORT file");
xvt_dm_post_fatal_exit("Can't open SORT file");
return fp;
}
@ -541,14 +542,16 @@ static FILE *wopen(char* name) /* nome del file temporaneo */
void sort_stats()
{
message_box(
char msg[256];
sprintf(msg,
"Record length = %d\n"
"%u records sorted\n"
"%u sequences\n"
"%u bytes of sort buffer\n"
"%u records per buffer",
sp->rc_len, totrcd, no_seq, bspace, nrcds
);
);
xvt_dm_post_note(msg);
}
/*

View File

@ -25,10 +25,10 @@ extern "C" {
#endif /* __cplusplus */
/*----------------------- FUNZIONI VISIBILI PRIMA PARTE ---------------------*/
int init_sort(struct s_prm *); /* Initialize the sort */
void sort(char *); /* Pass records to Sort */
char *sort_op(void); /* Retrieve sorted records */
void sort_stats(void); /* Display sort statistics */
int init_sort(struct s_prm *); /* Initialize the sort */
void sort(char *); /* Pass records to Sort */
char *sort_op(void); /* Retrieve sorted records */
void sort_stats(void); /* Display sort statistics */
/*----------------------- FUNZIONI VISIBILI SECONDA PARTE -------------------*/

View File

@ -1,7 +1,11 @@
#include <currency.h>
#include <diction.h>
#include <prefix.h>
#include <recarray.h>
#include <xvt.h>
#include <statbar.h>
///////////////////////////////////////////////////////////
// DowJones
///////////////////////////////////////////////////////////
@ -68,15 +72,21 @@ TObject* TDowJones::rec2obj(const TRectype& rec) const
{
TExchangeData* data = new TExchangeData;
const TString16 codval = rec.get("CODTAB");
const TString4 codval = rec.get("CODTAB");
data->_chg = rec.get_real("S4");
if (data->_chg <= ZERO)
{
data->_chg = rec.get_real("R10");
if (data->_chg <= ZERO)
{
if (codval.not_empty() && codval != "LIT")
NFCHECK("Codice valuta senza cambio: '%s'", (const char*)codval);
{
#ifdef DBG
if (codval.not_empty() && codval != _firm_val)
{
TString msg = TR("Codice valuta senza cambio");
msg << ": " << codval;
statbar_set_title(TASK_WIN, msg);
}
#endif
data->_chg = 1.0;
}
}

View File

@ -1599,12 +1599,12 @@ class TTree;
class TTree_field : public TWindowed_field
{
protected: // TObject
word class_id() const;
bool is_kind_of(word cid) const;
virtual word class_id() const;
virtual bool is_kind_of(word cid) const;
protected: // TWindowed_field
virtual TField_window* create_window(int x, int y, int dx, int dy,
WINDOW parent);
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
public:
TTree* tree() const;
void set_tree(TTree* t);
@ -1617,7 +1617,6 @@ public:
void set_header(const char* head);
void set_row_height(int rh);
TTree_field(TMask* m) : TWindowed_field(m) { }
virtual ~TTree_field() { }
};
@ -1627,8 +1626,8 @@ class TGolem_client_field : public TWindowed_field
TGolem_field* _driver;
protected: // TObject
word class_id() const;
bool is_kind_of(word cid) const;
virtual word class_id() const;
virtual bool is_kind_of(word cid) const;
protected: // TWindowed_field
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);

View File

@ -1,19 +1,11 @@
#include <relation.h>
#include <varrec.h>
// HIDDEN bool rec_has_memo(const RecDes* rd)
//{
// for( int i = rd->NFields - 1; i >= 0; i--)
// if (rd->Fd[i].TypeF == _memofld)
// return TRUE;
// return FALSE;
//}
TVariable_field::TVariable_field(
const char * name, //
const char * expr, //
TTypeexp type,
int len) //
const char * name,
const char * expr,
TTypeexp type,
int len)
: _rec(NULL), _name(name), _e(NULL) , _getfunc(NULL),
_put_string(NULL), _in_get(FALSE),_lenght(len)
{

View File

@ -24,11 +24,11 @@ typedef const char * (*VIRTUAL_GET_FUNCTION)(TVariable_rectype & r);
// @base public | TObject
class TVariable_field : public TObject
// @author:(INTERNAL) Sandro
// @author:(INTERNAL) Alessandro
{
TVariable_rectype * _rec;
TString _name;
TString80 _name;
TExpression * _e;
TString _value;
TToken_string * _put_string;

View File

@ -106,23 +106,9 @@ public:
void TXmlAttr::Write(ostream& outf) const
{
if (empty())
{
outf << '"' << '"';
}
else
{
if (real::is_real(*this))
{
print_on(outf);
}
else
{
outf << '"';
print_on(outf);
outf << '"';
}
}
outf << '"';
print_on(outf);
outf << '"';
}
///////////////////////////////////////////////////////////
@ -134,7 +120,8 @@ TXmlItem& TXmlItem::SetAttr(const char* strAttr, const char* strVal)
if (m_Attributes == NULL)
m_Attributes = new TAssoc_array;
m_Attributes->remove(strAttr);
m_Attributes->add(strAttr, new TXmlAttr(strVal));
if (strVal && *strVal)
m_Attributes->add(strAttr, new TXmlAttr(strVal));
return *this;
}
@ -149,6 +136,16 @@ const TString& TXmlItem::GetAttr(const char* strAttr) const
return EMPTY_STRING;
}
TXmlItem& TXmlItem::SetAttr(const char* strAttr, bool b)
{
return SetAttr(strAttr, b ? "1" : "");
}
bool TXmlItem::GetBoolAttr(const char* strAttr) const
{
return !GetAttr(strAttr).blank();
}
int TXmlItem::GetChildren() const
{
int n = 0;

View File

@ -48,6 +48,9 @@ public:
TXmlItem& SetAttr(const char* strAttr, const char* strVal);
const TString& GetAttr(const char* strAttr) const;
TXmlItem& SetAttr(const char* strAttr, bool yes);
bool GetBoolAttr(const char* strAttr) const;
TXmlItem& AddChild(const char* strTag);
TXmlItem& AddSoapString(const char* name, const char* value, bool typized = false);
TXmlItem& AddSoapInt(const char* name, int value, bool typized = false);