Patch level : 10.0
Files correlati : tutti Ricompilazione Demo : [ ] Commento : Allungata lunghezza massima percorso dati. git-svn-id: svn://10.65.10.50/trunk@17358 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7b0752408c
commit
2dea5d3711
155
include/about.cpp
Executable file
155
include/about.cpp
Executable file
@ -0,0 +1,155 @@
|
|||||||
|
#include <about.h>
|
||||||
|
#include <applicat.h>
|
||||||
|
#include <colors.h>
|
||||||
|
#include <config.h>
|
||||||
|
#include <dongle.h>
|
||||||
|
#include <prefix.h>
|
||||||
|
#include <sheet.h>
|
||||||
|
#include <sqlset.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Finestra informazioni
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TInfo_mask : public TArray_sheet
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool get_cell_colors(int row, int col, COLOR& fore, COLOR& back) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void add_row(const char* prompt, const char* value, int err = 0);
|
||||||
|
void add_row(const char* prompt, unsigned long value, int err = 0);
|
||||||
|
TInfo_mask();
|
||||||
|
};
|
||||||
|
|
||||||
|
bool TInfo_mask::get_cell_colors(int r, int c, COLOR& fore, COLOR& back) const
|
||||||
|
{
|
||||||
|
const int err = ((TArray_sheet*)this)->row(r).get_int(2);
|
||||||
|
if (err > 0)
|
||||||
|
{
|
||||||
|
fore = err == 1 ? NORMAL_COLOR : FOCUS_COLOR;
|
||||||
|
back = err == 1 ? REQUIRED_BACK_COLOR : FOCUS_BACK_COLOR;
|
||||||
|
}
|
||||||
|
return TArray_sheet::get_cell_colors(r, c, fore, back);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TInfo_mask::add_row(const char* prompt, const char* value, int err)
|
||||||
|
{
|
||||||
|
TToken_string* r = new TToken_string;
|
||||||
|
r->add(prompt);
|
||||||
|
r->add(value);
|
||||||
|
r->add(err);
|
||||||
|
add(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TInfo_mask::add_row(const char* prompt, unsigned long value, int err)
|
||||||
|
{
|
||||||
|
TString16 str; str.format("%lu", value);
|
||||||
|
add_row(prompt, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
TInfo_mask::TInfo_mask()
|
||||||
|
: TArray_sheet(-1, -1, 78, 20, TR("Informazioni"), "@16|@60")
|
||||||
|
{
|
||||||
|
const word ser_no = dongle().number();
|
||||||
|
|
||||||
|
int year = 2008, release = 10, tag = 0, patch = 1;
|
||||||
|
TString80 versione = "2008.10.00 Patch 0001";
|
||||||
|
if (main_app().get_version_info(year, release, tag, patch))
|
||||||
|
versione.format("%d.%02d.%02d Patch %04d", year, release, tag, patch);
|
||||||
|
|
||||||
|
TString80 stros, strwx;
|
||||||
|
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
|
||||||
|
|
||||||
|
TString arg;
|
||||||
|
for (int a = 0; a < main_app().argc(); a++)
|
||||||
|
arg << main_app().argv(a) << ' ';
|
||||||
|
arg.trim(); arg.lower();
|
||||||
|
|
||||||
|
TConfig campoini(CONFIG_INSTALL, "Main");
|
||||||
|
TConfig userini(CONFIG_GUI, "Printer");
|
||||||
|
|
||||||
|
TString prot;
|
||||||
|
const TDongleHardware dhw = dongle().hardware();
|
||||||
|
switch (dhw)
|
||||||
|
{
|
||||||
|
case _dongle_hardlock: prot = "Hardlock"; break;
|
||||||
|
case _dongle_eutron : prot = "Eutron"; break;
|
||||||
|
case _dongle_network : prot = campoini.get("Dongle", "Server"); break;
|
||||||
|
default : prot = TR("Nessuna"); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int type = campoini.get_int("Type");
|
||||||
|
const char* tipo = NULL;
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case 1: tipo = TR("Postazione singola"); break;
|
||||||
|
case 2: tipo = TR("Server"); break;
|
||||||
|
case 3: tipo = TR("Client"); break;
|
||||||
|
default:
|
||||||
|
if (campoini.get_bool("TestDatabase"))
|
||||||
|
{
|
||||||
|
if (dhw == _dongle_network)
|
||||||
|
tipo = TR("Server");
|
||||||
|
else
|
||||||
|
tipo = TR("Server o Postazione singola");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tipo = TR("Client");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
TFilename temp; temp.tempdir();
|
||||||
|
TString strdb, strsql;
|
||||||
|
{
|
||||||
|
TISAM_recordset rs("");
|
||||||
|
strdb = rs.driver_version();
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TSQL_recordset rs("");
|
||||||
|
strsql = rs.driver_version();
|
||||||
|
}
|
||||||
|
|
||||||
|
add_row(TR("Versione"), versione);
|
||||||
|
add_row(TR("Protezione"), prot);
|
||||||
|
add_row(TR("N. di serie"), ser_no, ser_no < 0);
|
||||||
|
add_row(TR("Assistenza"), dongle().year_assist());
|
||||||
|
add_row(TR("Installazione"), tipo);
|
||||||
|
add_row(TR("Sistema"), stros);
|
||||||
|
add_row(TR("Utente"), user());
|
||||||
|
add_row(TR("Studio"), firm2dir(-1));
|
||||||
|
add_row(TR("Ditta"), campoini.get("Firm", "Main"));
|
||||||
|
if (prefix_valid())
|
||||||
|
{
|
||||||
|
const TFirm& f = prefix().firm();
|
||||||
|
add_row(TR("Ragione Sociale"), f.ragione_sociale());
|
||||||
|
add_row(TR("Valuta"), f.codice_valuta());
|
||||||
|
}
|
||||||
|
|
||||||
|
add_row(TR("Programma"), arg);
|
||||||
|
add_row(TR("Config locale"), campoini.name(), campoini.name().find(' ') >= 0);
|
||||||
|
add_row(TR("Config utente"), userini.name(), userini.name().find(' ') >= 0);
|
||||||
|
add_row(TR("File temporanei"), temp, temp.find(' ') >= 0);
|
||||||
|
|
||||||
|
const long mbfree = xvt_fsys_get_disk_free_space(firm2dir(-1), 'M');
|
||||||
|
add_row(TR("Spazio su disco"), mbfree, mbfree < 512);
|
||||||
|
|
||||||
|
TString printer(userini.get("Name", "Printer"));
|
||||||
|
if (printer.blank())
|
||||||
|
printer = "Nessuna";
|
||||||
|
add_row(TR("Stampante"), printer, printer.len() >= 32);
|
||||||
|
|
||||||
|
xvt_print_pdf_version(printer.get_buffer(32), printer.size());
|
||||||
|
add_row(TR("Libreria PDF"), printer);
|
||||||
|
add_row(TR("Libreria GUI"), strwx);
|
||||||
|
add_row(TR("Libreria DB"), strdb);
|
||||||
|
add_row(TR("Libreria SQL"), strsql);
|
||||||
|
}
|
||||||
|
|
||||||
|
// About box: risposta alla opzione Informazioni del menu File
|
||||||
|
void about()
|
||||||
|
{
|
||||||
|
TInfo_mask info;
|
||||||
|
info.run();
|
||||||
|
}
|
||||||
|
|
6
include/about.h
Executable file
6
include/about.h
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef __ABOUT_H
|
||||||
|
#define __ABOUT_H
|
||||||
|
|
||||||
|
void about();
|
||||||
|
|
||||||
|
#endif
|
@ -1,13 +1,13 @@
|
|||||||
|
#include <about.h>
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <colors.h>
|
#include <colors.h>
|
||||||
#include <codeb.h>
|
|
||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
#include <extcdecl.h>
|
#include <extcdecl.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
|
#include <mask.h>
|
||||||
#include <modaut.h>
|
#include <modaut.h>
|
||||||
#include <printer.h>
|
#include <printer.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <sheet.h>
|
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
@ -16,137 +16,6 @@
|
|||||||
|
|
||||||
#include <user.h>
|
#include <user.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
// Finestra informazioni
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class TInfo_mask : public TArray_sheet
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
virtual bool get_cell_colors(int row, int col, COLOR& fore, COLOR& back) const;
|
|
||||||
|
|
||||||
public:
|
|
||||||
void add_row(const char* prompt, const char* value, int err = 0);
|
|
||||||
void add_row(const char* prompt, unsigned long value, int err = 0);
|
|
||||||
TInfo_mask();
|
|
||||||
};
|
|
||||||
|
|
||||||
bool TInfo_mask::get_cell_colors(int r, int c, COLOR& fore, COLOR& back) const
|
|
||||||
{
|
|
||||||
const int err = ((TArray_sheet*)this)->row(r).get_int(2);
|
|
||||||
if (err > 0)
|
|
||||||
{
|
|
||||||
fore = NORMAL_COLOR;
|
|
||||||
back = err == 1 ? REQUIRED_BACK_COLOR : FOCUS_BACK_COLOR;
|
|
||||||
}
|
|
||||||
return TArray_sheet::get_cell_colors(r, c, fore, back);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TInfo_mask::add_row(const char* prompt, const char* value, int err)
|
|
||||||
{
|
|
||||||
TToken_string* r = new TToken_string;
|
|
||||||
r->add(prompt);
|
|
||||||
r->add(value);
|
|
||||||
r->add(err);
|
|
||||||
add(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TInfo_mask::add_row(const char* prompt, unsigned long value, int err)
|
|
||||||
{
|
|
||||||
TString16 str; str.format("%lu", value);
|
|
||||||
add_row(prompt, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
TInfo_mask::TInfo_mask()
|
|
||||||
: TArray_sheet(-1, -1, 78, 20, "Informazioni", "@16|@60")
|
|
||||||
{
|
|
||||||
const word ser_no = dongle().number();
|
|
||||||
|
|
||||||
int year = 2008, release = 10, tag = 0, patch = 1;
|
|
||||||
TString80 versione = "2008.10.00 Patch 0001";
|
|
||||||
if (main_app().get_version_info(year, release, tag, patch))
|
|
||||||
versione.format("%d.%02d.%02d Patch %04d", year, release, tag, patch);
|
|
||||||
|
|
||||||
TString80 stros, strwx;
|
|
||||||
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
|
|
||||||
|
|
||||||
TString arg;
|
|
||||||
for (int a = 0; a < main_app().argc(); a++)
|
|
||||||
arg << main_app().argv(a) << ' ';
|
|
||||||
arg.trim(); arg.lower();
|
|
||||||
|
|
||||||
TConfig campoini(CONFIG_INSTALL, "Main");
|
|
||||||
TConfig userini(CONFIG_GUI, "Printer");
|
|
||||||
|
|
||||||
TString prot;
|
|
||||||
const TDongleHardware dhw = dongle().hardware();
|
|
||||||
switch (dhw)
|
|
||||||
{
|
|
||||||
case _dongle_hardlock: prot = "Hardlock"; break;
|
|
||||||
case _dongle_eutron : prot = "Eutron"; break;
|
|
||||||
case _dongle_network : prot = campoini.get("Dongle", "Server"); break;
|
|
||||||
default : prot = TR("Nessuna"); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const int type = campoini.get_int("Type");
|
|
||||||
const char* tipo = NULL;
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case 1: tipo = TR("Postazione singola"); break;
|
|
||||||
case 2: tipo = TR("Server"); break;
|
|
||||||
case 3: tipo = TR("Client"); break;
|
|
||||||
default:
|
|
||||||
if (campoini.get_bool("TestDatabase"))
|
|
||||||
{
|
|
||||||
if (dhw == _dongle_network)
|
|
||||||
tipo = TR("Server");
|
|
||||||
else
|
|
||||||
tipo = TR("Server o Postazione singola");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
tipo = TR("Client");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFilename temp;
|
|
||||||
temp.tempdir();
|
|
||||||
|
|
||||||
TString strdb;
|
|
||||||
DB_version(strdb.get_buffer(), strdb.size());
|
|
||||||
|
|
||||||
add_row(TR("Versione"), versione);
|
|
||||||
add_row(TR("Protezione"), prot);
|
|
||||||
add_row(TR("N. di serie"), ser_no, ser_no < 0);
|
|
||||||
add_row(TR("Assistenza"), dongle().year_assist());
|
|
||||||
add_row(TR("Installazione"), tipo);
|
|
||||||
add_row(TR("Sistema"), stros);
|
|
||||||
add_row(TR("Libreria GUI"), strwx);
|
|
||||||
add_row(TR("Libreria DB"), strdb);
|
|
||||||
add_row(TR("Utente"), user());
|
|
||||||
add_row(TR("Studio"), firm2dir(-1));
|
|
||||||
add_row(TR("Ditta"), campoini.get("Firm", "Main"));
|
|
||||||
if (prefix_valid())
|
|
||||||
{
|
|
||||||
const TFirm& f = prefix().firm();
|
|
||||||
add_row(TR("Ragione Sociale"), f.ragione_sociale());
|
|
||||||
add_row(TR("Valuta"), f.codice_valuta());
|
|
||||||
}
|
|
||||||
|
|
||||||
add_row(TR("Programma"), arg);
|
|
||||||
add_row(TR("Config locale"), campoini.name(), campoini.name().find(' ') >= 0);
|
|
||||||
add_row(TR("Config utente"), userini.name(), userini.name().find(' ') >= 0);
|
|
||||||
add_row(TR("File temporanei"), temp, temp.find(' ') >= 0);
|
|
||||||
|
|
||||||
const long mbfree = xvt_fsys_get_disk_free_space(firm2dir(-1), 'M');
|
|
||||||
add_row(TR("Spazio su disco"), mbfree, mbfree < 512);
|
|
||||||
|
|
||||||
TString printer(userini.get("Name", "Printer"));
|
|
||||||
if (printer.blank())
|
|
||||||
printer = "Nessuna";
|
|
||||||
add_row(TR("Stampante"), printer, printer.len() < 32);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Metodi di accesso globali all'applicazione corrente
|
// Metodi di accesso globali all'applicazione corrente
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -684,13 +553,6 @@ bool TApplication::get_version_info(int& year, int& release, int& tag, int& patc
|
|||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// About box: risposta alla opzione Informazioni del menu File
|
|
||||||
void TApplication::about() const
|
|
||||||
{
|
|
||||||
TInfo_mask info;
|
|
||||||
info.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Risposta alla selezione Stampa del menu File
|
// Risposta alla selezione Stampa del menu File
|
||||||
void TApplication::print()
|
void TApplication::print()
|
||||||
{
|
{
|
||||||
|
@ -61,8 +61,6 @@ class TApplication
|
|||||||
|
|
||||||
// @cmember:(INTERNAL) Termine dell'applicazione
|
// @cmember:(INTERNAL) Termine dell'applicazione
|
||||||
void terminate();
|
void terminate();
|
||||||
// @cmember:(INTERNAL) About box: risposta alla opzione Informazioni del menu File
|
|
||||||
void about() const;
|
|
||||||
|
|
||||||
// @access Protected Member
|
// @access Protected Member
|
||||||
protected:
|
protected:
|
||||||
|
@ -96,7 +96,7 @@ typedef long TrDate;
|
|||||||
|
|
||||||
typedef char PathSt[82];
|
typedef char PathSt[82];
|
||||||
|
|
||||||
extern Str80 cprefix;
|
extern PathSt cprefix;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
int dirfl[2] = {0, 0}, recfl[2] = {0, 0} ;
|
int dirfl[2] = {0, 0}, recfl[2] = {0, 0} ;
|
||||||
PathSt __ptprf = ""; // Nome della directory con lo studio corrente
|
PathSt __ptprf = ""; // Nome della directory con lo studio corrente
|
||||||
|
PathSt cprefix= "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@(#) COpenDir FILES
|
@(#) COpenDir FILES
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
static CODE4 code_base;
|
static CODE4 code_base;
|
||||||
static DATA4 *dbdata[CB4FILES];
|
static DATA4 *dbdata[CB4FILES];
|
||||||
|
|
||||||
bool handle_ok(int handle)
|
static bool handle_ok(int handle)
|
||||||
{
|
{
|
||||||
return handle >= 0 && handle < CB4FILES &&
|
return handle >= 0 && handle < CB4FILES &&
|
||||||
dbdata[handle] != NULL && dbdata[handle]->clientId >= 0;
|
dbdata[handle] != NULL && dbdata[handle]->clientId >= 0;
|
||||||
@ -123,7 +123,7 @@ int DB_open(const char *filename,int mode,int index)
|
|||||||
code_base.errorCode=0;
|
code_base.errorCode=0;
|
||||||
if (index == 0) /* Se e' stata richiesta l'apertura senza indici, setta il flag */
|
if (index == 0) /* Se e' stata richiesta l'apertura senza indici, setta il flag */
|
||||||
code_base.autoOpen = 0;
|
code_base.autoOpen = 0;
|
||||||
dbdata[found]=d4open(&code_base,(char*)filename);
|
dbdata[found]=d4open(&code_base, filename);
|
||||||
if (index == 0) /* Restore the configuration of opening indexes*/
|
if (index == 0) /* Restore the configuration of opening indexes*/
|
||||||
code_base.autoOpen = 1;
|
code_base.autoOpen = 1;
|
||||||
if(dbdata[found]==0)
|
if(dbdata[found]==0)
|
||||||
@ -628,12 +628,11 @@ int DB_packmemo(short vis, const char * filename)
|
|||||||
handle=DB_open(filename,1,0); /* Exclusive mode open! */
|
handle=DB_open(filename,1,0); /* Exclusive mode open! */
|
||||||
if (handle > -1)
|
if (handle > -1)
|
||||||
{
|
{
|
||||||
char s[81];
|
|
||||||
|
|
||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
strcpy(s,"Compattamento memo file : ");
|
char s[256];
|
||||||
strcat(s,(char*)filename);
|
strcpy(s, "Compattamento memo file : ");
|
||||||
|
strcat(s, filename);
|
||||||
progind_create(100L,s,0,0,60);
|
progind_create(100L,s,0,0,60);
|
||||||
}
|
}
|
||||||
rt=d4memoCompress(dbdata[handle]);
|
rt=d4memoCompress(dbdata[handle]);
|
||||||
@ -1151,7 +1150,7 @@ long DB_changed(int handle)
|
|||||||
|
|
||||||
char* DB_memoptr( const int handle, const char * fieldname )
|
char* DB_memoptr( const int handle, const char * fieldname )
|
||||||
{
|
{
|
||||||
FIELD4* f = d4field( dbdata[ handle ], ( char *)fieldname );
|
FIELD4* f = d4field( dbdata[ handle ], fieldname );
|
||||||
return f4memoPtr( f );
|
return f4memoPtr( f );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ extern "C" {
|
|||||||
extern PathSt __ptprf;
|
extern PathSt __ptprf;
|
||||||
|
|
||||||
// Guy moved these outside extern
|
// Guy moved these outside extern
|
||||||
extern Str80 cprefix;
|
extern PathSt cprefix;
|
||||||
|
|
||||||
/* @END */
|
/* @END */
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef __EXTCTYPE_H
|
#ifndef __EXTCTYPE_H
|
||||||
#define __EXTCTYPE_H
|
#define __EXTCTYPE_H
|
||||||
|
|
||||||
#if !defined(__STDIO_H) && !defined(_INC_STDIO)
|
#ifndef __CCOMMON_H
|
||||||
#include <stdio.h>
|
#include <ccommon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __STDTTYPES_H
|
#ifndef __STDTTYPES_H
|
||||||
@ -14,8 +14,9 @@
|
|||||||
#define __PACKED__ __attribute__ ((packed))
|
#define __PACKED__ __attribute__ ((packed))
|
||||||
#define __ALIGNED__ __attribute__ ((aligned(2)))
|
#define __ALIGNED__ __attribute__ ((aligned(2)))
|
||||||
#define __PACK_1__
|
#define __PACK_1__
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#ifdef WIN32
|
||||||
#define __PACKED__
|
#define __PACKED__
|
||||||
#define __ALIGNED__
|
#define __ALIGNED__
|
||||||
#pragma pack(2)
|
#pragma pack(2)
|
||||||
@ -46,8 +47,6 @@
|
|||||||
|
|
||||||
/* @T */
|
/* @T */
|
||||||
typedef long TrDate;
|
typedef long TrDate;
|
||||||
typedef char PathSt[42];
|
|
||||||
typedef char Str80[82];
|
|
||||||
typedef long RecNoType;
|
typedef long RecNoType;
|
||||||
typedef char *RecType;
|
typedef char *RecType;
|
||||||
typedef char FieldName[12] ;
|
typedef char FieldName[12] ;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
// @base public | TObject
|
// @base public | TObject
|
||||||
class TFile : public TObject
|
class TFile : public TObject
|
||||||
|
|
||||||
// @author:(INTERNAL) Sandro
|
// @author:(INTERNAL) Alex
|
||||||
|
|
||||||
// @access:(INTERNAL) Private Member
|
// @access:(INTERNAL) Private Member
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,6 @@ void write_journal(TJournalHeader& jh, void* data, int len)
|
|||||||
#define READTYPES 0x00FF
|
#define READTYPES 0x00FF
|
||||||
#define INVFLD 255
|
#define INVFLD 255
|
||||||
|
|
||||||
Str80 cprefix;
|
|
||||||
bool __field_changed = FALSE;
|
bool __field_changed = FALSE;
|
||||||
|
|
||||||
#define NOALLOC (char **) -1
|
#define NOALLOC (char **) -1
|
||||||
@ -1072,7 +1071,7 @@ int TBaseisamfile::_write(const TRectype& rec)
|
|||||||
|
|
||||||
_recno = DB_recno(fhnd);
|
_recno = DB_recno(fhnd);
|
||||||
if (_lasterr == NOERR && rec.has_memo())
|
if (_lasterr == NOERR && rec.has_memo())
|
||||||
((TRectype &)rec).write_memo(_isam_handle, _recno );
|
((TRectype&)rec).write_memo(_isam_handle, _recno );
|
||||||
|
|
||||||
return _lasterr;
|
return _lasterr;
|
||||||
}
|
}
|
||||||
@ -1082,7 +1081,6 @@ int TBaseisamfile::write(const TRectype& rec)
|
|||||||
return rec.write(*this);
|
return rec.write(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TBaseisamfile::write()
|
int TBaseisamfile::write()
|
||||||
{
|
{
|
||||||
return TBaseisamfile::write(curr());
|
return TBaseisamfile::write(curr());
|
||||||
@ -1151,8 +1149,8 @@ int TBaseisamfile::_rewrite(const TRectype& rec)
|
|||||||
|
|
||||||
if (_lasterr == NOERR)
|
if (_lasterr == NOERR)
|
||||||
{
|
{
|
||||||
if (curr().has_memo( ))
|
if (curr().has_memo())
|
||||||
((TRectype &)rec).write_memo(_isam_handle, _recno );
|
((TRectype&)rec).write_memo(_isam_handle, _recno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -952,12 +952,12 @@ TFirm::TFirm(long code)
|
|||||||
TPrefix::TPrefix() : _filelevel(0), _stdlevel(0), _items(0), _firm(NULL)
|
TPrefix::TPrefix() : _filelevel(0), _stdlevel(0), _items(0), _firm(NULL)
|
||||||
{
|
{
|
||||||
_prefix = ".";
|
_prefix = ".";
|
||||||
CGetPref();
|
const char* prfx = CGetPref();
|
||||||
|
|
||||||
if (!fexist(__ptprf) || strchr(__ptprf, ' ') != NULL)
|
if (!fexist(__ptprf) || strchr(__ptprf, ' ') != NULL)
|
||||||
fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf);
|
fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf);
|
||||||
|
|
||||||
const TFilename dir(cprefix);
|
const TFilename dir(prfx);
|
||||||
const long primaditta = atol(dir.name());
|
const long primaditta = atol(dir.name());
|
||||||
if (primaditta > 0L && !exist(primaditta))
|
if (primaditta > 0L && !exist(primaditta))
|
||||||
set_codditta(0L, TRUE);
|
set_codditta(0L, TRUE);
|
||||||
@ -985,8 +985,9 @@ void TPrefix::reopen() const
|
|||||||
{
|
{
|
||||||
if (_prefix != ".")
|
if (_prefix != ".")
|
||||||
{
|
{
|
||||||
((TPrefix*)this)->_manager.close_all();
|
TFile_manager& mgr = ((TPrefix*)this)->_manager; // Safe non const cast
|
||||||
((TPrefix*)this)->_manager.open_all();
|
mgr.close_all();
|
||||||
|
mgr.open_all();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1029,18 +1030,18 @@ void TPrefix::set(
|
|||||||
CCloseRecDir(COMDIR);
|
CCloseRecDir(COMDIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* prfx = (char*)CGetPref(); // Safe non-const cast for PathSt cprefix
|
||||||
if (strcmp(name, "DEF") == 0)
|
if (strcmp(name, "DEF") == 0)
|
||||||
{
|
{
|
||||||
CGetPref();
|
xvt_fsys_parse_pathname(prfx, NULL, NULL, _prefix.get_buffer(), NULL, NULL);
|
||||||
xvt_fsys_parse_pathname(cprefix, NULL, NULL, _prefix.get_buffer(), NULL, NULL);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_prefix = name;
|
_prefix = name;
|
||||||
if (*name)
|
if (*name)
|
||||||
xvt_fsys_build_pathname(cprefix, NULL, __ptprf, name, NULL, NULL);
|
xvt_fsys_build_pathname(prfx, NULL, __ptprf, name, NULL, NULL);
|
||||||
else
|
else
|
||||||
strcpy(cprefix, "");
|
*prfx = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test(_prefix))
|
if (!test(_prefix))
|
||||||
|
@ -179,15 +179,8 @@ void TIndwin::update_bar()
|
|||||||
check_stop();
|
check_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TIndwin::update()
|
void TIndwin::update_txt()
|
||||||
{
|
{
|
||||||
clear(MASK_BACK_COLOR);
|
|
||||||
|
|
||||||
if (_gauge != NULL_WIN)
|
|
||||||
update_bar();
|
|
||||||
|
|
||||||
if (!_text.empty())
|
|
||||||
{
|
|
||||||
RCT r; get_txt_rct(r);
|
RCT r; get_txt_rct(r);
|
||||||
|
|
||||||
WINDOW w = win();
|
WINDOW w = win();
|
||||||
@ -200,7 +193,17 @@ void TIndwin::update()
|
|||||||
set_opaque_text(TRUE);
|
set_opaque_text(TRUE);
|
||||||
set_font();
|
set_font();
|
||||||
advanced_draw_paragraph(*this, _text, r, 'L', 'C', CHARY);
|
advanced_draw_paragraph(*this, _text, r, 'L', 'C', CHARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TIndwin::update()
|
||||||
|
{
|
||||||
|
clear(MASK_BACK_COLOR);
|
||||||
|
|
||||||
|
if (_gauge != NULL_WIN)
|
||||||
|
update_bar();
|
||||||
|
|
||||||
|
if (!_text.empty())
|
||||||
|
update_txt();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TIndwin::setstatus(long l)
|
bool TIndwin::setstatus(long l)
|
||||||
|
@ -68,6 +68,8 @@ protected:
|
|||||||
|
|
||||||
// @cmember Aggiorna la barra di attesa
|
// @cmember Aggiorna la barra di attesa
|
||||||
virtual void update_bar();
|
virtual void update_bar();
|
||||||
|
virtual void update_txt();
|
||||||
|
|
||||||
// @cmember Controlla se ha terminato la barra di attesa
|
// @cmember Controlla se ha terminato la barra di attesa
|
||||||
KEY check_stop();
|
KEY check_stop();
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "../xvaga/incstr.h"
|
#include "../xvaga/incstr.h"
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <extcdecl.h>
|
#include <codeb.h>
|
||||||
#include <modaut.h>
|
#include <modaut.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <recset.h>
|
#include <recset.h>
|
||||||
@ -692,6 +692,9 @@ bool TRecordset::ask_variables(bool all)
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TString& TRecordset::driver_version() const
|
||||||
|
{ return EMPTY_STRING; }
|
||||||
|
|
||||||
TRecordset::TRecordset() : _parentset(NULL)
|
TRecordset::TRecordset() : _parentset(NULL)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@ -1533,6 +1536,13 @@ void TISAM_recordset::set(const char* use)
|
|||||||
find_and_reset_vars();
|
find_and_reset_vars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TString& TISAM_recordset::driver_version() const
|
||||||
|
{
|
||||||
|
TString& tmp = get_tmp_string(20);
|
||||||
|
DB_version(tmp.get_buffer(), tmp.size());
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
TISAM_recordset::TISAM_recordset(const char* use)
|
TISAM_recordset::TISAM_recordset(const char* use)
|
||||||
: _relation(NULL), _cursor(NULL)
|
: _relation(NULL), _cursor(NULL)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +53,7 @@ public: // Absolutely needed methods
|
|||||||
virtual void requery() pure;
|
virtual void requery() pure;
|
||||||
bool empty() const { return items() == 0; }
|
bool empty() const { return items() == 0; }
|
||||||
virtual const TString& query_text() const pure;
|
virtual const TString& query_text() const pure;
|
||||||
|
virtual const TString& driver_version() const;
|
||||||
|
|
||||||
virtual bool move_first() { return move_to(0); }
|
virtual bool move_first() { return move_to(0); }
|
||||||
virtual bool move_prev() { return move_to(current_row()-1); }
|
virtual bool move_prev() { return move_to(current_row()-1); }
|
||||||
@ -114,6 +115,7 @@ public:
|
|||||||
virtual const TRecordset_column_info& column_info(unsigned int c) const;
|
virtual const TRecordset_column_info& column_info(unsigned int c) const;
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
virtual const TVariant& get(unsigned int column) const;
|
||||||
virtual const TVariant& get(const char* column_name) const;
|
virtual const TVariant& get(const char* column_name) const;
|
||||||
|
virtual const TString& driver_version() const;
|
||||||
virtual const TString& query_text() const { return _use; }
|
virtual const TString& query_text() const { return _use; }
|
||||||
|
|
||||||
TISAM_recordset(const char* use);
|
TISAM_recordset(const char* use);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <sqlset.h>
|
#include <sqlset.h>
|
||||||
|
|
||||||
#include <diction.h>
|
#include <diction.h>
|
||||||
#include <extcdecl.h>
|
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
@ -571,6 +570,13 @@ void TSQL_recordset::set(const char* sql)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TString& TSQL_recordset::driver_version() const
|
||||||
|
{
|
||||||
|
TString& tmp = get_tmp_string();
|
||||||
|
tmp << "SQLITE " << SQLITE_VERSION;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
TSQL_recordset::TSQL_recordset(const char* sql)
|
TSQL_recordset::TSQL_recordset(const char* sql)
|
||||||
{
|
{
|
||||||
set(sql);
|
set(sql);
|
||||||
|
@ -29,7 +29,8 @@ public: // TRecordset
|
|||||||
virtual unsigned int columns() const;
|
virtual unsigned int columns() const;
|
||||||
virtual const TRecordset_column_info& column_info(unsigned int c) const;
|
virtual const TRecordset_column_info& column_info(unsigned int c) const;
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
virtual const TVariant& get(unsigned int column) const;
|
||||||
const TString& query_text() const { return _sql; }
|
virtual const TString& query_text() const { return _sql; }
|
||||||
|
virtual const TString& driver_version() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set(const char* sql);
|
void set(const char* sql);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user