Files
harbour-core/harbour/source/rtl/fnsplit.c
Przemyslaw Czerpak 990ac68465 2008-08-12 22:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/dm.cf
    * updated for central library directory used by Harbour - not tested

  * harbour/config/w32/xcc.cf
    ! fixed include PATH in XCC builds - Viktor be carefull with
      cleaning -I<path> parameter. Some compilers use different
      rulles then the one you may expect using the most popular
      ones and such operation will break compilation. F.e. XCC
      seems to ignore source file location for releative paths
      so in GNU make builds it's necessary to add "-I$(TOP)"
      instead of "-I." and when included file starts with ".."
      then it does not try to use it with paths set by -I option
      so we need -I$(TOP)$(ROOT) and hard coded for this compiler
      directories in include/hbregex.h and include/hbzip.h

  * harbour/source/hbzlib/zutil.h
    ! do not use fdopen() with XCC - it does not support it

  * harbour/contrib/examples/pp/pp.c
  * harbour/contrib/examples/pp/hbppcore.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/rtl/fnsplit.c
  * harbour/source/rtl/fstemp.c
    ! always use _POSIX_PATH_MAX + 1 buffers

  * harbour/source/compiler/gencobj.c
    * extended line buffer size

  * harbour/source/rtl/gtcrs/gtcrs.h
    * removed unnecessary declaration for _POSIX_PATH_MAX
      it's always defined in Harbour header files

  * harbour/source/rtl/inkey.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/gtwvt/gtwvt.c
    * use hb_array[SG]et*() functions insteaf of
      hb_item*( hb_arrayGetItemPtr, ... )
2008-08-12 20:50:38 +00:00

84 lines
2.8 KiB
C

/*
* $Id$
*/
/*
* Harbour Project source code:
* HB_FNAMESPLIT(), HB_FNAMEMERGE() functions
*
* Copyright 1999-2001 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"
HB_FUNC( HB_FNAMESPLIT )
{
if( ISCHAR( 1 ) )
{
PHB_FNAME pFileName = hb_fsFNameSplit( hb_parc( 1 ) );
hb_storc( pFileName->szPath, 2 );
hb_storc( pFileName->szName, 3 );
hb_storc( pFileName->szExtension, 4 );
hb_storc( pFileName->szDrive, 5 );
hb_xfree( pFileName );
}
}
HB_FUNC( HB_FNAMEMERGE )
{
HB_FNAME pFileName;
char szFileName[ _POSIX_PATH_MAX + 1 ];
pFileName.szPath = hb_parc( 1 );
pFileName.szName = hb_parc( 2 );
pFileName.szExtension = hb_parc( 3 );
pFileName.szDrive = hb_parc( 4 );
hb_retc( hb_fsFNameMerge( szFileName, &pFileName ) );
}