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:
@@ -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.
|
||||
|
||||
@@ -23,6 +23,7 @@ C_HEADERS=\
|
||||
hbcompat.h \
|
||||
|
||||
PRG_SOURCES=\
|
||||
arrayblk.prg \
|
||||
txml.prg \
|
||||
hblog.prg \
|
||||
hblognet.prg \
|
||||
|
||||
57
harbour/contrib/xhb/arrayblk.prg
Normal file
57
harbour/contrib/xhb/arrayblk.prg
Normal 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 )}
|
||||
|
||||
@@ -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) \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1562,7 +1562,7 @@ FUNCTION ReadLN( leof )
|
||||
|
||||
LOCAL cBuffer := ""
|
||||
|
||||
cBuffer := FT_FREADLN()
|
||||
cBuffer := FReadLn()
|
||||
FT_FSKIP( 1 )
|
||||
lEof := FT_FEOF()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user