2010-02-24 10:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbxpp/Makefile
  + contrib/hbxpp/runshell.prg
    + Added RUNSHELL()

  * src/rtl/hbproces.c
  * contrib/hbxpp/dll.ch
    * Formatting.
This commit is contained in:
Viktor Szakats
2010-02-24 09:04:21 +00:00
parent 0776044bf2
commit ec3d1fce89
5 changed files with 103 additions and 4 deletions

View File

@@ -17,11 +17,20 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-24 10:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxpp/Makefile
+ contrib/hbxpp/runshell.prg
+ Added RUNSHELL()
* src/rtl/hbproces.c
* contrib/hbxpp/dll.ch
* Formatting.
2010-02-23 14:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
+ contrib/hbide/resources/hbide.png
+ Added icon to be displayable in hbIDE windows title-bar.
Please visualize and forward any suggesstion. If possible
you can redesign it.
you can redesign it.
2010-02-23 20:52 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* examples/hbdoc2/hbdoc2.prg

View File

@@ -27,6 +27,7 @@ PRG_SOURCES := \
dbstruxx.prg \
dbtotalx.prg \
dbupdatx.prg \
runshell.prg \
tbcolumx.prg \
tbrowsex.prg \
tgetx.prg \

View File

@@ -68,7 +68,7 @@
/* Only for compatiblity.
Harbour always copies the string to a temporary buffer. */
#define DLL_CALLMODE_COPY 0
#define DLL_CALLMODE_NORMAL DLL_CALLMODE_COPY
#define DLL_CALLMODE_COPY 0
#define DLL_CALLMODE_NORMAL DLL_CALLMODE_COPY
#endif /* _DLL_CH */

View File

@@ -0,0 +1,89 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* RUNSHELL()
*
* Copyright 2010 Viktor Szakats (harbour.01 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 "common.ch"
FUNCTION RunShell( cCommand, cProgram, lAsync, lBackground )
/* Not supported (yet?) */
HB_SYMBOL_UNUSED( lBackground )
IF ! ISCHARACTER( cProgram )
#if defined( __PLATFORM__UNIX )
cProgram := hb_getenv( "SHELL" )
#elif defined( __PLATFORM__OS2 )
cProgram := hb_getenv( "OS2_SHELL" )
#else
cProgram := hb_getenv( "COMSPEC" )
#endif
IF Empty( cProgram )
#if defined( __PLATFORM__WINDOWS )
IF hb_osIsWinNT()
cProgram := "cmd.exe"
ELSE
cProgram := "command.com"
ENDIF
#elif defined( __PLATFORM__DOS )
cProgram := "command.com"
#elif defined( __PLATFORM__OS2 )
cProgram := "cmd.exe"
#else
cProgram := ""
#endif
ENDIF
ENDIF
IF ISCHARACTER( cCommand )
cProgram += " " + cCommand
ENDIF
RETURN hb_processRun( LTrim( cProgram ), NIL, NIL, NIL, lAsync )

View File

@@ -239,7 +239,7 @@ static void hb_getCommand( const char *pszFilename,
#endif
#if defined( HB_OS_DOS ) || defined( HB_OS_OS2 ) || defined( HB_OS_WIN_CE )
static int hb_fsProcessExec( const char *pszFilename,
static int hb_fsProcessExec( const char * pszFilename,
HB_FHANDLE hStdin, HB_FHANDLE hStdout,
HB_FHANDLE hStderr )
{