Patch level : xx.502

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Correzzioni al merge


git-svn-id: svn://10.65.10.50/trunk@8412 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1999-07-21 09:18:16 +00:00
parent 16258dc547
commit 4ab2626121
15 changed files with 115 additions and 50 deletions

View File

@ -1,3 +1,5 @@
#define STRICT
#define XVT_INCL_NATIVE
#include <applicat.h>
#include <colors.h>
#include <config.h>

View File

@ -36,9 +36,6 @@ class TArchive : public TObject
// corretta sequenza dei dischetti da inserire
FILE* ask_disk(TFilename& name, int disk, char floppy, bool lettura) const;
// @cmember Scrive il file backup.ini sul drive indicato
bool write_ini(TFilename& name, int disk, long tot, const char* desc, char floppy) const;
// @cmember Spezza il file in modo da farlo stare sul dischetto
bool fsplit(const char* filename, char floppy, const char* desc = "") const;
// @cmember Ricostruisce il file spezzato
@ -59,6 +56,8 @@ protected:
// @cmember Ricostruisce la lista dei file contenuti nel backup
int build_backup_list(long firm, TString_array& fl) const;
// @cmember Scrive il file backup.ini sul drive indicato
bool write_ini(TFilename& name, int disk, long tot, const char* desc, char floppy) const;
// @cmember Costruisce la lista delle directory da scompattare
int build_restore_list(long firm, char floppy, TString_array& fl) const;

View File

@ -443,10 +443,10 @@ bool TDongle::eutron_login(bool test_all_keys)
// Calcola il numero della word dove cominciano i bit di attivazione
unsigned short otb = eh->_offset_to_bits;
if (otb == 0) otb == 16; // Compatibile Hardlock
if (otb == 0) otb = 16; // Compatibile Hardlock
unsigned short sob = eh->_size_of_bits;
if (sob == 0) sob == 16; // Compatibile Hardlock
if (sob == 0) sob = 16; // Compatibile Hardlock
word data[64];
if (read_words(otb, sob, data))

View File

@ -26,7 +26,6 @@ class TDongle : public TObject
TBit_array _module;
bool _dirty;
TString16 _admin, _admpwd;
TDate _last_assist;
unsigned long _assist[MAX_DONGLE_ASSIST]; // Centesimi di Euro pre-pagati

View File

@ -116,7 +116,6 @@ const TString& TVararray::getstring(int varnum)
NFCHECK("Invalid variable number : %d", varnum);
return EMPTY_STRING;
}
TVar* var = (TVar*)objptr(varnum);
return var->string();
}

View File

