From f318b43a1eea8b00920fc5346289829669eb4c12 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 7 Jan 2009 15:47:19 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Migliorato calcolo memoria disponibile anche oltre i 2 GB git-svn-id: svn://10.65.10.50/trunk@17991 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvaga.cpp | 27 +++++++++++---------------- xvaga/xvt.h | 28 ++++++++++++++-------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 729fadbb4..14d66174a 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -3688,11 +3688,10 @@ long xvt_sys_close_siblings(WINDOW win) BOOLEAN xvt_sys_goto_url(const char* url, const char* action) { #ifdef WIN32 - return OsWin32_GotoUrl(url, action); -#else - SORRY_BOX(); // TBI - return FALSE; + if (action != NULL && xvt_str_compare_ignoring_case(action, "open") != 0) + return OsWin32_GotoUrl(url, action); #endif + return wxLaunchDefaultBrowser(url); } BOOLEAN xvt_sys_dongle_server_is_running() @@ -3854,20 +3853,14 @@ int xvt_sys_get_session_id() unsigned long xvt_sys_get_free_memory() { - unsigned long mem = 0; - - if (::wxGetFreeMemory().GetHi()) - mem = (unsigned long)-1; - else - mem = ::wxGetFreeMemory().GetLo(); - - return mem; + const wxMemorySize sz = ::wxGetFreeMemory(); + return sz.GetHi() ? -1 : sz.GetLo(); } unsigned long xvt_sys_get_free_memory_kb() { - unsigned long mem = xvt_sys_get_free_memory(); - return mem / 1024; // Arrotondo per difetto + const wxMemorySize sz = ::wxGetFreeMemory() / 1024; // Arrotondo per difetto + return sz.GetHi() ? -1 : sz.GetLo(); } int xvt_sys_get_os_version() @@ -3896,8 +3889,10 @@ int xvt_sys_get_os_version() int xvt_sys_get_version(char* os_version, char* ptk_version, int maxsize) { - wxStrncpy(os_version, wxGetOsDescription(), maxsize); - wxStrncpy(ptk_version, wxVERSION_STRING, maxsize); + if (os_version) + wxStrncpy(os_version, wxGetOsDescription(), maxsize); + if (ptk_version) + wxStrncpy(ptk_version, wxVERSION_STRING, maxsize); return xvt_sys_get_os_version(); } diff --git a/xvaga/xvt.h b/xvaga/xvt.h index 525781f63..eaf41e944 100755 --- a/xvaga/xvt.h +++ b/xvaga/xvt.h @@ -224,15 +224,15 @@ XVTDLL DATA_PTR xvt_mem_realloc(DATA_PTR p, size_t size); XVTDLL DATA_PTR xvt_mem_rep(DATA_PTR dst, DATA_PTR src, unsigned int srclen, long reps); XVTDLL DATA_PTR xvt_mem_zalloc(size_t size); -XVTDLL MENU_ITEM* xvt_menu_get_tree(WINDOW win); -XVTDLL BOOLEAN xvt_menu_popup(MENU_ITEM *menu_p, WINDOW win, PNT pos, XVT_POPUP_ALIGNMENT alignment, MENU_TAG item); -XVTDLL void xvt_menu_set_font_sel(WINDOW win, XVT_FNTID font_id); -XVTDLL void xvt_menu_set_item_checked(WINDOW win, MENU_TAG tag, BOOLEAN check); -XVTDLL void xvt_menu_set_item_enabled(WINDOW win, MENU_TAG tag, BOOLEAN enable); -XVTDLL void xvt_menu_set_item_title(WINDOW win, MENU_TAG tag, const char* text); -XVTDLL void xvt_menu_set_tree(WINDOW win, MENU_ITEM* tree); -XVTDLL void xvt_menu_update(WINDOW win); -XVTDLL MENU_ITEM* xvt_menu_duplicate_tree(const MENU_ITEM* m); +XVTDLL MENU_ITEM* xvt_menu_get_tree(WINDOW win); +XVTDLL BOOLEAN xvt_menu_popup(MENU_ITEM *menu_p, WINDOW win, PNT pos, XVT_POPUP_ALIGNMENT alignment, MENU_TAG item); +XVTDLL void xvt_menu_set_font_sel(WINDOW win, XVT_FNTID font_id); +XVTDLL void xvt_menu_set_item_checked(WINDOW win, MENU_TAG tag, BOOLEAN check); +XVTDLL void xvt_menu_set_item_enabled(WINDOW win, MENU_TAG tag, BOOLEAN enable); +XVTDLL void xvt_menu_set_item_title(WINDOW win, MENU_TAG tag, const char* text); +XVTDLL void xvt_menu_set_tree(WINDOW win, MENU_ITEM* tree); +XVTDLL void xvt_menu_update(WINDOW win); +XVTDLL MENU_ITEM* xvt_menu_duplicate_tree(const MENU_ITEM* m); XVTDLL short xvt_notebk_add_page(WINDOW notebk, WINDOW page, const char* title, XVT_IMAGE img, short page_no); XVTDLL WINDOW xvt_notebk_get_page(WINDOW notebk, short page_no); @@ -444,17 +444,17 @@ XVTDLL int xvt_pane_manager_save_perspective(WINDOW win, char* str, int max_ XVTDLL BOOLEAN xvt_pane_set_size_range(WINDOW pane, int min_size, int best_size, int max_size); XVTDLL BOOLEAN xvt_pane_set_title(WINDOW pane, const char* title); -typedef int ODBC_CALLBACK(void*,int,char**, char**); +typedef int ODBC_CALLBACK(void*, int, char**, char**); XVTDLL XVT_ODBC xvt_odbc_get_connection(const char* dsn, const char* usr, const char* pwd, const char* dir); -XVTDLL BOOLEAN xvt_odbc_free_connection(XVT_ODBC handle); -XVTDLL ULONG xvt_odbc_execute(XVT_ODBC handle, const char* sql, ODBC_CALLBACK cb, void* jolly); -XVTDLL BOOLEAN xvt_odbc_driver(XVT_ODBC handle, char* str, int max_size); +XVTDLL BOOLEAN xvt_odbc_free_connection(XVT_ODBC handle); +XVTDLL ULONG xvt_odbc_execute(XVT_ODBC handle, const char* sql, ODBC_CALLBACK cb, void* jolly); +XVTDLL BOOLEAN xvt_odbc_driver(XVT_ODBC handle, char* str, int max_size); XVTDLL BOOLEAN xvt_mail_send(const char* to, const char* cc, const char* ccn, const char* subject, const char* msg, const char* attach, BOOLEAN ui); XVTDLL void xvt_btn_set_images(WINDOW win, XVT_IMAGE up, XVT_IMAGE down); -XVTDLL int xvt_net_get_status(); +XVTDLL int xvt_net_get_status(); #ifdef __cplusplus }