From 2cb717f8204183acd15925295a263ffa8a1555b4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 11 Dec 2010 16:55:05 +0000 Subject: [PATCH] 2010-12-11 17:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwin/gtwin.c + Attempt to enable HB_GTI_PALETTER support for MSVC 2005/2008 combined with Longhorn SDK. (also reverted prev change) Please retest in above environments, plus old MSVC and BCC 5.9. * config/hbc.cfg + More tweaks to make it Harbour-ready. --- harbour/ChangeLog | 10 ++++++++++ harbour/config/hbc.cfg | 16 ++++++++-------- harbour/src/rtl/gtwin/gtwin.c | 5 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6f0cc64b92..d19468f5c6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2010-12-11 17:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/gtwin/gtwin.c + + Attempt to enable HB_GTI_PALETTER support for MSVC 2005/2008 + combined with Longhorn SDK. (also reverted prev change) + Please retest in above environments, plus old MSVC and + BCC 5.9. + + * config/hbc.cfg + + More tweaks to make it Harbour-ready. + 2010-12-11 16:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwin/gtwin.c ! Disabled HB_GTI_PALETTE support for MSVC 2005/2008 diff --git a/harbour/config/hbc.cfg b/harbour/config/hbc.cfg index 69162d44ef..aa0924669d 100644 --- a/harbour/config/hbc.cfg +++ b/harbour/config/hbc.cfg @@ -51,13 +51,13 @@ mod_paren_on_return = remove # "return 1;" vs "return (1);" mod_full_brace_do = force # ignore/add/remove/force # Add or remove braces on single-line 'for' statement -mod_full_brace_for = remove # ignore/add/remove/force +mod_full_brace_for = ignore # ignore/add/remove/force # Add or remove braces on single-line function definitions. (Pawn) mod_full_brace_function = force # ignore/add/remove/force # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. -mod_full_brace_if = remove # ignore/add/remove/force +mod_full_brace_if = ignore # ignore/add/remove/force # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. @@ -67,7 +67,7 @@ mod_full_brace_if_chain = false # false/true mod_full_brace_nl = 0 # number # Add or remove braces on single-line 'while' statement -mod_full_brace_while = remove # ignore/add/remove/force +mod_full_brace_while = ignore # ignore/add/remove/force # Add or remove braces on single-line 'using ()' statement mod_full_brace_using = ignore # ignore/add/remove/force @@ -209,10 +209,10 @@ sp_between_ptr_star = remove # ignore/add/remove/force sp_after_ptr_star = add # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by a func proto/def. -sp_after_ptr_star_func = remove # ignore/add/remove/force +sp_after_ptr_star_func = add # ignore/add/remove/force # Add or remove space before a pointer star '*', if followed by a func proto/def. -sp_before_ptr_star_func = force # ignore/add/remove/force +sp_before_ptr_star_func = add # ignore/add/remove/force # Add or remove space before a reference sign '&' sp_before_byref = remove # ignore/add/remove/force @@ -365,10 +365,10 @@ sp_inside_braces_empty = remove # ignore/add/remove/force sp_type_func = ignore # ignore/add/remove/force # Add or remove space between function name and '(' on function declaration -sp_func_proto_paren = force # ignore/add/remove/force +sp_func_proto_paren = remove # ignore/add/remove/force # Add or remove space between function name and '(' on function definition -sp_func_def_paren = force # ignore/add/remove/force +sp_func_def_paren = remove # ignore/add/remove/force # Add or remove space inside empty function '()' sp_inside_fparens = remove # ignore/add/remove/force @@ -550,7 +550,7 @@ sp_endif_cmt = ignore # ignore/add/remove/force align_enum_equ_span = 4 # '=' in enum definition # align_nl_cont = TRUE -# align_var_def_span = 2 +align_var_def_span = 3 # align_var_def_inline = TRUE # align_var_def_star = FALSE # align_var_def_colon = TRUE diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 82b9067d19..99a5b58a55 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -107,11 +107,12 @@ # define HB_GTWIN_USE_SETCONSOLEMENUCLOSE /* Enable undocumented Windows API function call */ #endif -#if ( defined( NTDDI_VERSION ) && defined( NTDDI_VISTA ) && NTDDI_VERSION >= NTDDI_VISTA ) && ! defined( __POCC__ ) +#if ( defined( NTDDI_VERSION ) && ( ( defined( NTDDI_VISTA ) && NTDDI_VERSION >= NTDDI_VISTA ) || \ + ( defined( NTDDI_LONGHORN ) && NTDDI_VERSION >= NTDDI_LONGHORN ) ) ) && ! defined( __POCC__ ) # if !defined( HB_GTWIN_USE_PCONSOLEINFOEX ) # define HB_GTWIN_USE_PCONSOLEINFOEX # endif -#elif ! defined( _MSC_VER ) || ( _MSC_VER < 1400 ) +#else # if ! defined( __WATCOMC__ ) || ( __WATCOMC__ < 1280 ) typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX {