2010-11-08 23:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbcompdf.h
  * harbour/include/hbexprb.c
  * harbour/src/common/expropt1.c
    + added protection against pushing series of parameters on HVM
      stack by hb_arrayToParams() function used in wrong contects,
      i.e.:
         var := hb_arrayToParams( { 1, 2, 3 } )
      Possible TODO: add compile time warning in such case.

  * harbour/contrib/hbexpat/3rd/expat/_hbconf.h
  * harbour/contrib/hbexpat/3rd/expat/expat.hbp
  * harbour/contrib/hbexpat/3rd/expat/xmltok.c
  * harbour/contrib/hbexpat/3rd/expat/xmlrole.c
  * harbour/contrib/hbexpat/3rd/expat/xmlparse.c
    * updated to define endian setting using information from hbdefs.h

  * harbour/contrib/hbexpat/3rd/expat/xmltok.c
   ! added missing members in structure initializations
This commit is contained in:
Przemyslaw Czerpak
2010-11-08 22:37:26 +00:00
parent 89308c197d
commit d5c7c499b5
9 changed files with 88 additions and 20 deletions

View File

@@ -16,6 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-11-08 23:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcompdf.h
* harbour/include/hbexprb.c
* harbour/src/common/expropt1.c
+ added protection against pushing series of parameters on HVM
stack by hb_arrayToParams() function used in wrong contects,
i.e.:
var := hb_arrayToParams( { 1, 2, 3 } )
Possible TODO: add compile time warning in such case.
* harbour/contrib/hbexpat/3rd/expat/_hbconf.h
* harbour/contrib/hbexpat/3rd/expat/expat.hbp
* harbour/contrib/hbexpat/3rd/expat/xmltok.c
* harbour/contrib/hbexpat/3rd/expat/xmlrole.c
* harbour/contrib/hbexpat/3rd/expat/xmlparse.c
* updated to define endian setting using information from hbdefs.h
* harbour/contrib/hbexpat/3rd/expat/xmltok.c
! added missing members in structure initializations
2010-11-08 22:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbexpat/3rd/expat/expat.hbp
+ *nix support.

View File

@@ -1,3 +1,31 @@
/*
* $Id$
*/
#ifndef _HBCONF_H
#define _HBCONF_H
#include "hbdefs.h"
/* 1234 = LITLE_ENDIAN, 4321 = BIG_ENDIAN */
#if defined( HB_LITTLE_ENDIAN )
# define BYTEORDER 1234
#elif defined( HB_BIG_ENDIAN )
# define BYTEORDER 4321
#else
# error Unsupported machine byte order (endian).
#endif
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to specify how much context to retain around the current parse
point. */
#define XML_CONTEXT_BYTES 1024
/* Define to make parameter entity parsing functionality available. */
#define XML_DTD 1
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
#endif /* _HBCONF_H */

View File

@@ -13,9 +13,8 @@ xmlparse.c
xmlrole.c
xmltok.c
-cflag=-DHARBOUR_CONF
{hblib}-cflag=-DXML_STATIC
{allwin}-cflag=-DCOMPILED_FROM_DSP
{unix|os2}-cflag=-DHAVE_MEMMOVE
{bcc}-cflag=-w-8057
{bcc}-cflag=-w-8008
{bcc}-cflag=-w-8066

View File

@@ -8,7 +8,9 @@
#define XML_BUILDING_EXPAT 1
#ifdef COMPILED_FROM_DSP
#ifdef HARBOUR_CONF
#include "_hbconf.h"
#elif defined(COMPILED_FROM_DSP)
#include "winconfi.h"
#elif defined(MACOS_CLASSIC)
#include "macconfi.h"

View File

@@ -4,7 +4,9 @@
#include <stddef.h>
#ifdef COMPILED_FROM_DSP
#ifdef HARBOUR_CONF
#include "_hbconf.h"
#elif defined(COMPILED_FROM_DSP)
#include "winconfi.h"
#elif defined(MACOS_CLASSIC)
#include "macconfi.h"

View File