@ -618,7 +618,6 @@ void set_autoload_new_files(
TBaseisamfile::TBaseisamfile(int logicnum)
{
CHECK(openrec, "This applications lies, it really do use files!");
_logicnum = logicnum;
_isam_handle = 0;
_curr_key = 0;
@ -869,7 +868,6 @@ int TBaseisamfile::_write(const TRectype& rec)
if (_lasterr == NOERR)
{
notify_change();
#ifdef JOURNAL
if (get_journal())
{
@ -923,7 +921,6 @@ int TBaseisamfile::_rewrite(const TRectype& rec)
_lasterr = DB_rewrite(fhnd);
if (_lasterr == NOERR)
{
notify_change();
#ifdef JOURNAL
if (get_journal())
{
@ -993,7 +990,6 @@ int TBaseisamfile::_remove(const TRectype& rec)
_lasterr = DB_delete(fhnd); // Put only deletion flag on record, must remove keys too!
if (_lasterr == NOERR)
{
notify_change();
DB_flush(fhnd);
#ifdef JOURNAL
if (get_journal())
@ -1079,7 +1075,6 @@ int TBaseisamfile::_open(
// @flag FALSE | Il file viene aperto senza indici
{
<<<<<<< isam.cpp
CHECKD(_isam_handle == 0, "Can't reopen file ", _logicnum);
_curr_key = index ? 1 : 0;
@ -1457,8 +1452,8 @@ int TIsamtempfile::open(
filename.ext("dbf");
if (err == -60)
{
if (access(n,0)) // check for existence
fatal_box("Apertura file %s : errore n. %d. File non esistente.",(const char*) n,err);
if (access(filename,0)) // check for existence
fatal_box("Apertura file %s : errore n. %d. File non esistente.",(const char*) filename,err);
else
fatal_box("Apertura file %s : errore n. %d. File aperto in uso esclusivo da un'altra applicazione.",(const char*)filename,err);
}
@ -1511,7 +1506,7 @@ int TIsamtempfile::close()
}
::remove(f);
if (rec_has_memo(filehnd()->r)) // Cancella eventuale file dei memo
if (curr().has_memo()) // Cancella eventuale file dei memo
{
f.ext("fpt");
::remove(f);

View File

@ -498,8 +498,6 @@ public:
virtual bool get_relapp(TString& app) const;
// @cmember Testa se il file e' cambiato dal ciclo di clock <p clk>
bool is_changed_since(long clk) const;
// @cmember Testa se il file e' cambiato dal momento <p stat>
bool is_changed_since(long& stat) const;

View File

@ -559,17 +559,6 @@ TEdit_field& TMask::efield(short id) const
return (TEdit_field&)f;
}
int TMask::sheets() const
{
int count = 0;
for (int f = fields()-1; f >= 0; f--)
{
if (fld(f).is_sheet())
count++;
}
return count;
}
TSheet_field& TMask::sfield(short id) const
{
TMask_field& f = field(id);
@ -865,14 +854,14 @@ TMask_field* TMask::parse_field(TScanner& scanner)
}
int TMask::sheets() const
{
int s = 0;
{
int count = 0;
for (int f = fields()-1; f >= 0; f--)
{
if (fld(f).is_kind_of(CLASS_SHEET_FIELD))
s++;
if (fld(f).is_sheet())
count++;
}
return s;
return count;
}
// @doc EXTERNAL

View File

@ -107,7 +107,8 @@ HIDDEN BOOLEAN event_hook(HWND hwnd,
bool os_allow_another_instance()
{
return TRUE;
NFCHECK("Bisogna implementare la allow_another_instance");
return TRUE;
}
COLOR os_choose_color(COLOR col, WINDOW win)

View File

@ -536,3 +536,87 @@ bool os_dongle_server_running()
ATOM a = GlobalFindAtom("DONGLE_SERVER_ATOM");
return a != 0;
}
HIDDEN const char* _file_to_find = NULL;
struct TFindWindowInfo
{
HINSTANCE _instance;
TFilename _file;
HWND _hwnd;
TFindWindowInfo() : _instance(NULL), _hwnd(NULL) { }
};
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
TFindWindowInfo* w = (TFindWindowInfo*)lParam;
HINSTANCE inst = (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE);
if (inst == w->_instance)
{
const LONG style = GetWindowLong(hwnd, GWL_STYLE);
if ((style & WS_CAPTION) != 0) // Ha la caption?
{
w->_hwnd = hwnd;
return FALSE;
}
return TRUE;
}
TString256 str;
GetWindowText(hwnd, str.get_buffer(), str.size());
str.upper();
if (str.find(w->_file) >= 0)
{
w->_hwnd = hwnd;
return FALSE;
}
return TRUE;
}
unsigned long os_execute_in_window(const TFilename& path, WINDOW win)
{
const unsigned long exitcode = WinExec(path, SW_SHOWNORMAL);
if (exitcode < 32)
return 0;
TFindWindowInfo w;
w._instance = (HINSTANCE) exitcode;
const int space = path.find(' ');
if (space > 0)
w._file = path.mid(space+1);
else
w._file = path;
w._file = w._file.name();
w._file.ext("");
w._file.upper();
const clock_t start = clock();
while (w._hwnd == NULL && (clock() - start) < 10*CLOCKS_PER_SEC)
{
xvt_app_process_pending_events();
EnumWindows(EnumWindowsProc, LPARAM(&w));
}
if (w._hwnd != NULL) // L'ho trovata!
{
RCT rct; xvt_vobj_get_client_rect(win, &rct);
HWND nat = (HWND)xvt_vobj_get_attr(win, ATTR_NATIVE_WINDOW);
SetParent(w._hwnd, nat);
// LONG style = GetWindowLong(w._hwnd, GWL_STYLE);
// style |= WS_CHILD;
// SetWindowLong(w._hwnd, GWL_STYLE, style);
const int fx = GetSystemMetrics(SM_CXFRAME);
const int fy = GetSystemMetrics(SM_CYFRAME);
int cy = GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYBORDER);
if (GetMenu(w._hwnd) != NULL)
cy += GetSystemMetrics(SM_CYMENU);
SetWindowPos(w._hwnd, nat, -fx, -fy-cy, rct.right+2*fx, rct.bottom+cy+2*fy, SWP_NOZORDER);
}
return (unsigned long) w._hwnd;
}

View File

@ -26,4 +26,4 @@ bool user_can_read(const TRelation* rel);
bool user_can_write(const TRelation* rel);
#endif
=======

View File

@ -67,7 +67,7 @@ class TRelation_application : public TSkeleton_application
// @cmember:(INTERNAL) Modalità di esecuzione della transazione corrente (Automatica o interattiva)
char _curr_trans_mode;
// @cmember:(INTERNAL) Flag di cancellazione automatica veloce
bool _autodelete;
int _autodelete;
private:
// @cmember:(INTERNAL) Carica la transazione corrente (protocollo via .ini)

View File

@ -1002,7 +1002,6 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
const bool filtered = has_filter();
TRecnotype* page = new TRecnotype [CMAXELPAGE];
<<<<<<< relation.cpp
// TRecnotype pos = DB_index_recno(handle);
// pos = DB_index_recno(fhnd);
_pos = -1;
@ -1011,14 +1010,12 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
while (TRUE)
{
if (DB_index_eof(fhnd)) break;
const char* s0 = DB_index_getkey(fhnd);
if (l && (strncmp(to(), s0, l) < 0)) break;
const TRecnotype recno = DB_index_recno(fhnd);
if (recno == oldrecno) break; // means that no more keys are available
oldrecno=recno;
if (DB_index_eof(handle)) break;
const char* s0 = DB_index_getkey(handle);
if (l && (strncmp(to(), s0, l) < 0)) break;
const TRecnotype recno = DB_index_recno(handle);
if (recno == oldrecno) break; // means that no more keys are available
oldrecno=recno;
if (pagecnt == CMAXELPAGE)
{
if (filtered && !simple_filter)
@ -1047,10 +1044,10 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
else
page[pagecnt++] = recno;
DB_index_next(fhnd);
DB_index_next(handle);
int rt=get_error(-1);
if (rt != NOERR)
fatal_box("Can't read index n. %d - file n. %d",DB_tagget(file().filehnd()->fhnd),file().filehnd()->ln);
fatal_box("Can't read index n. %d - file n. %d", DB_tagget(handle), file().num());
} // while
if (pagecnt)
{

View File

@ -98,10 +98,10 @@ void TString512::strncpy(const char* s, int n)
}
#ifdef FOXPRO
HIDDEN TString512 spark;
HIDDEN TString512 _spark;
#else
HIDDEN TString512* ptr_spark = new TString512;
HIDDEN TString512& spark = *ptr_spark;
HIDDEN TString512& _spark = *ptr_spark;
#endif
inline bool is_space(char c)

View File

@ -1,3 +1,5 @@
#define STRICT
#define XVT_INCL_NATIVE
#include <applicat.h>
#include <colors.h>
#include <controls.h>
@ -386,9 +388,9 @@ void customize_controls(
{
if (on)
{
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
HInstance = (HINSTANCE)xvt_vobj_get_attr(NULL_WIN, ATTR_WIN_INSTANCE);
#endif
//#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
// HInstance = (HINSTANCE)xvt_vobj_get_attr(NULL_WIN, ATTR_WIN_INSTANCE);
//#endif
customize_colors();
init_controls();
}