19991004-19:23 GMT+1

This commit is contained in:
Viktor Szakats
1999-10-04 17:41:59 +00:00
parent d13bf0432c
commit 035829ced9
24 changed files with 50 additions and 78 deletions

View File

@@ -1,3 +1,15 @@
19991004-19:23 GMT+1 Victor Szel <info@szelvesz.hu>
* tests/broken/*.* moved to tests/working
tests/working/Makefile
* moved to the BAD_PRG_SOURCES
- tests/broken/
- Removed
* tests/working/hscript/*.* moved to samples/hscript
* Moved
* source/rtl/mlcount.c
* BYTE type changed to USHORT.
* Hungarian notation slighly corrected.
19991004-18:58 GMT+1 Victor Szel <info@szelvesz.hu>
+ source/runner/stdalone/hbrun.prg
+ Added (now for sure)

View File

@@ -37,33 +37,33 @@
HARBOUR HB_MLCOUNT( void )
{
char * pString = hb_parc( 1 );
BYTE bLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79;
BYTE bTabLength = ISNUM( 3 ) ? hb_parni( 3 ) : 4;
BYTE bLastSpace = 0;
BYTE bCurLength = 0;
BOOL bWordWrap = ISLOG( 4 ) ? hb_parl( 4 ) : TRUE;
ULONG ulLen = hb_parclen( 1 );
ULONG ulLines = 0;
char * pszString = hb_parc( 1 );
USHORT uiLineLength = ISNUM( 2 ) ? hb_parni( 2 ) : 79;
USHORT uiTabLength = ISNUM( 3 ) ? hb_parni( 3 ) : 4;
USHORT uiLastSpace = 0;
USHORT uiCurLength = 0;
BOOL bWordWrap = ISLOG( 4 ) ? hb_parl( 4 ) : TRUE;
ULONG ulLen = hb_parclen( 1 );
ULONG ulLines = 0;
ULONG ulPos;
if( bLineLength < 4 || bLineLength > 254 )
bLineLength = 79;
if( uiLineLength < 4 || uiLineLength > 254 )
uiLineLength = 79;
if( bTabLength > bLineLength )
bTabLength = bLineLength - 1;
if( uiTabLength > uiLineLength )
uiTabLength = uiLineLength - 1;
for( ulPos = 0; ulPos < ulLen; ulPos++ )
{
switch( pString[ ulPos ] )
switch( pszString[ ulPos ] )
{
case HB_CHAR_HT:
bCurLength += bTabLength;
uiCurLength += uiTabLength;
break;
case HB_CHAR_LF:
bCurLength = 0;
bLastSpace = 0;
uiCurLength = 0;
uiLastSpace = 0;
ulLines++;
break;
@@ -71,32 +71,32 @@ HARBOUR HB_MLCOUNT( void )
break;
case ' ':
bCurLength++;
bLastSpace = bCurLength;
uiCurLength++;
uiLastSpace = uiCurLength;
break;
default:
bCurLength++;
uiCurLength++;
}
if( bCurLength > bLineLength )
if( uiCurLength > uiLineLength )
{
if( bWordWrap )
if( bWordWrap )
{
if( bLastSpace == 0 )
bCurLength = 1;
if( uiLastSpace == 0 )
uiCurLength = 1;
else
bCurLength = bCurLength - bLastSpace;
uiCurLength = uiCurLength - uiLastSpace;
}
else
bCurLength = 1;
uiCurLength = 1;
ulLines++;
bLastSpace = 0;
uiLastSpace = 0;
}
}
if( bCurLength > 0 )
if( uiCurLength > 0 )
ulLines++;
hb_retnl( ulLines );

View File

@@ -1,47 +0,0 @@
//
// $Id$
//
// The following code tests the application of the className message
// against the "fundemental" types of Clipper.
// These tests were written by Dave Pearson <davep@hagbard.demon.co.uk>
// and are placed into the public domain.
Function Main()
// First, try all the types. This checks that the VM can cope.
aeval( { NIL, "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },;
{|x| qout( x:className ) } )
// Now try against values "in the code". This checks that the
// compiler can cope.
qout( NIL:className )
qout( "":className )
qout( 0:className )
qout( ctod( "" ):className )
qout( .f.:className )
qout( {|| nil }:className )
qout( ErrorNew():className )
// For fun, do it again while ensuring the parser doesn't care about
// whitespace.
qout( NIL : className )
qout( "" : className )
qout( 0 : className )
qout( ctod( "" ) : className )
qout( .f. : className )
qout( {|| nil } : className )
qout( ErrorNew() : className )
// Now for some sillier ones. If the above work the following should
// work too.
qout( ( NIL:className ):className )
qout( qout( ( NIL:className ):className ):className )
Return( NIL )

View File

@@ -36,7 +36,6 @@ PRG_SOURCES=\
calling.prg \
cdow.prg \
clasinit.prg \
clasname.prg \
classch.prg \
classes.prg \
clsdata.prg \
@@ -157,10 +156,13 @@ PRG_HEADERS=\
BAD_PRG_SOURCES=\
alias.prg \
clasname.prg \
dupvars.prg \
extend1.prg \
keywords.prg \
linecont.prg \
lnlenli1.prg \
lnlenli2.prg \
setkeys.prg \
spawn.prg \
spawn2.prg \
@@ -168,6 +170,7 @@ BAD_PRG_SOURCES=\
statics2.prg \
test10.prg \
testid.prg \
vec1.prg \
C_SOURCES=\

View File

@@ -1,3 +1,4 @@
//NOTEST
//
// $Id$
//
@@ -12,10 +13,10 @@ Function Main()
// First, try all the types. This checks that the VM can cope.
aEval( { /* NIL, */ "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },;
aeval( { NIL, "", 0, ctod( "" ), .F., {|| NIL }, ErrorNew() },;
{|x| qout( x:className ) } )
/* // Now try against values "in the code". This checks that the
// Now try against values "in the code". This checks that the
// compiler can cope.
qout( NIL:className )
@@ -41,7 +42,7 @@ Function Main()
// work too.
qout( ( NIL:className ):className )
qout( qout( ( NIL:className ):className ):className ) */
qout( qout( ( NIL:className ):className ):className )
Return( NIL )

View File

@@ -1,3 +1,4 @@
//NOTEST
//
// $Id$
//

View File

@@ -1,3 +1,4 @@
//NOTEST
//
// $Id$
//

View File

@@ -1,3 +1,4 @@
//NOTEST
//
// $Id$
//