Patch level : 2.0 490
Files correlati : ba1 ve0 Ricompilazione Demo : [ ] Commento : Segnalazioni fatte sui rispettivi moduli git-svn-id: svn://10.65.10.50/trunk@11217 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
39f7c0dbed
commit
06710b7564
@ -40,9 +40,6 @@
|
|||||||
|
|
||||||
#define ELLIPSES ...
|
#define ELLIPSES ...
|
||||||
|
|
||||||
#define CHR(c) (c)
|
|
||||||
#define ORD(c) (c)
|
|
||||||
#define ODD(c) (((c) % 2) != 0)
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/* @(!) 2.3.01.316 modif. #define TMPFNAME(p,n) sprintf(p, "\\tmp\\%s.tmp", (n)); */
|
/* @(!) 2.3.01.316 modif. #define TMPFNAME(p,n) sprintf(p, "\\tmp\\%s.tmp", (n)); */
|
||||||
#define TMPFNAME(p,n) tmpfname((p),(n))
|
#define TMPFNAME(p,n) tmpfname((p),(n))
|
||||||
@ -61,12 +58,6 @@
|
|||||||
#define STRCMP(s1,op,s2) (strcmp(s1,s2) op 0)
|
#define STRCMP(s1,op,s2) (strcmp(s1,s2) op 0)
|
||||||
#define CSTR(n,s) sprintf((s), "%-d", (n))
|
#define CSTR(n,s) sprintf((s), "%-d", (n))
|
||||||
#define CSTR4(n,s) sprintf((s), "%-ld", (n))
|
#define CSTR4(n,s) sprintf((s), "%-ld", (n))
|
||||||
//#define MAXDATA cpackdata("31-12-50")
|
|
||||||
//#define MINDATA cpackdata("01-01-51")
|
|
||||||
//#define EMPTYDATA cpackdata(" - - ")
|
|
||||||
//#define MONTHNAME(i) months[(i) - 1]
|
|
||||||
//#define CCONVINT(s) atoi(s)
|
|
||||||
//#define CONVLONG(s) atol(s)
|
|
||||||
#define BADR(x) ((x) - 1)
|
#define BADR(x) ((x) - 1)
|
||||||
#define WINHND(hw) warr[(hw)].w
|
#define WINHND(hw) warr[(hw)].w
|
||||||
/* @(!) 2.3.01.69 */
|
/* @(!) 2.3.01.69 */
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#define __CFILES_C /* fv */
|
#define __CFILES_C /* fv */
|
||||||
|
|
||||||
#include <io.h>
|
|
||||||
#include <xvt.h>
|
#include <xvt.h>
|
||||||
|
|
||||||
#include "cfiles.h"
|
#include "cfiles.h"
|
||||||
@ -361,6 +360,41 @@ void CPutRec(logicname,recd,dirflg)
|
|||||||
CWrite(&rdir[dirflg],(RecType) recd,(long) logicname, NoLock);
|
CWrite(&rdir[dirflg],(RecType) recd,(long) logicname, NoLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CGetCampoStpValue(const char* name, char* value, int valsize)
|
||||||
|
{
|
||||||
|
BOOLEAN bFound = FALSE;
|
||||||
|
#ifdef WIN32
|
||||||
|
const char* stpfile = "c:/campo.stp";
|
||||||
|
int p;
|
||||||
|
DIRECTORY dir;
|
||||||
|
char exedir[_MAX_PATH], path[_MAX_PATH];
|
||||||
|
xvt_fsys_get_default_dir(&dir);
|
||||||
|
xvt_fsys_convert_dir_to_str(&dir, exedir, sizeof(exedir));
|
||||||
|
|
||||||
|
for (p = 1; ; p++)
|
||||||
|
{
|
||||||
|
int len = 0;
|
||||||
|
char para[4]; sprintf(para, "%d", p);
|
||||||
|
len = xvt_sys_get_profile_string(stpfile, para, "Program", "", path, sizeof(path));
|
||||||
|
if (len <= 0)
|
||||||
|
break;
|
||||||
|
if (path[len-1] == '\\' || path[len-1] == '/')
|
||||||
|
{
|
||||||
|
len--;
|
||||||
|
path[len] = '\0';
|
||||||
|
}
|
||||||
|
if (xvt_str_compare_ignoring_case(path, exedir) == 0)
|
||||||
|
{
|
||||||
|
xvt_sys_get_profile_string(stpfile, para, name, "", value, valsize);
|
||||||
|
bFound = *value > ' ';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return bFound;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@($) CGetCampoIni FILES
|
@($) CGetCampoIni FILES
|
||||||
|
|
||||||
@ -379,35 +413,16 @@ const char* CGetCampoIni(void)
|
|||||||
static char* prawin = NULL;
|
static char* prawin = NULL;
|
||||||
if (prawin == NULL)
|
if (prawin == NULL)
|
||||||
{
|
{
|
||||||
char exedir[_MAX_PATH], path[_MAX_PATH];
|
|
||||||
DIRECTORY dir;
|
|
||||||
BOOLEAN bFound = FALSE;
|
BOOLEAN bFound = FALSE;
|
||||||
xvt_fsys_get_dir(&dir);
|
|
||||||
xvt_fsys_convert_dir_to_str(&dir, exedir, sizeof(exedir));
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// Nelle installazioni sfigate con programmi in rete cerca di stabilire il percorso locale di Campo.ini
|
// Nelle installazioni sfigate con programmi in rete cerca di stabilire il percorso locale di Campo.ini
|
||||||
|
DIRECTORY dir;
|
||||||
|
char exedir[_MAX_PATH], path[_MAX_PATH];
|
||||||
|
xvt_fsys_get_default_dir(&dir);
|
||||||
|
xvt_fsys_convert_dir_to_str(&dir, exedir, sizeof(exedir));
|
||||||
if (xvt_fsys_is_network_drive(exedir))
|
if (xvt_fsys_is_network_drive(exedir))
|
||||||
{
|
{
|
||||||
int p;
|
bFound = CGetCampoStpValue("CampoIni", path, sizeof(path));
|
||||||
for (p = 1; ; p++)
|
|
||||||
{
|
|
||||||
int len = 0;
|
|
||||||
char para[4]; sprintf(para, "%d", p);
|
|
||||||
len = xvt_sys_get_profile_string("c:/campo.stp", para, "Program", "", path, sizeof(path));
|
|
||||||
if (len <= 0)
|
|
||||||
break;
|
|
||||||
if (path[len-1] == '\\' || path[len-1] == '/')
|
|
||||||
{
|
|
||||||
len--;
|
|
||||||
path[len] = '\0';
|
|
||||||
}
|
|
||||||
if (xvt_str_compare_ignoring_case(path, exedir) == 0)
|
|
||||||
{
|
|
||||||
xvt_sys_get_profile_string("c:/campo.stp", para, "CampoIni", "", path, sizeof(path));
|
|
||||||
bFound = *path > ' ';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!bFound)
|
if (!bFound)
|
||||||
{
|
{
|
||||||
const char* pp = getenv("PREFPATH");
|
const char* pp = getenv("PREFPATH");
|
||||||
@ -439,7 +454,7 @@ const char* CGetCampoIni(void)
|
|||||||
HIDDEN BOOLEAN CGetFirmDir()
|
HIDDEN BOOLEAN CGetFirmDir()
|
||||||
{
|
{
|
||||||
const char* prawin = CGetCampoIni();
|
const char* prawin = CGetCampoIni();
|
||||||
BOOLEAN good = _access(prawin, 0x00) == 0;
|
BOOLEAN good = xvt_fsys_file_exists(prawin);
|
||||||
if (good)
|
if (good)
|
||||||
{
|
{
|
||||||
const int len = xvt_sys_get_profile_string(prawin, "Main", "Study", "", __ptprf, sizeof(__ptprf));
|
const int len = xvt_sys_get_profile_string(prawin, "Main", "Study", "", __ptprf, sizeof(__ptprf));
|
||||||
@ -458,7 +473,7 @@ HIDDEN BOOLEAN CGetFirmDir()
|
|||||||
xvt_sys_get_profile_string(prawin, "Main", "Firm", "COM", firm, sizeof(firm));
|
xvt_sys_get_profile_string(prawin, "Main", "Firm", "COM", firm, sizeof(firm));
|
||||||
ditta = atol(firm);
|
ditta = atol(firm);
|
||||||
if (ditta > 0) sprintf(firm, "%05ldA", ditta);
|
if (ditta > 0) sprintf(firm, "%05ldA", ditta);
|
||||||
_makepath(cprefix, NULL, __ptprf, firm, NULL);
|
xvt_fsys_build_pathname(cprefix, NULL, __ptprf, firm, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,7 +621,7 @@ char *CInsPref(name,dirflg)
|
|||||||
if (*cprefix == '\0')
|
if (*cprefix == '\0')
|
||||||
strcpy(s, name);
|
strcpy(s, name);
|
||||||
else
|
else
|
||||||
_makepath(s, NULL, cprefix, name, NULL);
|
xvt_fsys_build_pathname(s, NULL, cprefix, name, NULL, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintf(s,"%scom%c%s", __ptprf, DIRSEP, name);
|
sprintf(s,"%scom%c%s", __ptprf, DIRSEP, name);
|
||||||
|
@ -106,6 +106,7 @@ extern "C" {
|
|||||||
/* @(!) 2.3.01.144 */
|
/* @(!) 2.3.01.144 */
|
||||||
char *CInsPref(char *, int);
|
char *CInsPref(char *, int);
|
||||||
|
|
||||||
|
int CGetCampoStpValue(const char* name, char* value, int valsize);
|
||||||
const char* CGetCampoIni(void);
|
const char* CGetCampoIni(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -70,7 +70,7 @@ unsigned long TEutronFooter::checksum(bool set)
|
|||||||
|
|
||||||
unsigned long cs = 0;
|
unsigned long cs = 0;
|
||||||
for (word i = 0; i < len; i++, ptr++)
|
for (word i = 0; i < len; i++, ptr++)
|
||||||
cs += *ptr | ~(*ptr << 8);
|
cs += *ptr | ~(short(*ptr << 8));
|
||||||
if (set) _checksum = cs;
|
if (set) _checksum = cs;
|
||||||
return cs;
|
return cs;
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ bool TDongle::already_programmed() const
|
|||||||
|
|
||||||
unsigned long cs = 0;
|
unsigned long cs = 0;
|
||||||
for (byte* ptr = (byte*)_eprom; ptr < (byte*)&eh->_checksum; ptr++)
|
for (byte* ptr = (byte*)_eprom; ptr < (byte*)&eh->_checksum; ptr++)
|
||||||
cs += *ptr | ~(*ptr << 8);
|
cs += *ptr | ~(short(*ptr << 8));
|
||||||
if (eh->_checksum != cs)
|
if (eh->_checksum != cs)
|
||||||
return FALSE; // Malicious programming!
|
return FALSE; // Malicious programming!
|
||||||
}
|
}
|
||||||
@ -717,7 +717,7 @@ bool TDongle::burn_eutron()
|
|||||||
|
|
||||||
unsigned long cs = 0;
|
unsigned long cs = 0;
|
||||||
for (byte* ptr = (byte*)_eprom; ptr < (byte*)&eh->_checksum; ptr++)
|
for (byte* ptr = (byte*)_eprom; ptr < (byte*)&eh->_checksum; ptr++)
|
||||||
cs += *ptr | ~(*ptr << 8);
|
cs += *ptr | ~(short(*ptr << 8));
|
||||||
eh->_checksum = cs;
|
eh->_checksum = cs;
|
||||||
|
|
||||||
const word otb = sizeof(TEutronHeader) / 2;
|
const word otb = sizeof(TEutronHeader) / 2;
|
||||||
|
@ -2353,7 +2353,10 @@ void TPrint_section::offset(int& x, int& y)
|
|||||||
TForm_item* TPrint_section::parse_item(const TString& s)
|
TForm_item* TPrint_section::parse_item(const TString& s)
|
||||||
{
|
{
|
||||||
TForm_item* f = create_item(s);
|
TForm_item* f = create_item(s);
|
||||||
CHECKS(f, "Campo non ammesso per la sezione di stampa:", (const char*)s);
|
#ifdef DBG
|
||||||
|
if (f == NULL)
|
||||||
|
yesno_fatal_box("Tipo di campo del form non riconosciuto: '%s'", (const char*)s);
|
||||||
|
#endif
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2329,12 +2329,12 @@ bool TBrowse::do_link(bool insert)
|
|||||||
if (insert)
|
if (insert)
|
||||||
{
|
{
|
||||||
TConfig ini(msg, "Transaction");
|
TConfig ini(msg, "Transaction");
|
||||||
ini.set("Action", "RUN");
|
ini.set("Action", TRANSACTION_RUN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TConfig ini(msg, "Transaction");
|
TConfig ini(msg, "Transaction");
|
||||||
ini.set("Action", "MODIFY");
|
ini.set("Action", TRANSACTION_LINK);
|
||||||
|
|
||||||
TString8 paragraph; paragraph << _cursor->file().num();
|
TString8 paragraph; paragraph << _cursor->file().num();
|
||||||
ini.set_paragraph(paragraph);
|
ini.set_paragraph(paragraph);
|
||||||
|
@ -968,19 +968,30 @@ bool TRelation_application::save(bool check_dirty)
|
|||||||
{
|
{
|
||||||
if (annulla)
|
if (annulla)
|
||||||
{
|
{
|
||||||
TString w(80);
|
TString w;
|
||||||
if (_mask->field(dirty).is_edit())
|
TMask_field& df = _mask->field(dirty);
|
||||||
w = _mask->efield(dirty).get_warning();
|
if (df.is_edit())
|
||||||
if (w.empty())
|
w = ((TEdit_field&)df).get_warning();
|
||||||
w = "Campo inconsistente: ";
|
if (w.blank())
|
||||||
|
{
|
||||||
|
w = df.prompt();
|
||||||
|
if (!w.blank())
|
||||||
|
{
|
||||||
|
w.trim();
|
||||||
|
w << ' ' << TR("inconsistente.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (w.blank())
|
||||||
|
w = TR("Campo inconsistente.");
|
||||||
|
w << '\n';
|
||||||
switch (last)
|
switch (last)
|
||||||
{
|
{
|
||||||
case K_ESC:
|
case K_ESC:
|
||||||
w << TR("si desidera annullare?"); break;
|
w << TR("Si desidera annullare?"); break;
|
||||||
case K_QUIT:
|
case K_QUIT:
|
||||||
w << TR("si desidera uscire?"); break;
|
w << TR("Si desidera uscire?"); break;
|
||||||
default:
|
default:
|
||||||
w << TR("si desidera continuare?"); break;
|
w << TR("Si desidera continuare?"); break;
|
||||||
}
|
}
|
||||||
k = yesno_box(w) ? K_NO : K_ESC;
|
k = yesno_box(w) ? K_NO : K_ESC;
|
||||||
if (k == K_ESC)
|
if (k == K_ESC)
|
||||||
@ -1386,6 +1397,7 @@ void TRelation_application::main_loop()
|
|||||||
|
|
||||||
if (autoins_caller().not_empty() && _recins >= 0)
|
if (autoins_caller().not_empty() && _recins >= 0)
|
||||||
{
|
{
|
||||||
|
NFCHECK("Obsolete LINK message calling convention");
|
||||||
TString16 num;
|
TString16 num;
|
||||||
num.format("%ld", _recins);
|
num.format("%ld", _recins);
|
||||||
TMessage msg(autoins_caller(), _lnflag ? MSG_LN : MSG_AI, num);
|
TMessage msg(autoins_caller(), _lnflag ? MSG_LN : MSG_AI, num);
|
||||||
@ -1631,7 +1643,6 @@ bool TRelation_application::load_transaction()
|
|||||||
_curr_trans_from = cnf.get("From");
|
_curr_trans_from = cnf.get("From");
|
||||||
const long firm = cnf.get_long("Firm");
|
const long firm = cnf.get_long("Firm");
|
||||||
if (firm > 0)
|
if (firm > 0)
|
||||||
|
|
||||||
{
|
{
|
||||||
bool ok = set_firm(firm);
|
bool ok = set_firm(firm);
|
||||||
if (ok)
|
if (ok)
|
||||||
|
@ -17,10 +17,11 @@
|
|||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TRANSACTION_RUN "RUN"
|
#define TRANSACTION_RUN "RUN" // Run application (eventually sets firm)
|
||||||
#define TRANSACTION_INSERT "INSERT"
|
#define TRANSACTION_INSERT "INSERT" // Create a new record and fill it
|
||||||
#define TRANSACTION_MODIFY "MODIFY"
|
#define TRANSACTION_MODIFY "MODIFY" // Load and modify an existing record
|
||||||
#define TRANSACTION_DELETE "DELETE"
|
#define TRANSACTION_DELETE "DELETE" // Delete an existing record
|
||||||
|
#define TRANSACTION_LINK "LINK" // Load an existing record and interactively edit it
|
||||||
#define TM_INTERACTIVE 'I'
|
#define TM_INTERACTIVE 'I'
|
||||||
#define TM_AUTOMATIC 'A'
|
#define TM_AUTOMATIC 'A'
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user