See ChangeLog entry 2000-03-20 21:55 GMT-5 David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
2000-03-21 02:58:07 +00:00
parent cadd7af4b3
commit 16f3dffc5a
6 changed files with 62 additions and 31 deletions

View File

@@ -1,3 +1,19 @@
2000-03-20 21:55 GMT-5 David G. Holm <dholm@jsd-llc.com>
* config/os2/icc.cf
* config/w32/bcc32.cf
+ Added HB_GT_LIB support
* source/rtl/gtdos/gtdos.c
* source/rtl/gtos2/gtos2.c
* source/rtl/gtwin/gtwin.c
+ Added Copyright notice for hb_gt_ReadKey()
+ Added missing conditionals and includes to gtos2.c for ICC
+ Added hb_gt_Version() to gtos2.c
- Removed GCC conditionals and includes from gtos2.c, because
gtos2.c doesn't support GCC for screen output, so there is
little point in including keyboard input or sound suport.
20000321-02:00 GMT+1 Victor Szakats <info@szelvesz.hu>
+ source/vm/runner.c

View File

@@ -37,6 +37,19 @@ LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(lib)$(LIB_EXT))
endif
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(TOP)$(ROOT)source/rtl/$(HB_GT_LIB)/$(ARCH)/$(HB_GT_LIB)$(LIB_EXT)
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
AR = ilib
ARFLAGS = /NOE /NOIgnoreCase
AROBJS = $(foreach file, $^, -+$(file))

View File

@@ -48,6 +48,19 @@ LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(TOP)$(ROOT)source/rtl/$(HB_GT_LIB)/$(ARCH)/$(HB_GT_LIB)$(LIB_EXT)
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
LDFLAGS = $(LINKPATHS)
AR = tlib

View File

@@ -41,6 +41,9 @@
* hb_gt_CtrlBrkHandler()
* hb_gt_CtrlBrkRestore()
*
* Copyright 1999 David G. Holm <dholm@jsd-llc.com>
* hb_gt_ReadKey()
*
* See doc/license.txt for licensing terms.
*
*/

View File

@@ -37,6 +37,9 @@
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 David G. Holm <dholm@jsd-llc.com>
* hb_gt_ReadKey()
*
* Copyright 1999 Chen Kedem <niki@actcom.co.il>
* hb_gt_Tone()
*
@@ -52,18 +55,16 @@
/* NOTE: User programs should never call this layer directly! */
#define INCL_VIO
#define INCL_DOSPROCESS
#define INCL_NOPMAPI
#include <string.h>
#include <os2.h>
#include <bsedos.h>
#include <conio.h>
#include "hbapigt.h"
#if defined(HARBOUR_GCC_OS2)
ULONG DosBeep( ULONG ulFrequency, ULONG ulDuration );
#else
#include <dos.h>
#endif
#include "inkey.ch"
static char hb_gt_GetCellSize( void );
static void hb_gt_SetCursorSize( char start, char end, int visible );
@@ -106,20 +107,6 @@ int hb_gt_ReadKey( HB_inkey_enum eventmask )
HB_TRACE(HB_TR_DEBUG, ("hb_gt_ReadKey(%d)", (int) event_mask));
#if defined(HARBOUR_GCC_OS2)
/* Read from the keyboard with no echo, no wait, and no SIGSEV on Ctrl-C */
ch = _read_kbd( 0, 0, 0 );
if( ch == 0 )
{
/* It's a function key lead-in, so read the function key scan code */
ch = _read_kbd( 0, 0, 0 );
if( ch != -1 ) ch += 256; /* If it's really a scan code, offset it */
}
/* _read_kbd() returns -1 for no key, the switch statement will handle
this. */
#else
if( kbhit() )
{
/* A key code is available in the BIOS keyboard buffer, so read it */
@@ -136,13 +123,12 @@ int hb_gt_ReadKey( HB_inkey_enum eventmask )
the actual function key and then offset it by 256,
unless extended keyboard events are allowed, in which
case offset it by 512 */
if( s_eventmask & INKEY_EXTENDED ) ch = getch() + 512;
if( eventmask & INKEY_EXTENDED ) ch = getch() + 512;
else ch = getch() + 256;
}
}
else
ch = 0;
#endif
/* Perform key translations */
switch( ch )
@@ -603,11 +589,7 @@ void hb_gt_Tone( double dFrequency, double dDuration )
while( dDuration > 0.0 )
{
#if defined(HB_TONE_OS2_GCC)
ULONG temp = ( ULONG ) HB_MIN_( HB_MAX_( 0, dDuration ), ULONG_MAX );
#else
USHORT temp = ( USHORT ) HB_MIN_( HB_MAX_( 0, dDuration ), USHRT_MAX );
#endif
dDuration -= temp;
if( temp <= 0 )
@@ -618,11 +600,7 @@ void hb_gt_Tone( double dFrequency, double dDuration )
}
else
{
#if defined(HB_TONE_OS2_GCC)
DosBeep( ( ULONG ) dFrequency, temp );
#else
DosBeep( ( USHORT ) dFrequency, temp );
#endif
}
}
}

View File

@@ -43,6 +43,9 @@
* Copyright 1999 David G. Holm <dholm@jsd-llc.com>
* hb_gt_Tone()
*
* Copyright 1999 David G. Holm <dholm@jsd-llc.com>
* hb_gt_ReadKey()
*
* See doc/license.txt for licensing terms.
*
*/
@@ -280,7 +283,12 @@ int hb_gt_ReadKey( HB_inkey_enum eventmask )
/* Save the keyboard state and ASCII key code */
DWORD dwState = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.dwControlKeyState;
ch = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.uChar.AsciiChar;
if( ch < 0 )
if( ch == 224 )
{
/* Strip extended key lead-in codes */
ch = 0;
}
else if( ch < 0 )
{
/* Process international key codes */
ch += 256;