2006-12-13 18:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/console.c
* pacify false CG error messages - Chen Kedem modifications (sizeof(int)
in #if replaced by hardcoded 4 for compilers which does not allow to
use sizeof() in #if directives)
* harbour/TODO
- removed console.c cleanup note from TOFIX
* harbour/include/hbcomp.h
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/source/common/expropt1.c
* minor code cleanup
This commit is contained in:
@@ -8,6 +8,21 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2006-12-13 18:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/console.c
|
||||
* pacify false CG error messages - Chen Kedem modifications (sizeof(int)
|
||||
in #if replaced by hardcoded 4 for compilers which does not allow to
|
||||
use sizeof() in #if directives)
|
||||
|
||||
* harbour/TODO
|
||||
- removed console.c cleanup note from TOFIX
|
||||
|
||||
* harbour/include/hbcomp.h
|
||||
* harbour/include/hbexprb.c
|
||||
* harbour/include/hbexprc.c
|
||||
* harbour/source/common/expropt1.c
|
||||
* minor code cleanup
|
||||
|
||||
2006-12-12 14:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbstack.h
|
||||
! fixed typo in function name, should be: hb_stackLocalVariable()
|
||||
|
||||
19
harbour/TODO
19
harbour/TODO
@@ -190,23 +190,4 @@ Status...: Open.
|
||||
|
||||
***
|
||||
|
||||
Assign to: <nobody>
|
||||
Detail...: The Borland CodeGuard warn about Access overrun in some
|
||||
of the console IO functions, it appears to be a fault in
|
||||
the way CG works when passing a static char * to a BYTE *
|
||||
function. Once the console IO functions would be optimozed,
|
||||
please take a look at this too.
|
||||
|
||||
--tt21.prg--
|
||||
proc main()
|
||||
SET PRINTER TO devtest
|
||||
SET DEVICE TO PRINTER
|
||||
DepPos( 1, 1 )
|
||||
return
|
||||
------------
|
||||
|
||||
Status...: Open.
|
||||
|
||||
***
|
||||
|
||||
=======================================================================
|
||||
|
||||
@@ -361,6 +361,10 @@ extern FILE *hb_comp_errFile;
|
||||
|
||||
#define HB_COMP_ISSUPPORTED(flag) ( HB_COMP_PARAM->supported & (flag) )
|
||||
|
||||
#define HB_SUPPORT_XBASE ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_XBASE) )
|
||||
#define HB_SUPPORT_HARBOUR ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_HARBOUR) )
|
||||
#define HB_SUPPORT_ARRSTR ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_ARRSTR) )
|
||||
|
||||
#if defined( HB_MACRO_SUPPORT )
|
||||
# define HB_MACRO_GENFLAGS HB_COMPFLAG_RT_MACRO
|
||||
#else
|
||||
|
||||
@@ -70,16 +70,6 @@
|
||||
/* Forward declarations
|
||||
*/
|
||||
|
||||
#if defined( HB_MACRO_SUPPORT )
|
||||
#define HB_SUPPORT_XBASE ( HB_COMP_ISSUPPORTED(HB_SM_XBASE) )
|
||||
#define HB_SUPPORT_HARBOUR ( HB_COMP_ISSUPPORTED(HB_SM_HARBOUR) )
|
||||
#define HB_SUPPORT_ARRSTR ( HB_COMP_ISSUPPORTED(HB_SM_ARRSTR) )
|
||||
#else
|
||||
#define HB_SUPPORT_XBASE ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_XBASE) )
|
||||
#define HB_SUPPORT_HARBOUR ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_HARBOUR) )
|
||||
#define HB_SUPPORT_ARRSTR ( HB_COMP_ISSUPPORTED(HB_COMPFLAG_ARRSTR) )
|
||||
#endif
|
||||
|
||||
/* forward declaration of callback functions
|
||||
*/
|
||||
static HB_EXPR_FUNC( hb_compExprUseDummy );
|
||||
@@ -884,7 +874,7 @@ static HB_EXPR_FUNC( hb_compExprUseRef )
|
||||
memcmp( szAlias, "MEMVAR", iLen ) == 0 &&
|
||||
pExp->value.asAlias.pVar->ExprType == HB_ET_VARIABLE )
|
||||
{ /* @M-> @MEMVAR-> or @MEMVA-> or @MEMV-> */
|
||||
#if !defined(HB_MACRO_SUPPORT)
|
||||
#if !defined(HB_MACRO_SUPPORT)
|
||||
HB_EXPR_PCODE2( hb_compGenVarPCode, HB_P_PUSHMEMVARREF, pExp->value.asAlias.pVar->value.asSymbol );
|
||||
#else
|
||||
HB_EXPR_PCODE2( hb_compMemvarGenPCode, HB_P_MPUSHMEMVARREF, pExp->value.asAlias.pVar->value.asSymbol );
|
||||
@@ -1559,9 +1549,9 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
hb_compFunCallCheck( HB_COMP_PARAM, pName->value.asSymbol, usCount );
|
||||
#endif
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
hb_compFunCallCheck( HB_COMP_PARAM, pName->value.asSymbol, usCount );
|
||||
#endif
|
||||
|
||||
if( ( strcmp( "AT", pName->value.asSymbol ) == 0 ) && usCount == 2 )
|
||||
{
|
||||
|
||||
@@ -281,7 +281,7 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
HB_EXPR_PCODE1( hb_compGenPCode1, bOpEq );
|
||||
return;
|
||||
}
|
||||
else if( pSelf->value.asOperator.pRight->ExprType == HB_ET_VARIABLE )
|
||||
else if( iType == HB_ET_VARIABLE )
|
||||
{
|
||||
int iScope = hb_compVariableScope( HB_COMP_PARAM, pSelf->value.asOperator.pRight->value.asSymbol );
|
||||
|
||||
@@ -291,6 +291,7 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
/* NOTE: direct type change */
|
||||
pSelf->value.asOperator.pLeft->ExprType = HB_ET_VARREF;
|
||||
pSelf->value.asOperator.pRight->ExprType = HB_ET_VARREF;
|
||||
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_PUSH_PCODE );
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_PUSH_PCODE );
|
||||
switch( bOpEq )
|
||||
@@ -314,7 +315,7 @@ void hb_compExprPushOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* push old value */
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_PUSH_PCODE );
|
||||
/* push increment value */
|
||||
@@ -443,7 +444,7 @@ void hb_compExprUseOperEq( HB_EXPR_PTR pSelf, BYTE bOpEq, HB_COMP_DECL )
|
||||
pSelf->value.asOperator.pLeft->ExprType = iOldType;
|
||||
return;
|
||||
}
|
||||
else if( pSelf->value.asOperator.pRight->ExprType == HB_ET_VARIABLE )
|
||||
else if( iType == HB_ET_VARIABLE )
|
||||
{
|
||||
int iScope = hb_compVariableScope( HB_COMP_PARAM, pSelf->value.asOperator.pRight->value.asSymbol );
|
||||
|
||||
|
||||
@@ -391,6 +391,7 @@ HB_EXPR_PTR hb_compExprNewMacro( HB_EXPR_PTR pMacroExpr,
|
||||
{
|
||||
HB_EXPR_PTR pExpr;
|
||||
|
||||
pExpr = hb_compExprNew( HB_ET_MACRO, HB_COMP_PARAM );
|
||||
if( szName )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_compExprNewMacro(%s)", szName));
|
||||
@@ -407,7 +408,6 @@ HB_EXPR_PTR hb_compExprNewMacro( HB_EXPR_PTR pMacroExpr,
|
||||
* is pushed as:
|
||||
* "MY&VAR.1"
|
||||
*/
|
||||
pExpr = hb_compExprNew( HB_ET_MACRO, HB_COMP_PARAM );
|
||||
pExpr->value.asMacro.cMacroOp = cMacroOp; /* '&' if variable or 0 if text */
|
||||
pExpr->value.asMacro.szMacro = szName; /* variable name or macro text */
|
||||
pExpr->value.asMacro.pExprList = NULL; /* this is not a parenthesized expressions */
|
||||
@@ -419,9 +419,9 @@ HB_EXPR_PTR hb_compExprNewMacro( HB_EXPR_PTR pMacroExpr,
|
||||
|
||||
/* Macro expression: &( expression_list )
|
||||
*/
|
||||
pExpr = hb_compExprNew( HB_ET_MACRO, HB_COMP_PARAM );
|
||||
pExpr->value.asMacro.pExprList = pMacroExpr;
|
||||
pExpr->value.asMacro.cMacroOp = 0;
|
||||
pExpr->value.asMacro.szMacro = NULL; /* this is used to distinguish &(...) from &ident */
|
||||
pExpr->value.asMacro.pExprList = pMacroExpr;
|
||||
pExpr->value.asMacro.SubType = HB_ET_MACRO_EXPR;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,14 +77,29 @@
|
||||
#include "hbset.h"
|
||||
#include "hb_io.h"
|
||||
|
||||
/* NOTE: Some C compilers like BCC32 optimize the call of small static buffers
|
||||
* into an integer to read it faster. Later, programs like CodeGuard
|
||||
* complain if the given buffer was smaller than an int. [ckedem]
|
||||
*/
|
||||
|
||||
/* length of buffer for CR/LF characters */
|
||||
#define CRLF_BUFFER_LEN OS_EOL_LEN + 1
|
||||
#if !defined(OS_EOL_LEN) || OS_EOL_LEN < 4
|
||||
# define CRLF_BUFFER_LEN 4
|
||||
#else
|
||||
# define CRLF_BUFFER_LEN OS_EOL_LEN + 1
|
||||
#endif
|
||||
|
||||
#if defined(OS_UNIX_COMPATIBLE) && !defined(HB_EOL_CRLF)
|
||||
static const char s_szCrLf[ CRLF_BUFFER_LEN ] = { HB_CHAR_LF, 0 };
|
||||
static const int s_iCrLfLen = 1;
|
||||
#else
|
||||
static const char s_szCrLf[ CRLF_BUFFER_LEN ] = { HB_CHAR_CR, HB_CHAR_LF, 0 };
|
||||
static const int s_iCrLfLen = 2;
|
||||
#endif
|
||||
|
||||
static BOOL s_bInit = FALSE;
|
||||
static USHORT s_uiPRow;
|
||||
static USHORT s_uiPCol;
|
||||
static char s_szCrLf[ CRLF_BUFFER_LEN ] = { HB_CHAR_LF, 0 };
|
||||
static int s_iCrLfLen = 1;
|
||||
static FHANDLE s_hFilenoStdin = 0;
|
||||
static FHANDLE s_hFilenoStdout = 1;
|
||||
static FHANDLE s_hFilenoStderr = 2;
|
||||
@@ -117,17 +132,6 @@ void hb_conInit( void )
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(OS_UNIX_COMPATIBLE) && !defined(HB_EOL_CRLF)
|
||||
s_szCrLf[ 0 ] = HB_CHAR_LF;
|
||||
s_szCrLf[ 1 ] = '\0';
|
||||
s_iCrLfLen = 1;
|
||||
#else
|
||||
s_szCrLf[ 0 ] = HB_CHAR_CR;
|
||||
s_szCrLf[ 1 ] = HB_CHAR_LF;
|
||||
s_szCrLf[ 2 ] = '\0';
|
||||
s_iCrLfLen = 2;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some compilers open stdout and stderr in text mode, but
|
||||
* Harbour needs them to be open in binary mode.
|
||||
@@ -171,7 +175,7 @@ char * hb_conNewLine( void )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_conNewLine()"));
|
||||
|
||||
return s_szCrLf;
|
||||
return ( char * ) s_szCrLf;
|
||||
}
|
||||
|
||||
HB_FUNC( HB_OSNEWLINE )
|
||||
|
||||
Reference in New Issue
Block a user