@@ -4,7 +4,9 @@
#include <stddef.h>
#ifdef COMPILED_FROM_DSP
#ifdef HARBOUR_CONF
#include "_hbconf.h"
#elif defined(COMPILED_FROM_DSP)
#include "winconfi.h"
#elif defined(MACOS_CLASSIC)
#include "macconfi.h"
@@ -222,6 +224,17 @@ struct normal_encoding {
E ## isInvalid3, \
E ## isInvalid4
#define NULL_VTABLE() \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL
static int FASTCALL checkCharRefNumber(int);
#include "xmltok_i.h"
@@ -467,7 +480,7 @@ static const struct normal_encoding latin1_encoding_ns = {
#include "asciitab.h"
#include "latin1ta.h"
},
STANDARD_VTABLE(sb_)
STANDARD_VTABLE(sb_) NULL_VTABLE()
};
#endif
@@ -480,7 +493,7 @@ static const struct normal_encoding latin1_encoding = {
#undef BT_COLON
#include "latin1ta.h"
},
STANDARD_VTABLE(sb_)
STANDARD_VTABLE(sb_) NULL_VTABLE()
};
static void PTRCALL
@@ -500,7 +513,7 @@ static const struct normal_encoding ascii_encoding_ns = {
#include "asciitab.h"
/* BT_NONXML == 0 */
},
STANDARD_VTABLE(sb_)
STANDARD_VTABLE(sb_) NULL_VTABLE()
};
#endif
@@ -513,7 +526,7 @@ static const struct normal_encoding ascii_encoding = {
#undef BT_COLON
/* BT_NONXML == 0 */
},
STANDARD_VTABLE(sb_)
STANDARD_VTABLE(sb_) NULL_VTABLE()
};
static int PTRFASTCALL
@@ -726,7 +739,7 @@ static const struct normal_encoding little2_encoding_ns = {
#include "asciitab.h"
#include "latin1ta.h"
},
STANDARD_VTABLE(little2_)
STANDARD_VTABLE(little2_) NULL_VTABLE()
};
#endif
@@ -745,7 +758,7 @@ static const struct normal_encoding little2_encoding = {
#undef BT_COLON
#include "latin1ta.h"
},
STANDARD_VTABLE(little2_)
STANDARD_VTABLE(little2_) NULL_VTABLE()
};
#if BYTEORDER != 4321
@@ -758,7 +771,7 @@ static const struct normal_encoding internal_little2_encoding_ns = {
#include "iasciita.h"
#include "latin1ta.h"
},
STANDARD_VTABLE(little2_)
STANDARD_VTABLE(little2_) NULL_VTABLE()
};
#endif
@@ -771,7 +784,7 @@ static const struct normal_encoding internal_little2_encoding = {
#undef BT_COLON
#include "latin1ta.h"
},
STANDARD_VTABLE(little2_)
STANDARD_VTABLE(little2_) NULL_VTABLE()
};
#endif
@@ -867,7 +880,7 @@ static const struct normal_encoding big2_encoding_ns = {
#include "asciitab.h"
#include "latin1ta.h"
},
STANDARD_VTABLE(big2_)
STANDARD_VTABLE(big2_) NULL_VTABLE()
};
#endif
@@ -886,7 +899,7 @@ static const struct normal_encoding big2_encoding = {
#undef BT_COLON
#include "latin1ta.h"
},
STANDARD_VTABLE(big2_)
STANDARD_VTABLE(big2_) NULL_VTABLE()
};
#if BYTEORDER != 1234
@@ -899,7 +912,7 @@ static const struct normal_encoding internal_big2_encoding_ns = {
#include "iasciita.h"
#include "latin1ta.h"
},
STANDARD_VTABLE(big2_)
STANDARD_VTABLE(big2_) NULL_VTABLE()
};
#endif
@@ -912,7 +925,7 @@ static const struct normal_encoding internal_big2_encoding = {
#undef BT_COLON
#include "latin1ta.h"
},
STANDARD_VTABLE(big2_)
STANDARD_VTABLE(big2_) NULL_VTABLE()
};
#endif

View File

@@ -341,6 +341,7 @@ typedef enum
#define HB_FN_UDF 0
#define HB_FN_RESERVED 1
#define HB_FN_MULTIARG 2
typedef HB_USHORT HB_EXPRTYPE;

View File

@@ -2086,11 +2086,12 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
if( pSelf->value.asFunCall.pFunName->ExprType == HB_ET_FUNNAME )
{
if( pSelf->value.asFunCall.pFunName->value.asSymbol.funcid ==
HB_F_ARRAYTOPARAMS )
if( pSelf->value.asFunCall.pFunName->value.asSymbol.funcid == HB_F_ARRAYTOPARAMS )
{
usCount = ( HB_USHORT ) hb_compExprParamListCheck( HB_COMP_PARAM, pSelf->value.asFunCall.pParms );
if( usCount == 1 && pSelf->value.asFunCall.pParms->ExprType != HB_ET_MACROARGLIST )
if( usCount == 1 &&
( pSelf->value.asFunCall.pFunName->value.asSymbol.flags & HB_FN_MULTIARG ) != 0 &&
pSelf->value.asFunCall.pParms->ExprType != HB_ET_MACROARGLIST )
{
HB_EXPR_USE( pSelf->value.asFunCall.pParms, HB_EA_PUSH_PCODE );
HB_GEN_FUNC1( PCode1, HB_P_PUSHAPARAMS );

View File

@@ -1348,6 +1348,8 @@ HB_SIZE hb_compExprParamListCheck( HB_COMP_DECL, HB_EXPR_PTR pExpr )
- handle it differently then in a normal statement */
if( pElem->ExprType == HB_ET_MACRO )
pElem->value.asMacro.SubType |= HB_ET_MACRO_LIST;
else if( pElem->ExprType == HB_ET_FUNCALL )
pElem->value.asFunCall.pFunName->value.asSymbol.flags |= HB_FN_MULTIARG;
if( nItems )
{
nItems = 0;