See ChangeLog entry 19991019-19:00 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-10-19 23:13:15 +00:00
parent fd18b30bcd
commit 22b9510a0b
7 changed files with 87 additions and 55 deletions

View File

@@ -1,3 +1,23 @@
19991019-19:00 EDT David G. Holm <dholm@jsd-llc.com>
* config/w32/bcc32.cf
! I finally found out what I did wrong with regards to using BCC32
with the GNU Make System. I had accidentally set it up for the
DOS GT API instead of for the Windows GT API!
+ include/wincheck.h
* source/rtl/dates.c
* source/rtl/dir.c
* source/rtl/environ.c
* source/rtl/inkey.c
! All source files that need to conditinally include the Windows API
now use the new include file "wincheck.h" in order to eliminate
inconsistent inclusion of "windows.h". If "windows.h" ends up being
included, then the new manifest constant HARBOUR_USE_WIN is defined.
* source/rtl/inkey.c
! Added Windows Console Mode translations for Alt+Tab and Shift+Tab.
19991019-11:55 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/tbrowse.prg
! Fixed the header/footer separator to be drawn until the border.

View File

@@ -23,7 +23,7 @@ endif
CC = bcc32
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I$(GRANDP) -I$(_HB_INC_COMPILE) -DHARBOUR_USE_DOS_GTAPI
CPPFLAGS = -I$(GRANDP) -I$(_HB_INC_COMPILE) -DHARBOUR_USE_WIN_GTAPI
CFLAGS = -O2
LD = bcc32

View File

@@ -0,0 +1,13 @@
/* The purpose for this Harbour include file is to determine if
windows.h should be included and to set set additional manifest
constants should this be the case. When used, this include file
must be the very first include file that is included! */
#if defined(_Windows) || defined(WINNT)
#define HARBOUR_USE_WIN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(__GNUC__)
#define HB_DONT_DEFINE_BASIC_TYPES
#endif
#endif

View File

@@ -65,13 +65,9 @@
*
*/
#if defined(_Windows) || defined(WINNT)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(__GNUC__) || defined(__MINGW32__)
#define HB_DONT_DEFINE_BASIC_TYPES
#endif
#endif
/* NOTE: The following #include "wincheck.h" must
be ahead of any other #include statements! */
#include "wincheck.h"
#include "extend.h"
#include "errorapi.h"

View File

@@ -107,13 +107,9 @@
#define INCL_DOSERRORS
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(__MINGW32__)
#define HB_DONT_DEFINE_BASIC_TYPES
#endif
#endif
/* NOTE: The following #include "wincheck.h" must
be ahead of any other #include statements! */
#include "wincheck.h"
#include <ctype.h>
#include "extend.h"

View File

@@ -55,18 +55,9 @@
#define INCL_DOSMISC
#endif
/* NOTE: The following #ifdef block #including <windows.h> must
be ahead of any and all #include statements! */
#if defined(_Windows) || defined(_WIN32) || defined(__MINGW32__)
#if !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(__MINGW32__)
#define HB_DONT_DEFINE_BASIC_TYPES
#endif
#endif
#endif
/* NOTE: The following #include "wincheck.h" must
be ahead of any other #include statements! */
#include "wincheck.h"
#if defined(__BORLANDC__) && defined(_Windows) && ! defined(VER_PLATFORM_WIN32_WINDOWS)
#define VER_PLATFORM_WIN32_WINDOWS 1
@@ -145,7 +136,7 @@ HARBOUR HB_OS( void )
/* TODO: add MSVC support but MSVC cannot detect any OS except Windows! */
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(_Windows) || defined(_WIN32) || defined(__MINGW32__)
#if defined(_Windows) || defined(WINNT)
/* NOTE: Support for determining the window version by Luiz Rafael Culik
Culik@sl.conex.net
@@ -299,9 +290,9 @@ char * hb_version( USHORT uiMode )
if( uiMode != 0 )
{
/* Optionally include the Compiler name and version, if available. */
char * compiler = ( char * ) NULL;
int version = 0;
int revision = 0;
char * compiler;
int version;
int revision;
#if defined(__IBMC__) || defined(__IBMCPP__)
@@ -322,24 +313,19 @@ char * hb_version( USHORT uiMode )
#elif defined(__BORLANDC__)
compiler = "Borland C++";
if( __BORLANDC__ == 1040 )
{
#if (__BORLANDC__ == 1040)
/* Version 3.1 */
version = 3;
revision = 1;
}
else if( __BORLANDC__ >= 1280 )
{
#elif (__BORLANDC__ >= 1280)
/* Version 5.x */
version = __BORLANDC__ >> 8;
revision = ( __BORLANDC__ & 0xff ) >> 4;
}
else
{
#else
/* Version 4.x */
version = __BORLANDC__ >> 8;
revision = ( __BORLANDC__ - 1 & 0xff) >> 4;
}
#endif
#elif defined(__TURBOC__)
@@ -396,6 +382,12 @@ char * hb_version( USHORT uiMode )
version = __GNUC__;
revision = __GNUC_MINOR__;
#else
compiler = ( char * ) NULL;
version = 0;
revision = 0;
#endif
if( compiler )

