20000313-12:40 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-03-13 11:42:13 +00:00
parent 6a141ea898
commit ecebc826a1
10 changed files with 77 additions and 72 deletions

View File

@@ -1,3 +1,21 @@
20000313-12:40 GMT+1 Victor Szakats <info@szelvesz.hu>
* source/rtl/inkey.c
! Fixed to work with STD_GTAPI on Win32.
* bin/bld_tpl.*
+ user32.lib added for MSVC
* source/rtl/oldbox.c
- Removed non-GT branches.
! __BOX() fixed handling of the fifth parameter.
* source/rtl/console.c
* OS_DOS_COMPATIBLE -> OS_UNIX_COMPATIBLE
* source/rtl/achoice.prg
source/rtl/text.prg
source/rtl/tgetlist.prg
% Removed #include "set.ch", since it's included anyway with the
built-in (default) PP rules.
* makefile.bc
+ NOTE added about "echo."
20000313-12:42 GMT+3 Alexander Kresin
* contrib/rdd_ads/ads1.c
* Little bug fixed in adsAppend()
@@ -43,12 +61,12 @@
So it's possible to link for the Win32 platform a non-GT mode Harbour.
!!WARNING!! Since this change involves many platform/compiler
combinations, please test it on yours and report any possible errors.
WIN32/MINGW32, WIN32/GCC, WIN32/BCC32/55, DOS/BCC16/31, WIN32/MSVC has
WIN32/MINGW32, WIN32/GCC, WIN32/BCC32/55, DOS/BCC16/31, WIN32/MSVC have
been tested.
* source/rtl/inkey.c
source/rtl/environ.c
! Fixed to use WINNT macro after the #include section.
! Code dependent of the GT API fixed.
! Code dependent on the GT API fixed.
* include/hbcomp.h
source/compiler/cmdcheck.c
source/compiler/hbusage.c
@@ -62,7 +80,7 @@
source/macro/macro.c
source/macro/macro.l
* bName10 structure member replaced with uiNameLen in HB_MACRO. Now
the HB_SYMBOL_NAME_LEN is the one and only setting which control the
the HB_SYMBOL_NAME_LEN is the one and only setting which controls the
maximum symbol name length in Harbour.
* include/hbsetup.h
- Removed some duplicated platform detection code.

View File

@@ -90,7 +90,7 @@ rem set HB_COMPILER=
if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib
if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon
if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon
if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib
if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib
if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning
goto END

View File

@@ -90,7 +90,7 @@ rem set HB_COMPILER=
if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib
if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon
if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon
if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib
if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib
if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning
goto END

View File

@@ -4,6 +4,9 @@
# makefile for Borland C/C++ compilers
# NOTE: "echo." intentionally used instead of "echo", to avoid conflicts
# with external commands named echo.
# Merge duplicate strings
BCC_OPT = $(BCC_OPT) -d

View File

@@ -15,7 +15,6 @@
#include "color.ch"
#include "common.ch"
#include "inkey.ch"
#include "set.ch"
#include "setcurs.ch"
#define INRANGE( xLo, xVal, xHi ) ( xVal >= xLo .AND. xVal <= xHi )
@@ -49,14 +48,14 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo
lUserFunc := !Empty( xUserFunc ) .AND. ValType( xUserFunc ) $ "CB"
DEFAULT nTop TO 0 // The topmost row of the window
DEFAULT nLeft TO 0 // The leftmost column of the window
DEFAULT nBottom TO MaxRow() + 1 // The bottommost row of the window
DEFAULT nRight TO MaxCol() + 1 // The rightmost column of the window
DEFAULT acItems TO {} // The items from which to choose
DEFAULT xSelect TO .T. // Array or logical, what is selectable
DEFAULT nPos TO 1 // The number of the selected item
DEFAULT nTop TO 0 // The topmost row of the window
DEFAULT nLeft TO 0 // The leftmost column of the window
DEFAULT nBottom TO MaxRow() + 1 // The bottommost row of the window
DEFAULT nRight TO MaxCol() + 1 // The rightmost column of the window
DEFAULT acItems TO {} // The items from which to choose
DEFAULT xSelect TO .T. // Array or logical, what is selectable
DEFAULT nPos TO 1 // The number of the selected item
DEFAULT nHiLiteRow TO 0 // The row to be highlighted
nNumCols := nRight - nLeft + 1

View File

