Patch level : 10.0
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : Corretta decodifica tabelle di ditta git-svn-id: svn://10.65.10.50/trunk@17684 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
77ca727c70
commit
ae20e57276
@ -465,7 +465,13 @@ void TFile_cache::construct(int key)
|
||||
TFile_cache::TFile_cache(TLocalisamfile* f , int key)
|
||||
{
|
||||
construct(key);
|
||||
_filecode << f->num();
|
||||
switch (f->num())
|
||||
{
|
||||
case LF_TABCOM: _filecode << '%' << f->name(); break;
|
||||
case LF_TAB : _filecode = f->name(); break;
|
||||
case LF_TABMOD: _filecode << '&' << f->name(); break;
|
||||
default : _filecode << f->num(); break;
|
||||
}
|
||||
init_file(f);
|
||||
}
|
||||
|
||||
@ -714,7 +720,16 @@ TObject* TDecoder::rec2obj(const TRectype& curr) const
|
||||
|
||||
const TString& TDecoder::decode(const char* code)
|
||||
{
|
||||
const TString& obj = (const TString&)query(code);
|
||||
TString80 key;
|
||||
switch (file().num())
|
||||
{
|
||||
case LF_TABMOD: key << file().get("MOD") << '|' << file().get("CUST") << '|'; // Fall down
|
||||
case LF_TAB:
|
||||
case LF_TABCOM: key << file().name() << '|'; break;
|
||||
default: break;
|
||||
}
|
||||
key << code;
|
||||
const TString& obj = (const TString&)query(key);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class TFile_cache : public TObject
|
||||
static unsigned long _hits, _misses;
|
||||
|
||||
TToken_string _code;
|
||||
TString4 _filecode;
|
||||
TString4 _filecode; // Codice tabella es: %STA, &AUT
|
||||
TLocalisamfile* _file;
|
||||
int _key;
|
||||
long _last_firm, _limit;
|
||||
@ -170,7 +170,7 @@ protected:
|
||||
|
||||
const TObject& query(const char* chiave);
|
||||
virtual TObject* rec2obj(const TRectype& rec) const pure;
|
||||
TLocalisamfile & file();
|
||||
TLocalisamfile& file();
|
||||
|
||||
public:
|
||||
virtual bool discard(const char* victim);
|
||||
|
@ -205,9 +205,10 @@ void TVariable_rectype::set_memo_fld( const char * fieldname)
|
||||
{
|
||||
if (fieldname && *fieldname)
|
||||
{
|
||||
CHECKS(exist(fieldname), "Unknown memo field", fieldname);
|
||||
CHECKS(type(fieldname) == _memofld, "Incorrect field type", fieldname);
|
||||
_memo_fld = fieldname;
|
||||
if (type(fieldname) == _memofld)
|
||||
_memo_fld = fieldname;
|
||||
else
|
||||
NFCHECK("Campo memo non esistente %s", fieldname);
|
||||
}
|
||||
else
|
||||
_memo_fld.cut(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user