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:
guy 2011-09-09 11:03:08 +00:00
parent c1f830fa8c
commit f6de739122
16 changed files with 43 additions and 37 deletions

View File

@ -629,6 +629,8 @@ bool TApplication::has_module(int module, int checktype) const
long TApplication::get_firm() const
{
if (!prefix_valid())
return ini_get_int(CONFIG_INSTALL, "Main", "Firm");
return prefix().get_codditta();
}

View File

@ -208,14 +208,14 @@ inline TObject& TArray::operator[] (int index) const
#define FOR_EACH_ARRAY_ITEM(__arr, __r, __obj) \
TObject* __obj; \
for (int __r = (__arr).first(); \
(__obj = (__arr).objptr(__r)); \
for (int __r = (__arr).first(); \
(__obj = (__arr).objptr(__r)) != NULL; \
__r = (__arr).succ(__r))
#define FOR_EACH_ARRAY_ITEM_BACK(__arr, __r, __obj) \
TObject* __obj; \
for (int __r = (__arr).last(); \
(__obj = (__arr).objptr(__r)); \
for (int __r = (__arr).last(); \
(__obj = (__arr).objptr(__r)) != NULL; \
__r = (__arr).pred(__r))

View File

@ -1,6 +1,10 @@
#ifndef __AUTOMASK_H
#define __AUTOMASK_H
#ifndef __DEFMASK_H
#include <defmask.h>
#endif
#ifndef __MSKSHEET_H
#include <msksheet.h>
#endif

View File

@ -4,11 +4,7 @@
#include <diction.h>
#include <keys.h>
#ifdef WIN32
#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
#define buildmsg() char msg[1024];va_list argptr;va_start(argptr,fmt);_vsnprintf(msg,sizeof(msg),fmt,argptr);va_end(argptr);msg[1023] = '\0';
// @doc EXTERNAL

View File

@ -136,6 +136,9 @@ public:
TDate& operator --()
{ 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
void print_on(ostream& out) const ;
// @cmember Legge dall'input passato la data
@ -286,8 +289,8 @@ inline bool operator !=(
{ return a._val != b._val;}
void swap(TDate& a, 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_min(const TDate& a, const TDate& b);
const TDate& fnc_max(const TDate& a, const TDate& b);
const char* itom(int month);
const char* itow(int dayofweek);

View File

@ -45,6 +45,7 @@
#define DLG_PACKTCLI 41 /* TAG del bottone Pacco a cliente */
#define DLG_PACKTMAG 42 /* TAG del bottone Pacco a magazzino */
#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 */

View File

@ -788,7 +788,7 @@ void TExpression::eval()
if (done)
{
const TDate d1(s1);
good = (d1 >= d2) && (!d3.ok() || d1 <= d3);
good = d1.between(d2, d3);
}
}
if (!done)

View File

@ -788,7 +788,7 @@ TCodeb_handle TBaseisamfile::handle(int key) const
return prefix().get_handle(_isam_handle, key > 0 ? key : _curr_key);
}
long TBaseisamfile::items() const
TRecnotype TBaseisamfile::items() const
{
return DB_reccount(handle());
}

View File

@ -448,7 +448,7 @@ public:
virtual TRecnotype eod() const ;
// @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
int get_int(const char* fieldname) const
@ -517,7 +517,7 @@ public:
// @cmember Vuota il contenuto del record corrente
virtual void zero() { curr().zero();}
// @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
void blank(const char * fieldname)
{ curr().blank(fieldname); }

View File

@ -2567,24 +2567,24 @@ bool TMask::kill_profile(int num)
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);
if (f.is_loadable())
{
const TString & def = f.get_default();
if (def.full())
f.set(def);
}
const TString& def = f->get_default();
if (def.full())
f->set(def);
}
}
const char* TMask::get_caption(TString& str) const
{
char* title = str.get_buffer(128);
xvt_vobj_get_title(win(), title, str.size());
char* title = NULL;
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;
}

View File

@ -2607,8 +2607,8 @@ int TBrowse::do_input(
if (_inp_id.empty())
return ne;
TRectype& cur = _cursor->curr();
_cursor->file(0).zero(); // was cur.zero() che non va bene per le tabelle di modulo
TRectype& cur = _cursor->curr();
TRectype filtrec(cur);
_inp_id.restart();
@ -2654,7 +2654,7 @@ int TBrowse::do_input(
switch (f.class_id())
{
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() &&
((TReal_field&)f).decimals() == 0 && fldref.name() == "CODTAB")
{
@ -4840,7 +4840,6 @@ bool TReal_field::autosave(TRelation& r)
return TEditable_field::autosave(r);
}
///////////////////////////////////////////////////////////
// Currency_field
///////////////////////////////////////////////////////////

View File

@ -12,9 +12,9 @@
TFast_isamfile::TFast_isamfile(int logicnum) : TIsamfile(logicnum)
{
int err = open(_excllock);
int err = open_ex(_excllock, true);
if (err != NOERR)
err = open(_manulock);
err = open(_manulock, true);
if (err != NOERR)
cantread_box(name());
}

View File

@ -1438,7 +1438,7 @@ void TCursor::filter(
if (to != NULL)
matildator(*to, _nkey, (tilde & 0x2) != 0, kto);
if (kf[0] <= ' ' || kto[0] <= ' ')
if (kf[0] <= ' ' || kto[0] <= ' ')
{
switch (file().num())
{

View File

@ -27,9 +27,10 @@
#define JOIN JO
#define LIST LI
#define LISTFILE LI
#define MASK MA
#define MESSAGE ME
#define MEMO ME
#define MASK MA
#define MODULES MO
#define NUMBER NU
#define NONE NO
#define OUTPUT OU

View File

@ -155,6 +155,7 @@
#define TOOL_EXPORT 151
#define TOOL_CONVERT 156
#define TOOL_PACK 157
#define TOOL_BARCODE 158
#define TOOL_INFO 162
#define TOOL_HELP 163

View File

@ -534,8 +534,7 @@ long daytime()
static bool is_aga_station(const char* hostname)
{
const char* const ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK",
"MOBILE", "PICARD", "SPOCK", "SULU", "UHURA", "ARCHIMEDE1", NULL };
const char* const ranger[] = { "ARCHIMEDE", "BATMOBILE", "KIRK", "MOBILE", "SPOCK", NULL };
for (int i = 0; ranger[i]; i++)
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
return true;
@ -548,7 +547,7 @@ bool is_power_station()
if (ps < 0)
{
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());
else
ps = FALSE;