2010-01-02 18:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/global.mk
% Applied little optimization from Tamas Tevesz.
* contrib/hbide/idemisc.prg
+ hbide_PathProc()
This function can combine relative paths together so it's
the key to avoid macros dealing with placing paths to their
intended location. It can replace current method of
<IdeSrc> = hb_dirBase(). F.e.:
hbide_PathProc( "src/mysource_in_project.prg", "projects_dir/" ) ->
"projects_dir/src/mysource_in_project.prg"
hbide_PathProc( "projects/myproject.hbi", hb_dirBase() ) ->
"C:/harbour/contrib/hbide/projects/myproject.hbi"
Please use it.
; TOFIX: Since hbide seems to intend to support a hbrun-like
command prompt, maybe it's a good idea to prefix all
public functions with hbide_, otherwise there will
be problems when name collision occurs with user code.
If this is not the goal, we can leave it.
This commit is contained in:
@@ -17,6 +17,28 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-02 18:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* config/global.mk
|
||||
% Applied little optimization from Tamas Tevesz.
|
||||
|
||||
* contrib/hbide/idemisc.prg
|
||||
+ hbide_PathProc()
|
||||
This function can combine relative paths together so it's
|
||||
the key to avoid macros dealing with placing paths to their
|
||||
intended location. It can replace current method of
|
||||
<IdeSrc> = hb_dirBase(). F.e.:
|
||||
hbide_PathProc( "src/mysource_in_project.prg", "projects_dir/" ) ->
|
||||
"projects_dir/src/mysource_in_project.prg"
|
||||
hbide_PathProc( "projects/myproject.hbi", hb_dirBase() ) ->
|
||||
"C:/harbour/contrib/hbide/projects/myproject.hbi"
|
||||
Please use it.
|
||||
|
||||
; TOFIX: Since hbide seems to intend to support a hbrun-like
|
||||
command prompt, maybe it's a good idea to prefix all
|
||||
public functions with hbide_, otherwise there will
|
||||
be problems when name collision occurs with user code.
|
||||
If this is not the goal, we can leave it.
|
||||
|
||||
2010-01-02 08:28 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/projects/hbide.hbi
|
||||
+ Added missing files. A little formatting.
|
||||
|
||||
@@ -507,10 +507,10 @@ ifeq ($(HB_COMPILER),)
|
||||
|
||||
# try to detect MinGW cross-compiler location using some default platform settings
|
||||
ifeq ($(HB_CCPATH)$(HB_CCPREFIX),)
|
||||
ifneq ($(call find_in_path_raw,debian_version,/etc),)
|
||||
ifneq ($(wildcard /etc/debian_version),)
|
||||
HB_CCPREFIX := i586-mingw32msvc-
|
||||
else
|
||||
ifneq ($(call find_in_path_raw,gentoo-release,/etc),)
|
||||
ifneq ($(wildcard /etc/gentoo-release),)
|
||||
ifneq ($(call find_in_path_par,i386-mingw32msvc-gcc,/opt/xmingw/bin),)
|
||||
HB_CCPATH := /opt/xmingw/
|
||||
HB_CCPREFIX := i386-mingw32msvc-
|
||||
|
||||
@@ -48,6 +48,18 @@
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* hbide_PathProc()
|
||||
*
|
||||
* See COPYING for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -442,7 +454,7 @@ FUNCTION IsValidText( cSourceFile )
|
||||
hb_fNameSplit( cSourceFile, , , @cExt )
|
||||
cExt := lower( cExt )
|
||||
|
||||
RETURN ( cExt $ ".c,.cpp,.prg,.h,.ch,.txt,.log,.ini,.env,.ppo" )
|
||||
RETURN cExt $ ".c,.cpp,.prg,.h,.ch,.txt,.log,.ini,.env,.ppo"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -452,7 +464,7 @@ FUNCTION IsValidSource( cSourceFile )
|
||||
hb_fNameSplit( cSourceFile, , , @cExt )
|
||||
cExt := lower( cExt )
|
||||
|
||||
RETURN ( cExt $ ".c,.cpp,.prg,.res,.rc" )
|
||||
RETURN cExt $ ".c,.cpp,.prg,.res,.rc"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -463,7 +475,7 @@ FUNCTION PathNormalized( cPath, lLower )
|
||||
|
||||
s := strtran( cPath, "\", "/" )
|
||||
|
||||
RETURN IF( lLower, lower( s ), s )
|
||||
RETURN IIF( lLower, lower( s ), s )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*
|
||||
@@ -653,7 +665,28 @@ FUNCTION ParseKeyValPair( s, cKey, cVal )
|
||||
lYes := ( !empty( cKey ) .and. !empty( cVal ) )
|
||||
ENDIF
|
||||
|
||||
RETURN ( lYes )
|
||||
RETURN lYes
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_PathProc( cPathR, cPathA )
|
||||
LOCAL cDirA
|
||||
LOCAL cDirR, cDriveR, cNameR, cExtR
|
||||
|
||||
IF Empty( cPathA )
|
||||
RETURN cPathR
|
||||
ENDIF
|
||||
|
||||
hb_FNameSplit( cPathR, @cDirR, @cNameR, @cExtR, @cDriveR )
|
||||
|
||||
IF ! Empty( cDriveR ) .OR. ( ! Empty( cDirR ) .AND. Left( cDirR, 1 ) $ hb_osPathDelimiters() )
|
||||
RETURN cPathR
|
||||
ENDIF
|
||||
|
||||
hb_FNameSplit( cPathA, @cDirA )
|
||||
|
||||
IF Empty( cDirA )
|
||||
RETURN cPathR
|
||||
ENDIF
|
||||
|
||||
RETURN hb_FNameMerge( cDirA + cDirR, cNameR, cExtR )
|
||||
|
||||
Reference in New Issue
Block a user