Gestione help ipertestuali modulo per modulo

Corretta picture per numeri negativi
Tolta xvt_fmalloc dal metodo new
Controllati errori di scrittura in fcopy


git-svn-id: svn://10.65.10.50/trunk@888 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-01-19 14:00:04 +00:00
parent 5c08bfe0f5
commit 4200d83619
5 changed files with 34 additions and 14 deletions

View File

@ -1,4 +1,4 @@
// $Id: maskfld.cpp,v 1.69 1995-01-18 14:40:52 guy Exp $ // $Id: maskfld.cpp,v 1.70 1995-01-19 13:59:55 guy Exp $
#include <xvt.h> #include <xvt.h>
#include <applicat.h> #include <applicat.h>
@ -806,8 +806,13 @@ bool TMask_field::on_key(KEY key)
mk.mkKeylist = 'M'; mk.mkKeylist = 'M';
strcpy(mk.mkKeyphrase, topic); strcpy(mk.mkKeyphrase, topic);
TFilename hlp("prassi.hlp");
const TString16 mod(topic.left(2));
if (mod != "ba")
hlp.insert(mod, 6);
HWND hwnd = (HWND)get_value(TASK_WIN, ATTR_NATIVE_WINDOW); HWND hwnd = (HWND)get_value(TASK_WIN, ATTR_NATIVE_WINDOW);
WinHelp(hwnd, "prassi.hlp", HELP_MULTIKEY, (DWORD)&mk); WinHelp(hwnd, hlp, HELP_MULTIKEY, (DWORD)&mk);
break; break;
} }
#endif #endif

View File

@ -1 +1 @@
#define VERSION 1.3 #define VERSION 1.4

View File

@ -384,8 +384,18 @@ char *real ::string (const char *picture)
j--; j--;
if (z == '~') if (z == '~')
c = ' '; c = ' ';
else if (c == '@') else
c = (z == '@') ? '0' : ' '; {
if (c == '@')
c = (z == '@') ? '0' : ' ';
else
if (c == '-' && f[i+1] == '.')
{
f[i+1] = '-';
c = ' ';
}
}
z = c; z = c;
} }
} }

View File

@ -85,8 +85,9 @@ void free_global_vars()
#include <xvt.h> #include <xvt.h>
void* operator new(size_t size) void* operator new(size_t size)
{ {
void* mem = (void*)xvt_fmalloc(size); // void* mem = (void*)xvt_fmalloc(size);
void* mem = (void*)malloc(size);
if (mem == NULL) if (mem == NULL)
fatal_box("Out of memory: can't allocate %u bytes", size); fatal_box("Out of memory: can't allocate %u bytes", size);
return mem; return mem;
@ -94,8 +95,9 @@ void* operator new(size_t size)
void operator delete(void* ptr) void operator delete(void* ptr)
{ {
CHECK(ptr, "Can't delete a NULL pointer!"); CHECK(ptr, "Can't delete a NULL pointer");
xvt_ffree((char*)ptr); // xvt_ffree((char*)ptr);
free(ptr);
} }
#endif // FOXPRO #endif // FOXPRO

View File

@ -37,18 +37,21 @@ bool fcopy(const char* orig, const char* dest)
const word size = 16*1024; const word size = 16*1024;
TString buffer(size); TString buffer(size);
while (TRUE) bool ok = TRUE;
while (ok)
{ {
const word letti = fread((char*)(const char*)buffer, 1, size, i); const word letti = fread((char*)(const char*)buffer, 1, size, i);
fwrite((char*)(const char*)buffer, 1, letti, o); ok = fwrite((char*)(const char*)buffer, 1, letti, o) == letti;
if (letti < size) break; if (letti < size) break;
} }
if (!ok) error_box("Errore di scrittura: probabile disco pieno!");
fclose(o); fclose(o);
fclose(i); fclose(i);
return TRUE; return ok;
} }