diff --git a/ce/ce3.cpp b/ce/ce3.cpp index 21383e28a..c0628c408 100755 --- a/ce/ce3.cpp +++ b/ce/ce3.cpp @@ -18,4 +18,3 @@ int main(int argc,char** argv) } return 0; } - \ No newline at end of file diff --git a/ce/ce3100.cpp b/ce/ce3100.cpp index 6097bac77..6b3cacb36 100755 --- a/ce/ce3100.cpp +++ b/ce/ce3100.cpp @@ -19,7 +19,7 @@ #include "ce3100.h" #include "celib.h" -#include "..\cg\cglib01.h" +#include "../cg/cglib01.h" class TForm_registroce : public TForm_cespiti { @@ -226,7 +226,7 @@ void TRegistro_cespiti::main_loop() TRectype darec(LF_CESPI),arec(LF_CESPI); TString filtro; // filtro sulla attivitį e categorie - const int esercizio = _mask->get_int(F_ESERCIZIO); +// const int esercizio = _mask->get_int(F_ESERCIZIO); const TString4 catini = _mask->get(F_CATINI); const TString4 catfin = _mask->get(F_CATFIN); darec.put(CESPI_CODCGRA, _mask->get(F_GRUPPO)); @@ -236,8 +236,8 @@ void TRegistro_cespiti::main_loop() arec.put(CESPI_CODSPA, _mask->get(F_SPECIE)); arec.put(CESPI_CODCAT, catfin); // filtro sulle date di acquisizione e alienazione - const TDate datainizio = _mask->get(F_DATAINIZIO); - const TDate datafine = _mask->get(F_DATAFINE); + const TDate datainizio(_mask->get(F_DATAINIZIO)); + const TDate datafine(_mask->get(F_DATAFINE)); filtro.format("(ANSI(%d->DTCOMP)<=\"",LF_CESPI) << datafine.string(ANSI) << "\")"; filtro << format(" && ((ANSI(%d->DTALIEN)>=\"",LF_CESPI) << datainizio.string(ANSI); filtro << format("\") || (%d->DTALIEN==\"\"))",LF_CESPI); @@ -334,7 +334,7 @@ void TRegistro_cespiti::costruisci_cespite(int cat, const real& spese) int es; TString4 gr, sp; ditta_cespiti().get_attivita(es, gr, sp); - const TDate datafine = _mask->get(F_DATAFINE); + const TDate datafine(_mask->get(F_DATAFINE)); TString& idcespite = (cat == 91) ? _idspese5 : _idspese25; @@ -464,7 +464,7 @@ void TRegistro_cespiti::aggiorna_bollato() //aggiorna la tabella REG (registro cespiti) { - const TDate datafine = _mask->get(F_DATAFINE); + const TDate datafine(_mask->get(F_DATAFINE)); TString16 codtab; codtab.format("%4d%s", datafine.year(), (const char*)_mask->get(F_CODREG)); TTable reg("REG"); @@ -664,7 +664,7 @@ void TRegistro_cespiti::print_movimenti() if (idret.not_empty()) continue; - const TDate dtmov = recmovce.get(MOVCE_DTMOV); + const TDate dtmov = recmovce.get_date(MOVCE_DTMOV); const int esmov = _esc.date2esc(dtmov); if (_mask->get_int(F_ESERCIZIO) != esmov) continue; @@ -750,7 +750,7 @@ void TRegistro_cespiti::print_valorifinali() TString80 key; key.format("%04d",_mask->get_int(F_ESERCIZIO)); const TRectype& cce = cache().get("CCE", key); long giorni = (_mask->get_date(F_DATAFINE) - _mask->get_date(F_DATAINIZIO) + 1); - key.format(FR("Amm.to ragguagliato all'esercizio di %3d giorni su %3d"),giorni, cce.get("I3")); + key.format(FR("Amm.to ragguagliato all'esercizio di %3d giorni su %3d"),giorni, cce.get_int("I3")); section.find_field(FR_FE_MSG2).set(key); section.find_field(FR_FE_MSG2).enable(msg); msg = _form->cursor()->curr(LF_AMMCE).get_bool(AMMCE_MSG03); diff --git a/ce/ce3200.cpp b/ce/ce3200.cpp index c2864ae68..cc43a3f22 100755 --- a/ce/ce3200.cpp +++ b/ce/ce3200.cpp @@ -4,7 +4,7 @@ #include #include -#include "..\cg\cglib01.h" +#include "../cg/cglib01.h" #include "ce3.h" #include "ce3200a.h" #include "ce3200.h" @@ -132,7 +132,7 @@ void TStampa_storico::print_header( const int tipo ) _form->find_field('H', odd_page, FF_D_GRUPPO).set(_mask->get(F_D_GRUPPO)); _form->find_field('H', odd_page, FF_SPECIE).set(_mask->get(F_SPECIE)); _form->find_field('H', odd_page, FF_D_SPECIE).set(_mask->get(F_D_SPECIE)); - TDate inies = _mask->get(F_INIZIO_ES); + TDate inies(_mask->get(F_INIZIO_ES)); --inies; _form->find_field('H', odd_page, FF_DATASIT).set(inies.string()); @@ -255,7 +255,7 @@ void TStampa_storico::print_percespite( const int tipo) if (!errore) do //se non c'é incongruenza di date procede alla stampa righe 2 { - TDate datamov = rel.curr(LF_MOVCE).get("DTMOV"); + TDate datamov = rel.curr(LF_MOVCE).get_date("DTMOV"); if (datamov >= inies) break; bool ammven = FALSE; @@ -489,7 +489,7 @@ void TStampa_storico::print_percespite( const int tipo) if (scrivo_unarigatre) //stampa la riga3 solo se ha trovato almeno una cosa da stampare { - TDate inies = _mask->get(F_INIZIO_ES); + TDate inies(_mask->get(F_INIZIO_ES)); --inies; _form->find_field('B', last_page, FF_DATASIT).set(inies.string()); @@ -585,12 +585,10 @@ void TStampa_storico::main_loop() cursore.freeze(FALSE); } } - - - + int ce3200(int argc, char* argv[]) { TStampa_storico a; a.run(argc,argv,TR("Stampa schede cespiti")); return 0; -} \ No newline at end of file +} diff --git a/ce/ce3200.h b/ce/ce3200.h index 23b77910a..43bf39836 100755 --- a/ce/ce3200.h +++ b/ce/ce3200.h @@ -61,4 +61,4 @@ #define FF_TALIACC 75 #define FF_TQNOR 76 #define FF_TQANT 77 -#define FF_TQACC 78 \ No newline at end of file +#define FF_TQACC 78 diff --git a/ce/ce3200a.h b/ce/ce3200a.h index 7be6d3bd0..3951e4095 100755 --- a/ce/ce3200a.h +++ b/ce/ce3200a.h @@ -18,4 +18,4 @@ #define F_INIZIO_ES 116 #define F_FINE_ES 117 #define F_TIPOSTAMPA 118 -#define F_D_GRUPPO 119 \ No newline at end of file +#define F_D_GRUPPO 119 diff --git a/ce/ce3300.cpp b/ce/ce3300.cpp index c25498e46..dade84d70 100755 --- a/ce/ce3300.cpp +++ b/ce/ce3300.cpp @@ -6,7 +6,7 @@ #include "ce3.h" #include "celib.h" -#include "..\cg\cglib01.h" +#include "../cg/cglib01.h" #include "ce2101.h" #include "ce3300a.h" @@ -335,29 +335,29 @@ void TStampa_prospetto::aggiorna_totali(TCursor& cur, const int tipo, TTipo_cesp { // valori della riga 1 (dipendenti da tipo solo le rivgf/rivgc) TRectype& recsalce = cur.curr(LF_SALCE); - real csto = recsalce.get(SALCE_CSTO); + real csto = recsalce.get_real(SALCE_CSTO); if (tipo == 1) { - real vnonamm1 = recsalce.get(SALCE_VNONAMM); + real vnonamm1 = recsalce.get_real(SALCE_VNONAMM); _cat._tot_csto += csto - vnonamm1; } else _cat._tot_csto += csto; - real riv75 = recsalce.get(SALCE_RIV75); - real riv83 = recsalce.get(SALCE_RIV83); - real riv90 = recsalce.get(SALCE_RIV90); - real riv91 = recsalce.get(SALCE_RIV91); + real riv75 = recsalce.get_real(SALCE_RIV75); + real riv83 = recsalce.get_real(SALCE_RIV83); + real riv90 = recsalce.get_real(SALCE_RIV90); + real riv91 = recsalce.get_real(SALCE_RIV91); if (tipo == 1) { - real rivgf = recsalce.get(SALCE_RIVGF); + real rivgf = recsalce.get_real(SALCE_RIVGF); _cat._tot_riv += riv75 + riv83 + riv90 + riv91 + rivgf; } else { - real rivgc = recsalce.get(SALCE_RIVGC); + real rivgc = recsalce.get_real(SALCE_RIVGC); _cat._tot_riv += riv75 + riv83 + riv90 + riv91 + rivgc; } @@ -389,7 +389,7 @@ void TStampa_prospetto::aggiorna_totali(TCursor& cur, const int tipo, TTipo_cesp const TRectype& mov = curmovce.curr(); const TRectype& amm = curmovce.curr(LF_MOVAM); const TRectype& amv = curmovce.curr(LF_AMMMV); - const TDate dtmov = mov.get(MOVCE_DTMOV); + const TDate dtmov = mov.get_date(MOVCE_DTMOV); if (dtmov >= _dataini && dtmov <= _datafine) { const TString8 codmov = mov.get(MOVCE_CODMOV); @@ -590,4 +590,4 @@ int ce3300(int argc, char* argv[]) TStampa_prospetto a; a.run(argc,argv,TR("Stampa prospetto cespiti")); return 0; -} \ No newline at end of file +} diff --git a/ce/ce3300.h b/ce/ce3300.h index 583c2c3c5..1fb33cdd0 100755 --- a/ce/ce3300.h +++ b/ce/ce3300.h @@ -69,4 +69,4 @@ #define FR_TG_AMMACC 75 #define FR_TG_AMMANT 76 #define FR_TG_FONDBIL 77 -#define FR_TG_RESBIL 78 \ No newline at end of file +#define FR_TG_RESBIL 78 diff --git a/ce/ce3300a.h b/ce/ce3300a.h index 8503e7156..454eb6ad8 100755 --- a/ce/ce3300a.h +++ b/ce/ce3300a.h @@ -13,4 +13,4 @@ #define F_SITFISC 120 #define F_SITCIV 121 #define F_SITGEST 122 -#define F_ORDINA 123 \ No newline at end of file +#define F_ORDINA 123 diff --git a/ce/ce3400.cpp b/ce/ce3400.cpp index 11d280057..6b9458a5b 100755 --- a/ce/ce3400.cpp +++ b/ce/ce3400.cpp @@ -155,7 +155,7 @@ const TString& TTotalizer::get(const char* name) void TTotalizer::add_num(const TRectype& rec, const char* name, char segno) { - real num = rec.get(name); + real num = rec.get_real(name); if (!num.is_zero()) { if (segno == '-') @@ -314,7 +314,7 @@ void TPR_app::print_movimenti(const TRectype& salini) _tot_grp += tot; } - real valore = salini.get(SALCE_CSTO); + real valore = salini.get_real(SALCE_CSTO); valore += totces.get_num(SALCE_RIV75); valore += totces.get_num(SALCE_RIV83); valore += totces.get_num(SALCE_RIV90); @@ -342,7 +342,7 @@ void TPR_app::print_total(TTotalizer& tot, const char* prompt) body.find_field(1).set_prompt(prompt); TForm_item& field = body.find_field(2); - const real costo = tot.get(SALCE_CSTO); + const real costo(tot.get(SALCE_CSTO)); if (!costo.is_zero()) { field.show(); diff --git a/ce/ce3400a.h b/ce/ce3400a.h index f8e2301e0..5fc7b32c5 100755 --- a/ce/ce3400a.h +++ b/ce/ce3400a.h @@ -22,4 +22,3 @@ #define F_SITUAZIONE 120 #define F_ORDINAMENTO 121 - \ No newline at end of file diff --git a/ce/ce3500.cpp b/ce/ce3500.cpp index 6e3ef52c7..769631a59 100755 --- a/ce/ce3500.cpp +++ b/ce/ce3500.cpp @@ -3,7 +3,7 @@ #include #include -#include "celib.h" +#include "celib.h" #include "ce3400.h" #include "ce3500a.h" @@ -75,7 +75,7 @@ bool TLC_form::validate(TForm_item& fld, TToken_string& val) { const TRectype& cespi = relation()->curr(); const char* cmd = val.get(0); - if (stricmp(cmd, "_INVCODTAB") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_INVCODTAB") == 0) { // Se la stampa č ordinata per categoria allora stampo l'impianto e viceversa const TString16 codtab = cespi.get(_order == 1 ? CESPI_CODIMP : CESPI_CODCAT); @@ -85,7 +85,7 @@ bool TLC_form::validate(TForm_item& fld, TToken_string& val) fld.set(""); return TRUE; } - if (stricmp(cmd, "_USOPROM") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_USOPROM") == 0) { bool yes = cespi.get_bool(CESPI_VEIDIP); if (!yes) @@ -93,7 +93,7 @@ bool TLC_form::validate(TForm_item& fld, TToken_string& val) fld.set(yes ? TR("Si") : TR("No")); return TRUE; } - if (stricmp(cmd, "_TPSPEMAN") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_TPSPEMAN") == 0) { switch(cespi.get_int(CESPI_TPSPEMAN)) { @@ -104,7 +104,7 @@ bool TLC_form::validate(TForm_item& fld, TToken_string& val) } return TRUE; } - if (stricmp(cmd, "_RIVGEN") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_RIVGEN") == 0) { const TRectype& salce = relation()->curr(LF_SALCE); fld.set(salce.get(_tiposit == 1 ? SALCE_RIVGF : SALCE_RIVGC)); diff --git a/ce/ce3500a.h b/ce/ce3500a.h index a435144d4..d7782039c 100755 --- a/ce/ce3500a.h +++ b/ce/ce3500a.h @@ -23,4 +23,3 @@ #define F_ORDINAMENTO 121 #define F_SALDINI 122 #define F_SUBORDINAMENTO 123 - \ No newline at end of file diff --git a/ce/ce3600.cpp b/ce/ce3600.cpp index 8e4b41e4e..cb951bb43 100755 --- a/ce/ce3600.cpp +++ b/ce/ce3600.cpp @@ -47,7 +47,7 @@ void TLM_form::set_testata(const TMask& m) bool TLM_form::validate(TForm_item& fld, TToken_string& val) { const char* cmd = val.get(0); - if (stricmp(cmd, "_RIVGEN") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_RIVGEN") == 0) { const TRectype& mov = relation()->curr(); fld.set(mov.get(_tiposit == 1 ? MOVCE_RIVGF : MOVCE_RIVGC)); @@ -139,7 +139,8 @@ void TLM_app::main_loop() const TRectype& cespi = rel.curr(LF_CESPI); - TDate fromdate = m.get(F_FROM_DATE), todate = m.get(F_TO_DATE); + TDate fromdate(m.get(F_FROM_DATE)); + TDate todate(m.get(F_TO_DATE)); TString filter; if (fromdate.ok()) filter << "(ANSI(" << MOVCE_DTMOV << ")>=\"" << fromdate.string(ANSI) << "\")"; diff --git a/ce/ce3600a.h b/ce/ce3600a.h index cc445da1e..070482612 100755 --- a/ce/ce3600a.h +++ b/ce/ce3600a.h @@ -19,5 +19,3 @@ #define F_SITUAZIONE 120 #define F_ORDINAMENTO 121 - - \ No newline at end of file diff --git a/ce/ce3700.cpp b/ce/ce3700.cpp index 2c76e2511..8783939c3 100755 --- a/ce/ce3700.cpp +++ b/ce/ce3700.cpp @@ -59,7 +59,9 @@ bool TECUP_mask::on_field_event(TOperable_field& f, TField_event e, long jolly) case F_USOPROM1: if (e == fe_close) { - for (int up = 2; up >= 0; up--) + int up; + + for (up = 2; up >= 0; up--) if (get_bool(F_USOPROM1+up)) break; if (up < 0) diff --git a/ce/ce3700a.h b/ce/ce3700a.h index bba23efeb..ffbdf36a0 100755 --- a/ce/ce3700a.h +++ b/ce/ce3700a.h @@ -4,4 +4,3 @@ #define F_USOPROM2 202 #define F_USOPROM3 203 #define F_VEIDIP 204 - \ No newline at end of file diff --git a/ce/ce3800.cpp b/ce/ce3800.cpp index aee087fd2..3e569d663 100755 --- a/ce/ce3800.cpp +++ b/ce/ce3800.cpp @@ -67,7 +67,7 @@ const TString& TECFE_form::decode_group(const char* codtab, int mode) bool TECFE_form::validate(TForm_item& fld, TToken_string& val) { const char* cmd = val.get(0); - if (stricmp(cmd, "_INVCODTAB") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_INVCODTAB") == 0) { const TRectype& cespi = relation()->curr(); // Se la stampa č ordinata per categoria allora stampo l'impianto e viceversa @@ -78,7 +78,7 @@ bool TECFE_form::validate(TForm_item& fld, TToken_string& val) fld.set(""); return TRUE; } - if (stricmp(cmd, "_VALAMM") == 0) + if (xvt_str_compare_ignoring_case(cmd, "_VALAMM") == 0) { const TRectype& salpro = relation()->curr(LF_SALCE); real val = salpro.get_real(SALCE_CSTO)-salpro.get_real(SALCE_VNONAMM)-salpro.get_real(SALCE_PLUSREIN)+ @@ -164,7 +164,7 @@ void TECFE_app::print_totale(const char* cod) bool TECFE_app::elenco_filter(const TRelation* rel) { const TRectype& salpro = rel->curr(LF_SALCE); - const real num = salpro.get(SALCE_NUMELE); + const real num = salpro.get_real(SALCE_NUMELE); return num > ZERO; } diff --git a/ce/ce4.cpp b/ce/ce4.cpp index 236471c11..0df51d9b4 100755 --- a/ce/ce4.cpp +++ b/ce/ce4.cpp @@ -16,4 +16,3 @@ int main(int argc,char** argv) } return 0; } - \ No newline at end of file diff --git a/ce/ce4200.cpp b/ce/ce4200.cpp index db9bcc8a1..c54cf6d85 100755 --- a/ce/ce4200.cpp +++ b/ce/ce4200.cpp @@ -4,7 +4,7 @@ #include #include -#include "..\ve\velib.h" +#include "../ve/velib.h" #include "ce4200a.h" #include "ce4200.h" diff --git a/ce/ce4200.h b/ce/ce4200.h index 1abf4d6b2..43cf9f2b7 100755 --- a/ce/ce4200.h +++ b/ce/ce4200.h @@ -13,6 +13,3 @@ #define FR_B_VALAMM 21 #define FR_B_TOTVALAMM 22 #define FR_B_TOTPERC 23 - - - \ No newline at end of file diff --git a/ce/celib.cpp b/ce/celib.cpp index f0febcd18..c6afc6c70 100755 --- a/ce/celib.cpp +++ b/ce/celib.cpp @@ -403,4 +403,3 @@ bool null_fields(const TRectype& rec, const char* fld0, const char* fld1, const return TRUE; } - \ No newline at end of file diff --git a/ce/cetbcac.h b/ce/cetbcac.h index 7ba0f9f10..26655cf43 100755 --- a/ce/cetbcac.h +++ b/ce/cetbcac.h @@ -30,4 +30,4 @@ #define GR_MAT 130 #define GR_IMMAT 131 -#define GR_PLURI 132 \ No newline at end of file +#define GR_PLURI 132