Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Modifiche di libreria per supporto/ottimizzazione modulo FE git-svn-id: svn://10.65.10.50/branches/R_10_00@22403 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c1f830fa8c
commit
f6de739122
@ -629,6 +629,8 @@ bool TApplication::has_module(int module, int checktype) const
|
|||||||
|
|
||||||
long TApplication::get_firm() const
|
long TApplication::get_firm() const
|
||||||
{
|
{
|
||||||
|
if (!prefix_valid())
|
||||||
|
return ini_get_int(CONFIG_INSTALL, "Main", "Firm");
|
||||||
return prefix().get_codditta();
|
return prefix().get_codditta();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,14 +208,14 @@ inline TObject& TArray::operator[] (int index) const
|
|||||||
|
|
||||||
#define FOR_EACH_ARRAY_ITEM(__arr, __r, __obj) \
|
#define FOR_EACH_ARRAY_ITEM(__arr, __r, __obj) \
|
||||||
TObject* __obj; \
|
TObject* __obj; \
|
||||||
for (int __r = (__arr).first(); \
|
for (int __r = (__arr).first(); \
|
||||||
(__obj = (__arr).objptr(__r)); \
|
(__obj = (__arr).objptr(__r)) != NULL; \
|
||||||
__r = (__arr).succ(__r))
|
__r = (__arr).succ(__r))
|
||||||
|
|
||||||
#define FOR_EACH_ARRAY_ITEM_BACK(__arr, __r, __obj) \
|
#define FOR_EACH_ARRAY_ITEM_BACK(__arr, __r, __obj) \
|
||||||
TObject* __obj; \
|
TObject* __obj; \
|
||||||
for (int __r = (__arr).last(); \
|
for (int __r = (__arr).last(); \
|
||||||
(__obj = (__arr).objptr(__r)); \
|
(__obj = (__arr).objptr(__r)) != NULL; \
|
||||||
__r = (__arr).pred(__r))
|
__r = (__arr).pred(__r))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef __AUTOMASK_H
|
#ifndef __AUTOMASK_H
|
||||||
#define __AUTOMASK_H
|
#define __AUTOMASK_H
|
||||||
|
|
||||||
|
#ifndef __DEFMASK_H
|
||||||
|
#include <defmask.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __MSKSHEET_H
|
#ifndef __MSKSHEET_H
|
||||||
#include <msksheet.h>
|
#include <msksheet.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,11 +4,7 @@
|
|||||||
#include <diction.h>
|
#include <diction.h>
|
||||||
#include <keys.h>
|
#include <keys.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#define buildmsg() char msg[1024];va_list argptr;va_start(argptr,fmt);_vsnprintf(msg,sizeof(msg),fmt,argptr);va_end(argptr);msg[1023] = '\0';
|
||||||
#define buildmsg() char msg[256];va_list argptr;va_start(argptr,fmt);_vsnprintf(msg,sizeof(msg),fmt,argptr);va_end(argptr);msg[255] = '\0';
|
|
||||||
#else
|
|
||||||
#define buildmsg() char msg[256];va_list argptr;va_start(argptr,fmt);vsprintf(msg,fmt,argptr);va_end(argptr)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
|
@ -136,6 +136,9 @@ public:
|
|||||||
TDate& operator --()
|
TDate& operator --()
|
||||||
{ return operator +=(-1L); }
|
{ return operator +=(-1L); }
|
||||||
|
|
||||||
|
bool between(const TDate& a, const TDate& b) const
|
||||||
|
{ return _val >= a._val && (_val <= b._val || b._val <= 0); }
|
||||||
|
|
||||||
// @cmember Stampa sull'output passato la data
|
// @cmember Stampa sull'output passato la data
|
||||||
void print_on(ostream& out) const ;
|
void print_on(ostream& out) const ;
|
||||||
// @cmember Legge dall'input passato la data
|
// @cmember Legge dall'input passato la data
|
||||||
@ -286,8 +289,8 @@ inline bool operator !=(
|
|||||||
{ return a._val != b._val;}
|
{ return a._val != b._val;}
|
||||||
|
|
||||||
void swap(TDate& a, TDate& b) ;
|
void swap(TDate& a, TDate& b) ;
|
||||||
const TDate& fnc_min(const TDate& a, const TDate& b) ;
|
const TDate& fnc_min(const TDate& a, const TDate& b);
|
||||||
const TDate& fnc_max(const TDate& a, const TDate& b) ;
|
const TDate& fnc_max(const TDate& a, const TDate& b);
|
||||||
|
|
||||||
const char* itom(int month);
|
const char* itom(int month);
|
||||||
const char* itow(int dayofweek);
|
const char* itow(int dayofweek);
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#define DLG_PACKTCLI 41 /* TAG del bottone Pacco a cliente */
|
#define DLG_PACKTCLI 41 /* TAG del bottone Pacco a cliente */
|
||||||
#define DLG_PACKTMAG 42 /* TAG del bottone Pacco a magazzino */
|
#define DLG_PACKTMAG 42 /* TAG del bottone Pacco a magazzino */
|
||||||
#define DLG_SORT 43 /* TAG del bottone Sort */
|
#define DLG_SORT 43 /* TAG del bottone Sort */
|
||||||
|
#define DLG_BARCODE 44 /* TAG del bottone codice a barre */
|
||||||
|
|
||||||
#define DLG_USER 100 /* TAG del primo controllo definito dall'utente */
|
#define DLG_USER 100 /* TAG del primo controllo definito dall'utente */
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ void TExpression::eval()
|
|||||||
if (done)
|
if (done)
|
||||||
{
|
{
|
||||||
const TDate d1(s1);
|
const TDate d1(s1);
|
||||||
good = (d1 >= d2) && (!d3.ok() || d1 <= d3);
|
good = d1.between(d2, d3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!done)
|
if (!done)
|
||||||
|
@ -788,7 +788,7 @@ TCodeb_handle TBaseisamfile::handle(int key) const
|
|||||||
return prefix().get_handle(_isam_handle, key > 0 ? key : _curr_key);
|
return prefix().get_handle(_isam_handle, key > 0 ? key : _curr_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
long TBaseisamfile::items() const
|
TRecnotype TBaseisamfile::items() const
|
||||||
{
|
{
|
||||||
return DB_reccount(handle());
|
return DB_reccount(handle());
|
||||||
}
|
}
|
||||||
|
@ -448,7 +448,7 @@ public:
|
|||||||
virtual TRecnotype eod() const ;
|
virtual TRecnotype eod() const ;
|
||||||
|
|
||||||
// @cmember Numero di records presenti nel file
|
// @cmember Numero di records presenti nel file
|
||||||
long items() const; // n.o di records nel file
|
virtual TRecnotype items() const; // n.o di records nel file
|
||||||
|
|
||||||
// @cmember Ritorna il contenuto del campo <p fieldname> di tipo int
|
// @cmember Ritorna il contenuto del campo <p fieldname> di tipo int
|
||||||
int get_int(const char* fieldname) const
|
int get_int(const char* fieldname) const
|
||||||
@ -517,7 +517,7 @@ public:
|
|||||||
// @cmember Vuota il contenuto del record corrente
|
// @cmember Vuota il contenuto del record corrente
|
||||||
virtual void zero() { curr().zero();}
|
virtual void zero() { curr().zero();}
|
||||||
// @cmember Vuota tutto il record corrente usando il carattere <p c>
|
// @cmember Vuota tutto il record corrente usando il carattere <p c>
|
||||||
void zero(char c) { curr().zero(c);}
|
virtual void zero(char c) { curr().zero(c);}
|
||||||
// @cmember Riempie il campo <p fieldname> del record corrente di spazi
|
// @cmember Riempie il campo <p fieldname> del record corrente di spazi
|
||||||
void blank(const char * fieldname)
|
void blank(const char * fieldname)
|
||||||
{ curr().blank(fieldname); }
|
{ curr().blank(fieldname); }
|
||||||
|
@ -2567,24 +2567,24 @@ bool TMask::kill_profile(int num)
|
|||||||
|
|
||||||
void TMask::load_defaults()
|
void TMask::load_defaults()
|
||||||
{
|
{
|
||||||
for (int pos = 0; pos < fields(); pos++)
|
FOR_EACH_MASK_FIELD(*this, i, f) if (f->is_loadable())
|
||||||
{
|
{
|
||||||
TMask_field& f = fld(pos);
|
const TString& def = f->get_default();
|
||||||
|
if (def.full())
|
||||||
if (f.is_loadable())
|
f->set(def);
|
||||||
{
|
|
||||||
const TString & def = f.get_default();
|
|
||||||
|
|
||||||
if (def.full())
|
|
||||||
f.set(def);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* TMask::get_caption(TString& str) const
|
const char* TMask::get_caption(TString& str) const
|
||||||
{
|
{
|
||||||
char* title = str.get_buffer(128);
|
char* title = NULL;
|
||||||
xvt_vobj_get_title(win(), title, str.size());
|
for (int i = 32; i <= 256; i *= 2)
|
||||||
|
{
|
||||||
|
title = str.get_buffer(i);
|
||||||
|
xvt_vobj_get_title(win(), title, i+1);
|
||||||
|
if (str.len() < i)
|
||||||
|
break;
|
||||||
|
}
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2607,8 +2607,8 @@ int TBrowse::do_input(
|
|||||||
if (_inp_id.empty())
|
if (_inp_id.empty())
|
||||||
return ne;
|
return ne;
|
||||||
|
|
||||||
TRectype& cur = _cursor->curr();
|
|
||||||
_cursor->file(0).zero(); // was cur.zero() che non va bene per le tabelle di modulo
|
_cursor->file(0).zero(); // was cur.zero() che non va bene per le tabelle di modulo
|
||||||
|
TRectype& cur = _cursor->curr();
|
||||||
TRectype filtrec(cur);
|
TRectype filtrec(cur);
|
||||||
|
|
||||||
_inp_id.restart();
|
_inp_id.restart();
|
||||||
@ -2654,7 +2654,7 @@ int TBrowse::do_input(
|
|||||||
switch (f.class_id())
|
switch (f.class_id())
|
||||||
{
|
{
|
||||||
case CLASS_REAL_FIELD:
|
case CLASS_REAL_FIELD:
|
||||||
// Cerco di allineare correttamente i campi numerici salvati parzialmente su codtab
|
// Cerco di allineare correttamente i campi interi salvati parzialmente su codtab
|
||||||
if (fldref.to() > 1 && f.size() > 1 && val.full() &&
|
if (fldref.to() > 1 && f.size() > 1 && val.full() &&
|
||||||
((TReal_field&)f).decimals() == 0 && fldref.name() == "CODTAB")
|
((TReal_field&)f).decimals() == 0 && fldref.name() == "CODTAB")
|
||||||
{
|
{
|
||||||
@ -4840,7 +4840,6 @@ bool TReal_field::autosave(TRelation& r)
|
|||||||
return TEditable_field::autosave(r);
|
return TEditable_field::autosave(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Currency_field
|
// Currency_field
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
TFast_isamfile::TFast_isamfile(int logicnum) : TIsamfile(logicnum)
|
TFast_isamfile::TFast_isamfile(int logicnum) : TIsamfile(logicnum)
|
||||||
{
|
{
|
||||||
int err = open(_excllock);
|
int err = open_ex(_excllock, true);
|
||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
err = open(_manulock);
|
err = open(_manulock, true);
|
||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
cantread_box(name());
|
cantread_box(name());
|
||||||
}
|
}
|
||||||
|
@ -1438,7 +1438,7 @@ void TCursor::filter(
|
|||||||
if (to != NULL)
|
if (to != NULL)
|
||||||
matildator(*to, _nkey, (tilde & 0x2) != 0, kto);
|
matildator(*to, _nkey, (tilde & 0x2) != 0, kto);
|
||||||
|
|
||||||
if (kf[0] <= ' ' || kto[0] <= ' ')
|
if (kf[0] <= ' ' || kto[0] <= ' ')
|
||||||
{
|
{
|
||||||
switch (file().num())
|
switch (file().num())
|
||||||
{
|
{
|
||||||
|
@ -27,9 +27,10 @@
|
|||||||
#define JOIN JO
|
#define JOIN JO
|
||||||
#define LIST LI
|
#define LIST LI
|
||||||
#define LISTFILE LI
|
#define LISTFILE LI
|
||||||
|
#define MASK MA
|
||||||
#define MESSAGE ME
|
#define MESSAGE ME
|
||||||
#define MEMO ME
|
#define MEMO ME
|
||||||
#define MASK MA
|
#define MODULES MO
|
||||||
#define NUMBER NU
|
#define NUMBER NU
|
||||||
#define NONE NO
|
#define NONE NO
|
||||||
#define OUTPUT OU
|
#define OUTPUT OU
|
||||||
|
@ -155,6 +155,7 @@
|
|||||||
#define TOOL_EXPORT 151
|
#define TOOL_EXPORT 151
|
||||||
#define TOOL_CONVERT 156
|
#define TOOL_CONVERT 156
|
||||||
#define TOOL_PACK 157
|
#define TOOL_PACK 157
|
||||||
|
#define TOOL_BARCODE 158
|
||||||
|
|
||||||
#define TOOL_INFO 162
|
#define TOOL_INFO 162
|
||||||
#define TOOL_HELP 163
|
#define TOOL_HELP 163
|
||||||
|
@ -534,8 +534,7 @@ long daytime()
|
|||||||
|
|
||||||
static bool is_aga_station(const char* hostname)
|
static bool is_aga_station(const char* hostname)
|
||||||
{
|
{
|
||||||
const char* const ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK",
|
const char* const ranger[] = { "ARCHIMEDE", "BATMOBILE", "KIRK", "MOBILE", "SPOCK", NULL };
|
||||||
"MOBILE", "PICARD", "SPOCK", "SULU", "UHURA", "ARCHIMEDE1", NULL };
|
|
||||||
for (int i = 0; ranger[i]; i++)
|
for (int i = 0; ranger[i]; i++)
|
||||||
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
|
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
|
||||||
return true;
|
return true;
|
||||||
@ -548,7 +547,7 @@ bool is_power_station()
|
|||||||
if (ps < 0)
|
if (ps < 0)
|
||||||
{
|
{
|
||||||
const TDongle& d = dongle();
|
const TDongle& d = dongle();
|
||||||
if ((d.local() && d.number() == 0) || (d.network() && is_aga_station(d.server_name())))
|
if ((d.local() && (d.number() == 0 || d.number()==1045)) || (d.network() && is_aga_station(d.server_name())))
|
||||||
ps = is_aga_station(get_hostname());
|
ps = is_aga_station(get_hostname());
|
||||||
else
|
else
|
||||||
ps = FALSE;
|
ps = FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user