2008-08-22 22:51 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* utils/hbtest/rt_array.prg
     + Added failing test case of doing AEval() 
       and resizing the evaluated array in the 
       eval codeblock.

   * utils/hbdoc/ft_funcs.prg
   * utils/hbdoc/hbdoc.prg
   * utils/hbmake/ft_funcs.prg
   * utils/hbmake/hbmutils.prg
     ! Two EOL handling fixes applied.
       Thanks to Bill Robertson.
     ; Please test.

   * contrib/xhb/Makefile
   * contrib/xhb/common.mak
   + contrib/xhb/arrayblk.prg
     + Added HB_ARRAYBLOCK()
This commit is contained in:
Viktor Szakats
2008-08-22 20:56:09 +00:00
parent 44048fc8a8
commit b70cbd6a34
9 changed files with 94 additions and 10 deletions

View File

@@ -8,6 +8,25 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-08-22 22:51 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbtest/rt_array.prg
+ Added failing test case of doing AEval()
and resizing the evaluated array in the
eval codeblock.
* utils/hbdoc/ft_funcs.prg
* utils/hbdoc/hbdoc.prg
* utils/hbmake/ft_funcs.prg
* utils/hbmake/hbmutils.prg
! Two EOL handling fixes applied.
Thanks to Bill Robertson.
; Please test.
* contrib/xhb/Makefile
* contrib/xhb/common.mak
+ contrib/xhb/arrayblk.prg
+ Added HB_ARRAYBLOCK()
2008-08-22 17:03 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/make_gcc_all.sh
+ Added darwin autodetection.

View File

@@ -23,6 +23,7 @@ C_HEADERS=\
hbcompat.h \
PRG_SOURCES=\
arrayblk.prg \
txml.prg \
hblog.prg \
hblognet.prg \

View File

@@ -0,0 +1,57 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* HB_ArrayBlk function
*
* Copyright 2003 Walter Negro <anegro@overnet.com.ar>
* www - http://www.xharbour.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
FUNCTION HB_ARRAYBLOCK( aArray, nIndex )
RETURN {| x | iif( PCount() == 0, aArray[ nIndex ], aArray[ nIndex ] := x )}

View File

@@ -28,6 +28,7 @@ LIB_OBJS = \
$(OBJ_DIR)hbcomprs$(OBJEXT) \
$(OBJ_DIR)xstrdel$(OBJEXT) \
\
$(OBJ_DIR)arrayblk$(OBJEXT) \
$(OBJ_DIR)txml$(OBJEXT) \
$(OBJ_DIR)hblog$(OBJEXT) \
$(OBJ_DIR)hblognet$(OBJEXT) \

View File

@@ -907,9 +907,6 @@ FUNCTION FT_FEOF()
FUNCTION FReadLn()
RETURN s_oFileBase:retrieve()
FUNCTION FT_FReadLn()
RETURN StrTran( FReadLn(), Chr( 13 ), "" )
PROCEDURE FT_FGotop()
s_oFileBase:Gotop()
RETURN
@@ -983,7 +980,7 @@ FUNCTION FREADline( nH, cB, nMaxLine )
cB := cLine
ELSE
cB := SUBSTR( cLine, 1, nEol - 1 )
FSEEK( nH, nSavePos + nEol + 1, FS_SET )
FSEEK( nH, nSavePos + Len( hb_OSNewLine() ) - 1, FS_SET )
ENDIF
RETURN nNumRead != 0

View File

@@ -1562,7 +1562,7 @@ FUNCTION ReadLN( leof )
LOCAL cBuffer := ""
cBuffer := FT_FREADLN()
cBuffer := FReadLn()
FT_FSKIP( 1 )
lEof := FT_FEOF()

View File

@@ -907,9 +907,6 @@ FUNCTION FT_FEOF()
FUNCTION FReadLn()
RETURN s_oFileBase:retrieve()
FUNCTION FT_FReadLn()
RETURN StrTran( FReadLn(), Chr( 13 ), "" )
PROCEDURE FT_FGotop()
s_oFileBase:Gotop()
RETURN
@@ -983,7 +980,7 @@ FUNCTION FREADline( nH, cB, nMaxLine )
cB := cLine
ELSE
cB := SUBSTR( cLine, 1, nEol - 1 )
FSEEK( nH, nSavePos + nEol + 1, FS_SET )
FSEEK( nH, nSavePos + Len( hb_OSNewLine() ) - 1, FS_SET )
ENDIF
RETURN nNumRead != 0

View File

@@ -502,7 +502,7 @@ FUNCTION ReadLN( lEof )
*----------------------
LOCAL cBuffer := ""
cBuffer := FT_FREADLN()
cBuffer := FReadLn()
cBuffer := STRTRAN( cBuffer, CHR( 13 ), "" )
cBuffer := STRTRAN( cBuffer, CHR( 10 ), "" )
FT_FSKIP( 1 )

View File

@@ -359,8 +359,20 @@ PROCEDURE Main_ARRAY()
TEST_LINE( AScan( saAllTypes, scStringZ ) , 3 )
SET EXACT OFF
TEST_LINE( TAEVSM() , "N10N 9N 8N 7N 6N 5N 4N 3N 2N 1 0" )
RETURN
STATIC FUNCTION TAEVSM()
LOCAL cString := ""
LOCAL aArray := Array( 10 )
AFill( aArray, 0 )
AEval( aArray, {| x | cString += ValType( x ) + Str( Len( aArray ), 2 ), ASize( aArray, Len( aArray ) - 1 ) } )
RETURN cString + Str( Len( aArray ) )
STATIC FUNCTION TANew( cChar, nLen )
LOCAL aArray
LOCAL tmp