Modifiche dall versione Linux sulla 2.1

git-svn-id: svn://10.65.10.50/trunk@11864 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-03-16 07:25:42 +00:00
parent 3b42ecfc52
commit d9955008ac
10 changed files with 36 additions and 28 deletions

@ -12,4 +12,4 @@ int main(int argc, char** argv)
}
exit(0);
return 0;
}
}

@ -63,7 +63,10 @@ void TLavorazione_tab::put_sheet(TSheet_field& sheet)
linea=row.get(F_LPRODUTTIV-101);
linea.cut(5);
linea.rtrim();
if (!set_produttiv_linea(l,real(linea)))
real lin(linea);
if (!set_produttiv_linea(l, lin))
break;
ok=TRUE;
}
@ -117,7 +120,6 @@ TMask * TDistinta_tables::set_mask(TMask* _m)
TMask* mask = TTable_application::set_mask(_m);
if (get_tabname() == "LAV")
{
TSheet_field& sheet = mask->sfield(F_SHEET);
if (!has_module(MRAUT))
mask->disable_page(1);
}

@ -652,7 +652,6 @@ bool TDistinta_mask::on_unitsheet_event(TOperable_field& o, TField_event e, long
TSheet_field& sht = (TSheet_field&)o;
const int chk = sht.cid2index(FU_RIF);
const int cod = sht.cid2index(FU_UM);
switch(e)
{
@ -912,7 +911,7 @@ bool TDistinta_mask::on_parmsheet_event(TOperable_field& o, TField_event e, long
}
static _sort_key = 0;
static int _sort_key = 0;
static int compare_sheet_rows(const TObject** o1, const TObject** o2)
{
@ -941,7 +940,7 @@ bool TDistinta_mask::on_field_event(TOperable_field& o, TField_event e, long jol
if (code.not_empty())
{
const char type = _tree.get_type(code);
bool is_virtual=type == 'V';
switch(type)
{
case 'A':

@ -574,7 +574,9 @@ void TArticolo_giacenza_static::calc_ordinato_fornitori(_ParmStruct* p, const ch
// volta per articolo.
_ordinato_fornitori.destroy();
// Azzera l'array...
for (int i=0; i <= p->_periods; i++)
int i;
for (i = 0; i <= p->_periods; i++)
_ordinato_fornitori.add(new real);
//Scorre tutte le numerazioni
@ -861,8 +863,6 @@ bool TExplode_distinta_form::validate(TForm_item &f, TToken_string &t)
else
if (code == "_DES")
{
const TRelation* rel = relation();
switch (tipo)
{
case 'A':
@ -1278,7 +1278,7 @@ void TExplode_distinta_form::explode_and_print()
}
// Ordina le righe di esplosione per livello/articolo/giacenza
compare_print_rows(const TObject** o1, const TObject** o2)
int compare_print_rows(const TObject** o1, const TObject** o2)
{
TRiga_esplosione2print & r1 =(TRiga_esplosione2print &)(**o1);
TRiga_esplosione2print & r2 =(TRiga_esplosione2print &)(**o2);
@ -1295,7 +1295,7 @@ compare_print_rows(const TObject** o1, const TObject** o2)
}
// Ordina le righe di esplosione per fornitore/articolo/giacenza
compare_print_rows_forn(const TObject** o1, const TObject** o2)
int compare_print_rows_forn(const TObject** o1, const TObject** o2)
{
TRiga_esplosione2print & r1 =(TRiga_esplosione2print &)(**o1);
TRiga_esplosione2print & r2 =(TRiga_esplosione2print &)(**o2);
@ -1482,7 +1482,9 @@ bool TEsplosione_distinta_app::sheet_notify(TSheet_field& s, int r, KEY key)
const int TEsplosione_distinta_app::date2period(const TDate& d)
{
const int items = _date_array.items();
for (int i = 0; i<items; i++)
int i;
for (i = 0; i<items; i++)
{
const TDate& limit = (TDate&)_date_array[i];
if (d <= limit)
@ -1947,4 +1949,4 @@ int db1100(int argc, char* argv[])
a->run(argc, argv, TR("Stampa esplosione"));
delete a;
return 0;
}
}

@ -53,7 +53,6 @@ void TStampa_anagrafica::configura_profilo()
a.put("CODDIST", _msk->get(F_DISTA));
TCursor * cur = _form->cursor();
TString filtrorighe,filtrodist;
TString or("||");
const bool r_lavorazioni = _msk->get_bool(F_RIGHE_LAVORAZIONI);
const bool r_articoli = _msk->get_bool(F_RIGHE_ARTICOLI);
const bool r_virtuali = _msk->get_bool(F_RIGHE_VIRTUALI);

@ -88,7 +88,9 @@ void TXmas_tree::add_branch(TDistinta_tree& dt)
TCodice_articolo father; dt.curr_code(father);
TString80 level; dt.curr_giaclev(level);
const TRectype* child = NULL;
for (int c = 1; ; c++)
int c;
for (c = 1; ; c++)
{
child = find_child(art, c);
if (child == NULL)
@ -844,4 +846,4 @@ int db1300(int argc, char* argv[])
TImplosion bum;
bum.run(argc, argv, TR("Implosione"));
return 0;
}
}

@ -12,4 +12,4 @@ int main(int argc, char** argv)
}
exit(0);
return 0;
}
}

@ -110,7 +110,7 @@ real TValorizzazione_mask::valore(const TCodice_articolo& dis, const char* liv)
break;
default :
{
const real prezzo = cache().get(LF_DIST, dis, "PREZZO");
const real prezzo(cache().get(LF_DIST, dis, "PREZZO"));
total = prezzo;
}
break;
@ -208,7 +208,7 @@ void TValorizzazione_mask::elabora()
if (dest == 2 && sorc != 2)
{
const real perc = articolo.get(ANAMAG_PERCRIC);
const real perc = articolo.get_real(ANAMAG_PERCRIC);
const TPrice pric(value.get_num() * (100.0 + perc) / 100.0);
num = pric.string(TRUE);
}
@ -239,7 +239,7 @@ void TValorizzazione_mask::elabora()
void TValorizzazione_mask::salva()
{
const TDate oggi = get(F_DATA);
const TDate oggi = get_date(F_DATA);
const int sorc = get_int(F_TIPO);
const int dest = get_int(F_VALORIZZA);
@ -272,7 +272,7 @@ void TValorizzazione_mask::salva()
case 2:
if (sorc != 2) // Tengo conto del ricarico
{
const real perc = art.get(ANAMAG_PERCRIC);
const real perc = art.get_real(ANAMAG_PERCRIC);
const TPrice pric(price * (100.0 + perc) / 100.0);
art.set_prezzo_vendita(pric.get_num());
}

@ -662,7 +662,7 @@ bool TDistinta_tree::goto_node(const TString &id)
if (id != _path)
{
_stack.destroy();
TToken_string str = id;
TToken_string str(id);
_path = str.get(0);
if (!push_vars())
return FALSE;
@ -996,7 +996,7 @@ bool TDistinta_tree::has_son() const
if (_sort != 0 && find_child(key, 2) != NULL)
{
TArray children;
const int total = build_children_list(key, children);
build_children_list(key, children);
const int first = ((TToken_string*)children.objptr(0))->get_int(2);
_curr = find_child(key, first);
}
@ -1089,7 +1089,9 @@ bool TDistinta_tree::has_rbrother() const
const int last = build_children_list(father, children)-1;
if (last > 0) // Ci sono almeno due fratelli
{
for (int c = last; c >= 0; c--)
int c;
for (c = last; c >= 0; c--)
{
const int nrig = ((TToken_string*)children.objptr(c))->get_int(2);
if (nrig == curr_nrig)
@ -1142,7 +1144,9 @@ bool TDistinta_tree::has_lbrother() const
const int last = build_children_list(father, children)-1;
if (last > 0) // Ci sono almeno due fratelli
{
for (int c = last; c > 0; c--)
int c;
for (c = last; c > 0; c--)
{
const int nrig = ((TToken_string*)children.objptr(c))->get_int(2);
if (nrig == curr_nrig)

@ -18,7 +18,7 @@
#endif
#ifndef __MGLIB_H
#include "..\mg\mglib.h"
#include "../mg/mglib.h"
#endif
@ -244,11 +244,11 @@ class TDistinta_tree : public TBidirectional_tree
bool _ignore_ghost;
bool _stop_prod;
bool _livgiac_on_descr[4];
bool _qta_on_descr;
char _descr_sep;
// TDecoder _vars, _mag, _lav;
TCodgiac_livelli *_livgiac;
bool _qta_on_descr;
char _descr_sep;
static const TRectype* _curr;
TToken_string _tmp;