20000302-20:44 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-03-02 19:49:22 +00:00
parent 6cb05c3a78
commit c124d2959e
14 changed files with 76 additions and 37 deletions

View File

@@ -1,12 +1,29 @@
20000302-20:44 GMT+1 Victor Szakats <info@szelvesz.hu>
* contrib/rdd_ads/ads1.c
! All direct item accesses changed to Item API calls.
* source/compiler/cmdcheck.c
makefile.bc
makefile.vc
! Fixed OBJ32 support.
(Note that for some unknown reason the linker GPF on Harbour executables
when the OBJ generation is turned on, and the .OBJ format is also
rejected by the linker. Tested with BCC53 and BCC55)
* source/compiler/genobj32.c
+ Stub added for non OBJ32 support mode.
* make*.bat
+ They also delete the .LOG file on CLEAN.
* source/gt/*
* Minor formatting.
20000302-17:45 GMT+1 Victor Szakats <info@szelvesz.hu>
* tests/regress/*
% Modified to take advantage of the code inclusion feature of the PP.
* source/rdd/dbcmd.c
! All direct item accesses changed to Item API calls.
! Fixed direct item string buffer access in DBSETDRIVER()
% Variable scopes and some other minor thing optimized.
% Variable scopes and some other minor things optimized.
+ Static variables prefixed with "s_"
% LASTREC() is now the same speed as RECCOUNT() (minor enh.)
% LASTREC() is now of the same speed as RECCOUNT() (minor enh.)
! DBSETDRIVER(), RDDSETDEFAULT(), __RDDSETDEFAULT() synchronized.
! DBSETDRIVER(), RDDSETDEFAULT(), __RDDSETDEFAULT(), RDDREGISTER(),
DBCREATE()
@@ -18,6 +35,7 @@
* source/rtl/arrays.c
include/hbapi.h
+ Added hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex )
Same as above.
* source/rtl/arrays.c
source/rtl/descend.c
source/rtl/empty.c
@@ -30,7 +48,7 @@
source/rtl/dates.c
! All direct item accesses changed to Item API calls.
* source/rtl/do.c
! One direct item accesses changed to Item API calls.
! One direct item access changed to Item API calls.
* doc/en/misc.txt
! One copyright fixed.
* source/rtl/alert.prg

View File

@@ -259,7 +259,7 @@ static ERRCODE adsGoToId( ADSAREAP pArea, PHB_ITEM pItem )
HB_TRACE(HB_TR_DEBUG, ("adsGoToId(%p, %p)", pArea, pItem));
if( pItem->type & IT_NUMERIC )
if( IS_NUMERIC( pItem ) )
{
ulRecNo = hb_itemGetNL( pItem );
if( ulRecNo == 0 )
@@ -289,14 +289,14 @@ static ERRCODE adsSeek( ADSAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin
if( bFindLast )
{
AdsSeekLast( pArea->hOrdCurrent, (UNSIGNED8*)pKey->item.asString.value,
(UNSIGNED16) pKey->item.asString.length, ADS_STRINGKEY,
AdsSeekLast( pArea->hOrdCurrent, (UNSIGNED8*) hb_itemGetCPtr( pKey ),
(UNSIGNED16) hb_itemGetCLen( pKey ), ADS_STRINGKEY,
(UNSIGNED16*) &(pArea->fFound) );
}
else
{
AdsSeek( pArea->hOrdCurrent, (UNSIGNED8*)pKey->item.asString.value,
(UNSIGNED16) pKey->item.asString.length, ADS_STRINGKEY,
AdsSeek( pArea->hOrdCurrent, (UNSIGNED8*) hb_itemGetCPtr( pKey ),
(UNSIGNED16) hb_itemGetCLen( pKey ), ADS_STRINGKEY,
usSeekType, (UNSIGNED16*) &(pArea->fFound) );
}
AdsIsFound( pArea->hTable, (UNSIGNED16 *)&(pArea->fFound) );
@@ -535,20 +535,20 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
switch( pField->uiType )
{
case 'C':
if( pItem->type & IT_STRING )
if( IS_STRING( pItem ) )
{
uiCount = pItem->item.asString.length;
uiCount = hb_itemGetCLen( pItem );
if( uiCount > pField->uiLen )
uiCount = pField->uiLen;
memcpy( szText, pItem->item.asString.value, uiCount );
memcpy( szText, hb_itemGetCPtr( pItem ), uiCount );
memset( szText + uiCount, ' ', pField->uiLen - uiCount );
AdsSetString ( pArea->hTable, szName, pItem->item.asString.value, uiCount );
AdsSetString( pArea->hTable, szName, hb_itemGetCPtr( pItem ), uiCount );
bError = FALSE;
}
break;
case 'N':
if( pItem->type & IT_NUMERIC )
if( IS_NUMERIC( pItem ) )
{
if( pField->uiDec )
bError = !hb_ndtoa( hb_itemGetND( pItem ), ( char * ) szText,
@@ -568,12 +568,12 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
case 'D':
if( pItem->type & IT_DATE )
if( IS_DATE( pItem ) )
{
AdsGetDateFormat ( pucFormat, &pusLen );
AdsSetDateFormat ( "YYYYMMDD" );
szEndChar = * ( szText + pField->uiLen );
hb_dateDecode( pItem->item.asDate.value, &lDay, &lMonth, &lYear );
hb_dateDecode( hb_itemGetDL( pItem ), &lDay, &lMonth, &lYear );
hb_dateStrPut( ( char * ) szText, lDay, lMonth, lYear );
* ( szText + pField->uiLen ) = szEndChar;
AdsSetDate( pArea->hTable, szName, szText, 8 );
@@ -583,24 +583,20 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
case 'L':
if( pItem->type & IT_LOGICAL )
if( IS_LOGICAL( pItem ) )
{
if( pItem->item.asLogical.value )
*szText = 'T';
else
*szText = 'F';
*szText = hb_itemGetL( pItem ) ? 'T' : 'F';
bError = FALSE;
AdsSetLogical( pArea->hTable, szName,
pItem->item.asLogical.value );
AdsSetLogical( pArea->hTable, szName, hb_itemGetL( pItem ) );
}
break;
case 'M':
if( pItem->type & IT_STRING )
if( IS_STRING( pItem ) )
{
uiCount = pItem->item.asString.length;
AdsSetString ( pArea->hTable, szName,
pItem->item.asString.value, uiCount );
uiCount = hb_itemGetCLen( pItem );
AdsSetString( pArea->hTable, szName,
hb_itemGetCPtr( pItem ), uiCount );
bError = FALSE;
}
break;
@@ -762,11 +758,9 @@ static ERRCODE adsInfo( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
break;
}
case DBI_LASTUPDATE:
hb_itemClear( pItem );
pItem->type = IT_DATE;
pItem->item.asDate.value = hb_dateEncode( pArea->lpExtendInfo->bDay,
pArea->lpExtendInfo->bMonth,
pArea->lpExtendInfo->bYear );
hb_itemPutDL( pItem, hb_dateEncode( pArea->lpExtendInfo->bDay,
pArea->lpExtendInfo->bMonth,
pArea->lpExtendInfo->bYear ) );
break;
case DBI_GETRECSIZE:
@@ -936,8 +930,8 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
HB_TRACE(HB_TR_DEBUG, ("adsOrderCreate(%p, %p)", pArea, pOrderInfo));
if( !pOrderInfo->abBagName || *(pOrderInfo->abBagName) == '\0' ) ulOptions = ADS_COMPOUND;
ulRetVal = AdsCreateIndex ( pArea->hTable, pOrderInfo->abBagName,
pOrderInfo->atomBagName, pItem->item.asString.value, "", "",
ulRetVal = AdsCreateIndex( pArea->hTable, pOrderInfo->abBagName,
pOrderInfo->atomBagName, hb_itemGetCPtr( pItem ), "", "",
ulOptions, &phIndex);
if ( ulRetVal != AE_SUCCESS )
{
@@ -1272,3 +1266,4 @@ HARBOUR HB_ADS_GETFUNCTABLE( void )
else
hb_retni( FAILURE );
}

View File

@@ -17,6 +17,7 @@ if "%1" == "CLEAN" goto CLEAN
echo Y | del bin\*.exe > nul
echo Y | del obj\b16\*.* > nul
echo Y | del lib\b16\*.* > nul
echo Y | del make_b16.log > nul
goto EXIT
:EXIT

View File

@@ -18,6 +18,7 @@ if "%1" == "CLEAN" goto CLEAN
echo Y | del bin\*.tds > nul
echo Y | del obj\b32\*.* > nul
echo Y | del lib\b32\*.* > nul
echo Y | del make_b32.log > nul
goto EXIT
:EXIT

View File

@@ -18,6 +18,7 @@ if "%1" == "CLEAN" goto CLEAN
echo Y | del bin\*.tds > nul
echo Y | del obj\b32\*.* > nul
echo Y | del lib\b32\*.* > nul
echo Y | del make_b40.log > nul
goto EXIT
:EXIT

View File

@@ -17,6 +17,7 @@ if "%1" == "CLEAN" goto CLEAN
echo Y | del bin\*.exe > nul
echo Y | del obj\vc\*.* > nul
echo Y | del lib\vc\*.* > nul
echo Y | del make_vc.log > nul
goto EXIT
:EXIT

View File

@@ -70,6 +70,7 @@ HARBOUR_EXE_OBJS = $(OBJ_DIR)\harbour.obj \
$(OBJ_DIR)\hbgenerr.obj \
$(OBJ_DIR)\hbpcode.obj \
$(OBJ_DIR)\genc.obj \
$(OBJ_DIR)\genobj32.obj \
$(OBJ_DIR)\genjava.obj \
$(OBJ_DIR)\genpas.obj \
$(OBJ_DIR)\genrc.obj \
@@ -355,6 +356,7 @@ $(HARBOUR_EXE) : $(HARBOUR_EXE_OBJS)
echo $(OBJ_DIR)\hbgenerr.obj >> make.tmp
echo $(OBJ_DIR)\hbpcode.obj >> make.tmp
echo $(OBJ_DIR)\genc.obj >> make.tmp
echo $(OBJ_DIR)\genobj32.obj >> make.tmp
echo $(OBJ_DIR)\genjava.obj >> make.tmp
echo $(OBJ_DIR)\genpas.obj >> make.tmp
echo $(OBJ_DIR)\genrc.obj >> make.tmp
@@ -395,6 +397,9 @@ $(OBJ_DIR)\hbpcode.obj : $(COMPILER_DIR)\hbpcode.c
$(OBJ_DIR)\genc.obj : $(COMPILER_DIR)\genc.c
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$@ $**
$(OBJ_DIR)\genobj32.obj : $(COMPILER_DIR)\genobj32.c
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$@ $**
$(OBJ_DIR)\genjava.obj : $(COMPILER_DIR)\genjava.c
$(BCC_EXE) $(BCC_OPT) -c -I$(INCLUDE_DIR) -o$@ $**

View File

@@ -416,7 +416,7 @@ $(HARBOUR_EXE) : \
$(PP_DIR)\hbpp.c \
$(PP_DIR)\hbppint.c \
$(PP_DIR)\table.c
$(CC) $(CFLAGS) -w -DHARBOUR_OBJ_GENERATION $** -o $(HARBOUR_EXE)
$(CC) $(CFLAGS) -w $** -o $(HARBOUR_EXE)
-del harbour.obj
-del harboury.obj
-del harbourl.obj

View File

@@ -283,10 +283,12 @@ void hb_compChkEnvironVar( char * szSwitch )
hb_comp_iLanguage = LANG_C;
break;
#ifdef HARBOUR_OBJ_GENERATION
case 'f':
case 'F':
hb_comp_iLanguage = LANG_OBJ32;
break;
#endif
case 'j':
case 'J':

View File

@@ -38,6 +38,18 @@
#include "hbpcode.h"
#include "hberrors.h"
#ifndef HARBOUR_OBJ_GENERATION
void hb_compGenObj32( PHB_FNAME pFileName )
{
HB_SYMBOL_UNUSED( pFileName );
printf( "\nThis feature is not included in this build." );
fflush( stdout );
}
#else
static ULONG GetSymbolsSize( void );
static PCOMSYMBOL GetFirstSymbol( void );
static char * GetSymbolName( ULONG ulPos );
@@ -730,3 +742,6 @@ static void GroupDef( FILE * hObjFile, BYTE bName, BYTE * aSegs )
putbyte( 256 - bCheckSum, hObjFile );
}
#endif /* HARBOUR_OBJ_GENERATION */

View File

@@ -41,6 +41,9 @@
* Support for #pragma directive and related functions
* See doc/pragma.txt
*
* Copyright 2000 Victor Szakats <info@szelvesz.hu>
* __DATE__, __TIME__ support
*
* See doc/license.txt for licensing terms.
*
*/

View File

@@ -7,7 +7,6 @@
* Video subsystem based on ncurses.
*
* Copyright 1999 Gonzalo Diethelm <gonzalo.diethelm@iname.com>
*
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -7,7 +7,6 @@
* Video subsystem based on ncurses.
*
* Copyright 1999 Gonzalo Diethelm <gonzalo.diethelm@iname.com>
*
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -7,7 +7,6 @@
* Video subsystem for Win32 compilers
*
* Copyright 1999 Paul Tucker <ptucker@sympatico.ca> (functions marked ptucker)
*
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify