2001-12-21 16:31 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>

This commit is contained in:
Viktor Szakats
2001-12-21 15:31:33 +00:00
parent a4e9f5feb7
commit b6be3cf42e
7 changed files with 84 additions and 13 deletions

View File

@@ -7,6 +7,15 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2001-12-22 03:30 UTC+0700 Andi Jahja <harbour@cbn.net.id>
* source/rtl/filesys.c
* add required C casts
* include/hbinit.h
* inconsistent hb_vmProcessSymbols() declaration corrected
2001-12-21 17:58 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
* source/rtl/filesys.c
* source/rtl/philes.c
* include/hbapifs.h

View File

@@ -237,6 +237,7 @@ RTL_LIB_OBJS = \
$(OBJ_DIR)\empty.obj \
$(OBJ_DIR)\errorapi.obj \
$(OBJ_DIR)\file.obj \
$(OBJ_DIR)\filehb.obj \
$(OBJ_DIR)\filesys.obj \
$(OBJ_DIR)\fkmax.obj \
$(OBJ_DIR)\fnsplit.obj \
@@ -1388,6 +1389,10 @@ $(OBJ_DIR)\file.obj : $(RTL_DIR)\file.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(RTL_LIB) $(ARFLAGS) -+$@,,
$(OBJ_DIR)\filehb.obj : $(RTL_DIR)\filehb.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(RTL_LIB) $(ARFLAGS) -+$@,,
$(OBJ_DIR)\filesys.obj : $(RTL_DIR)\filesys.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(RTL_LIB) $(ARFLAGS) -+$@,,

View File

@@ -281,6 +281,7 @@ RTL_LIB_OBJS = \
$(OBJ_DIR)\empty.obj \
$(OBJ_DIR)\errorapi.obj \
$(OBJ_DIR)\file.obj \
$(OBJ_DIR)\filehb.obj \
$(OBJ_DIR)\filesys.obj \
$(OBJ_DIR)\fkmax.obj \
$(OBJ_DIR)\fnsplit.obj \

View File

@@ -30,6 +30,7 @@ C_SOURCES=\
empty.c \
errorapi.c \
file.c \
filehb.c \
filesys.c \
fkmax.c \
fnsplit.c \

View File

@@ -139,19 +139,19 @@ HB_FUNC( DIRECTORY )
{
PHB_ITEM pSubarray = hb_itemArrayNew( F_LEN );
char buffer[ 32 ];
hb_arraySet( pSubarray, F_NAME, hb_itemPutC( pFilename, ffind->szName ) );
hb_arraySet( pSubarray, F_SIZE, hb_itemPutNL( pSize, ffind->size ) );
hb_arraySet( pSubarray, F_DATE, hb_itemPutDL( pDate, ffind->lDate ) );
hb_arraySet( pSubarray, F_TIME, hb_itemPutC( pTime, ffind->szTime ) );
hb_arraySet( pSubarray, F_ATTR, hb_itemPutC( pAttr, hb_fsAttrDecode( ffind->attr, buffer ) ) );
/* Don't exit when array limit is reached */
hb_arrayAdd( pDir, pSubarray );
hb_itemRelease( pSubarray );
}
}
}
while( hb_fsFindNext( ffind ) );
hb_itemRelease( pFilename );

View File

@@ -4,7 +4,7 @@
/*
* Harbour Project source code:
* FILE() function
* hb_fsFile() function
*
* Copyright 1999-2002 Viktor Szakats <viktor.szakats@syenar.hu>
* www - http://www.harbour-project.org
@@ -59,7 +59,7 @@ BOOL hb_fsFile( BYTE * pFilename )
HB_TRACE(HB_TR_DEBUG, ("hb_fsFile(%s)", (char*) pFilename));
if( ( ffind = hb_fsFindFirst( pFilename, HB_FA_ALL ) ) != NULL )
if( ( ffind = hb_fsFindFirst( ( char * ) pFilename, HB_FA_ALL ) ) != NULL )
{
hb_fsFindClose( ffind );
return TRUE;
@@ -68,10 +68,3 @@ BOOL hb_fsFile( BYTE * pFilename )
return FALSE;
}
/* TODO: Xbase++ has an extension where the second parameter can specify
the required attribute. */
HB_FUNC( FILE )
{
hb_retl( ISCHAR( 1 ) ? hb_spFile( ( unsigned char * ) hb_parc( 1 ) ) : FALSE );
}

View File

@@ -0,0 +1,62 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* FILE() function
*
* Copyright 1999-2002 Viktor Szakats <viktor.szakats@syenar.hu>
* www - http://www.harbour-project.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.
*
*/
#include "hbapi.h"
#include "hbapifs.h"
/* TODO: Xbase++ has an extension where the second parameter can specify
the required attribute. */
HB_FUNC( FILE )
{
hb_retl( ISCHAR( 1 ) ? hb_spFile( ( unsigned char * ) hb_parc( 1 ) ) : FALSE );
}