stdtypes.cpp Aggiornata gestione prefix()
strings.* Spostato da prefix il nome dell'utente corrente tree.cpp Condizionato il controllo delle dimensioni delle immagini varrec.* Aggiornato uso dei nuovi file handles xvtility.cpp Migliorata gestione tasti estesi git-svn-id: svn://10.65.10.50/trunk@6458 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2c2d972216
commit
f16f443f52
@ -1,15 +1,9 @@
|
|||||||
#define __STDTYPES_CPP
|
#define __STDTYPES_CPP
|
||||||
|
|
||||||
#include <extcdecl.h>
|
|
||||||
#include <codeb.h>
|
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
#include <isam.h>
|
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
|
|
||||||
extern isfdptr *openf;
|
|
||||||
extern isfdptr *ext_files;
|
|
||||||
HIDDEN long _stdlevel = 0;
|
HIDDEN long _stdlevel = 0;
|
||||||
|
|
||||||
// @doc INTERNAL
|
// @doc INTERNAL
|
||||||
@ -43,7 +37,7 @@ bool test_assistance_year()
|
|||||||
if (get_serial_number() > 0)
|
if (get_serial_number() > 0)
|
||||||
{
|
{
|
||||||
const int new_year = dongle().year_assist();
|
const int new_year = dongle().year_assist();
|
||||||
if (new_year >= 1997 && new_year <= dongle_year)
|
if (new_year >= 1998 && new_year <= dongle_year)
|
||||||
dongle_year = new_year;
|
dongle_year = new_year;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,27 +58,9 @@ void init_global_vars()
|
|||||||
{
|
{
|
||||||
TPrefix& pref = prefix_init();
|
TPrefix& pref = prefix_init();
|
||||||
|
|
||||||
pref.set("");
|
pref.set(""); // Dati standard
|
||||||
_stdlevel = pref.filelevel();
|
_stdlevel = pref.filelevel();
|
||||||
|
pref.set("DEF"); // Ditta corrente
|
||||||
FileDes d;
|
|
||||||
CGetFile(LF_DIR, &d, _nolock, NORDIR);
|
|
||||||
|
|
||||||
long maxfdir = d.EOX;
|
|
||||||
pref.set("DEF");
|
|
||||||
CGetFile(LF_DIR, &d, _nolock, NORDIR);
|
|
||||||
if (d.EOD > maxfdir) maxfdir = d.EOD;
|
|
||||||
|
|
||||||
openf = new isfdptr[maxfdir];
|
|
||||||
ext_files = new isfdptr[maxfdir];
|
|
||||||
|
|
||||||
for (long i = 0; i < maxfdir; i++)
|
|
||||||
{
|
|
||||||
openf[i] = NULL;
|
|
||||||
ext_files[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DB_init();
|
|
||||||
}
|
}
|
||||||
// @doc INTERNAL
|
// @doc INTERNAL
|
||||||
|
|
||||||
@ -92,15 +68,8 @@ void init_global_vars()
|
|||||||
void free_global_vars()
|
void free_global_vars()
|
||||||
{
|
{
|
||||||
destroy_dongle();
|
destroy_dongle();
|
||||||
|
|
||||||
if (openf != NULL)
|
|
||||||
{
|
|
||||||
delete openf;
|
|
||||||
delete ext_files;
|
|
||||||
prefix_destroy();
|
prefix_destroy();
|
||||||
}
|
}
|
||||||
// DB_exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(FOXPRO) && (XVT_OS != XVT_OS_WIN32)
|
#if !defined(FOXPRO) && (XVT_OS != XVT_OS_WIN32)
|
||||||
|
|
||||||
|
@ -4,11 +4,21 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <strstrea.h>
|
#include <strstrea.h>
|
||||||
|
|
||||||
#include <prefix.h>
|
|
||||||
#include <regexp.h>
|
#include <regexp.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
|
// @doc EXTERNAL
|
||||||
|
|
||||||
|
// @func Ritorna il nome dell'utente attuale
|
||||||
|
//
|
||||||
|
// @rdesc Ritorno il nome dell'utente attuale
|
||||||
|
TString& user()
|
||||||
|
{
|
||||||
|
static TString16 _user;
|
||||||
|
return _user;
|
||||||
|
}
|
||||||
|
|
||||||
const TToken_string& empty_string()
|
const TToken_string& empty_string()
|
||||||
{
|
{
|
||||||
static TToken_string _ts(1);
|
static TToken_string _ts(1);
|
||||||
|
@ -603,6 +603,8 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TString& user();
|
||||||
|
|
||||||
const TToken_string& empty_string();
|
const TToken_string& empty_string();
|
||||||
#define EMPTY_STRING empty_string()
|
#define EMPTY_STRING empty_string()
|
||||||
|
|
||||||
|
@ -262,12 +262,6 @@ TImage* TTree::get_res_image(short bmp_id) const
|
|||||||
bmp = new TImage(bmp_id);
|
bmp = new TImage(bmp_id);
|
||||||
if (bmp->ok())
|
if (bmp->ok())
|
||||||
{
|
{
|
||||||
#ifdef DBG
|
|
||||||
if (bmp->width() > 2*CHARX)
|
|
||||||
error_box("Image %d is too wide: %d", bmp_id, bmp->width());
|
|
||||||
if (bmp->height() > CHARY)
|
|
||||||
error_box("Image %d is too high: %d", bmp_id, bmp->height());
|
|
||||||
#endif
|
|
||||||
bmp->convert_transparent_color(NORMAL_BACK_COLOR);
|
bmp->convert_transparent_color(NORMAL_BACK_COLOR);
|
||||||
((TTree*)this)->_image.add(bmp, bmp_id);
|
((TTree*)this)->_image.add(bmp, bmp_id);
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ void TVariable_rectype::unknown_field(const char* name) const
|
|||||||
TRectype::unknown_field(name);
|
TRectype::unknown_field(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TVariable_rectype::write_memo(isdef * file, const TRecnotype recno)
|
void TVariable_rectype::write_memo(int file, const TRecnotype recno)
|
||||||
{
|
{
|
||||||
if (_memo_fld.not_empty())
|
if (_memo_fld.not_empty())
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
void set_memo_fld(const char * fieldname);
|
void set_memo_fld(const char * fieldname);
|
||||||
void reset_memo_fld() { set_memo_fld(NULL); }
|
void reset_memo_fld() { set_memo_fld(NULL); }
|
||||||
virtual void init_memo(const TRecnotype recno = RECORD_NON_FISICO);
|
virtual void init_memo(const TRecnotype recno = RECORD_NON_FISICO);
|
||||||
virtual void write_memo(isdef * file, const TRecnotype recno);
|
virtual void write_memo(int file, const TRecnotype recno);
|
||||||
|
|
||||||
virtual void add_field(TVariable_field * f);
|
virtual void add_field(TVariable_field * f);
|
||||||
virtual void remove_field(const char * fieldname = NULL);
|
virtual void remove_field(const char * fieldname = NULL);
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OLDXVT_H
|
#ifdef OLDXVT_H
|
||||||
|
#ifndef XI_R4
|
||||||
#define XI_R4
|
#define XI_R4
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,9 +16,9 @@ short BASEY = 12;
|
|||||||
|
|
||||||
HIDDEN bool _ignore_xvt_errors = FALSE;
|
HIDDEN bool _ignore_xvt_errors = FALSE;
|
||||||
|
|
||||||
void ignore_xvt_errors(bool ie)
|
void ignore_xvt_errors(bool ixe)
|
||||||
{
|
{
|
||||||
_ignore_xvt_errors = ie;
|
_ignore_xvt_errors = ixe;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN error_hook(XVT_ERRMSG err, DATA_PTR)
|
BOOLEAN error_hook(XVT_ERRMSG err, DATA_PTR)
|
||||||
@ -233,8 +233,13 @@ KEY e_char_to_key(
|
|||||||
KEY key = ep->v.chr.ch;
|
KEY key = ep->v.chr.ch;
|
||||||
if (key < K_INS || key > K_HELP)
|
if (key < K_INS || key > K_HELP)
|
||||||
{
|
{
|
||||||
if (ep->v.chr.shift && (key < ' ' || key >= K_UP)) key += K_SHIFT;
|
if (ep->v.chr.shift && (key < ' ' || key >= K_UP))
|
||||||
if (ep->v.chr.control && key >= ' ') key += K_CTRL;
|
key += K_SHIFT;
|
||||||
|
// if (ep->v.chr.control && key >= ' ')
|
||||||
|
if (ep->v.chr.control && (key > K_SHIFT ||
|
||||||
|
(key >= K_F1 && key <= K_F12) ||
|
||||||
|
isalnum(key) || strchr("\r+-*/", key)))
|
||||||
|
key += K_CTRL;
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user