From 30511d52a88c041ca07dec32ff0a4756fd28de6a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 5 May 2000 00:04:35 +0000 Subject: [PATCH] 20000505-02:03 GMT+1 Victor Szakats --- harbour/ChangeLog | 13 +++++- harbour/config/dos/bcc16.cf | 10 ++--- harbour/config/dos/djgpp.cf | 12 +++--- harbour/contrib/hbclip/hbarg.c | 56 ++++++++++++++++++++++++++ harbour/contrib/hbclip/hbclip.ch | 61 ++++++++++++++--------------- harbour/contrib/hbclip/make_clp.bat | 2 + harbour/make_gnu.bat | 2 +- harbour/make_gnu.cmd | 2 +- harbour/make_gnu.sh | 2 +- 9 files changed, 113 insertions(+), 47 deletions(-) create mode 100644 harbour/contrib/hbclip/hbarg.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index edec31c0a5..dd21481ffc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,15 @@ +20000505-02:03 GMT+1 Victor Szakats + + * make_gnu.* + - Removed output redirection. + + * config/dos/bcc16.cf + * config/dos/djgpp.cf + ! echo -> echo. + + * contrib/hbclip/* + + HB_ARGC(), HB_ARGV() added. + 20000505-00:27 GMT+2 Maurilio Longo * source/rtl/teditor.prg @@ -26,7 +38,6 @@ * changed to access pointers via hb_vmPushPointer/hb_itemGetPtr instead of passing them using values of long type - 20000504-04:05 GMT-8 Ron Pinkas * source/compiler/hbpcode.c diff --git a/harbour/config/dos/bcc16.cf b/harbour/config/dos/bcc16.cf index d4a5d30c8b..ff5f03543c 100644 --- a/harbour/config/dos/bcc16.cf +++ b/harbour/config/dos/bcc16.cf @@ -29,13 +29,13 @@ CFLAGS = -O2 -mh -d #Note: The empty line below HAVE TO exist! define link_file -echo $(file) >> __link__.tmp +echo. $(file) >> __link__.tmp endef define link_exe_file -echo $(LDFLAGS) -e$@ > __link__.tmp +echo. $(LDFLAGS) -e$@ > __link__.tmp $(foreach file, $^, $(link_file)) $(foreach file, $(LINKLIBS), $(link_file)) -$(LD) @__link__.tmp @@ -71,14 +71,14 @@ endif #Note: The empty line below HAVE TO exist! define lib_object -echo -+$(file) &>> __lib__.tmp +echo. -+$(file) &>> __lib__.tmp endef define create_library -echo $@ &> __lib__.tmp +echo. $@ &> __lib__.tmp $(foreach file, $^, $(lib_object)) -echo ,, >> __lib__.tmp +echo. ,, >> __lib__.tmp $(AR) $(ARFLAGS) @__lib__.tmp del __lib__.tmp endef diff --git a/harbour/config/dos/djgpp.cf b/harbour/config/dos/djgpp.cf index 3fe49dd1c1..669c2c5f04 100644 --- a/harbour/config/dos/djgpp.cf +++ b/harbour/config/dos/djgpp.cf @@ -41,28 +41,28 @@ endif # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every echo command will be separated by LF define lib_object -echo ADDMOD $(file) >> __lib__.tmp +echo. ADDMOD $(file) >> __lib__.tmp endef # We have to use script to overcome the DOS limit of max 128 characters # in commmand line define create_library -echo CREATE $@ > __lib__.tmp +echo. CREATE $@ > __lib__.tmp $(foreach file, $^, $(lib_object)) -echo SAVE >> __lib__.tmp -echo END >> __lib__.tmp +echo. SAVE >> __lib__.tmp +echo. END >> __lib__.tmp $(AR) -M < __lib__.tmp endef # NOTE: The empty line below HAVE TO exist! define link_file -echo $(file) >> __link__.tmp +echo. $(file) >> __link__.tmp endef define link_exe_file -echo $(LDFLAGS) $(LD_OUT)$@ > __link__.tmp +echo. $(LDFLAGS) $(LD_OUT)$@ > __link__.tmp $(foreach file, $^, $(link_file)) $(foreach file, $(LINKPATHS), $(link_file)) $(foreach file, $(LINKLIBS), $(link_file)) diff --git a/harbour/contrib/hbclip/hbarg.c b/harbour/contrib/hbclip/hbarg.c new file mode 100644 index 0000000000..2e95611ca8 --- /dev/null +++ b/harbour/contrib/hbclip/hbarg.c @@ -0,0 +1,56 @@ +/* + * $Id$ + */ + +/* + * Harbour Compatibility Library for CA-Cl*pper source code: + * HB_ARGC(), HB_ARGV() functions + * + * Copyright 2000 Victor Szakats + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +#include "extend.h" + +extern int __argc; +extern char ** __argv; + +CLIPPER HB_ARGC( void ) +{ + _retni( __argc - 1 ); +} + +CLIPPER HB_ARGV( void ) +{ + if( ISNUM( 1 ) ) + { + int argc = _parni( 1 ); + + _retc( ( argc >= 0 && argc < __argc ) ? __argv[ argc ] : "" ); + } + else + _retc( "" ); +} diff --git a/harbour/contrib/hbclip/hbclip.ch b/harbour/contrib/hbclip/hbclip.ch index b583786901..cbf01fab0f 100644 --- a/harbour/contrib/hbclip/hbclip.ch +++ b/harbour/contrib/hbclip/hbclip.ch @@ -52,8 +52,6 @@ #xtranslate HB_ARGCHECK( ) => ( .F. ) #xtranslate HB_ARGSTRING( ) => "" -#xtranslate HB_ARGC() => 0 -#xtranslate HB_ARGV( ) => "" #xtranslate HB_FNAMESPLIT( ) => NIL #xtranslate HB_FNAMEMERGE( [, [, [, ]]] ) => "" #xtranslate HB_PVALUE( ) => NIL @@ -61,46 +59,45 @@ #xtranslate HB_SETKEYSAVE( [] ) => ( {} ) #xtranslate HB_SETKEYCHECK( [, [, [, ]]] ) => ( .F. ) -#TRANSLATE AS CHAR ARRAY => -#TRANSLATE AS CHARACTER ARRAY => -#TRANSLATE AS STRING ARRAY => +#translate AS CHAR ARRAY => +#translate AS CHARACTER ARRAY => +#translate AS STRING ARRAY => -#TRANSLATE AS NUM ARRAY => -#TRANSLATE AS NUMERIC ARRAY => +#translate AS NUM ARRAY => +#translate AS NUMERIC ARRAY => -#TRANSLATE AS DATE ARRAY => -#TRANSLATE AS ARRAY ARRAY => -#TRANSLATE AS BLOCK ARRAY => -#TRANSLATE AS OBJECT ARRAY => +#translate AS DATE ARRAY => +#translate AS ARRAY ARRAY => +#translate AS BLOCK ARRAY => +#translate AS OBJECT ARRAY => -#TRANSLATE AS BOOL ARRAY => -#TRANSLATE AS BOOLEAN ARRAY => -#TRANSLATE AS LOGICAL ARRAY => +#translate AS BOOL ARRAY => +#translate AS BOOLEAN ARRAY => +#translate AS LOGICAL ARRAY => -#TRANSLATE AS VAR ARRAY => -#TRANSLATE AS VARIANT ARRAY => +#translate AS VAR ARRAY => +#translate AS VARIANT ARRAY => +#translate AS CHAR => +#translate AS CHARACTER => +#translate AS STRING => -#TRANSLATE AS CHAR => -#TRANSLATE AS CHARACTER => -#TRANSLATE AS STRING => +#translate AS NUM => +#translate AS NUMERIC => -#TRANSLATE AS NUM => -#TRANSLATE AS NUMERIC => +#translate AS DATE => +#translate AS ARRAY => +#translate AS BLOCK => +#translate AS OBJECT => -#TRANSLATE AS DATE => -#TRANSLATE AS ARRAY => -#TRANSLATE AS BLOCK => -#TRANSLATE AS OBJECT => +#translate AS BOOL => +#translate AS BOOLEAN => +#translate AS LOGICAL => -#TRANSLATE AS BOOL => -#TRANSLATE AS BOOLEAN => -#TRANSLATE AS LOGICAL => +#translate AS VAR => +#translate AS VARIANT => -#TRANSLATE AS VAR => -#TRANSLATE AS VARIANT => - -#COMMAND DECLARE FUNCTION <*x*> => +#command DECLARE FUNCTION <*x*> => #endif /* HB_CLIP_CH_ */ diff --git a/harbour/contrib/hbclip/make_clp.bat b/harbour/contrib/hbclip/make_clp.bat index 4fc0308e7e..aaec23d0d7 100644 --- a/harbour/contrib/hbclip/make_clp.bat +++ b/harbour/contrib/hbclip/make_clp.bat @@ -8,6 +8,7 @@ clipper hbkeyput.prg /n clipper hbshadow.prg /n clipper hbvaltoc.prg /n +cl /c /AL /Zl /Oalt /Gs /W3 hbarg.c cl /c /AL /Zl /Oalt /Gs /W3 hbcolind.c cl /c /AL /Zl /Oalt /Gs /W3 hbstod.c cl /c /AL /Zl /Oalt /Gs /W3 hbstodx.c @@ -19,6 +20,7 @@ lib hbclip -+ hbkeyput.obj ,, lib hbclip -+ hbshadow.obj ,, lib hbclip -+ hbvaltoc.obj ,, +lib hbclip -+ hbarg.obj ,, lib hbclip -+ hbcolind.obj ,, lib hbclip -+ hbstod.obj ,, lib hbclip -+ hbstodx.obj ,, diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index 924595e980..61e7e1e069 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -109,7 +109,7 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=include\ rem --------------------------------------------------------------- rem Start the GNU make system - make %1 %2 %3 %4 %5 %6 %7 %8 %9 2> make_gnu.log + make %1 %2 %3 %4 %5 %6 %7 %8 %9 goto END :END diff --git a/harbour/make_gnu.cmd b/harbour/make_gnu.cmd index d39847811e..984b85bc42 100644 --- a/harbour/make_gnu.cmd +++ b/harbour/make_gnu.cmd @@ -109,7 +109,7 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=include\ rem --------------------------------------------------------------- rem Start the GNU make system - make %1 %2 %3 %4 %5 %6 %7 %8 %9 2> make_gnu.log + make %1 %2 %3 %4 %5 %6 %7 %8 %9 goto END :END diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index 2d8d90635a..1fb983e24c 100644 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -99,6 +99,6 @@ else # --------------------------------------------------------------- # Start the GNU make system - make $* > make_gnu.log + make $* fi