2008-05-27 17:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/idle.c
    * updated included header files
    * removed unnecessary separated code for MacOSX
    * small modification in comment

  * harbour/source/hbpcre/pcreinal.h
    ! do not redefine BOOL type and TRUE / FALSE definitions

  * harbour/source/hbpcre/_hbpcreg.c
    * remap memory functions to Harbour core ones

  * harbour/source/hbpcre/pcrevutf.c
  * harbour/source/hbpcre/pcreoutf.c
  * harbour/source/hbpcre/pcrecomp.c
    * pacify warnings when utf8 mode is disabled

  * harbour/source/hbpcre/pcrefind.c
    * casting

  * harbour/contrib/gtwvg/wvtutils.c
  * harbour/contrib/rddads/adsfunc.c
    * cleanup warnings
This commit is contained in:
Przemyslaw Czerpak
2008-05-27 15:12:00 +00:00
parent 4761f7a5af
commit 77394377fb
10 changed files with 73 additions and 36 deletions

View File

@@ -8,6 +8,30 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-05-27 17:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/idle.c
* updated included header files
* removed unnecessary separated code for MacOSX
* small modification in comment
* harbour/source/hbpcre/pcreinal.h
! do not redefine BOOL type and TRUE / FALSE definitions
* harbour/source/hbpcre/_hbpcreg.c
* remap memory functions to Harbour core ones
* harbour/source/hbpcre/pcrevutf.c
* harbour/source/hbpcre/pcreoutf.c
* harbour/source/hbpcre/pcrecomp.c
* pacify warnings when utf8 mode is disabled
* harbour/source/hbpcre/pcrefind.c
* casting
* harbour/contrib/gtwvg/wvtutils.c
* harbour/contrib/rddads/adsfunc.c
* cleanup warnings
2008-05-27 09:43 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/hbapi.h
* source/vm/hvm.c

View File

@@ -1656,9 +1656,9 @@ HB_FUNC( WIN_SENDMESSAGE )
HB_FUNC( WIN_SENDDLGITEMMESSAGE )
{
char *cText;
PHB_ITEM pText = hb_param( 5, HB_IT_STRING );
int iLen;
char *cText = NULL;
int iLen = 0;
if( pText )
{
@@ -1666,26 +1666,22 @@ HB_FUNC( WIN_SENDDLGITEMMESSAGE )
cText = (char*) hb_xgrab( iLen+1 );
hb_xmemcpy( cText, hb_itemGetCPtr( pText ), iLen+1 );
}
else
{
cText = NULL;
}
hb_retnl( (LONG) SendDlgItemMessage( (HWND) hb_parnl( 1 ) ,
(int) hb_parni( 2 ) ,
(UINT) hb_parni( 3 ) ,
(ISNIL(4) ? 0 : (WPARAM) hb_parnl( 4 )) ,
(cText ? (LPARAM) cText : (LPARAM) hb_parnl( 5 ))
) ) ;
) );
if( ISBYREF( 5 ) && pText )
{
hb_storclen( cText, iLen, 5 ) ;
}
if( cText )
{
hb_xfree( cText );
}
if( cText )
{
if( ISBYREF( 5 ) )
{
hb_storclen( cText, iLen, 5 ) ;
}
hb_xfree( cText );
}
}
//-------------------------------------------------------------------//

View File

@@ -1419,7 +1419,9 @@ UNSIGNED32 WINAPI hb_adsShowPercentageCB( UNSIGNED16 usPercentDone )
return fResult;
}
else
{
HB_TRACE(HB_TR_DEBUG, ("hb_adsShowPercentageCB(%d) called with no codeblock set.\n", usPercentDone ));
}
return 0;
}

View File

@@ -60,13 +60,6 @@ static void * hb_pcre_grab( size_t size )
return hb_xgrab( size );
}
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#if 1
#include "_hbconf.h"
#endif
@@ -74,11 +67,13 @@ static void * hb_pcre_grab( size_t size )
#include "pcreinal.h"
#ifndef VPCOMPAT
PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc;
PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free;
PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc;
PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = free;
HB_EXTERN_BEGIN
PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = hb_pcre_grab;
PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = hb_xfree;
PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = hb_pcre_grab;
PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = hb_xfree;
PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL;
HB_EXTERN_END
#endif
/* End of pcre_globals.c */

View File

@@ -1450,6 +1450,9 @@ for (;;)
if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f];
break;
}
#else
/* pacify warnings */
(void)(utf8);
#endif
}
}
@@ -1543,6 +1546,9 @@ for (;;)
if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f];
break;
}
#else
/* pacify warnings */
(void)(utf8);
#endif
}
}
@@ -2134,6 +2140,9 @@ if (next >= 0) switch(op_code)
case OP_CHAR:
#ifdef SUPPORT_UTF8
if (utf8 && item > 127) { GETCHAR(item, utf8_char); }
#else
/* pacify warnings */
(void)(utf8_char);
#endif
return item != next;

View File

@@ -152,7 +152,7 @@ makes things a lot slower. */
for (;;)
{
if (top <= bot) return -1;
if (top <= bot) return (unsigned int) -1;
mid = (bot + top) >> 1;
if (c == (ucp_table[mid].f0 & f0_charmask)) break;
if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid;

View File

@@ -551,10 +551,12 @@ variable-length repeat, or a anything other than literal characters. */
/* Miscellaneous definitions */
#ifndef FALSE
typedef int BOOL;
#define FALSE 0
#define TRUE 1
#endif
/* Escape items that are just an encoding of a particular data value. */

View File

@@ -78,6 +78,9 @@ for (j = i; j > 0; j--)
*buffer = _pcre_utf8_table2[i] | cvalue;
return i + 1;
#else
/* pacify warnings */
(void)(cvalue);
(void)(buffer);
return 0; /* Keep compiler happy; this function won't ever be */
#endif /* called when SUPPORT_UTF8 is not defined. */
}

View File

@@ -154,6 +154,10 @@ for (p = string; length-- > 0; p++)
if ((*(++p) & 0xc0) != 0x80) return p - string;
}
}
#else
/* pacify warnings */
(void)(string);
(void)(length);
#endif
return -1;

View File

@@ -77,6 +77,7 @@
#ifndef __USE_POSIX199309
#define __USE_POSIX199309
#endif
#include <sys/time.h>
#include <sys/times.h>
#include <unistd.h>
#endif
@@ -139,13 +140,6 @@ void hb_releaseCPU( void )
HB_DOS_INT86( 0x2F, &regs, &regs );
}
#elif defined(HB_OS_DARWIN)
{
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 1000;
select( 0, NULL, NULL, NULL, &tv );
}
#elif defined(HB_OS_UNIX)
{
struct timeval tv;
@@ -153,10 +147,18 @@ void hb_releaseCPU( void )
tv.tv_usec = 1000;
select( 0, NULL, NULL, NULL, &tv );
}
/* the code below is more efficient but doesn't work in Centos 5.1
/* the code below is simpler but seems that some Linux kernels
* (f.e. from Centos 5.1) have problems with nanosleep()
* so it was replaced by above code
*/
/*
{
static const struct timespec nanosecs = { 0, 1000000 };
nanosleep( &nanosecs, NULL );
*/
}
*/
#else
/* Do nothing */