View File

@@ -82,17 +82,16 @@
#define INCL_NOPMAPI
#endif
#if defined(_Windows) || defined(WINNT)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
/* NOTE: The following #include "wincheck.h" must
be ahead of any other #include statements! */
#include "wincheck.h"
#ifdef HARBOUR_USE_WIN
#define INPUT_BUFFER_LEN 128
extern HANDLE hb_gtHInput; /* This variable is located in source/rtl/gt/gtwin.c */
DWORD cNumRead = 0; /* Ok to use DWORD here, because this is specific... */
DWORD cNumIndex = 0; /* ...to the Windows API, which defines DWORD, etc. */
INPUT_RECORD irInBuf[INPUT_BUFFER_LEN];
#if defined(__GNUC__)
#define HB_DONT_DEFINE_BASIC_TYPES
#endif
#endif
#include "extend.h"
@@ -272,7 +271,7 @@ int hb_inkeyLast( void ) /* Return the value of the last key that was extra
int hb_inkeyNext( void ) /* Return the next key without extracting it */
{
int key = 0;
int key;
hb_inkeyPoll();
if( hb_set.HB_SET_TYPEAHEAD )
{
@@ -321,7 +320,7 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour
/* Save the keyboard state and ASCII key code */
DWORD dwState = irInBuf[cNumIndex].Event.KeyEvent.dwControlKeyState;
ch = irInBuf[cNumIndex].Event.KeyEvent.uChar.AsciiChar;
if( ch == 0 || ( dwState & ( ENHANCED_KEY | LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED | RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED ) ) )
if( ch == 0 || ( dwState & ( ENHANCED_KEY | LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED | RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED | SHIFT_PRESSED ) ) )
{
/* Process non-ASCII key codes */
WORD wKey;
@@ -373,6 +372,7 @@ printf("\nhb_inkeyPoll: wKey is %d, dwState is %d, ch is %d", wKey, dwState, ch)
{
/* Alt key held */
if( wKey == 1 ) ch = K_ALT_ESC; /* Esc */
else if( wKey == 15 ) ch = K_ALT_TAB; /* Tab */
else if( wKey <= 12 ) ch = wKey + 374; /* Numeric row */
else if( wKey == 28 ) ch = KP_ALT_ENTER; /* Num Pad Enter */
else if( wKey <= 52 ) ch = wKey + 256; /* Alpha rows */
@@ -480,14 +480,26 @@ printf("\nhb_inkeyPoll: wKey is %d, dwState is %d, ch is %d", wKey, dwState, ch)
else if( bShift )
{
/* Shift key held */
if( wKey == 1 ) ch = K_ESC; /* Esc */
else if( wKey == 28 ) ch = K_ENTER; /* Num Pad Enter */
else if( wKey == 53 && bEnhanced ) ch = '/'; /* Num Pad / */
if( wKey == 53 && bEnhanced ) ch = '/'; /* Num Pad / */
else if( wKey >= 59 && wKey <= 68 ) ch = 49 - wKey; /* F1 - F10 */
else if( wKey == 76 ) ch = '5'; /* Num Pad 5 */
else if( wKey == 87 || wKey == 88 ) ch = 45 - wKey; /* F11, F12 */
else switch( wKey )
{
case 1: /* Esc */
ch = K_ESC;
break;
case 15: /* Tab */
ch = K_SH_TAB;
break;
case 28: /* Num Pad Enter */
ch = K_ENTER;
break;
case 76: /* Num Pad 5 */
ch = '5';
break;
case 87: /* F11 */
case 88: /* F12 */
ch = 45 - wKey;
break;
case 82: /* Ins */
ch = K_INS;
break;
@@ -518,8 +530,11 @@ printf("\nhb_inkeyPoll: wKey is %d, dwState is %d, ch is %d", wKey, dwState, ch)
case 75: /* Left */
ch = K_LEFT;
break;
default:
ch = wKey + 128;
default: /* Any thing not explicitly translated */
if( ch == 0 )
/* Only provide a translation for those key
codes that don't have a default one. */
ch = wKey + 128;
}
}
else