Patch level : 10.0

Files correlati     : tutti
Ricompilazione Demo : [ ]
Commento            :
Corretta intepretazione espressioni di JOIN alternative (tra parentesi)
Corretta intepretazione sottocampi, ad esempio "G1:TOTVAL[1,2]"


git-svn-id: svn://10.65.10.50/trunk@17644 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-11-14 16:41:23 +00:00
parent 4fe9873346
commit 3f311dd12c
6 changed files with 39 additions and 46 deletions

View File

@ -58,8 +58,9 @@ TInfo_mask::TInfo_mask()
if (main_app().get_version_info(year, release, tag, patch))
versione.format("%d.%02d.%02d Patch %04d", year, release, tag, patch);
TString80 stros, strwx;
TString80 stros, strwx, strcpu;
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
xvt_sys_get_host_name(strcpu.get_buffer(), strcpu.size());
TString arg;
for (int a = 0; a < main_app().argc(); a++)
@ -115,8 +116,9 @@ TInfo_mask::TInfo_mask()
add_row(TR("N. di serie"), ser_no, ser_no < 0);
add_row(TR("Assistenza"), dongle().year_assist());
add_row(TR("Installazione"), tipo);
add_row(TR("Sistema"), stros);
add_row(TR("Sistema Operativo"), stros);
add_row(TR("Utente"), user());
add_row(TR("Computer"), strcpu);
add_row(TR("Studio"), firm2dir(-1));
add_row(TR("Ditta"), campoini.get("Firm", "Main"));
if (prefix_valid())

View File

@ -244,8 +244,8 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
xvt_font_set_size(BIGFAT_FONT, xvt_font_get_size(FAT_FONT) * 2);
xvt_font_map_using_default(BIGFAT_FONT);
CHECK(xvt_font_is_mapped(BIGFAT_FONT), "Can't map native font");
// Compute true text size
// Compute true text size
ROWY = (pc.bottom - pc.top) / 25;
const int COLX = (pc.right - pc.left) / 80;
@ -264,12 +264,11 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
CHARY = ROWY-2;
}
XVT_FNTID f;
XVT_FNTID f = NULL;
if (bold)
f = big ? BIGFAT_FONT : FAT_FONT;
f = big ? BIGFAT_FONT : FAT_FONT;
else
f = big ? BIG_FONT : DEF_FONT;
f = big ? BIG_FONT : DEF_FONT;
return f;
}

View File

@ -4132,8 +4132,21 @@ bool TRectype::set_creation_info()
// TRecfield (campo/sottocampo di un record)
///////////////////////////////////////////////////////////
void TRecfield::set_range(int from, int to)
TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
{
_rec = &rec;
const TFixed_string fname(name);
const int colon = fname.find(':');
if (colon > 0)
{
_name.strncpy(name, colon);
_sub_field = name+colon+1;
_sub_field << '='; // ???????????????
}
else
_name = name;
const RecDes* rd = _rec->rec_des();
const int nf = findfld(rd, _name);
@ -4178,23 +4191,8 @@ void TRecfield::set_range(int from, int to)
_len = rd->Fd[nf].Len;
}
}
}
TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
{
const TFixed_string fname(name);
const int colon = fname.find(':');
if (colon > 0)
{
_name.strncpy(name, colon);
_sub_field = name+colon+1;
_sub_field << '='; // ???????????????
}
else
_name = name;
_rec = &rec;
set_range(from, to);
CHECKS(colon < 0 || _type == _memofld, "SubField on non memo field: ", name);
}
void TRecfield::put_subfield(const char* s)

View File

@ -798,7 +798,6 @@ class TRecfield : public TObject
byte _to;
// @cmember:(INTERNAL) Setta il campo <p to>-esimo con i valori di <p from>-esimo
void set_range(int from, int to);
void get_subfield(TString& s) const;
void put_subfield(const char * s);

View File

@ -947,9 +947,7 @@ bool TMask::on_key(
break;
case K_F1:
{
char key[_MAX_FNAME];
xvt_fsys_parse_pathname(source_file(), NULL, NULL, key, NULL, NULL);
const char* key = source_file().name_only();
EVENT e; memset(&e, 0, sizeof(e));
e.type = E_HELP;
e.v.help.tag = M_HELP_ONCONTEXT;
@ -957,8 +955,8 @@ bool TMask::on_key(
e.v.help.tid = (long)key;
TFilename n = "campo";
TString4 module; module.strncpy(key, 2);
if (module.compare("ba", -1, true) != 0)
TString4 module; module.strncpy(key, 2); module.lower();
if (module != "ba")
n.insert(module);
FILE_SPEC fs; xvt_fsys_convert_str_to_fspec(n, &fs);
XVT_HELP_INFO hi = xvt_help_open_helpfile(&fs, 0);

View File

@ -242,22 +242,22 @@ void TRelationdef::print_on(TToken_string& out) const
const char* TRelationdef::evaluate_expr(int j, const TLocalisamfile& to)
{
const TRectype& rec = to.curr();
TExpression& expr = (TExpression&)_exprs[j];
for (int k = 0; k < expr.numvar(); k++)
{
const TFieldref fr(expr.varname(k), to.num());
expr.setvar(k, fr.read(to.curr()));
const TFieldref fr(expr.varname(k), rec.num());
expr.setvar(k, fr.read(rec));
}
const char* val = (const char* )expr.as_string();
const char* val = (const char*)expr.as_string();
if (*val == '\0' && _altexprs.objptr(j))
{
TExpression& altexpr = (TExpression&)_altexprs[j];
for (int k = 0; k < expr.numvar(); k++)
for (int k = 0; k < altexpr.numvar(); k++)
{
const TFieldref fr(altexpr.varname(k), to.num());
altexpr.setvar(k, fr.read(to.curr()));
const TFieldref fr(altexpr.varname(k), rec.num());
altexpr.setvar(k, fr.read(rec));
}
val = (const char*)altexpr.as_string();
}
@ -2368,16 +2368,13 @@ const char* TFieldref::read(const TRectype& rec) const
}
else
{
/*buffer = _name; buffer.upper();
buffer = rec.get(buffer);
if (_from > 0 || _to > 0)
if (_from > 0 || _to > 0 || _name.find(':') > 0)
{
const int l = buffer.len();
if (_to < l && _to > 0) buffer.cut(_to);
if (_from > 0) buffer.ltrim(_from);
} */
const TRecfield rf((TRectype&)rec, _name, _from, _to);
buffer = rf;
const TRecfield rf((TRectype&)rec, _name, _from, _to-1);
buffer = rf;
}
else
buffer = rec.get(_name);
}
return buffer;
}