Patch level : 2.0 476

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :

Elininati tutti i riferimenti a WIN16
Aggiunto supporto per variabile ADVANCED_GRAPHICS, per dis/abilitare gli sfondi


git-svn-id: svn://10.65.10.50/trunk@11187 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-05-26 13:02:42 +00:00
parent 66a85ef230
commit 9d3a868d0d
16 changed files with 28 additions and 57 deletions

View File

@ -179,8 +179,8 @@ HIDDEN const char* producer_name(TString& firm)
HIDDEN long backdrop_eh(WINDOW win, EVENT* ep)
{
XVT_DISPLAY_TYPE type = (XVT_DISPLAY_TYPE)xvt_vobj_get_attr(win, ATTR_DISPLAY_TYPE);
if (type == XVT_DISPLAY_DIRECT_COLOR) // True color (senza palette)
const XVT_DISPLAY_TYPE type = (XVT_DISPLAY_TYPE)xvt_vobj_get_attr(win, ATTR_DISPLAY_TYPE);
if (ADVANCED_GRAPHICS && type == XVT_DISPLAY_DIRECT_COLOR)
{
const int step = 6;
RCT r; xvt_vobj_get_client_rect(win, &r);

View File

@ -1,3 +1,4 @@
#include <stdio.h>
#include <automask.h>
bool TAutomask::error_box(const char* fmt, ...)

View File

@ -5,7 +5,9 @@
#ifdef WIN32
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef LINUX
#include <sys/ipc.h>
#include <sys/sem.h>
@ -14,7 +16,6 @@
#include <io.h>
#include <share.h>
#include <sys/locking.h>
#include "modaut.h"
#endif
#define CalcPos(Rec, Len, Base) (((Rec) - 1) * ((RecNoType) (Len)) + ((RecNoType) (Base)))

View File

@ -1,5 +1,6 @@
#define __CFILES_C /* fv */
#include <io.h>
#include <xvt.h>
#include "cfiles.h"

View File

@ -21,11 +21,6 @@
#ifdef CB6
#if XVT_OS == XVT_OS_WIN
#define S4DLL
#define S4WIN16
#endif
#if XVT_OS == XVT_OS_WIN32
#define S4DLL
#define S4WIN32
@ -1202,16 +1197,11 @@ int DB_memowrite( const int handle, const char * fieldname, const char * data )
#else // CB6
#if XVT_OS == XVT_OS_WIN
#if XVT_OS == XVT_OS_WIN32
#define S4DLL
#define S4WIN16
#define S4WIN32
#else
#if XVT_OS == XVT_OS_WIN32
#define S4DLL
#define S4WIN32
#else
#define S4UNIX
#endif
#define S4UNIX
#endif
#include <d4all.h>

View File

@ -302,8 +302,8 @@ void TSelect_color_mask::init(const char * mask_name, const char * para)
TSelect_color_mask::TSelect_color_mask(const TSheet_field & field)
: TVariable_mask("bagn007")
{
TMask & m = field.mask();
TString para("Colors");
const TMask& m = field.mask();
TString16 para("Colors");
const int num = field.sheet_mask().number() - 1;
if (num > 0)
para << num;

View File

@ -29,8 +29,10 @@ extern COLOR FOCUS_COLOR;
extern COLOR FOCUS_BACK_COLOR;
extern COLOR REQUIRED_BACK_COLOR;
extern bool CAMPI_SCAVATI;
extern bool AUTOSELECT;
extern bool CAMPI_SCAVATI;
extern bool ADVANCED_GRAPHICS;
extern bool AUTOSELECT;
extern bool SMALL_ICONS;
const COLOR COLOR_DKCYAN = MAKE_COLOR(0,128,128);
const COLOR COLOR_DKYELLOW = MAKE_COLOR(128,128, 0);

View File

@ -161,7 +161,7 @@ void TConfig::_write_file()
if (fexist(_file))
{
while (access(_file, 02) != 0)
while (xvt_fsys_access(_file, 02) != 0)
message_box("Il file %s e' gia' in uso", (const char*)_file);
}
fcopy(temp, _file); // Copia dalla tempdir al nuovo .ini

View File

@ -36,6 +36,7 @@ COLOR REQUIRED_BACK_COLOR = MAKE_COLOR(255,255,156);
bool CAMPI_SCAVATI = TRUE;
bool AUTOSELECT = FALSE;
bool ADVANCED_GRAPHICS = TRUE;
bool SMALL_ICONS=FALSE;
HIDDEN bool _button_blocked = FALSE;
@ -254,6 +255,7 @@ void customize_colors()
TOOL_BACK_COLOR = colors.get_color("ToolBack", NULL, -1, MASK_DARK_COLOR);
CAMPI_SCAVATI = colors.get_bool("Campi3D", NULL, -1, CAMPI_SCAVATI);
AUTOSELECT = colors.get_bool("AutoSelect", NULL, -1, AUTOSELECT);
ADVANCED_GRAPHICS = colors.get_bool("AdvancedGraphics", NULL, -1, ADVANCED_GRAPHICS);
SMALL_ICONS = colors.get_bool("SmallIcons", NULL, -1, SMALL_ICONS);
xi_set_pref(XI_PREF_COLOR_LIGHT, MASK_LIGHT_COLOR);

View File

@ -1,4 +1,5 @@
#include <fcntl.h>
#include <io.h>
#include <diction.h>
#include <share.h>

View File

@ -264,7 +264,7 @@ void TPrintwin::paint_row(long j)
else
{
set_font(printer().fontname(), XVT_FS_NONE, _char_size);
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
#if XVT_OS == XVT_OS_WIN32
// Questa e' la patch per TTY.DRV.
if (j > 0 && (j % _realformlen) == 0)
{

View File

@ -134,7 +134,7 @@ void TIndwin::update_bar()
RCT b = r;
const WINDOW w = win();
if (CAMPI_SCAVATI)
if (ADVANCED_GRAPHICS)
{
// Rettangolo scavato
xi_draw_3d_rect((XinWindow)w, (XinRect*)&r, TRUE, 2,

View File

@ -1095,7 +1095,7 @@ bool TFilename::ok() const
{
switch(_str[c])
{
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
#if XVT_OS == XVT_OS_WIN32
case ':':
if (c != 1 || !isalpha(_str[0])) return FALSE; // Nome disco errato
len = 0;
@ -1104,7 +1104,7 @@ bool TFilename::ok() const
#endif
case '/':
if (ext) return FALSE; // Slash dopo estensione
if (len > 8) return FALSE; // Nome troppo lungo
if (len > _MAX_FNAME) return FALSE; // Nome troppo lungo
if (!isalnum(_str[++c])) return FALSE;
len = 1;
break;
@ -1120,10 +1120,10 @@ bool TFilename::ok() const
}
}
if (ext && len > 3)
if (ext && len > _MAX_EXT)
return FALSE;
return len > 0 && len < 9;
return len > 0 && len <= _MAX_FNAME;
}
// Certified 70%

View File

@ -739,7 +739,7 @@ const TToken_string& empty_string();
__r = (__arr).pred(__r))
const char SLASH =
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
#if XVT_OS == XVT_OS_WIN32
'\\';
#else
'/';

View File

@ -74,7 +74,7 @@ bool fcopy(
bool fexist(
const char* file) // @parm Nome del file di cui contrallare l'esistenza
{
int err = access(file, 0x00);
int err = xvt_fsys_access(file, 0x00);
return err == 0;
}

View File

@ -101,11 +101,6 @@ public:
// @cmember Distruttore
~TWindow_manager();
// @cmember Libera lo spazio per aprire il file (vedi <p _lowhandle>)
void free_handle();
// @cmember Occupa lo spazio per aprire il file (vedi <p _lowhandle>)
void lock_handle();
// @cmember Registra la finestra <p m> corrente
void reg(TWindow* m);
// @cmember De-registra la finestra corrente
@ -125,13 +120,11 @@ public:
TWindow_manager::TWindow_manager() : _current(-1), _lowhandle(NULL)
{
lock_handle();
}
TWindow_manager::~TWindow_manager()
{
destroy();
free_handle();
}
void TWindow_manager::destroy()
@ -144,25 +137,6 @@ void TWindow_manager::destroy()
}
}
void TWindow_manager::lock_handle()
{
#if XVT_OS == XVT_OS_WIN
CHECK(_lowhandle == NULL, "Can't relock low handle");
_lowhandle = fopen("con", "r");
CHECK(_lowhandle != NULL, "Can't lock low handle");
#endif
}
void TWindow_manager::free_handle()
{
#if XVT_OS == XVT_OS_WIN
CHECK(_lowhandle, "Can't unlock low handle");
fclose(_lowhandle);
_lowhandle = NULL;
#endif
}
bool TWindow_manager::can_close() const
{
bool ok = TRUE;
@ -171,7 +145,6 @@ bool TWindow_manager::can_close() const
return ok;
}
// Dis/abilitazione del menu principale
HIDDEN void xvt_menu_enable(MENU_ITEM* m, bool on)
{
@ -458,7 +431,7 @@ KEY TWindow::run()
{
do_events();
#if XVT_OS == XVT_OS_WIN32
xvt_sys_sleep(10);
xvt_sys_sleep(50);
#endif
}