2008-11-09 11:48 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* ChangeLog
    ! Restored last non-UNICODE version, and readded
      all entries and reapplied all changes since then.
    ; NOTE: Please never save any Harbour files in
            UNICODE mode. Thank you.

  * contrib/make_gcc_all.sh
  * contrib/Makefile
    - Removed hbdbgfx.

  * source/pp/hbpp.c
  * source/main/harbour.c
    * Excluded hbwmain for __POCC__ WinCE.
    ; TOFIX: Warning: Not proper fix.
             This way it won't link but at least it compiles.

  * source/compiler/gencc.c
    * Switched to hexadecimal format for high chars, because
      octal was tried to be converted to Windows codepage, by
      PellesC.

  * config/w32/poccce.cf
    - Removed -DSTRSAFE_NO_DEPRECATE switch.

  * config/w32/pocc.cf
    + Added -MT switch.

  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/win_dll.c
  * source/rtl/hbhex.c
  * source/rdd/hbsix/sxcompat.prg
    * Minor formatting.
This commit is contained in:
Viktor Szakats
2008-11-09 11:15:06 +00:00
parent abd25b1b8f
commit 5b53f67db4
12 changed files with 42 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* $Id$
*/

View File

@@ -16,7 +16,7 @@ CC_IN = -c
CC_OUT = -Fo
CPPFLAGS = -I.
CPPFLAGS += -Ze -Go
CPPFLAGS += -Ze -Go -MT
# optimizations
CPPFLAGS += -Ot -Ox

View File

@@ -23,7 +23,7 @@ CPPFLAGS += -Ze -Go
CPPFLAGS += -Ot -Ox
# For Pocket PC and ARM processors (including XScale)
CPPFLAGS += -Tarm-coff -DSTRSAFE_NO_DEPRECATE
CPPFLAGS += -Tarm-coff
ifneq ($(HB_INC_COMPILE),)
CPPFLAGS += -I$(HB_INC_COMPILE)

View File

@@ -13,7 +13,6 @@ DIRS=\
hbbtree \
hbclipsm \
hbct \
hbdbgfx \
hbgf \
hbgt \
hbmisc \

View File