@@ -109,13 +109,13 @@ void hb_consoleInitialize( void )
HB_TRACE(HB_TR_DEBUG, ("hb_consoleInitialize()"));
#if defined(OS_DOS_COMPATIBLE)
#if defined(OS_UNIX_COMPATIBLE)
s_szCrLf[ 0 ] = HB_CHAR_LF;
s_szCrLf[ 1 ] = '\0';
#else
s_szCrLf[ 0 ] = HB_CHAR_CR;
s_szCrLf[ 1 ] = HB_CHAR_LF;
s_szCrLf[ 2 ] = '\0';
#else
s_szCrLf[ 0 ] = HB_CHAR_LF;
s_szCrLf[ 1 ] = '\0';
#endif
s_szAcceptResult[ 0 ] = '\0';
@@ -685,9 +685,9 @@ HARBOUR HB_COL( void ) /* Return the current screen column position (zero origin
HARBOUR HB_DISPBOX( void )
{
#ifdef HARBOUR_USE_GTAPI
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
{
#ifdef HARBOUR_USE_GTAPI
char szOldColor[ CLR_STRLEN ];
if( ISCHAR( 6 ) )
@@ -705,10 +705,7 @@ HARBOUR HB_DISPBOX( void )
if( ISCHAR( 6 ) )
hb_gtSetColorStr( szOldColor );
}
#else
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
{
char * szBorderStyle = _B_SINGLE;
int i_top = hb_parni( 1 );
int i_left = hb_parni( 2 );
@@ -819,8 +816,8 @@ HARBOUR HB_DISPBOX( void )
}
fflush( stdout );
hb_gtSetPos( bottom + 1, right + 1 );
}
#endif
}
}
HARBOUR HB_DISPBEGIN( void )
@@ -852,13 +849,11 @@ HARBOUR HB_NOSNOW( void )
HARBOUR HB_HB_SHADOW( void )
{
if( hb_pcount() >= 4 )
{
hb_gtDrawShadow( hb_parni( 1 ),
hb_parni( 2 ),
hb_parni( 3 ),
hb_parni( 4 ),
ISNUM( 5 ) ? hb_parni( 5 ) : 7 );
}
}
HARBOUR HB_DBGSHADOW( void )
@@ -887,13 +882,11 @@ HARBOUR HB_SAVESCREEN( void )
HARBOUR HB_RESTSCREEN( void )
{
if( ISCHAR( 5 ) )
{
hb_gtRest( ISNUM( 1 ) ? hb_parni( 1 ) : 0,
ISNUM( 2 ) ? hb_parni( 2 ) : 0,
ISNUM( 3 ) ? hb_parni( 3 ) : hb_gtMaxRow(),
ISNUM( 4 ) ? hb_parni( 4 ) : hb_gtMaxCol(),
( void * ) hb_parc( 5 ) );
}
}
USHORT hb_setCursor( BOOL bSetCursor, USHORT usNewCursor )

View File

@@ -98,17 +98,17 @@
#include "inkey.ch"
#include "hbinit.h"
#if defined(_WINDOWS_) || defined(WINNT)
#if ! defined(HARBOUR_USE_CRS_GTAPI) && ! defined(HARBOUR_USE_SLN_GTAPI)
#define INPUT_BUFFER_LEN 128
extern BOOL hb_gtBreak; /* This variable is located in source/rtl/gt/gtwin.c */
extern HANDLE hb_gtHInput; /* This variable is located in source/rtl/gt/gtwin.c */
static DWORD s_cNumRead = 0; /* Ok to use DWORD here, because this is specific... */
static DWORD s_cNumIndex = 0; /* ...to the Windows API, which defines DWORD, etc. */
static INPUT_RECORD s_irInBuf[ INPUT_BUFFER_LEN ];
extern int hb_mouse_iCol;
extern int hb_mouse_iRow;
#endif
#if (defined(_WINDOWS_) || defined(WINNT)) && defined(HARBOUR_USE_WIN_GTAPI)
extern int hb_mouse_iCol;
extern int hb_mouse_iRow;
extern BOOL hb_gtBreak; /* This variable is located in source/rtl/gt/gtwin.c */
extern HANDLE hb_gtHInput; /* This variable is located in source/rtl/gt/gtwin.c */
#define INPUT_BUFFER_LEN 128
static DWORD s_cNumRead = 0; /* Ok to use DWORD here, because this is specific... */
static DWORD s_cNumIndex = 0; /* ...to the Windows API, which defines DWORD, etc. */
static INPUT_RECORD s_irInBuf[ INPUT_BUFFER_LEN ];
#endif
#define HB_BREAK_FLAG 256 /* 256, because that's what DJGPP returns Ctrl+Break as.
@@ -169,17 +169,17 @@ static void restore_input_mode( void )
}
HB_CALL_ON_STARTUP_BEGIN( init_input_mode )
struct termios ta;
tcgetattr( STDIN_FILENO, &startup_attributes );
atexit( restore_input_mode );
tcgetattr( STDIN_FILENO, &ta );
ta.c_lflag &= ~( ICANON | ECHO );
ta.c_iflag &= ~ICRNL;
ta.c_cc[ VMIN ] = 0;
ta.c_cc[ VTIME ] = 0;
tcsetattr( STDIN_FILENO, TCSAFLUSH, &ta );
struct termios ta;
tcgetattr( STDIN_FILENO, &startup_attributes );
atexit( restore_input_mode );
tcgetattr( STDIN_FILENO, &ta );
ta.c_lflag &= ~( ICANON | ECHO );
ta.c_iflag &= ~ICRNL;
ta.c_cc[ VMIN ] = 0;
ta.c_cc[ VTIME ] = 0;
tcsetattr( STDIN_FILENO, TCSAFLUSH, &ta );
HB_CALL_ON_STARTUP_END( init_input_mode )
#elif defined(HARBOUR_USE_DOS_GTAPI) && ! defined(__DJGPP__)
@@ -294,6 +294,7 @@ int hb_inkeyLast( void ) /* Return the value of the last key that was extra
HB_TRACE(HB_TR_DEBUG, ("hb_inkeyLast()"));
hb_inkeyPoll();
return s_inkeyLast;
}
@@ -304,13 +305,18 @@ int hb_inkeyNext( void ) /* Return the next key without extracting it */
HB_TRACE(HB_TR_DEBUG, ("hb_inkeyNext()"));
hb_inkeyPoll();
if( hb_set.HB_SET_TYPEAHEAD )
{
/* Proper typeahead support is enabled */
if( s_inkeyHead == s_inkeyTail ) key = 0; /* No key */
else key = s_inkeyBuffer[ s_inkeyTail ]; /* Next key */
if( s_inkeyHead == s_inkeyTail )
key = 0; /* No key */
else
key = s_inkeyBuffer[ s_inkeyTail ]; /* Next key */
}
else key = s_inkeyForce; /* Typeahead support is disabled */
else
key = s_inkeyForce; /* Typeahead support is disabled */
return key;
}
@@ -327,7 +333,7 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour
#elif defined(OS_UNIX_COMPATIBLE)
if( ! read( STDIN_FILENO, &ch, 1 ) )
ch = 0;
#elif defined(_WINDOWS_) || defined(WINNT)
#elif (defined(_WINDOWS_) || defined(WINNT)) && defined(HARBOUR_USE_WIN_GTAPI)
/* First check for Ctrl+Break, which is handled by gt/gtwin.c */
if( hb_gtBreak )
{

View File

@@ -37,30 +37,19 @@
HARBOUR HB___BOX( void )
{
#ifdef HARBOUR_USE_GTAPI
char * frame = hb_parc( 5 );
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) && ISCHAR( 5 ) )
hb_gtBox( hb_parni( 1 ), hb_parni( 2 ),
hb_parni( 3 ), hb_parni( 4 ),
( BYTE * ) ( frame ? frame : " " ) );
#endif
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
hb_gtBox( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ),
( BYTE * ) ( ISCHAR( 5 ) ? hb_parc( 5 ) : " " ) );
}
HARBOUR HB___BOXD( void )
{
#ifdef HARBOUR_USE_GTAPI
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
hb_gtBoxD( hb_parni( 1 ), hb_parni( 2 ),
hb_parni( 3 ), hb_parni( 4 ) );
#endif
hb_gtBoxD( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) );
}
HARBOUR HB___BOXS( void )
{
#ifdef HARBOUR_USE_GTAPI
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
hb_gtBoxS( hb_parni( 1 ), hb_parni( 2 ),
hb_parni( 3 ), hb_parni( 4 ) );
#endif
hb_gtBoxS( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) );
}

View File

@@ -33,8 +33,6 @@
*
*/
#include "set.ch"
STATIC s_cFile
STATIC s_lOldPrinter
STATIC s_lOldExtra

View File

@@ -37,7 +37,6 @@
#include "common.ch"
#include "getexit.ch"
#include "inkey.ch"
#include "set.ch"
#include "setcurs.ch"
#define SCORE_ROW 0