*** empty log message ***

This commit is contained in:
Viktor Szakats
1999-07-28 03:59:58 +00:00
parent f6451542a1
commit afe9b50e06
6 changed files with 39 additions and 21 deletions

View File

@@ -1,5 +1,16 @@
19990728-05:40 CET Victor Szel <info@szelvesz.hu>
! source/compiler/harbour.y/MakeFilename() -
Fixed bug, which sometimes caused that the
filename losed the "." extension separator char.
! tests/working/makefile - newcopy.prg removed.
+ tests/working/strsub.prg - Added some more tests, and the
expected results.
! source/vm/hvm.c - Minus() simplified and fixed for strings.
! config/dos/djgpp.cf - Added -g to CFLAGS, so it's
able to make test programs.
19990728-03:50 CET Victor Szel <info@szelvesz.hu>
! config\win32\msvc.cf - Missing include added.
! config/win32/msvc.cf - Missing include added.
19990727-16:30 EDT David G. Holm <dholm@jsd-llc.com>
* source/rtl/dir.c

View File

@@ -13,7 +13,7 @@ CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -Wall
CFLAGS = -Wall -g
LD = gcc
LD_OUT = -o

View File

@@ -1616,7 +1616,7 @@ char *MakeFilename( char *szFileName, FILENAME *pFileName )
{
int iLen =strlen(szFileName);
if( !(pFileName->extension[ 0 ] == '.' || pFileName->name[ iLen-1 ] == '.') )
if( !(pFileName->extension[ 0 ] == '.' || szFileName[ iLen-1 ] == '.') )
{
/* add extension separator only when extansion doesn't contain it */
szFileName[ iLen++ ] ='.';

View File

@@ -1451,30 +1451,21 @@ void Minus( void )
}
else if( IS_STRING( pItem1 ) && IS_STRING( pItem2 ) )
{
ULONG lLen = pItem1->item.asString.length;
ULONG lInc = 0;
ULONG i;
ULONG ulLen = pItem1->item.asString.length;
pItem1->item.asString.value = (char*)hb_xrealloc( pItem1->item.asString.value, pItem1->item.asString.length + pItem2->item.asString.length + 1 );
pItem1->item.asString.length += pItem2->item.asString.length;
while( lLen && pItem1->item.asString.value[lLen - 1] == ' ' )
while( ulLen && pItem1->item.asString.value[ulLen - 1] == ' ' )
{
lLen--;
lInc++;
ulLen--;
}
pItem1->item.asString.length = lLen;
lLen = pItem2->item.asString.length;
pItem2->item.asString.length += lInc;
for( i = 0; i < lInc; i++)
pItem2->item.asString.value[lLen + i] = ' ';
memcpy( pItem1->item.asString.value+ pItem1->item.asString.length,
pItem2->item.asString.value, pItem2->item.asString.length );
pItem1->item.asString.length += pItem2->item.asString.length;
memcpy( pItem1->item.asString.value + ulLen, pItem2->item.asString.value, pItem2->item.asString.length );
ulLen += pItem2->item.asString.length;
memset( pItem1->item.asString.value + ulLen, ' ', pItem1->item.asString.length - ulLen);
pItem1->item.asString.value[ pItem1->item.asString.length ] = 0;
if( pItem2->item.asString.value )
{
hb_xfree( pItem2->item.asString.value );

View File

@@ -64,7 +64,6 @@ PRG_SOURCES=\
memvar.prg \
mtran.prg \
multiarg.prg \
newcopy.prg \
nums.prg \
objarr.prg \
objasign.prg \

View File

@@ -1,6 +1,17 @@
// Testing strings concat
// Expected result:
//
// [STRINGSCONCAT ]
// [STRINGSCONCAT ]
// [STRINGSCONCAT ]
// >AB<
// >AB <
// >AB <
// >A B <
// >B <
function main()
LOCAL a := "STRINGS "
@@ -15,6 +26,12 @@ function main()
QOut( "[" + c + "]" )
next
QOut( ">" + "A" - "B" + "<" ) // "AB"
QOut( ">" + "A " - "B" + "<" ) // "AB "
QOut( ">" + "A " - "B " + "<" ) // "AB "
QOut( ">" + "A " - " B" + "<" ) // "A B "
QOut( ">" + " " - "B " + "<" ) // "B "
QOut()
__Accept( "Press a key to raise an error!" )
QOut( a - i )