2008-09-04 09:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_vc.mak
* contrib/mtpl_vc.mak
+ -w34701 VC flag added to enabled warning 4701 (uninitialized vars) on -W3 level.
% -FD VC flag removed. This is only needed for IDEs.
% -Gs VC flag moved to the common section.
% VC flags synced in contrib with core.
+ TOFIX added for WinCE command line. It's full of stuff which is _probably_ not needed.
+ NOTE added about MSDN page explaining VC switches.
; NOTE: -W4 and -Wp64 are recommended for MSVC.
; TOFIX: There are still a few uninit vars warnings:
harboury.c(7226) : warning C4701: potentially uninitialized local variable 'hb_complval' used
macroy.c(3095) : warning C4701: potentially uninitialized local variable 'hb_macrolval' used
dbffpt1.c(2671) : warning C4701: potentially uninitialized local variable 'ulType' used
dbffpt1.c(2614) : warning C4701: potentially uninitialized local variable 'ulSize' used
dbffpt1.c(3073) : warning C4701: potentially uninitialized local variable 'ulOldSize' used
dbffpt1.c(3083) : warning C4701: potentially uninitialized local variable 'ulBlock' used
dbffpt1.c(3652) : warning C4701: potentially uninitialized local variable 'pBlock' used
* source/rdd/workarea.c
! Fixed DBI_POSITIONED value returned.
* include/hbsetup.h
* source/vm/pvalue.c
* source/rtl/fserror.c
* source/rtl/accept.c
* source/rtl/descend.c
* source/rtl/inkey.c
* source/rtl/dates.c
* source/rtl/fkmax.c
* source/rtl/natmsg.c
* source/rtl/hbinet.c
* source/rtl/dates.c
! Fixed some MSVS2008 -W4 warnings (we use -W3 as the default).
; NOTE: There is a lot more of these.
* source/rtl/dates.c
* Formatting.
This commit is contained in:
@@ -8,6 +8,45 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2008-09-04 09:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* make_vc.mak
|
||||
* contrib/mtpl_vc.mak
|
||||
+ -w34701 VC flag added to enabled warning 4701 (uninitialized vars) on -W3 level.
|
||||
% -FD VC flag removed. This is only needed for IDEs.
|
||||
% -Gs VC flag moved to the common section.
|
||||
% VC flags synced in contrib with core.
|
||||
+ TOFIX added for WinCE command line. It's full of stuff which is _probably_ not needed.
|
||||
+ NOTE added about MSDN page explaining VC switches.
|
||||
; NOTE: -W4 and -Wp64 are recommended for MSVC.
|
||||
; TOFIX: There are still a few uninit vars warnings:
|
||||
harboury.c(7226) : warning C4701: potentially uninitialized local variable 'hb_complval' used
|
||||
macroy.c(3095) : warning C4701: potentially uninitialized local variable 'hb_macrolval' used
|
||||
dbffpt1.c(2671) : warning C4701: potentially uninitialized local variable 'ulType' used
|
||||
dbffpt1.c(2614) : warning C4701: potentially uninitialized local variable 'ulSize' used
|
||||
dbffpt1.c(3073) : warning C4701: potentially uninitialized local variable 'ulOldSize' used
|
||||
dbffpt1.c(3083) : warning C4701: potentially uninitialized local variable 'ulBlock' used
|
||||
dbffpt1.c(3652) : warning C4701: potentially uninitialized local variable 'pBlock' used
|
||||
|
||||
* source/rdd/workarea.c
|
||||
! Fixed DBI_POSITIONED value returned.
|
||||
|
||||
* include/hbsetup.h
|
||||
* source/vm/pvalue.c
|
||||
* source/rtl/fserror.c
|
||||
* source/rtl/accept.c
|
||||
* source/rtl/descend.c
|
||||
* source/rtl/inkey.c
|
||||
* source/rtl/dates.c
|
||||
* source/rtl/fkmax.c
|
||||
* source/rtl/natmsg.c
|
||||
* source/rtl/hbinet.c
|
||||
* source/rtl/dates.c
|
||||
! Fixed some MSVS2008 -W4 warnings (we use -W3 as the default).
|
||||
; NOTE: There is a lot more of these.
|
||||
|
||||
* source/rtl/dates.c
|
||||
* Formatting.
|
||||
|
||||
2008-09-03 23:06 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbziparc/hbziparc.prg
|
||||
! Fix to one of the rarely used function names.
|
||||
|
||||
@@ -118,13 +118,14 @@ HB_VISUALC_VER = 80
|
||||
|
||||
# C Compiler Flags
|
||||
!if $(HB_VISUALC_VER) >= 80
|
||||
CFLAGS_VER = -Ot2b1 -FD -Gs -D_CRT_SECURE_NO_DEPRECATE
|
||||
CFLAGS_VER = -Ot2b1 -EHs-c- -D_CRT_SECURE_NO_DEPRECATE
|
||||
!else
|
||||
CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX -FD -Gs
|
||||
CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX
|
||||
!endif
|
||||
#-----------
|
||||
|
||||
CFLAGS = -I$(INCLUDE_DIR) $(CFLAGS_VER) -W3 -nologo -T$(HB_BUILD_MODE) $(C_USR) $(CFLAGS)
|
||||
CFLAGS = -nologo -W3 -w34701 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) -T$(HB_BUILD_MODE) \
|
||||
$(C_USR) $(CFLAGS) -I$(OBJ_DIR)
|
||||
|
||||
#-----------
|
||||
!if "$(HB_BUILD_DEBUG)" == "yes"
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
/* Sub-option inside HB_OS_WIN_32 */
|
||||
#ifndef HB_WINCE
|
||||
#if defined(_WINCE) || defined(__CEGCC__) || defined(__MINGW32CE__) || (__POCC_TARGET__ == 2)
|
||||
#if defined(_WINCE) || defined(__CEGCC__) || defined(__MINGW32CE__) || (defined(__POCC_TARGET__) && __POCC_TARGET__ == 2)
|
||||
#define HB_WINCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -141,11 +141,13 @@ HB_BUILD_MODE = C
|
||||
!if "$(HB_BUILD_WINCE)" == "yes"
|
||||
|
||||
!if $(HB_VISUALC_VER) >= 80
|
||||
CFLAGS_VER = -Od -Os -Gy -GS- -EHsc- -fp:fast -Gm -Zi -GR- -FD -D_CRT_SECURE_NO_DEPRECATE
|
||||
CFLAGS_VER = -Od -Os -Gy -GS- -EHsc- -fp:fast -Gm -Zi -GR- -D_CRT_SECURE_NO_DEPRECATE
|
||||
!else
|
||||
CFLAGS_VER = -Oxsb1 -EHsc -YX -GF
|
||||
!endif
|
||||
|
||||
# TOFIX: These should be cleaned from everything not absolutely necessary:
|
||||
|
||||
CFLAGS = -nologo -W3 -I$(INCLUDE_DIR) -I$(CFLAGS_VER) -T$(HB_BUILD_MODE) \
|
||||
-D"_WIN32_WCE=0x420" -D"UNDER_CE=0x420" -D"WIN32_PLATFORM_PSPC" \
|
||||
-D"WINCE" -D"_WINCE" -D"_WINDOWS" -D"ARM" -D"_ARM_" -D"ARMV4" \
|
||||
@@ -166,13 +168,15 @@ CFLAGS = $(CFLAGS) -D "NDEBUG"
|
||||
|
||||
!else
|
||||
|
||||
# NOTE: See here: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
|
||||
|
||||
!if $(HB_VISUALC_VER) >= 80
|
||||
CFLAGS_VER = -Ot2b1 -EHs-c- -FD -Gs -D_CRT_SECURE_NO_DEPRECATE
|
||||
CFLAGS_VER = -Ot2b1 -EHs-c- -D_CRT_SECURE_NO_DEPRECATE
|
||||
!else
|
||||
CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX -FD -Gs
|
||||
CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX
|
||||
!endif
|
||||
|
||||
CFLAGS = -nologo -W3 -I$(INCLUDE_DIR) $(CFLAGS_VER) -T$(HB_BUILD_MODE) \
|
||||
CFLAGS = -nologo -W3 -w34701 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) -T$(HB_BUILD_MODE) \
|
||||
$(C_USR) $(CFLAGS) -I$(OBJ_DIR)
|
||||
|
||||
#-----------
|
||||
|
||||
@@ -845,7 +845,8 @@ static ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
hb_itemPutL( pItem, TRUE );
|
||||
else if( SELF_RECCOUNT( pArea, &ulRecCount ) != SUCCESS )
|
||||
return FAILURE;
|
||||
hb_itemPutL( pItem, ulRecNo != ulRecCount + 1 );
|
||||
else
|
||||
hb_itemPutL( pItem, ulRecNo != ulRecCount + 1 );
|
||||
break;
|
||||
}
|
||||
case DBI_RM_SUPPORTED:
|
||||
|
||||
@@ -111,7 +111,7 @@ HB_FUNC( __ACCEPT )
|
||||
default:
|
||||
if( ulLen < ( ACCEPT_BUFFER_LEN - 1 ) && input >= 32 && input <= 255 )
|
||||
{
|
||||
szAcceptResult[ ulLen ] = input; /* Accept the input */
|
||||
szAcceptResult[ ulLen ] = ( char ) input; /* Accept the input */
|
||||
hb_conOutAlt( &szAcceptResult[ ulLen ], sizeof( char ) ); /* Then display it */
|
||||
ulLen++; /* Then adjust the input count */
|
||||
}
|
||||
|
||||
@@ -50,18 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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_dateFormat()
|
||||
* hb_dateUnformat()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "hbapi.h"
|
||||
@@ -82,7 +70,8 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
* Determine the maximum size of the formatted date string
|
||||
*/
|
||||
size = strlen( szDateFormat );
|
||||
if( size > 10 ) size = 10;
|
||||
if( size > 10 )
|
||||
size = 10;
|
||||
|
||||
if( szDate && szFormattedDate && strlen( szDate ) == 8 ) /* A valid date is always 8 characters */
|
||||
{
|
||||
@@ -102,7 +91,8 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
while( toupper( ( UCHAR ) *szPtr ) == digit && format_count < size )
|
||||
{
|
||||
szPtr++;
|
||||
if( format_count + digit_count < size ) digit_count++;
|
||||
if( format_count + digit_count < size )
|
||||
digit_count++;
|
||||
}
|
||||
switch( digit )
|
||||
{
|
||||
@@ -112,14 +102,14 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
case 4:
|
||||
if( ! used_d && format_count < size )
|
||||
{
|
||||
/* szFormattedDate[ format_count++ ] = '0'; */
|
||||
/* szFormattedDate[ format_count++ ] = '0'; */
|
||||
szFormattedDate[ format_count++ ] = szDate[ 6 ];
|
||||
digit_count--;
|
||||
}
|
||||
case 3:
|
||||
if( ! used_d && format_count < size )
|
||||
{
|
||||
/* szFormattedDate[ format_count++ ] = '0'; */
|
||||
/* szFormattedDate[ format_count++ ] = '0'; */
|
||||
szFormattedDate[ format_count++ ] = szDate[ 6 ];
|
||||
digit_count--;
|
||||
}
|
||||
@@ -135,7 +125,8 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
szFormattedDate[ format_count++ ] = szDate[ 7 ];
|
||||
digit_count--;
|
||||
}
|
||||
while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = digit;
|
||||
while( digit_count-- > 0 && format_count < size )
|
||||
szFormattedDate[ format_count++ ] = digit;
|
||||
}
|
||||
used_d = TRUE;
|
||||
break;
|
||||
@@ -169,7 +160,8 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
szFormattedDate[ format_count++ ] = szDate[ 5 ];
|
||||
digit_count--;
|
||||
}
|
||||
while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = digit;
|
||||
while( digit_count-- > 0 && format_count < size )
|
||||
szFormattedDate[ format_count++ ] = digit;
|
||||
}
|
||||
used_m = TRUE;
|
||||
break;
|
||||
@@ -204,13 +196,15 @@ HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, con
|
||||
szFormattedDate[ format_count++ ] = szDate[ 3 ];
|
||||
digit_count--;
|
||||
}
|
||||
while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = digit;
|
||||
while( digit_count-- > 0 && format_count < size )
|
||||
szFormattedDate[ format_count++ ] = digit;
|
||||
}
|
||||
used_y = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
while( digit_count-- > 0 && format_count < size ) szFormattedDate[ format_count++ ] = digit;
|
||||
while( digit_count-- > 0 && format_count < size )
|
||||
szFormattedDate[ format_count++ ] = digit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,27 +255,36 @@ HB_EXPORT long hb_dateUnformat( const char * szDate, const char * szDateFormat )
|
||||
case 'd':
|
||||
if( d_pos == 0 )
|
||||
{
|
||||
if( m_pos == 0 && y_pos == 0 ) d_pos = 1;
|
||||
else if( m_pos == 0 || y_pos == 0 ) d_pos = 2;
|
||||
else d_pos = 3;
|
||||
if( m_pos == 0 && y_pos == 0 )
|
||||
d_pos = 1;
|
||||
else if( m_pos == 0 || y_pos == 0 )
|
||||
d_pos = 2;
|
||||
else
|
||||
d_pos = 3;
|
||||
}
|
||||
break;
|
||||
case 'M':
|
||||
case 'm':
|
||||
if( m_pos == 0 )
|
||||
{
|
||||
if( d_pos == 0 && y_pos == 0 ) m_pos = 1;
|
||||
else if( d_pos == 0 || y_pos == 0 ) m_pos = 2;
|
||||
else m_pos = 3;
|
||||
if( d_pos == 0 && y_pos == 0 )
|
||||
m_pos = 1;
|
||||
else if( d_pos == 0 || y_pos == 0 )
|
||||
m_pos = 2;
|
||||
else
|
||||
m_pos = 3;
|
||||
}
|
||||
break;
|
||||
case 'Y':
|
||||
case 'y':
|
||||
if( y_pos == 0 )
|
||||
{
|
||||
if( m_pos == 0 && d_pos == 0 ) y_pos = 1;
|
||||
else if( m_pos == 0 || d_pos == 0 ) y_pos = 2;
|
||||
else y_pos = 3;
|
||||
if( m_pos == 0 && d_pos == 0 )
|
||||
y_pos = 1;
|
||||
else if( m_pos == 0 || d_pos == 0 )
|
||||
y_pos = 2;
|
||||
else
|
||||
y_pos = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void hb_strDescend( char * szStringTo, const char * szStringFrom, ULONG ulLen )
|
||||
else
|
||||
{
|
||||
for(; ulLen--; szStringTo++, szStringFrom++ )
|
||||
*szStringTo = 256 - *szStringFrom;
|
||||
*szStringTo = ( char ) ( 256 - *szStringFrom );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ HB_FUNC( FKLABEL )
|
||||
|
||||
if( pPar1 )
|
||||
{
|
||||
USHORT uiFKey = hb_itemGetNI( pPar1 );
|
||||
USHORT uiFKey = ( USHORT ) hb_itemGetNI( pPar1 );
|
||||
|
||||
if( uiFKey > 0 && uiFKey <= 40 )
|
||||
{
|
||||
|
||||
@@ -171,7 +171,7 @@ static int hb_WinToDosError( ULONG ulError )
|
||||
break;
|
||||
|
||||
default:
|
||||
iResult = ( int ) ulError ;
|
||||
iResult = ( int ) ulError;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,6 @@ HB_EXPORT void hb_fsSetError( USHORT uiError )
|
||||
/* set error code for last operation */
|
||||
HB_EXPORT void hb_fsSetIOError( BOOL fResult, USHORT uiOperation )
|
||||
{
|
||||
|
||||
/* TODO: implement it */
|
||||
HB_SYMBOL_UNUSED( uiOperation );
|
||||
|
||||
@@ -234,8 +233,8 @@ HB_EXPORT void hb_fsSetIOError( BOOL fResult, USHORT uiOperation )
|
||||
else
|
||||
{
|
||||
#if defined(HB_WIN32_IO) || defined(HB_OS_WIN_32)
|
||||
s_uiOsErrorLast = (USHORT) GetLastError();
|
||||
s_uiErrorLast = hb_WinToDosError( s_uiOsErrorLast );
|
||||
s_uiOsErrorLast = ( USHORT ) GetLastError();
|
||||
s_uiErrorLast = ( USHORT ) hb_WinToDosError( s_uiOsErrorLast );
|
||||
#elif defined(_MSC_VER) || defined(__DMC__)
|
||||
#ifdef __XCC__
|
||||
extern unsigned long _doserrno;
|
||||
|
||||
@@ -994,8 +994,8 @@ static void s_inetRecvPattern( char *szPattern )
|
||||
PHB_ITEM pMaxSize = hb_param( 3, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBufferSize = hb_param( 4, HB_IT_NUMERIC );
|
||||
|
||||
char cChar;
|
||||
char *Buffer;
|
||||
char cChar = '\0';
|
||||
char * Buffer;
|
||||
int iAllocated, iBufferSize, iMax;
|
||||
int iLen = 0, iPatLen;
|
||||
int iPos = 0, iTimeElapsed;
|
||||
@@ -1146,9 +1146,9 @@ HB_FUNC( HB_INETRECVENDBLOCK )
|
||||
PHB_ITEM pMaxSize = hb_param( 4, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBufferSize = hb_param( 5, HB_IT_NUMERIC );
|
||||
|
||||
char cChar;
|
||||
char *Buffer;
|
||||
char **Proto;
|
||||
char cChar = '\0';
|
||||
char * Buffer;
|
||||
char ** Proto;
|
||||
int iAllocated, iBufferSize, iMax;
|
||||
int iLen;
|
||||
int iPos = 0;
|
||||
@@ -1256,7 +1256,7 @@ HB_FUNC( HB_INETRECVENDBLOCK )
|
||||
int protos;
|
||||
bProtoFound = 0;
|
||||
|
||||
for( protos=0; protos < iprotos; protos++ )
|
||||
for( protos = 0; protos < iprotos; protos++ )
|
||||
{
|
||||
if( cChar == Proto[protos][iprotosize[protos]-1] && iprotosize[protos] <= iPos )
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ static PHB_ITEM s_inkeyBlockAfter = NULL;
|
||||
|
||||
HB_FUNC( INKEY )
|
||||
{
|
||||
USHORT uiPCount = hb_pcount();
|
||||
USHORT uiPCount = ( USHORT ) hb_pcount();
|
||||
PHB_ITEM pKey = NULL;
|
||||
int iKey;
|
||||
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
#define _LF_YN 12 /* "Y/N" */ /* NOTE: This must be in uppercase. [vszakats] */
|
||||
#define _INVALID_EXPR 13 /* "INVALID EXPRESSION" */
|
||||
|
||||
static char * hb_nationGetMsg( USHORT uiMsg )
|
||||
static char * hb_nationGetMsg( int iMsg )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_nationGetMsg(%hu)", uiMsg));
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_nationGetMsg(%hu)", iMsg));
|
||||
|
||||
return ( uiMsg >= 1 && uiMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + uiMsg - 1 ) : ( char * ) "";
|
||||
return ( iMsg >= 1 && iMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + iMsg - 1 ) : ( char * ) "";
|
||||
}
|
||||
|
||||
HB_FUNC( __NATISAFFIRM )
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
HB_FUNC( HB_PVALUE )
|
||||
{
|
||||
LONG lOffset = hb_stackBaseItem()->item.asSymbol.stackstate->lBaseItem;
|
||||
USHORT uiParam = hb_parni( 1 );
|
||||
USHORT uiParam = ( USHORT ) hb_parni( 1 );
|
||||
|
||||
if( uiParam && uiParam <= hb_stackItem( lOffset )->item.asSymbol.paramcnt )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user