Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Risolti conflitti git-svn-id: svn://10.65.10.50/trunk@8413 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4ab2626121
commit
45b1afe173
@ -637,7 +637,7 @@ public:
|
|||||||
virtual TForm_item* create_item(const TString& typ);
|
virtual TForm_item* create_item(const TString& typ);
|
||||||
// @cmember Ritorna il numero di campi da stampare
|
// @cmember Ritorna il numero di campi da stampare
|
||||||
word fields() const
|
word fields() const
|
||||||
{ return word(_item.items()); }
|
{ return _item.items(); }
|
||||||
// @cmember Ritorna il numero di campi stampabili (0 se non e' COLUMNWISE)
|
// @cmember Ritorna il numero di campi stampabili (0 se non e' COLUMNWISE)
|
||||||
word columns()
|
word columns()
|
||||||
{ tab(0); return _nfld; }
|
{ tab(0); return _nfld; }
|
||||||
@ -841,7 +841,7 @@ public:
|
|||||||
{ return _effective_height; }
|
{ return _effective_height; }
|
||||||
// @cmember Imposta l'altezza effettiva del campo
|
// @cmember Imposta l'altezza effettiva del campo
|
||||||
virtual void set_effective_height(int val)
|
virtual void set_effective_height(int val)
|
||||||
{ _effective_height=short(val); }
|
{ _effective_height=val; }
|
||||||
// @cmember Formatta la stringa <p s>. Funzione che per default non fa nulla.
|
// @cmember Formatta la stringa <p s>. Funzione che per default non fa nulla.
|
||||||
// Ridefinita solo per TForm_number e TForm_string.
|
// Ridefinita solo per TForm_number e TForm_string.
|
||||||
virtual void apply_format(TString & s) const {}
|
virtual void apply_format(TString & s) const {}
|
||||||
|
@ -1452,8 +1452,8 @@ int TIsamtempfile::open(
|
|||||||
filename.ext("dbf");
|
filename.ext("dbf");
|
||||||
if (err == -60)
|
if (err == -60)
|
||||||
{
|
{
|
||||||
if (access(filename,0)) // check for existence
|
if (!filename.exist())
|
||||||
fatal_box("Apertura file %s : errore n. %d. File non esistente.",(const char*) filename,err);
|
fatal_box("Apertura file %s : errore n. %d. File non esistente.",(const char*)filename,err);
|
||||||
else
|
else
|
||||||
fatal_box("Apertura file %s : errore n. %d. File aperto in uso esclusivo da un'altra applicazione.",(const char*)filename,err);
|
fatal_box("Apertura file %s : errore n. %d. File aperto in uso esclusivo da un'altra applicazione.",(const char*)filename,err);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#define MOV_REG "REG"
|
#define MOV_REG "REG"
|
||||||
#define MOV_PROTIVA "PROTIVA"
|
#define MOV_PROTIVA "PROTIVA"
|
||||||
#define MOV_UPROTIVA "UPROTIVA"
|
#define MOV_UPROTIVA "UPROTIVA"
|
||||||
#define MOV_MESELIQ "MESELIQ"
|
|
||||||
#define MOV_CODVAL "CODVAL"
|
#define MOV_CODVAL "CODVAL"
|
||||||
#define MOV_CAMBIO "CAMBIO"
|
#define MOV_CAMBIO "CAMBIO"
|
||||||
#define MOV_CONTROEURO "CONTROEURO"
|
#define MOV_CONTROEURO "CONTROEURO"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <os_dep.h>
|
#include <os_dep.h>
|
||||||
|
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
#include <winver.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
@ -415,15 +416,17 @@ bool os_get_image_editor_path(TFilename& name)
|
|||||||
|
|
||||||
os_type os_get_type()
|
os_type os_get_type()
|
||||||
{
|
{
|
||||||
|
os_type t = os_Unknown;
|
||||||
OSVERSIONINFO ovi;
|
OSVERSIONINFO ovi;
|
||||||
GetVersionEx(&ovi);
|
if (GetVersionEx(&ovi))
|
||||||
os_type t;
|
|
||||||
switch (ovi.dwPlatformId)
|
|
||||||
{
|
{
|
||||||
case VER_PLATFORM_WIN32s : t = os_Win32s; break;
|
switch (ovi.dwPlatformId)
|
||||||
case VER_PLATFORM_WIN32_NT : t = os_WindowsNT; break;
|
{
|
||||||
case VER_PLATFORM_WIN32_WINDOWS: t = os_Windows95; break;
|
case VER_PLATFORM_WIN32s : t = os_Win32s; break;
|
||||||
default : t = os_Unknown; break;
|
case VER_PLATFORM_WIN32_NT : t = os_WindowsNT; break;
|
||||||
|
case VER_PLATFORM_WIN32_WINDOWS: t = os_Windows95; break;
|
||||||
|
default : t = os_Unknown; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
@ -537,6 +540,41 @@ bool os_dongle_server_running()
|
|||||||
return a != 0;
|
return a != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool os_test_network_version()
|
||||||
|
{
|
||||||
|
if (os_get_type() == os_Windows95)
|
||||||
|
{
|
||||||
|
char* VREDIRNAME = "vredir.vxd";
|
||||||
|
DWORD handle;
|
||||||
|
|
||||||
|
DWORD dwSize = GetFileVersionInfoSize(VREDIRNAME,&handle);
|
||||||
|
if (dwSize)
|
||||||
|
{
|
||||||
|
BYTE infoBuffer[512];
|
||||||
|
GetFileVersionInfo(VREDIRNAME,handle,dwSize,infoBuffer);
|
||||||
|
long *language;
|
||||||
|
void * lpBuffer;
|
||||||
|
UINT Size;
|
||||||
|
if (VerQueryValue(infoBuffer, "\\VarFileInfo\\Translation", (void **)&language, &Size) && Size!=0)
|
||||||
|
{
|
||||||
|
char szName[128];
|
||||||
|
sprintf(szName, "\\StringFileInfo\\%04x%04x\\FileVersion",LOWORD(*language), HIWORD(*language));
|
||||||
|
if (VerQueryValue(infoBuffer, szName, &lpBuffer, &Size) && Size!=0)
|
||||||
|
{
|
||||||
|
TToken_string v((const char *)lpBuffer,'.');
|
||||||
|
int subver=atoi(v.get(2));
|
||||||
|
if (subver >=1111 && subver <=1115)
|
||||||
|
return error_box("La versione %s del driver di rete '%s' contiene un bug riconosciuto da Microsoft.\nConsultare la documentazione sul sito AGA per eliminare questo inconveniente.",(const char *)lpBuffer, VREDIRNAME);
|
||||||
|
else
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message_box("Impossibile determinare la versione del driver di rete '%s'",VREDIRNAME);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
HIDDEN const char* _file_to_find = NULL;
|
HIDDEN const char* _file_to_find = NULL;
|
||||||
|
|
||||||
struct TFindWindowInfo
|
struct TFindWindowInfo
|
||||||
@ -619,4 +657,3 @@ unsigned long os_execute_in_window(const TFilename& path, WINDOW win)
|
|||||||
|
|
||||||
return (unsigned long) w._hwnd;
|
return (unsigned long) w._hwnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,10 +23,11 @@ void set_std_level(const long l)
|
|||||||
// @rdesc Numero di serie della chiave
|
// @rdesc Numero di serie della chiave
|
||||||
int get_serial_number()
|
int get_serial_number()
|
||||||
{
|
{
|
||||||
bool ok = dongle().ok();
|
TDongle& din = dongle();
|
||||||
|
bool ok = din.ok();
|
||||||
if (!ok)
|
if (!ok)
|
||||||
ok = dongle().login();
|
ok = din.login();
|
||||||
return ok ? int(dongle().number()) : -1;
|
return ok ? int(din.number()) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool test_assistance_year()
|
bool test_assistance_year()
|
||||||
|
@ -263,7 +263,7 @@ TString& TString::operator <<(double n)
|
|||||||
|
|
||||||
// Appends an object to the string
|
// Appends an object to the string
|
||||||
// Certified 50%
|
// Certified 50%
|
||||||
// The object should be completely storable in _spark
|
// The object should be completely storable in spark
|
||||||
TString& TString::operator <<(const TObject& obj)
|
TString& TString::operator <<(const TObject& obj)
|
||||||
{
|
{
|
||||||
TString256 spark;
|
TString256 spark;
|
||||||
@ -479,8 +479,8 @@ const TString& TString::left(
|
|||||||
|
|
||||||
// @rdesc Ritorna l'indirizzo della stringa contenente i <p count> caratteri da sinistra
|
// @rdesc Ritorna l'indirizzo della stringa contenente i <p count> caratteri da sinistra
|
||||||
{
|
{
|
||||||
_spark.strncpy(_str, count);
|
spark.strncpy(_str, count);
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 99%
|
// Certified 99%
|
||||||
@ -494,8 +494,8 @@ const TString& TString::right(
|
|||||||
{
|
{
|
||||||
int from = len()-count;
|
int from = len()-count;
|
||||||
if (from < 0) from = 0;
|
if (from < 0) from = 0;
|
||||||
_spark = _str + from;
|
spark = _str + from;
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -522,8 +522,8 @@ const TString& TString::mid(
|
|||||||
if (from > l) from = l;
|
if (from > l) from = l;
|
||||||
if (count < 0 || from+count>l)
|
if (count < 0 || from+count>l)
|
||||||
count = l-from;
|
count = l-from;
|
||||||
_spark.strncpy(&_str[from], count);
|
spark.strncpy(&_str[from], count);
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -738,9 +738,9 @@ TString& TString::right_just(
|
|||||||
{
|
{
|
||||||
if (n < 0) n = size();
|
if (n < 0) n = size();
|
||||||
trim();
|
trim();
|
||||||
_spark = _str;
|
spark = _str;
|
||||||
fill(c, n);
|
fill(c, n);
|
||||||
overwrite(_spark, n-_spark.len());
|
overwrite(spark, n-spark.len());
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -760,10 +760,10 @@ TString& TString::center_just(
|
|||||||
{
|
{
|
||||||
if (n < 0) n = size();
|
if (n < 0) n = size();
|
||||||
trim();
|
trim();
|
||||||
_spark = _str;
|
spark = _str;
|
||||||
fill(c, n);
|
fill(c, n);
|
||||||
const int p = (n-_spark.len()) >> 1;
|
const int p = (n-spark.len()) >> 1;
|
||||||
overwrite(_spark, p);
|
overwrite(spark, p);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -783,9 +783,9 @@ TString& TString::left_just(
|
|||||||
{
|
{
|
||||||
if (n < 0) n = size();
|
if (n < 0) n = size();
|
||||||
trim();
|
trim();
|
||||||
_spark = _str;
|
spark = _str;
|
||||||
fill(c, n);
|
fill(c, n);
|
||||||
overwrite(_spark, 0);
|
overwrite(spark, 0);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -815,7 +815,7 @@ TString& TString::picture(
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 90% (_spark size limited)
|
// Certified 90% (spark size limited)
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
// @mfunc Manda un output formattato alla stringa oggetto
|
// @mfunc Manda un output formattato alla stringa oggetto
|
||||||
@ -828,12 +828,12 @@ TString& TString::format(
|
|||||||
{
|
{
|
||||||
va_list pars;
|
va_list pars;
|
||||||
va_start(pars, fmt);
|
va_start(pars, fmt);
|
||||||
const int tot = vsprintf(_spark.get_buffer(), fmt, pars);
|
const int tot = vsprintf(spark.get_buffer(), fmt, pars);
|
||||||
va_end(pars);
|
va_end(pars);
|
||||||
|
|
||||||
CHECK(tot >= 0 && tot < _spark.size(), "Ue'! Quanto scrivi?");
|
CHECK(tot >= 0 && tot < spark.size(), "Ue'! Quanto scrivi?");
|
||||||
if (tot > size()) resize(tot, FALSE);
|
if (tot > size()) resize(tot, FALSE);
|
||||||
strcpy(_str, _spark);
|
strcpy(_str, spark);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -948,9 +948,9 @@ TString& TString::insert(
|
|||||||
{
|
{
|
||||||
const int l = strlen(s);
|
const int l = strlen(s);
|
||||||
make_room(l);
|
make_room(l);
|
||||||
mid(pos); // Scrivi in _spark la stringa da pos in poi
|
mid(pos); // Scrivi in spark la stringa da pos in poi
|
||||||
overwrite(s, pos); // Aggiungi s
|
overwrite(s, pos); // Aggiungi s
|
||||||
strcpy(&_str[pos+l], _spark); // Aggiungi _spark
|
strcpy(&_str[pos+l], spark); // Aggiungi spark
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -1022,7 +1022,7 @@ TString& TFixed_string::format(
|
|||||||
|
|
||||||
// @comm Funziona come la funzione "sprintf" standard del C e ritorna la
|
// @comm Funziona come la funzione "sprintf" standard del C e ritorna la
|
||||||
// stringa formattata con i parametri passati.
|
// stringa formattata con i parametri passati.
|
||||||
// <nl>E' piu' efficiente di <mf TString::format> poiche' non usa _spark
|
// <nl>E' piu' efficiente di <mf TString::format> poiche' non usa spark
|
||||||
{
|
{
|
||||||
va_list pars;
|
va_list pars;
|
||||||
va_start(pars, fmt);
|
va_start(pars, fmt);
|
||||||
@ -1083,8 +1083,8 @@ const char* TFilename::name() const
|
|||||||
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
_spark.strncpy(&_str[i+1], start-i);
|
spark.strncpy(&_str[i+1], start-i);
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 95%
|
// Certified 95%
|
||||||
@ -1096,8 +1096,8 @@ const char* TFilename::path() const
|
|||||||
for (int i = start; i >= 0; i--)
|
for (int i = start; i >= 0; i--)
|
||||||
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
||||||
break;
|
break;
|
||||||
_spark.strncpy(_str, i+1);
|
spark.strncpy(_str, i+1);
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1454,13 +1454,13 @@ const char* TToken_string::get(
|
|||||||
char* p = strchr(s, _separator);
|
char* p = strchr(s, _separator);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
_spark = s;
|
spark = s;
|
||||||
_last = -1;
|
_last = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
_spark = s;
|
spark = s;
|
||||||
*p = _separator;
|
*p = _separator;
|
||||||
_last = (int)((const char*)p - _str) + 1;
|
_last = (int)((const char*)p - _str) + 1;
|
||||||
}
|
}
|
||||||
@ -1471,7 +1471,7 @@ const char* TToken_string::get(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _spark;
|
return spark;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 99%
|
// Certified 99%
|
||||||
@ -1614,9 +1614,9 @@ bool TToken_string::set_item(const char* v, int n)
|
|||||||
int e = find(_separator, i);
|
int e = find(_separator, i);
|
||||||
if (e < 0) e = len();
|
if (e < 0) e = len();
|
||||||
|
|
||||||
_spark = &_str[e]; // Salva items seguenti
|
spark = _str+e; // Salva items seguenti
|
||||||
cut(i); // Considera solo items precedenti
|
cut(i); // Considera solo items precedenti
|
||||||
*this << v << _spark; // Aggiunge item desiderato e seguenti
|
*this << v << spark; // Aggiunge item desiderato e seguenti
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SAFE_PIPE_CHR '¦'
|
#define SAFE_PIPE_CHR '¦'
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
// @class Classe per la definizione della stringhe
|
// @class Classe per la definizione della stringhe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user