@@ -258,7 +258,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
#if defined( __MINGW32__ )
#elif defined( __BORLANDC__ ) || defined(__DMC__)
#else
DWORD *pESP;
DWORD * pESP;
#endif
/* Reserve 256 bytes of stack space for our arguments */
@@ -267,7 +267,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
"\tsubl $0x100, %%esp\n"
: "=r" (pStack) );
#elif defined( __BORLANDC__ ) || defined(__DMC__)
pStack = (DWORD *)_ESP;
pStack = ( DWORD * ) _ESP;
_ESP -= 0x100;
#else
_asm mov pStack, esp
@@ -279,10 +279,10 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
4-byte boundary. We start at the rightmost argument. */
for( i = 0; i < nArgs; i++ )
{
nInd = (nArgs - 1) - i;
nInd = ( nArgs - 1 ) - i;
/* Start at the back of the arg ptr, aligned on a DWORD */
nSize = (Parm[nInd].nWidth + 3) / 4 * 4;
pArg = (BYTE *) Parm[nInd].pArg + nSize - 4;
nSize = ( Parm[ nInd ].nWidth + 3 ) / 4 * 4;
pArg = ( BYTE * ) Parm[ nInd ].pArg + nSize - 4;
dwStSize += ( DWORD ) nSize; /* Count no of bytes on stack */
nLoops = ( nSize / 4 ) - 1;
@@ -290,7 +290,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
while( nSize > 0 )
{
/* Copy argument to the stack */
if( Parm[nInd].dwFlags & DC_FLAG_ARGPTR )
if( Parm[ nInd ].dwFlags & DC_FLAG_ARGPTR )
{
/* Arg has a ptr to a variable that has the arg */
dwVal = ( DWORD ) pArg; /* Get first four bytes */
@@ -299,7 +299,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
else
{
/* Arg has the real arg */
dwVal = *( (DWORD *)( (BYTE *) ( &( Parm[nInd].numargs.dwArg ) ) + ( nLoops * 4 ) ) );
dwVal = *( ( DWORD * )( ( BYTE * ) ( &( Parm[ nInd ].numargs.dwArg ) ) + ( nLoops * 4 ) ) );
}
/* Do push dwVal */
@@ -344,18 +344,18 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
else if( pRet == NULL )
{
Res.Int = dwEAX;
(&Res.Int)[1] = dwEDX;
( &Res.Int )[ 1 ] = dwEDX;
}
else if( ( ( iFlags & DC_BORLAND ) == 0 ) && ( nRetSiz <= 8 ) )
{
/* Microsoft optimized less than 8-bytes structure passing */
((int *)pRet)[0] = dwEAX;
((int *)pRet)[1] = dwEDX;
( ( int * ) pRet )[ 0 ] = dwEAX;
( ( int * ) pRet )[ 1 ] = dwEDX;
}
#elif defined( __BORLANDC__ ) || defined(__DMC__)
_ESP += (0x100 - dwStSize);
_ESP += ( 0x100 - dwStSize );
_EDX = ( DWORD ) &lpFunction;
__emit__(0xff,0x12); /* call [edx]; */
__emit__( 0xFF, 0x12 ); /* call [edx]; */
dwEAX = _EAX;
dwEDX = _EDX;
@@ -370,14 +370,14 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
_EBX = ( DWORD ) &Res;
_EAX = dwEAX;
_EDX = dwEDX;
__emit__(0xd9,0x1b); /* _asm fnstp float ptr [ebx] */
__emit__( 0xD9, 0x1B ); /* _asm fnstp float ptr [ebx] */
}
else if( iFlags & DC_RETVAL_MATH8 )
{
_EBX = ( DWORD ) &Res;
_EAX = dwEAX;
_EDX = dwEDX;
__emit__(0xdd,0x1b); /* _asm fnstp qword ptr [ebx] */
__emit__( 0xDD, 0x1B ); /* _asm fnstp qword ptr [ebx] */
}
else if( pRet == NULL )
{
@@ -386,7 +386,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
_EDX = dwEDX;
/* _asm mov DWORD PTR [ebx], eax */
/* _asm mov DWORD PTR [ebx + 4], edx */
__emit__(0x89,0x03,0x89,0x53,0x04);
__emit__( 0x89, 0x03, 0x89, 0x53, 0x04 );
}
else if( ( ( iFlags & DC_BORLAND ) == 0 ) && ( nRetSiz <= 8 ) )
{
@@ -395,7 +395,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
_EDX = dwEDX;
/* _asm mov DWORD PTR [ebx], eax */
/* _asm mov DWORD PTR [ebx + 4], edx */
__emit__(0x89,0x03,0x89,0x53,0x04);
__emit__( 0x89, 0x03, 0x89, 0x53, 0x04 );
}
#else
_asm add esp, 0x100 /* Restore to original position */

View File

@@ -174,11 +174,11 @@ BOOL hb_GetDefaultPrinter( char * pPrinterName, LPDWORD pdwBufferSize )
if( dwSize && dwSize < *pdwBufferSize )
{
dwSize = 0;
while( pPrinterName[dwSize] != '\0' && pPrinterName[dwSize] != ',' )
while( pPrinterName[ dwSize ] != '\0' && pPrinterName[ dwSize ] != ',' )
{
dwSize++;
}
pPrinterName[dwSize] = '\0';
pPrinterName[ dwSize ] = '\0';
*pdwBufferSize = dwSize + 1;
Result = TRUE;
}
@@ -323,7 +323,7 @@ HB_FUNC( PRINTERPORTTONAME )
LONG hb_PrintFileRaw( UCHAR * cPrinterName, UCHAR * cFileName, UCHAR * cDocName )
{
UCHAR printBuffer[BIG_PRINT_BUFFER];
UCHAR printBuffer[ BIG_PRINT_BUFFER ];
HANDLE hPrinter, hFile;
DOC_INFO_1 DocInfo;
DWORD nRead, nWritten;
@@ -348,7 +348,7 @@ LONG hb_PrintFileRaw( UCHAR * cPrinterName, UCHAR * cFileName, UCHAR * cDocName
while( ReadFile( hFile, printBuffer, BIG_PRINT_BUFFER, &nRead, NULL )
&& ( nRead > 0 ) )
{
if( printBuffer[nRead - 1] == 26 )
if( printBuffer[ nRead - 1 ] == 26 )
{
nRead--; /* Skip the EOF() character */
}

View File

@@ -41,7 +41,7 @@ fi
if [ "$HB_CONTRIBLIBS" != "" ]; then
_HB_DIRS="${HB_CONTRIBLIBS}"
else
_HB_DIRS="hbbmcdx hbbtree hbclipsm hbct hbdbgfx hbgt hbmisc hbmsql hbmzip hbnf hbtip hbsqlit3 hbtpathy hbvpdf hbziparc xhb"
_HB_DIRS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmsql hbmzip hbnf hbtip hbsqlit3 hbtpathy hbvpdf hbziparc xhb"
case "$HB_ARCHITECTURE" in
w32|cyg|os2)

View File

@@ -58,17 +58,20 @@ void hb_compGenCString( FILE * yyc, BYTE * pText, ULONG ulLen )
* NOTE: After optimization some CHR(n) can be converted
* into a string containing nonprintable characters.
*
* TODO: add switch to use hexadecimal format "%#04x"
*
* ? is escaped to avoid conflicts with trigraph sequences which
* are part of ANSI C standard
*/
if( uchr == '"' || uchr == '\\' || uchr == '?' )
fprintf( yyc, "\\%c", uchr );
else if( uchr < ( BYTE ) ' ' || uchr >= 127 )
fprintf( yyc, "\\%03o%s", uchr, ulPos < ulLen - 1 &&
pText[ ulPos + 1 ] >= ( BYTE ) '0' &&
pText[ ulPos + 1 ] <= ( BYTE ) '9' ? "\" \"" : "" );
{
BYTE uchrnext = pText[ ulPos + 1 ];
fprintf( yyc, "\\x%02X%s", uchr, ulPos < ulLen - 1 &&
( uchrnext >= ( BYTE ) '0' && uchrnext <= ( BYTE ) '9' ) ||
( uchrnext >= ( BYTE ) 'a' && uchrnext <= ( BYTE ) 'z' ) ||
( uchrnext >= ( BYTE ) 'A' && uchrnext <= ( BYTE ) 'Z' ) ? "\" \"" : "" );
}
else
fprintf( yyc, "%c", uchr );
}

View File

@@ -622,6 +622,6 @@ int main( int argc, char * argv[] )
return iResult;
}
#if defined( HB_WINCE ) && !defined( __CEGCC__ )
#if defined( HB_WINCE ) && !defined( __CEGCC__ ) && !defined( __POCC__ )
# include "hbwmain.c"
#endif

View File

@@ -738,6 +738,6 @@ int main( int argc, char * argv[] )
return iResult;
}
#if defined( HB_WINCE ) && !defined( __CEGCC__ )
#if defined( HB_WINCE ) && !defined( __CEGCC__ ) && !defined( __POCC__ )
# include "hbwmain.c"
#endif

View File

@@ -322,7 +322,7 @@ FUNCTION Sx_KillTag( xTag, xIndex )
ENDIF
IF !Empty( cIndex )
IF ordBagClear( cIndex )
lRet := ferase( cIndex ) != -1
lRet := FErase( cIndex ) != -1
ENDIF
ENDIF
ENDIF
@@ -389,11 +389,11 @@ FUNCTION RDD_Info( xID )
IF ISNUMBER( xID )
IF !Empty( Alias( xID ) )
( xID )->( RDDName() )
( xID )->( rddName() )
ENDIF
ELSEIF ISCHARACTER( xID )
cRDD := Upper( AllTrim( xID ) )
IF ascan( RDDList(), {|x| Upper( x ) == cRDD } ) == 0
IF AScan( rddList(), {|x| Upper( x ) == cRDD } ) == 0
cRDD := NIL
ENDIF
ELSEIF xID == NIL
@@ -442,11 +442,11 @@ FUNCTION Sx_BLOB2File( cFileName, cFldName )
FUNCTION Sx_File2BLOB( cFileName, cFldName, nActionCode )
LOCAL nAction := 0
IF HB_BITAND( nActionCode, BLOB_FILECOMPRESS ) != 0
nAction := HB_BITOR( nAction, FILEPUT_COMPRESS )
IF hb_bitAnd( nActionCode, BLOB_FILECOMPRESS ) != 0
nAction := hb_bitOr( nAction, FILEPUT_COMPRESS )
ENDIF
IF HB_BITAND( nActionCode, BLOB_FILEENCRYPT ) != 0
nAction := HB_BITOR( nAction, FILEPUT_ENCRYPT )
IF hb_bitAnd( nActionCode, BLOB_FILEENCRYPT ) != 0
nAction := hb_bitOr( nAction, FILEPUT_ENCRYPT )
ENDIF
RETURN dbFileGet( cFldName, cFileName, nAction )

View File

@@ -108,7 +108,7 @@ HB_FUNC( HB_NUMTOHEX )
if( ISNUM( 1 ) )
ulNum = hb_parnint( 1 );
else if( ISPOINTER( 1 ) )
ulNum = (HB_PTRDIFF) hb_parptr( 1 );
ulNum = ( HB_PTRDIFF ) hb_parptr( 1 );
else
{
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );