2010-06-15 13:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* harbour-win-spec
* harbour-wce-spec
* harbour.spec
! Deleted references to hbcc, hbcmp, hblnk. They still work,
and they still can be readded as links if someone finds them
necessary. As a general direction for most users though it's
preferred to use hbmk2 as-is.
* Updated help text. (pls fix it further, it's not perfect)
* contrib/hbcomm/hbcomm.prg
+ OUTCHR() smartened to use a loop until failure or the whole
data is transmitted. As suggested by Mindaugas.
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-15 13:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* harbour-win-spec
|
||||
* harbour-wce-spec
|
||||
* harbour.spec
|
||||
! Deleted references to hbcc, hbcmp, hblnk. They still work,
|
||||
and they still can be readded as links if someone finds them
|
||||
necessary. As a general direction for most users though it's
|
||||
preferred to use hbmk2 as-is.
|
||||
* Updated help text. (pls fix it further, it's not perfect)
|
||||
|
||||
* contrib/hbcomm/hbcomm.prg
|
||||
+ OUTCHR() smartened to use a loop until failure or the whole
|
||||
data is transmitted. As suggested by Mindaugas.
|
||||
|
||||
2010-06-15 12:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/xhb/xhbcomp.prg
|
||||
* harbour/contrib/xhb/xhbmsgs.c
|
||||
|
||||
@@ -122,23 +122,37 @@ FUNCTION ISWORKING( nPort )
|
||||
RETURN nPort $ s_hPort
|
||||
|
||||
/* NOTE: INCOMPATIBILITY.
|
||||
In contratry to original HBCOMM, here <cString> must be passed by reference.
|
||||
In contratry to original HBCOMM, here <cData> must be passed by reference.
|
||||
HBCOMM could corrupt HVM because of its buggy way of returning data.
|
||||
[vszakats] */
|
||||
/* Fetch <nCount> chars into <cString> */
|
||||
FUNCTION INCHR( nPort, nCount, /* @ */ cString )
|
||||
cString := iif( ISNUMBER( nCount ), Space( nCount ), "" )
|
||||
RETURN hb_comRecv( nPort, @cString, nCount )
|
||||
/* Fetch <nCount> chars into <cData> */
|
||||
FUNCTION INCHR( nPort, nCount, /* @ */ cData )
|
||||
cData := iif( ISNUMBER( nCount ), Space( nCount ), "" )
|
||||
RETURN hb_comRecv( nPort, @cData, nCount )
|
||||
|
||||
/* Send out characters. Returns .t. if successful. */
|
||||
FUNCTION OUTCHR( nPort, cString )
|
||||
RETURN hb_comSend( nPort, cString ) == Len( cString )
|
||||
/* Send out characters. Returns .T. if successful. */
|
||||
FUNCTION OUTCHR( nPort, cData )
|
||||
LOCAL nLen
|
||||
|
||||
DO WHILE Len( cData ) > 0
|
||||
|
||||
/* I expect at least some data to be sent in a second */
|
||||
nLen := hb_comSend( nPort, cData,, 1000 )
|
||||
|
||||
IF nLen <= 0
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
cData := SubStr( cData, nLen + 1 )
|
||||
ENDDO
|
||||
|
||||
RETURN .T.
|
||||
|
||||
/* Find out how many chars are in input buffer */
|
||||
FUNCTION INBUFSIZE( nPort )
|
||||
RETURN hb_comInputCount( nPort )
|
||||
|
||||
/* Find out how many characters are in out buf? */
|
||||
/* Find out how many characters are in output buffer */
|
||||
FUNCTION OUTBUFSIZE( nPort )
|
||||
RETURN hb_comOutputCount( nPort )
|
||||
|
||||
|
||||
@@ -127,30 +127,16 @@ make install %{?_smp_mflags}
|
||||
|
||||
# remove unused files
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbmk2,hbrun,hbi18n,hbtest}.exe
|
||||
rm -fR ${HB_BIN_INSTALL}/{hb,%{hb_pref}}mk.cfg
|
||||
rm -fR ${HB_BIN_INSTALL}/hbmk.cfg
|
||||
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
This RPM distribution of Harbour includes extra commands to make compiling
|
||||
and linking with Harbour a little easier. There are compiler and linker
|
||||
wrappers called "%{hb_pref}cc", "%{hb_pref}cmp", "%{hb_pref}lnk" and "%{hb_pref}mk".
|
||||
and linking with Harbour a little easier.It includes hbmk2 to build
|
||||
projects easily.
|
||||
|
||||
"%{hb_pref}cc" is a wrapper to the C compiler only. It sets all flags
|
||||
and paths necessary to compile .c files which include Harbour header
|
||||
files. The result of its work is an object file.
|
||||
|
||||
Use "%{hb_pref}cmp" exactly as you would use the harbour compiler itself.
|
||||
The main difference with %{hb_pref}cmp is that it results in an object file,
|
||||
not a C file that needs compiling down to an object. %{hb_pref}cmp also
|
||||
ensures that the harbour include directory is seen by the harbour compiler.
|
||||
|
||||
"%{hb_pref}lnk" simply takes a list of object files and links them together
|
||||
with the harbour virtual machine and run-time library to produce an
|
||||
executable. The executable will be given the basename of the first object
|
||||
file if not directly set by the "-o" command line switch.
|
||||
|
||||
"%{hb_pref}mk" tries to produce an executable from your .prg file. It's a simple
|
||||
equivalent of cl.bat from the CA-Cl*pper distribution.
|
||||
hbmk2 tries to produce an executable from your .prg file. It's similar
|
||||
to cl.bat from the CA-Cl*pper distribution.
|
||||
|
||||
All these scripts accept command line switches:
|
||||
-o<outputfilename> # output file name
|
||||
@@ -171,10 +157,6 @@ All these scripts accept command line switches:
|
||||
# exist the name of first public function/procedure
|
||||
# in first linked object module (link)
|
||||
|
||||
Link options work only with "%{hb_pref}lnk" and "%{hb_pref}mk" and have no effect
|
||||
in "%{hb_pref}cc" and "%{hb_pref}cmp".
|
||||
Other options are passed to Harbour/C compiler/linker.
|
||||
|
||||
An example compile/link session looks like:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
@@ -182,35 +164,15 @@ function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}cmp foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}lnk foo.o
|
||||
|
||||
druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe
|
||||
----------------------------------------------------------------------
|
||||
|
||||
or using %{hb_pref}mk only:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}mk foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
druzus@uran:~/tmp$ hbmk2 foo
|
||||
Harbour 2.1.0beta1 (Rev. 14701)
|
||||
Copyright (c) 1999-2010, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
|
||||
druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo
|
||||
----------------------------------------------------------------------
|
||||
|
||||
I hope this RPM is useful. Have fun with Harbour.
|
||||
@@ -246,11 +208,7 @@ rm -fR $RPM_BUILD_ROOT
|
||||
%doc doc/%{readme}
|
||||
|
||||
%{_bindir}/%{hb_pref}-mkdyn
|
||||
%{_bindir}/%{hb_pref}-build
|
||||
%{_bindir}/%{hb_pref}cc
|
||||
%{_bindir}/%{hb_pref}cmp
|
||||
%{_bindir}/%{hb_pref}lnk
|
||||
%{_bindir}/%{hb_pref}mk
|
||||
%{_bindir}/hbmk2
|
||||
|
||||
%defattr(644,root,root,755)
|
||||
%dir %{_includedir}/%{name}
|
||||
|
||||
@@ -127,30 +127,16 @@ make install %{?_smp_mflags}
|
||||
|
||||
# remove unused files
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbmk2,hbrun,hbi18n,hbtest}.exe
|
||||
rm -fR ${HB_BIN_INSTALL}/{hb,%{hb_pref}}mk.cfg
|
||||
rm -fR ${HB_BIN_INSTALL}/hbmk.cfg
|
||||
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
This RPM distribution of Harbour includes extra commands to make compiling
|
||||
and linking with Harbour a little easier. There are compiler and linker
|
||||
wrappers called "%{hb_pref}cc", "%{hb_pref}cmp", "%{hb_pref}lnk" and "%{hb_pref}mk".
|
||||
and linking with Harbour a little easier.It includes hbmk2 to build
|
||||
projects easily.
|
||||
|
||||
"%{hb_pref}cc" is a wrapper to the C compiler only. It sets all flags
|
||||
and paths necessary to compile .c files which include Harbour header
|
||||
files. The result of its work is an object file.
|
||||
|
||||
Use "%{hb_pref}cmp" exactly as you would use the harbour compiler itself.
|
||||
The main difference with %{hb_pref}cmp is that it results in an object file,
|
||||
not a C file that needs compiling down to an object. %{hb_pref}cmp also
|
||||
ensures that the harbour include directory is seen by the harbour compiler.
|
||||
|
||||
"%{hb_pref}lnk" simply takes a list of object files and links them together
|
||||
with the harbour virtual machine and run-time library to produce an
|
||||
executable. The executable will be given the basename of the first object
|
||||
file if not directly set by the "-o" command line switch.
|
||||
|
||||
"%{hb_pref}mk" tries to produce an executable from your .prg file. It's a simple
|
||||
equivalent of cl.bat from the CA-Cl*pper distribution.
|
||||
hbmk2 tries to produce an executable from your .prg file. It's similar
|
||||
to cl.bat from the CA-Cl*pper distribution.
|
||||
|
||||
All these scripts accept command line switches:
|
||||
-o<outputfilename> # output file name
|
||||
@@ -171,10 +157,6 @@ All these scripts accept command line switches:
|
||||
# exist the name of first public function/procedure
|
||||
# in first linked object module (link)
|
||||
|
||||
Link options work only with "%{hb_pref}lnk" and "%{hb_pref}mk" and have no effect
|
||||
in "%{hb_pref}cc" and "%{hb_pref}cmp".
|
||||
Other options are passed to Harbour/C compiler/linker.
|
||||
|
||||
An example compile/link session looks like:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
@@ -182,35 +164,15 @@ function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}cmp foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}lnk foo.o
|
||||
|
||||
druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe
|
||||
----------------------------------------------------------------------
|
||||
|
||||
or using %{hb_pref}mk only:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}mk foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
druzus@uran:~/tmp$ hbmk2 foo
|
||||
Harbour 2.1.0beta1 (Rev. 14701)
|
||||
Copyright (c) 1999-2010, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
|
||||
druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo.exe
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo
|
||||
----------------------------------------------------------------------
|
||||
|
||||
I hope this RPM is useful. Have fun with Harbour.
|
||||
@@ -246,11 +208,7 @@ rm -fR $RPM_BUILD_ROOT
|
||||
%doc doc/%{readme}
|
||||
|
||||
%{_bindir}/%{hb_pref}-mkdyn
|
||||
%{_bindir}/%{hb_pref}-build
|
||||
%{_bindir}/%{hb_pref}cc
|
||||
%{_bindir}/%{hb_pref}cmp
|
||||
%{_bindir}/%{hb_pref}lnk
|
||||
%{_bindir}/%{hb_pref}mk
|
||||
%{_bindir}/hbmk2
|
||||
|
||||
%defattr(644,root,root,755)
|
||||
%dir %{_includedir}/%{name}
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
%define dname Harbour
|
||||
%define version 2.1.0
|
||||
%define releasen beta1
|
||||
%define hb_pref hb
|
||||
%define hb_etcdir /etc/%{name}
|
||||
%define hb_plat export HB_PLATFORM=linux
|
||||
%define hb_cc export HB_COMPILER=gcc
|
||||
@@ -435,25 +434,11 @@ rm -f $HB_INST_PKGPREF$HB_BIN_INSTALL/hbtest
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
This RPM distribution of %{dname} includes extra commands to make compiling
|
||||
and linking with %{dname} a little easier. There are compiler and linker
|
||||
wrappers called "%{hb_pref}cc", "%{hb_pref}cmp", "%{hb_pref}lnk" and "%{hb_pref}mk".
|
||||
and linking with %{dname} a little easier. It includes hbmk2 to build
|
||||
projects easily.
|
||||
|
||||
"%{hb_pref}cc" is a wrapper to the C compiler only. It sets all flags
|
||||
and paths necessary to compile .c files which include %{dname} header
|
||||
files. The result of its work is an object file.
|
||||
|
||||
Use "%{hb_pref}cmp" exactly as you would use the harbour compiler itself.
|
||||
The main difference with %{hb_pref}cmp is that it results in an object file,
|
||||
not a C file that needs compiling down to an object. %{hb_pref}cmp also
|
||||
ensures that the harbour include directory is seen by the harbour compiler.
|
||||
|
||||
"%{hb_pref}lnk" simply takes a list of object files and links them together
|
||||
with the harbour virtual machine and run-time library to produce an
|
||||
executable. The executable will be given the basename of the first object
|
||||
file if not directly set by the "-o" command line switch.
|
||||
|
||||
"%{hb_pref}mk" tries to produce an executable from your .prg file. It's a simple
|
||||
equivalent of cl.bat from the CA-Cl*pper distribution.
|
||||
hbmk2 tries to produce an executable from your .prg file. It's similar
|
||||
to cl.bat from the CA-Cl*pper distribution.
|
||||
|
||||
All these scripts accept command line switches:
|
||||
-o<outputfilename> # output file name
|
||||
@@ -474,10 +459,6 @@ All these scripts accept command line switches:
|
||||
# exist the name of first public function/procedure
|
||||
# in first linked object module (link)
|
||||
|
||||
Link options work only with "%{hb_pref}lnk" and "%{hb_pref}mk" and have no effect
|
||||
in "%{hb_pref}cc" and "%{hb_pref}cmp".
|
||||
Other options are passed to %{dname}/C compiler/linker.
|
||||
|
||||
An example compile/link session looks like:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
@@ -485,31 +466,9 @@ function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}cmp foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}lnk foo.o
|
||||
|
||||
druzus@uran:~/tmp$ strip foo
|
||||
|
||||
druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo
|
||||
----------------------------------------------------------------------
|
||||
|
||||
or using %{hb_pref}mk only:
|
||||
----------------------------------------------------------------------
|
||||
druzus@uran:~/tmp$ cat foo.prg
|
||||
function main()
|
||||
? "Hello, World!"
|
||||
return nil
|
||||
|
||||
druzus@uran:~/tmp$ %{hb_pref}mk foo
|
||||
Harbour 1.0.0 Intl. (Rev. 9099)
|
||||
Copyright (c) 1999-2008, http://harbour-project.org/
|
||||
druzus@uran:~/tmp$ hbmk2 foo
|
||||
Harbour 2.1.0beta1 (Rev. 14701)
|
||||
Copyright (c) 1999-2010, http://harbour-project.org/
|
||||
Compiling 'foo.prg'...
|
||||
Lines 5, Functions/Procedures 2
|
||||
Generating C source output to 'foo.c'... Done.
|
||||
@@ -518,7 +477,6 @@ druzus@uran:~/tmp$ ls -l foo
|
||||
-rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
In this RPM you will find additional wonderful tools: /usr/bin/hbrun
|
||||
You can run clipper/xbase compatible source files with it if you only
|
||||
put in their first line:
|
||||
@@ -581,11 +539,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_bindir}/harbour
|
||||
%{_bindir}/hbpp
|
||||
%{_bindir}/hb-mkdyn
|
||||
%{_bindir}/%{hb_pref}-build
|
||||
%{_bindir}/%{hb_pref}cc
|
||||
%{_bindir}/%{hb_pref}cmp
|
||||
%{_bindir}/%{hb_pref}lnk
|
||||
%{_bindir}/%{hb_pref}mk
|
||||
#%{_bindir}/hbtest
|
||||
%{_bindir}/hbrun
|
||||
%{_bindir}/hbi18n
|
||||
@@ -748,7 +701,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- 0.82 version set
|
||||
|
||||
* Wed Apr 30 2003 Przemyslaw Czerpak <druzus@polbox.com>
|
||||
- new tool "%{hb_pref}-build" (%{hb_pref}cmp, %{hb_pref}lnk, %{hb_pref}mk) added -
|
||||
- new tool "hb-build" (hbcmp, hblnk, hbmk) added -
|
||||
compiler/linker wrapper.
|
||||
- new tool "hb-mkdyn" (build shared libraries from static ones and object
|
||||
files).
|
||||
|
||||
Reference in New Issue
Block a user