2008-06-21 12:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* harbour-ce-spec
   * harbour-w32-spec
   * doc/whatsnew.txt
     ! Fixed version to be 1.0.0 RC1
       [1.0.0RC1]

   * contrib/hbwhat32/winuser.ch
     ! Pulled from MinGW distribution.
     ; HbWhat32 compiles fine but I have seen a lot of contradictions
       in the header. Anybody using hbwhat32 needs to test it 
       properly. May be in normal usage this is OK.  
       [1.0.0RC1]

   * contrib/hbtpathy/telepath.prg
     ! Fixed embedded comments.
       [1.0.0RC1]

   * contrib/hbziparch/zip.c
   * contrib/hbziparch/zipfile.cpp
   * contrib/hbziparch/zipnew.cpp
   * contrib/hbziparch/zipplatform.cpp
   * contrib/hbziparch/zipstorage.cpp
     * Synced with xharbour. Added relative paths capability, removed memory leaks and minor refinements.
     ( code aported by Juan Galvez )
       [1.0.0RC1]

   * include/hbgtinfo.ch
     ! Comment typo.
       [1.0.0RC1]

   * contrib/hbtpathy/tplinux.c
   * contrib/hbtpathy/telepath.prg
     ! Moved some commented "inline" stuff to C level.
       [1.0.0RC1]

  * Set version in harbour.spec to 1.0.0-RC1
  * Set version in include/hbver.h to 1.0.0-RC1
       [1.0.0RC1]
This commit is contained in:
Viktor Szakats
2008-06-21 10:06:52 +00:00
parent fcbc2daadf
commit ac1dac0919
15 changed files with 2707 additions and 6852 deletions

View File

@@ -8,14 +8,54 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-21 12:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* harbour-ce-spec
* harbour-w32-spec
* doc/whatsnew.txt
! Fixed version to be 1.0.0 RC1
[1.0.0RC1]
* contrib/hbwhat32/winuser.ch
! Pulled from MinGW distribution.
; HbWhat32 compiles fine but I have seen a lot of contradictions
in the header. Anybody using hbwhat32 needs to test it
properly. May be in normal usage this is OK.
[1.0.0RC1]
* contrib/hbtpathy/telepath.prg
! Fixed embedded comments.
[1.0.0RC1]
* contrib/hbziparch/zip.c
* contrib/hbziparch/zipfile.cpp
* contrib/hbziparch/zipnew.cpp
* contrib/hbziparch/zipplatform.cpp
* contrib/hbziparch/zipstorage.cpp
* Synced with xharbour. Added relative paths capability, removed memory leaks and minor refinements.
( code aported by Juan Galvez )
[1.0.0RC1]
* include/hbgtinfo.ch
! Comment typo.
[1.0.0RC1]
* contrib/hbtpathy/tplinux.c
* contrib/hbtpathy/telepath.prg
! Moved some commented "inline" stuff to C level.
[1.0.0RC1]
* Set version in harbour.spec to 1.0.0-RC1
* Set version in include/hbver.h to 1.0.0-RC1
[1.0.0RC1]
2008-06-20 14:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/examples/hscript/bld_b32.bat
! Fixed to have hbzlib.lib
[RC1]
[1.0.0RC1]
* contrib/hbtip/common.mak
! Added missing sendmail.prg
[RC1]
[1.0.0RC1]
* contrib/hbtip/tests/base64.prg
* contrib/hbtip/tests/dbtohtml.prg
@@ -26,22 +66,22 @@
! All tip tests fixed and tested to compile/link
with Harbour.
* Changed to not require hbw32.lib.
[RC1]
[1.0.0RC1]
+ contrib/hbtip/tests/test.dbf
+ Added for tests.
[RC1]
[1.0.0RC1]
* source/rtl/gtclip.c
! hb_gt_w32_setClipboard() fix to CF_UNICODETEXT
EOS char setting.
[RC1]
[1.0.0RC1]
* source/rtl/gtwvt/gtwvt.c
+ Now showing the application's executable name
in the window title on startup, instead of "Harbour WVT".
* Window class name handling and control flow cleaned.
[RC1]
[1.0.0RC1]
* tests/rto_get.prg
* source/rtl/tget.prg
@@ -49,7 +89,7 @@
to the original length with the original content.
This also clears some existing differences in rto_get.prg.
+ Added regression test specifically for this.
[RC1]
[1.0.0RC1]
* source/rtl/gtclip.c
! Added three LPWSTR casts to pacify warnings.
@@ -62,25 +102,25 @@
! Fixed get clipboard when CF_TEXT/CF_OEMTEXT format
is used, so that an additionaly zero byte won't be
appended anymore to the returned string.
[RC1]
[1.0.0RC1]
* source/rtl/gtwvt/gtwvt.c
* "HARBOUR_WVT" -> "Harbour WVT". This text is visible,
so it's better to make it "desktop friendlier"".
[RC1]
[1.0.0RC1]
* contrib/hbmzip/hbmzip.ch
* contrib/hbmzip/hbmzip.c
+ Added error codes to hbmzip.ch
+ Interface code changed to use manifest constants
instead of literals in a few places.
[RC1]
[1.0.0RC1]
2008-06-16 18:17 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddads/doc/en/adsfuncs.txt
* contrib/rddads/doc/en/readme.txt
+ Updated.
[RC1]
[1.0.0RC1]
* contrib/hbtip/tests/httpadv.prg
* contrib/hbtip/tests/dnldftp.prg
@@ -89,7 +129,7 @@
* contrib/hbtip/tests/loadhtml.prg
* contrib/hbtip/tests/ftpadv.prg
* Changed to compile in Harbour.
[RC1]
[1.0.0RC1]
+ contrib/hbtip/tests
+ contrib/hbtip/tests/bld_b32.bat
@@ -107,16 +147,16 @@
+ contrib/hbtip/tests/tiptime.prg
+ contrib/hbtip/tests/uploadftp.prg
+ Added TIP library tests from xhb repository.
[RC1]
[1.0.0RC1]
* contrib/hbct/fcopy.prg
! Fixed crash in FILECOPY() (reported by Mario H. Sabado)
[RC1]
[1.0.0RC1]
2008-06-14 09:13 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rdd/dbcmd.c
! LUPDATE() buffer overread fixed. (hb_retds(""))
[RC1]
[1.0.0RC1]
2008-06-11 19:39 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/xhb/Makefile
@@ -127,12 +167,12 @@
goes now to the official include dir. After this change
has been merged with RC1, xhb.lib may be included in
the default build.
[RC1]
[1.0.0RC1]
* include/hbgtinfo.ch
+ Added comment to compatibility #defines, to not use
them, since they're deprecated.
[RC1]
[1.0.0RC1]
* include/hbgfx.ch
* include/hbgfxdef.ch
@@ -144,26 +184,26 @@
#define HB_GT_NO_XHB to disable the compatibility #defines,
if it collides with your code or you want to test after
transition.
; [RC1]
; [1.0.0RC1]
* source/rtl/dirdrive.c
! Guarded C53 undoc functions with HB_C52_UNDOC, which is enabled
so it won't make a difference in default builds.
; [RC1]
; [1.0.0RC1]
* contrib/hbfbird/make_b32.bat
* contrib/hbfbird/make_vc.bat
* Fixed location where .libs are looked for.
[RC1]
[1.0.0RC1]
* contrib/hbcurl/hbcurl.c
% Minor cleanups.
[RC1]
[1.0.0RC1]
* contrib/hbodbc/make_vc.bat
! Removed .dll -> .lib conversion for MSVC,
since the .lib is provided by the MS SDK anyway.
; [RC1]
; [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
* contrib/hbcurl/hbcurl.ch
@@ -179,7 +219,7 @@
error would be thrown now.
! CURL_ESCAPE()/CURL_UNESCAPE() fixed picked parameter ordinal.
+ CURL_ESCAPE()/CURL_UNESCAPE() added parameter checking.
; [RC1]
; [1.0.0RC1]
2008-06-07 09:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbcurl/hbcurl.c
@@ -189,10 +229,10 @@
CURL_SHARE_STRERROR()
CURL_MULTI_STRERROR()
CURL_GETDATE()
[RC1]
[1.0.0RC1]
* contrib/hbcurl/hbcurl.c
% Minor opt. [RC1]
% Minor opt. [1.0.0RC1]
; Not bugfixes per se, but I didn't want to leave a gap
in behaviour. This are the final finishes to this lib.
@@ -203,44 +243,44 @@
a font change.
! Fixed cursor SC_NORMAL height to be calculated
from the font height, instead of being a static
number. [RC1]
number. [1.0.0RC1]
% Few ""s -> NULL (also from RC1, but I forgot this
one from the ChangeLog) [RC1]
one from the ChangeLog) [1.0.0RC1]
2008-06-06 17:58 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbpgsql/make_b32.bat
- Removed special compiler switches no longer necessary. [RC1]
- Removed special compiler switches no longer necessary. [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
+ Now throws RTEs when required parameters are missing
or the wrong type. The concept here is that RTEs are
only to catch syntax mistakes, and not errors resulting
from actual libcurl usage/functionality/states. [RC1]
from actual libcurl usage/functionality/states. [1.0.0RC1]
* contrib/hbapollo/apollo.ch
* Formatting. [RC1]
* Formatting. [1.0.0RC1]
* contrib/hbapollo/common.mak
* contrib/hbapollo/Makefile
+ contrib/hbapollo/apollo.ch
- contrib/hbapollo/tests/apollo.ch
! apollo.ch file was in tests by mistake. [RC1]
! apollo.ch file was in tests by mistake. [1.0.0RC1]
* harbour-w32-spec
! Added 'svn:keywords "Author Date Id Revision"' [RC1]
! Added 'svn:keywords "Author Date Id Revision"' [1.0.0RC1]
* contrib/examples/pe/bld_b32.bat
! Fixed. [RC1]
! Fixed. [1.0.0RC1]
* contrib/hbpgsql/make_vc.bat
+ Now uses the .lib provided in the binary package. [RC1]
+ Now uses the .lib provided in the binary package. [1.0.0RC1]
(This needs the current 8.3.1 version)
* contrib/hbpgsql/make_b32.bat
* contrib/hbpgsql/make_vc.bat
* contrib/hbpgsql/tests/bld_b32.bat
* contrib/hbpgsql/tests/bld_vc.bat
! Fixed to use the right .dll to generate the .lib. [RC1]
! Fixed to use the right .dll to generate the .lib. [1.0.0RC1]
* contrib/hbcurl/hbcurl.ch
* contrib/hbcurl/hbcurl.c
@@ -257,13 +297,13 @@
HB_CURLOPT_POSTQUOTE
HB_CURLOPT_PREQUOTE
HB_CURLOPT_TELNETOPTIONS
; [RC1]
; [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
* Minor. [RC1]
* Minor. [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
! Missing cast. [RC1]
! Missing cast. [1.0.0RC1]
* contrib/hbcurl/hbcurl.ch
* contrib/hbcurl/hbcurl.c
@@ -283,37 +323,37 @@
* HB_CURLOPT_SETDOWNLOADFILE -> HB_CURLOPT_DL_FILE_SETUP
* HB_CURLOPT_CLOSEDOWNLOADFILE -> HB_CURLOPT_DL_FILE_CLOSE
* HB_CURLOPT_SETPROGRESS -> HB_CURLOPT_PROGRESSBLOCK
; [RC1]
; [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
* Changed all logical options to default to .T.. This
way all work the same way, and in real life usage
the logical parameter can omitted in most cases.
INCOMPATIBLE. [RC1]
INCOMPATIBLE. [1.0.0RC1]
* contrib/hbcurl/tests/ftp_uldl.prg
+ Added small example to get a dir listing. [RC1]
+ Added small example to get a dir listing. [1.0.0RC1]
* contrib/hbcurl/hbcurl.c
+ Changed to use hb_parc() (instead of hb_parcx()) for all
curl_easy_setopt() string options, so that NULL (NIL) will
reset these options to default state, instead of passing
an empty string to them. [RC1]
an empty string to them. [1.0.0RC1]
* source/rtl/hbbit.c
+ Added important NOTE about hb_bit*() functions'
relation to the compiler optimization engine. [RC1]
relation to the compiler optimization engine. [1.0.0RC1]
2008-06-05 00:00 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbsqlit2/Makefile
! Readded last char of last line.
[RC1]
[1.0.0RC1]
2008-06-04 22:13 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* tests/rto_get.prg
+ Added keypress emulator to aid automated testing.
+ Added test for EMG's bug case.
[RC1]
[1.0.0RC1]
2008-06-04 19:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbsqlit3/hbsqlit3.c

View File

@@ -7,8 +7,7 @@
* Telepathy emulation library
*
* Copyright 2000, 2001 Dan Levitt <dan@boba-fett.net>
*
* Copyright 2004, 2005 - Maurilio Longo <maurilio.longo@libero.it>
* Copyright 2004, 2005 Maurilio Longo <maurilio.longo@libero.it>
* www - http://www.xharbour.org
*
* This program is free software; you can redistribute it and/or modify
@@ -65,8 +64,8 @@
STATIC aPorts // Array with port info
STATIC nErrorCode := 0 // Error code from last operation, 0 if no error
STATIC s_aPorts // Array with port info
STATIC s_nErrorCode := 0 // Error code from last operation, 0 if no error
@@ -77,7 +76,7 @@ function tp_baud( nPort, nNewBaud )
default nNewBaud to 0
if ! isport( nPort ) .OR. Empty( aPorts[ nPort, TPFP_NAME ] )
if ! isport( nPort ) .OR. Empty( s_aPorts[ nPort, TPFP_NAME ] )
return TE_NOPORT
endif
@@ -86,13 +85,13 @@ function tp_baud( nPort, nNewBaud )
endif
if nNewBaud > 0
if ( nRes := p_InitPortSpeed( aPorts[ nPort, TPFP_HANDLE ] ,;
if ( nRes := p_InitPortSpeed( s_aPorts[ nPort, TPFP_HANDLE ] ,;
nNewBaud,;
aPorts[ nPort, TPFP_DBITS ] ,;
aPorts[ nPort, TPFP_PARITY ] ,;
aPorts[ nPort, TPFP_SBITS ] ) ) == 0
s_aPorts[ nPort, TPFP_DBITS ] ,;
s_aPorts[ nPort, TPFP_PARITY ] ,;
s_aPorts[ nPort, TPFP_SBITS ] ) ) == 0
aPorts[ nPort, TPFP_BAUD ] := nNewBaud
s_aPorts[ nPort, TPFP_BAUD ] := nNewBaud
else
@@ -100,7 +99,7 @@ function tp_baud( nPort, nNewBaud )
endif
endif
return aPorts[ nPort, TPFP_BAUD ]
return s_aPorts[ nPort, TPFP_BAUD ]
@@ -151,16 +150,16 @@ function tp_close( nPort, nTimeout )
tp_flush( nPort, nTimeout )
endif
if aPorts[ nPort, TPFP_HANDLE ] >= 0
if s_aPorts[ nPort, TPFP_HANDLE ] >= 0
fClose( aPorts[ nPort, TPFP_HANDLE ] )
fClose( s_aPorts[ nPort, TPFP_HANDLE ] )
/* Port parameters should stay the same for the case the port
gets reopened
*/
aPorts[ nPort, TPFP_OC ] := .F.
aPorts[ nPort, TPFP_INBUF ] := ""
aPorts[ nPort, TPFP_HANDLE ] := -1
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_HANDLE ] := -1
endif
return 0
@@ -173,15 +172,15 @@ function tp_reopen( nPort, nInSize, nOutSize )
default nInSize to 1536, nOutSize to 1536
if ! isport( nPort ) .OR. Empty( aPorts[ nPort, TPFP_NAME ] )
if ! isport( nPort ) .OR. Empty( s_aPorts[ nPort, TPFP_NAME ] )
return TE_NOPORT
endif
cPortname := aPorts[ nPort, TPFP_NAME ]
nBaud := aPorts[ nPort, TPFP_BAUD ]
nData := aPorts[ nPort, TPFP_DBITS ]
cParity := aPorts[ nPort, TPFP_PARITY ]
nStop := aPorts[ nPort, TPFP_SBITS ]
cPortname := s_aPorts[ nPort, TPFP_NAME ]
nBaud := s_aPorts[ nPort, TPFP_BAUD ]
nData := s_aPorts[ nPort, TPFP_DBITS ]
cParity := s_aPorts[ nPort, TPFP_PARITY ]
nStop := s_aPorts[ nPort, TPFP_SBITS ]
return tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortName )
@@ -233,37 +232,37 @@ function tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortn
return TE_NOPORT
endif
aPorts[ nPort, TPFP_NAME ] := cPortname
aPorts[ nPort, TPFP_BAUD ] := nBaud
aPorts[ nPort, TPFP_DBITS ] := nData
aPorts[ nPort, TPFP_PARITY ] := cParity
aPorts[ nPort, TPFP_SBITS ] := nStop
aPorts[ nPort, TPFP_OC ] := .F.
aPorts[ nPort, TPFP_INBUF ] := ""
aPorts[ nPort, TPFP_INBUF_SIZE ] := nInSize
s_aPorts[ nPort, TPFP_NAME ] := cPortname
s_aPorts[ nPort, TPFP_BAUD ] := nBaud
s_aPorts[ nPort, TPFP_DBITS ] := nData
s_aPorts[ nPort, TPFP_PARITY ] := cParity
s_aPorts[ nPort, TPFP_SBITS ] := nStop
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_INBUF_SIZE ] := nInSize
#ifdef __PLATFORM__Linux
// Maybe we should have a p_Open() on every platform
aPorts[ nPort, TPFP_HANDLE ] := p_Open( cPortname )
s_aPorts[ nPort, TPFP_HANDLE ] := p_Open( cPortname )
#else
aPorts[ nPort, TPFP_HANDLE ] := fOpen( cPortname, FO_READWRITE )
s_aPorts[ nPort, TPFP_HANDLE ] := fOpen( cPortname, FO_READWRITE )
#endif
if aPorts[ nPort, TPFP_HANDLE ] >= 0
if s_aPorts[ nPort, TPFP_HANDLE ] >= 0
/* low level C functions are prefixed p_ (don't ask me why :)) */
if ( nRes := p_InitPortSpeed( aPorts[ nPort, TPFP_HANDLE ] ,;
aPorts[ nPort, TPFP_BAUD ] ,;
aPorts[ nPort, TPFP_DBITS ] ,;
aPorts[ nPort, TPFP_PARITY ] ,;
aPorts[ nPort, TPFP_SBITS ] ) ) == 0
if ( nRes := p_InitPortSpeed( s_aPorts[ nPort, TPFP_HANDLE ] ,;
s_aPorts[ nPort, TPFP_BAUD ] ,;
s_aPorts[ nPort, TPFP_DBITS ] ,;
s_aPorts[ nPort, TPFP_PARITY ] ,;
s_aPorts[ nPort, TPFP_SBITS ] ) ) == 0
aPorts[ nPort, TPFP_OC ] := .T.
s_aPorts[ nPort, TPFP_OC ] := .T.
return nRes
else
tp_Close( aPorts[ nPort, TPFP_HANDLE ] )
tp_Close( s_aPorts[ nPort, TPFP_HANDLE ] )
return nRes
endif
@@ -273,15 +272,15 @@ function tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortn
// set error code to a static var to have tp_error() work as expected
//cnHandle := ferror()
aPorts[ nPort, TPFP_NAME ] := ""
aPorts[ nPort, TPFP_HANDLE ] := -1
aPorts[ nPort, TPFP_BAUD ] := 1200
aPorts[ nPort, TPFP_DBITS ] := 8
aPorts[ nPort, TPFP_PARITY ] := "N"
aPorts[ nPort, TPFP_SBITS ] := 1
aPorts[ nPort, TPFP_OC ] := .F.
aPorts[ nPort, TPFP_INBUF ] := ""
aPorts[ nPort, TPFP_INBUF_SIZE ] := 0
s_aPorts[ nPort, TPFP_NAME ] := ""
s_aPorts[ nPort, TPFP_HANDLE ] := -1
s_aPorts[ nPort, TPFP_BAUD ] := 1200
s_aPorts[ nPort, TPFP_DBITS ] := 8
s_aPorts[ nPort, TPFP_PARITY ] := "N"
s_aPorts[ nPort, TPFP_SBITS ] := 1
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_INBUF_SIZE ] := 0
return TE_CONFL // maybe should return something different?
@@ -292,14 +291,14 @@ function tp_recv( nPort, nLength, nTimeout )
local nDone
local cRet := ""
default nLength to aPorts[ nPort, TPFP_INBUF_SIZE ]
default nLength to s_aPorts[ nPort, TPFP_INBUF_SIZE ]
default nTimeout to 0
FetchChars( nPort )
nDone := Seconds() + iif( nTimeout >= 0, nTimeout, 0 )
while Len( aPorts[ nPort, TPFP_INBUF ] ) < nLength .AND.;
while Len( s_aPorts[ nPort, TPFP_INBUF ] ) < nLength .AND.;
( nTimeout < 0 .OR. Seconds() < nDone )
if ! tp_idle()
@@ -310,12 +309,12 @@ function tp_recv( nPort, nLength, nTimeout )
enddo
if nLength > Len( aPorts[ nPort, TPFP_INBUF ] )
cRet := aPorts[ nPort, TPFP_INBUF ]
aPorts[ nPort, TPFP_INBUF ] := ""
if nLength > Len( s_aPorts[ nPort, TPFP_INBUF ] )
cRet := s_aPorts[ nPort, TPFP_INBUF ]
s_aPorts[ nPort, TPFP_INBUF ] := ""
else
cRet := SubStr( aPorts[ nPort, TPFP_INBUF ], 1, nLength )
aPorts[ nPort, TPFP_INBUF ] := SubStr( aPorts[ nPort, TPFP_INBUF ], nLength + 1 )
cRet := SubStr( s_aPorts[ nPort, TPFP_INBUF ], 1, nLength )
s_aPorts[ nPort, TPFP_INBUF ] := SubStr( s_aPorts[ nPort, TPFP_INBUF ], nLength + 1 )
endif
return cRet
@@ -342,7 +341,7 @@ function tp_send( nPort, cString, nTimeout )
while nTotWritten < Len( cString ) .AND. ;
( nTimeout < 0 .OR. Seconds() <= nDone )
nWritten := p_WritePort( aPorts[ nPort, TPFP_HANDLE ], SubStr( cString, nTotWritten + 1 ) )
nWritten := p_WritePort( s_aPorts[ nPort, TPFP_HANDLE ], SubStr( cString, nTotWritten + 1 ) )
if nWritten >= 0
@@ -389,7 +388,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
return ""
endif
if ValType( cDelim ) <> "C" .OR. Empty( cDelim )
if !( ValType( cDelim ) == "C" ) .OR. Empty( cDelim )
return ""
endif
@@ -401,7 +400,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
/* Telepathy ng: [...] If nTimeout is omitted or zero, reads until finding the
delimiter or the input buffer is empty. */
if nTimeout == 0 .AND. Empty( aPorts[ nPort, TPFP_INBUF ] )
if nTimeout == 0 .AND. Empty( s_aPorts[ nPort, TPFP_INBUF ] )
return ""
endif
@@ -411,7 +410,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
if Len( cDelim ) == 1
nAt := hb_At( cDelim, aPorts[ nPort, TPFP_INBUF ], nStartPos )
nAt := hb_At( cDelim, s_aPorts[ nPort, TPFP_INBUF ], nStartPos )
if nAt > 0 .AND. iif( nFirst > 0, nAt < nFirst, .T. )
nFirst := nAt
@@ -421,7 +420,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
FOR EACH cChar IN cDelim
nAt := hb_At( cChar, aPorts[ nPort, TPFP_INBUF ], nStartPos )
nAt := hb_At( cChar, s_aPorts[ nPort, TPFP_INBUF ], nStartPos )
if nAt > 0 .AND. iif( nFirst > 0, nAt < nFirst, .T. )
nFirst := nAt
@@ -438,7 +437,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
else
// Next loop I don't need to search that part of the input buffer that
// I've already just searched for
nStartPos := Max( Len( aPorts[ nPort, TPFP_INBUF ] ), 1 )
nStartPos := Max( Len( s_aPorts[ nPort, TPFP_INBUF ] ), 1 )
// I've read more characters than I'm allowed to, so I exit
if nStartPos >= nMaxLen
@@ -455,8 +454,8 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
enddo
if nFirst > 0
cRet := Left( aPorts[ nPort, TPFP_INBUF ], nFirst )
aPorts[ nPort, TPFP_INBUF ] := SubStr( aPorts[ nPort, TPFP_INBUF ], nFirst + 1 )
cRet := Left( s_aPorts[ nPort, TPFP_INBUF ], nFirst )
s_aPorts[ nPort, TPFP_INBUF ] := SubStr( s_aPorts[ nPort, TPFP_INBUF ], nFirst + 1 )
endif
return cRet
@@ -477,7 +476,7 @@ function tp_lookfor( nPort, cLookfor )
FetchChars( nPort )
return At( cLookfor, aPorts[ nPort, TPFP_INBUF ] )
return At( cLookfor, s_aPorts[ nPort, TPFP_INBUF ] )
@@ -489,7 +488,7 @@ function tp_inchrs( nPort )
FetchChars( nPort )
return Len( aPorts[ nPort, TPFP_INBUF ] )
return Len( s_aPorts[ nPort, TPFP_INBUF ] )
@@ -499,7 +498,7 @@ function tp_outfree( nPort )
return 0
endif
return p_OutFree( aPorts[ nPort, TPFP_HANDLE ] )
return p_OutFree( s_aPorts[ nPort, TPFP_HANDLE ] )
@@ -507,7 +506,7 @@ function tp_clearin( nPort )
if isopenport( nPort )
FetchChars( nPort )
aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_INBUF ] := ""
endif
return nil
@@ -561,6 +560,7 @@ function tp_waitfor( ... )
endif
while ( nDone > _clock() .or. nFirst == 100000 ) .and. ! tp_idle()
if nFirst == 100000
nFirst := 99999
endif
@@ -569,9 +569,9 @@ function tp_waitfor( ... )
for x := 1 to len( acList )
if lIgnorecase
nAt := at( upper( acList[ x ] ), upper( aPorts[ nPort, TPFP_INBUF ] ))
nAt := at( upper( acList[ x ] ), upper( s_aPorts[ nPort, TPFP_INBUF ] ))
else
nAt := at( acList[ x ] , aPorts[ nPort, TPFP_INBUF ] )
nAt := at( acList[ x ] , s_aPorts[ nPort, TPFP_INBUF ] )
endif
if nAt > 0 .and. nAt < nFirst
nFirst := nAt
@@ -582,10 +582,11 @@ function tp_waitfor( ... )
if nFirst < 64000
exit
endif
hb_inline()
{
sched_yield();
}
#if 0
sched_yield() // C level function
#endif
enddo
if nFirst < 64000
@@ -609,10 +610,10 @@ function tp_ctrlcts( nPort, nNewCtrl )
endif
if Valtype( nNewCtrl ) == "U"
nCurValue := p_ctrlcts( aPorts[ nPort, TPFP_HANDLE ] )
nCurValue := p_ctrlcts( s_aPorts[ nPort, TPFP_HANDLE ] )
else
nCurValue := p_ctrlcts( aPorts[ nPort, TPFP_HANDLE ], nNewCtrl )
nCurValue := p_ctrlcts( s_aPorts[ nPort, TPFP_HANDLE ], nNewCtrl )
endif
@@ -638,30 +639,9 @@ function tp_ctrldtr( nPort, nParamNewval )
if ! isopenport( nPort )
return -1
endif
nph := aPorts[ nPort, TPFP_HANDLE ]
HB_INLINE(nph, @nnewval, @noldval)
{
double nph = hb_parnd(1);
double nnewval, noldval;
unsigned int result = 0;
ioctl( nph, TIOCMGET, &result );
if ( result & TIOCM_DTR )
noldval = 1;
else
noldval = 0;
nph := s_aPorts[ nPort, TPFP_HANDLE ]
if ( noldval != nnewval )
{
if ( nnewval == 0 )
result &= ~TIOCM_DTR;
else
result |= TIOCM_DTR;
ioctl( nph, TIOCMSET, &result );
}
hb_stornd(nnewval,2);
hb_stornd(noldval,3);
}
_P_CTRLDTR(nph, @nnewval, @noldval)
return noldval
*/
@@ -674,7 +654,7 @@ function tp_isdcd( nPort )
return .f.
endif
return p_isdcd( aPorts[ nPort, TPFP_HANDLE ] )
return p_isdcd( s_aPorts[ nPort, TPFP_HANDLE ] )
@@ -684,7 +664,7 @@ function tp_isri( nPort )
return .f.
endif
return p_isri( aPorts[ nPort, TPFP_HANDLE ] )
return p_isri( s_aPorts[ nPort, TPFP_HANDLE ] )
@@ -694,7 +674,7 @@ function tp_isdsr( nPort )
return .f.
endif
return p_isdsr( aPorts[ nPort, TPFP_HANDLE ] )
return p_isdsr( s_aPorts[ nPort, TPFP_HANDLE ] )
@@ -704,7 +684,7 @@ function tp_iscts( nPort )
return .f.
endif
return p_iscts( aPorts[ nPort, TPFP_HANDLE ] )
return p_iscts( s_aPorts[ nPort, TPFP_HANDLE ] )
@@ -722,7 +702,7 @@ function tp_flush( nPort, nTimeout )
return TE_CLOSED
endif
nRes := p_Drain( aPorts[ nPort, TPFP_HANDLE ] )
nRes := p_Drain( s_aPorts[ nPort, TPFP_HANDLE ] )
// Sleep rest of timeout
/*
@@ -789,7 +769,7 @@ static function isopenport( nPort )
return .f.
endif
return aPorts[ nPort, TPFP_OC ]
return s_aPorts[ nPort, TPFP_OC ]
@@ -811,10 +791,10 @@ static function FetchChars( nPort )
return 0
endif
cStr := p_ReadPort( aPorts[ nPort, TPFP_HANDLE ] )
cStr := p_ReadPort( s_aPorts[ nPort, TPFP_HANDLE ] )
if ! Empty( cStr )
aPorts[ nPort, TPFP_INBUF ] += cStr
s_aPorts[ nPort, TPFP_INBUF ] += cStr
endif
return Len( cStr )
@@ -825,11 +805,11 @@ INIT PROCEDURE _tpinit()
local x
if aPorts == nil
aPorts := array( TP_MAXPORTS )
for x := 1 to len( aPorts )
if s_aPorts == nil
s_aPorts := array( TP_MAXPORTS )
for x := 1 to len( s_aPorts )
/// port name, file handle, baud, data bits, parity, stop bits, Open?, input buffer, input buff.size
aPorts[ x ] := { "", -1, 1200, 8, "N", 1, .F., "", 0 }
s_aPorts[ x ] := { "", -1, 1200, 8, "N", 1, .F., "", 0 }
next
endif

View File

@@ -54,8 +54,8 @@
*
*/
#define _CLIPDEFS_H
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbapifs.h"
#ifdef HB_OS_UNIX
@@ -68,24 +68,16 @@
#include <termios.h> /* POSIX terminal control definitions */
#include <sys/ioctl.h>
#include "extend.api"
#include "item.api"
HB_FUNC( P_OPEN )
{
int fd = open( hb_parcx( 1 ), O_RDWR | O_NOCTTY | O_NDELAY ); /* File descriptor for the port */
HB_FUNC( P_OPEN ) {
int fd; /* File descriptor for the port */
fd = open( hb_parcx( 1 ), O_RDWR | O_NOCTTY | O_NDELAY );
if (fd != -1) {
if( fd != -1 )
fcntl( fd, F_SETFL, 0 );
}
hb_retnl( fd );
}
/*
p_InitPortSpeed( aPorts[ nPort, TPFP_HANDLE ] ,;
aPorts[ nPort, TPFP_BAUD ] ,;
@@ -93,122 +85,64 @@ p_InitPortSpeed( aPorts[ nPort, TPFP_HANDLE ] ,;
aPorts[ nPort, TPFP_PARITY ] ,;
aPorts[ nPort, TPFP_SBITS ] )
*/
HB_FUNC( P_INITPORTSPEED ) {
HB_FUNC( P_INITPORTSPEED )
{
struct termios options;
int port = hb_parnl( 1 );
int baud = B300;
char *ptr = hb_parcx( 4 );
char * ptr = hb_parcx( 4 );
int rc;
tcgetattr( port, &options );
// let's set baud rate
switch ( hb_parnl( 2 ) ) {
case 0:
baud = B0; // Drop line
break;
case 50:
baud = B50;
break;
case 75:
baud = B75;
break;
case 110:
baud = B110;
break;
case 150:
baud = B150;
break;
case 200:
baud = B200;
break;
case 300:
baud = B300;
break;
case 600:
baud = B600;
break;
case 1200:
baud = B1200;
break;
case 1800:
baud = B1800;
break;
case 2400:
baud = B2400;
break;
case 4800:
baud = B4800;
break;
case 9600:
baud = B9600;
break;
case 19200:
baud = B19200;
break;
case 38400:
baud = B38400;
break;
case 57600:
baud = B57600;
break;
case 115200:
baud = B115200;
break;
case 230400:
baud = B230400;
break;
/* let's set baud rate */
switch( hb_parnl( 2 ) )
{
case 0: baud = B0; break; /* Drop line */
case 50: baud = B50; break;
case 75: baud = B75; break;
case 110: baud = B110; break;
case 150: baud = B150; break;
case 200: baud = B200; break;
case 300: baud = B300; break;
case 600: baud = B600; break;
case 1200: baud = B1200; break;
case 1800: baud = B1800; break;
case 2400: baud = B2400; break;
case 4800: baud = B4800; break;
case 9600: baud = B9600; break;
case 19200: baud = B19200; break;
case 38400: baud = B38400; break;
case 57600: baud = B57600; break;
case 115200: baud = B115200; break;
case 230400: baud = B230400; break;
}
cfsetispeed( &options, baud );
cfsetospeed( &options, baud );
// Enable the receiver and set local mode...
/* Enable the receiver and set local mode... */
options.c_cflag |= ( CLOCAL | CREAD );
// Raw input from device
/* Raw input from device */
cfmakeraw( &options );
// Reset data bits ( cfmakeraw() puts it to CS8 )
/* Reset data bits ( cfmakeraw() puts it to CS8 ) */
options.c_cflag &= ~CSIZE;
// Data bits
if ( hb_parni( 3 ) == 8 ) {
/* Data bits */
if( hb_parni( 3 ) == 8 )
options.c_cflag |= CS8;
} else {
else
options.c_cflag |= CS7;
}
// Stop bits
if ( hb_parni( 5 ) == 1 ) {
/* Stop bits */
if( hb_parni( 5 ) == 1 )
options.c_cflag &= ~CSTOPB;
}
// Parity, only No, Even, Odd supported
switch ( *ptr ) {
/* Parity, only No, Even, Odd supported */
switch ( *ptr )
{
case 'N':
case 'n':
options.c_cflag &= ~PARENB;
@@ -233,157 +167,90 @@ HB_FUNC( P_INITPORTSPEED ) {
break;
}
// Every read() call returns as soon as a char is available OR after 3 tenths of a second
/* Every read() call returns as soon as a char is available OR after 3 tenths of a second */
options.c_cc[ VMIN ] = 0;
options.c_cc[ VTIME ] = 3;
// Set the new options for the port...
/* Set the new options for the port... */
rc = tcsetattr( port, TCSAFLUSH, &options );
hb_retnl( rc );
}
HB_FUNC( P_READPORT )
{
char Buffer[ 512 ];
int nRead = read( hb_parnl( 1 ), Buffer, sizeof( Buffer ) );
HB_FUNC( P_READPORT ) {
char Buffer[512];
int nRead;
nRead = read( hb_parnl( 1 ), Buffer, 512 );
if ( nRead < 0 ) {
hb_retclen( "", 0 );
} else {
hb_retclen( Buffer, nRead );
}
hb_retclen( nRead > 0 ? Buffer : NULL, nRead );
}
HB_FUNC( P_WRITEPORT )
{
long n = write( hb_parnl( 1 ), hb_parcx( 2 ), hb_parclen( 2 ) );
HB_FUNC( P_WRITEPORT ) {
long n;
n = write( hb_parnl( 1 ), hb_parcx( 2 ), hb_parclen( 2 ) );
if ( n < 0 ) {
hb_retnl( -1 );
} else {
hb_retnl( n );
}
hb_retnl( n < 0 ? -1 : n );
}
HB_FUNC( P_DRAIN ) {
HB_FUNC( P_DRAIN )
{
hb_retnl( tcdrain( hb_parnl( 1 ) ) );
}
HB_FUNC( P_OUTFREE ) {
HB_FUNC( P_OUTFREE )
{
/*
APIRET rc;
RXQUEUE rxqueue = { 0 };
if ( ( rc = DosDevIOCtl( (HFILE) hb_parnl( 1 ), IOCTL_ASYNC, ASYNC_GETOUTQUECOUNT,
NULL, 0L, NULL, &rxqueue, sizeof(RXQUEUE), NULL ) ) == NO_ERROR ) {
if ( ( rc = DosDevIOCtl( ( HFILE ) hb_parnl( 1 ), IOCTL_ASYNC, ASYNC_GETOUTQUECOUNT,
NULL, 0L, NULL, &rxqueue, sizeof( RXQUEUE ), NULL ) ) == NO_ERROR )
hb_retnl( rxqueue.cb - rxqueue.cch );
} else {
// Put GetLastError() here, or better a second byref param?
hb_retnl( -1 );
}
else
hb_retnl( -1 ); /* Put GetLastError() here, or better a second byref param? */
*/
}
HB_FUNC( P_ISDCD ) {
HB_FUNC( P_ISDCD )
{
int status;
int rc;
rc = ioctl( hb_parnl( 1 ), TIOCMGET, &status );
if ( rc == 0 ) {
if ( ioctl( hb_parnl( 1 ), TIOCMGET, &status ) == 0 )
hb_retl( ( status & TIOCM_CD ) == TIOCM_CD );
} else {
else
hb_retl( FALSE );
}
}
HB_FUNC( P_ISRI ) {
HB_FUNC( P_ISRI )
{
int status;
int rc;
rc = ioctl( hb_parnl( 1 ), TIOCMGET, &status );
if ( rc == 0 ) {
if ( ioctl( hb_parnl( 1 ), TIOCMGET, &status ) == 0 )
hb_retl( ( status & TIOCM_RI ) == TIOCM_RI );
} else {
else
hb_retl( FALSE );
}
}
HB_FUNC( P_ISDSR ) {
HB_FUNC( P_ISDSR )
{
int status;
int rc;
rc = ioctl( hb_parnl( 1 ), TIOCMGET, &status );
if ( rc == 0 ) {
if ( ioctl( hb_parnl( 1 ), TIOCMGET, &status ) == 0 )
hb_retl( ( status & TIOCM_DSR ) == TIOCM_DSR );
} else {
else
hb_retl( FALSE );
}
}
HB_FUNC( P_ISCTS ) {
HB_FUNC( P_ISCTS )
{
int status;
int rc;
rc = ioctl( hb_parnl( 1 ), TIOCMGET, &status );
if ( rc == 0 ) {
if ( ioctl( hb_parnl( 1 ), TIOCMGET, &status ) == 0 )
hb_retl( ( status & TIOCM_CTS ) == TIOCM_CTS );
} else {
else
hb_retl( FALSE );
}
}
HB_FUNC( P_CTRLCTS ) {
struct termios options;
@@ -395,20 +262,47 @@ HB_FUNC( P_CTRLCTS ) {
tcgetattr( port, &options );
curvalue = ( options.c_cflag & CRTSCTS ) == CRTSCTS;
if ( newvalue == 0 ) {
if( newvalue == 0 )
options.c_cflag &= ~CRTSCTS;
else if( newvalue == 1 )
options.c_cflag |= CRTSCTS;
} else {
if ( newvalue == 1 ) {
options.c_cflag |= CRTSCTS;
}
}
if ( newvalue >= 0 ) {
if( newvalue >= 0 )
rc = tcsetattr( port, TCSAFLUSH, &options );
}
hb_retni( curvalue ? 1 : 0 );
}
#endif // HB_OS_UNIX
#if 0
/* Inline function moved here from telepath.prg */
HB_FUNC( _P_CTRLDTR )
{
double nph = hb_parnd( 1 );
double nnewval, noldval;
unsigned int result = 0;
ioctl( nph, TIOCMGET, &result );
if( result & TIOCM_DTR )
noldval = 1;
else
noldval = 0;
if( noldval != nnewval )
{
if( nnewval == 0 )
result &= ~TIOCM_DTR;
else
result |= TIOCM_DTR;
ioctl( nph, TIOCMSET, &result );
}
hb_stornd( nnewval, 2 );
hb_stornd( noldval, 3 );
}
#endif
#endif /* HB_OS_UNIX */

File diff suppressed because it is too large Load Diff

View File

@@ -85,13 +85,11 @@ extern void SetFileAttributes( char * szEntry, ULONG ulAttr );
static void ResetAttribs( void )
{
ULONG ulAtt, ulZipLen = hb_arrayLen(FileToZip);
char *szFile;
int iAttr;
for( ulAtt = 0; ulAtt < ulZipLen; ulAtt ++ )
{
szFile = hb_arrayGetC( FileToZip, ulAtt + 1 );
iAttr = hb_arrayGetNI( FileAttribs, ulAtt + 1 );
char *szFile = hb_arrayGetC( FileToZip, ulAtt + 1 );
int iAttr = hb_arrayGetNI( FileAttribs, ulAtt + 1 );
SetFileAttributes( szFile, iAttr );
hb_xfree( szFile );
}
@@ -121,14 +119,14 @@ static void UnzipCreateArray( char *szZipFileName, char *szSkleton, int uiOption
bOkAdd = hb_strMatchFile( (const char *) szEntry, (const char *) sRegEx );
}
if ( !bOkAdd )
if ( !bOkAdd )
{
PHB_FNAME pFileName = hb_fsFNameSplit( szEntry );
if( pFileName->szName )
{
char *szFile = (char*) hb_xgrab( _POSIX_PATH_MAX + 1 );
pFileName->szPath = "";
pFileName->szPath = (char*) "";
hb_fsFNameMerge( szFile, pFileName );
bOkAdd = ( hb_stricmp(szSkleton,szFile) ==0 ? 1 : 0 );
hb_xfree(szFile);
@@ -138,7 +136,7 @@ static void UnzipCreateArray( char *szZipFileName, char *szSkleton, int uiOption
}
}
hb_xfree( pFileName );
hb_xfree( pFileName );
}
@@ -158,12 +156,8 @@ static void UnzipCreateArray( char *szZipFileName, char *szSkleton, int uiOption
}
}
hb_xfree( szEntry );
}
}
static BOOL ZipTestExclude ( char *szEntry )
@@ -191,9 +185,7 @@ static void ZipCreateExclude( PHB_ITEM pExclude )
{
PHB_ITEM ExTmp;
ExcludeFile= hb_itemNew(NULL);
hb_arrayNew( ExcludeFile, 0 );
ExcludeFile = hb_itemArrayNew(0);
if( pExclude == NULL )
{
@@ -215,7 +207,7 @@ static void ZipCreateExclude( PHB_ITEM pExclude )
int ui;
WildFile= hb_itemNew(NULL);
hb_fsDirectory( WildFile, hb_itemGetCPtr( pExclude ), NULL, 0, TRUE);
uiLen = hb_arrayLen(WildFile);
@@ -227,8 +219,8 @@ static void ZipCreateExclude( PHB_ITEM pExclude )
if( szEntry )
{
ExTmp = hb_itemNew( NULL );
hb_arrayAddForward( ExcludeFile, hb_itemPutC( ExTmp, hb_strupr( szEntry ) ) );
ExTmp = hb_itemPutC( NULL, hb_strupr( szEntry ) );
hb_arrayAddForward( ExcludeFile, ExTmp );
hb_xfree( szEntry );
hb_itemRelease( ExTmp );
}
@@ -238,8 +230,8 @@ static void ZipCreateExclude( PHB_ITEM pExclude )
}
else
{
ExTmp = hb_itemNew( NULL );
hb_arrayAddForward( ExcludeFile, hb_itemPutC( ExTmp, hb_itemGetCPtr( pExclude ) ) );
ExTmp = hb_itemPutC( NULL, hb_itemGetCPtr( pExclude ) );
hb_arrayAddForward( ExcludeFile, ExTmp );
hb_itemRelease( ExTmp ) ;
}
}
@@ -297,37 +289,28 @@ static void ZipCreateExclude( PHB_ITEM pExclude )
}
}
static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir )
static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir, BOOL bFullPath ) /* bFullPath by JGS */
{
PHB_ITEM pDirEntry;
PHB_ITEM Temp, TempArray, WildFile;
PHB_ITEM pDirEntry, Temp, TempArray;
PHB_ITEM WildFile = hb_itemNew( NULL );
int ul, ulLen, ulArr, ulLenArr;
WildFile= hb_itemNew(NULL);
//FileAttribs.type = HB_IT_NIL;
//FileToZip.type = HB_IT_NIL;
FileToZip = hb_itemNew(NULL);
TempArray= hb_itemNew(NULL);
FileAttribs = hb_itemNew(NULL);
hb_arrayNew( FileAttribs, 0 );
hb_arrayNew( TempArray, 0 );
FileToZip = hb_itemArrayNew(0);
FileAttribs = hb_itemArrayNew(0);
if( pParam->type == HB_IT_STRING )
{
Temp= hb_itemNew(NULL);
hb_arrayAddForward( TempArray, hb_itemPutC( Temp, hb_itemGetCPtr( pParam ) ) );
TempArray = hb_itemArrayNew( 0 );
Temp = hb_itemPutC( NULL, hb_itemGetCPtr( pParam ) );
hb_arrayAddForward( TempArray, Temp );
hb_itemRelease( Temp );
}
else
{
PHB_ITEM pClone = hb_arrayClone( pParam );
hb_itemCopy( TempArray, pClone );
hb_itemRelease( pClone );
TempArray = hb_arrayClone( pParam );
}
ulLenArr = hb_arrayLen(TempArray);
hb_arrayNew( FileToZip, 0 );
ulLenArr = hb_arrayLen( TempArray );
for ( ulArr = 0; ulArr < ulLenArr ; ulArr ++ )
{
@@ -337,17 +320,24 @@ static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir )
{
if ( strchr( szArrEntry, '*' ) != NULL || strchr( szArrEntry, '?' ) != NULL )
{
// if don't gave path add current dir !
#if defined(HB_WIN32_IO)
/* by JGS if don't gave path or there is a relative path add current dir ! */
PHB_FNAME fDirSpec = hb_fsFNameSplit( (char*) szArrEntry );
if ( ( pCurDir ) && ( fDirSpec != NULL ) &&
! ( fDirSpec->szDrive ) && ( fDirSpec->szPath ) && ( fDirSpec->szPath[0] != OS_PATH_DELIMITER ) )
#else
/* if don't gave path add current dir ! */
if ( ( pCurDir ) && ( ! strchr( szArrEntry, OS_PATH_DELIMITER ) ) )
#endif
{
char * szTemp = szArrEntry ;
szArrEntry = ( char * ) hb_xrealloc( szArrEntry, _POSIX_PATH_MAX );
hb_xstrcpy( szArrEntry, (char *) pCurDir,
OS_PATH_DELIMITER_STRING, szTemp, NULL );
szArrEntry = hb_xstrcpy( NULL, (char *) pCurDir, OS_PATH_DELIMITER_STRING, szTemp, NULL );
hb_xfree( szTemp );
}
hb_fsDirectory(WildFile,szArrEntry,NULL,0,TRUE);
ulLen = hb_arrayLen(WildFile);
hb_fsDirectory(WildFile,szArrEntry,NULL,0,bFullPath ); /* bFullPath by JGS */
ulLen = hb_arrayLen(WildFile);
for ( ul = 0; ul < ulLen ; ul ++ )
{
@@ -355,6 +345,17 @@ static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir )
pDirEntry = hb_arrayGetItemPtr( WildFile, ul + 1 );
szEntry = hb_arrayGetC( pDirEntry, 1 );
/* by JGS */
#if defined(HB_WIN32_IO)
if (! ( bFullPath ) && ( fDirSpec != NULL ) && ( fDirSpec->szPath ) )
{
char * szFile = szEntry;
szEntry = hb_xstrcpy( NULL, fDirSpec->szPath, szFile, NULL );
hb_xfree( szFile );
}
#endif
/* by JGS */
if ( ZipTestExclude ( szEntry ) )
{
Temp= hb_itemNew(NULL);
@@ -376,17 +377,26 @@ static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir )
}
}
hb_itemRelease( WildFile );
/* by JGS */
#if defined(HB_WIN32_IO)
if ( fDirSpec )
{
hb_xfree( fDirSpec );
}
#endif
hb_itemClear( WildFile );
/* by JGS */
}
else
{
Temp = hb_itemNew( NULL);
hb_arrayAddForward( FileToZip, hb_itemPutC( Temp, szArrEntry ) );
Temp = hb_itemPutC( NULL, szArrEntry ) ;
hb_arrayAddForward( FileToZip, Temp );
hb_itemRelease( Temp ) ;
Temp = hb_itemNew( NULL);
hb_arrayAddForward( FileAttribs, hb_itemPutNI( Temp, GetFileAttributes( szArrEntry ) ) );
Temp = hb_itemPutNI( NULL, GetFileAttributes( szArrEntry ) );
hb_arrayAddForward( FileAttribs, Temp );
hb_itemRelease( Temp ) ;
#if defined(HB_OS_LINUX)
SetFileAttributes( szArrEntry, 0777 );
#else
@@ -398,6 +408,7 @@ static void ZipCreateArray( PHB_ITEM pParam, BYTE *pCurDir )
}
}
hb_itemRelease( WildFile );
hb_itemRelease( TempArray );
}
@@ -412,12 +423,20 @@ HB_FUNC( HB_ZIPFILE )
if ( pParam )
{
char szFile[ _POSIX_PATH_MAX ];
PHB_ITEM pProgress = hb_param( 9, HB_IT_BLOCK );
PHB_ITEM pExclude = hb_param( 10, HB_IT_STRING | HB_IT_ARRAY );
HB_ITEM iProgress;
BYTE *pCurDir;
char *szZipFileName;
/* by JGS */
BOOL bFullPath = TRUE;
#if defined(HB_WIN32_IO)
if ( ISLOG( 11 ) )
{
bFullPath = hb_parl( 11 );
}
#endif
/* by JGS */
if ( ! ISNIL( 4 ) && ! ISBLOCK( 4 ) )
{
hb_errRT_BASE_SubstR( EG_ARG, 2017, "Invalid Codeblock ","hb_zipfile",
@@ -428,24 +447,15 @@ HB_FUNC( HB_ZIPFILE )
return;
}
iProgress.type = HB_IT_NIL;
pCurDir = ( BYTE * )hb_xstrcpy( NULL, OS_PATH_DELIMITER_STRING, ( const char * )hb_fsCurDir( 0 ) , NULL );
pCurDir = ( BYTE * ) hb_xstrcpy( NULL, OS_PATH_DELIMITER_STRING, ( const char * )hb_fsCurDir( 0 ) , NULL );
/* Always needs to create an array */
ZipCreateExclude( pExclude );
ZipCreateArray( pParam, pCurDir );
ZipCreateArray( pParam, pCurDir, bFullPath ); /* bFullPath by JGS */
hb_fsChDir( pCurDir ) ;
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
// add current dir to file name if not specified
if ( ! strchr( hb_parc( 1 ), OS_PATH_DELIMITER ) )
{
strcpy( szFile, (char *) pCurDir );
@@ -456,11 +466,13 @@ HB_FUNC( HB_ZIPFILE )
{
strcpy( szFile, hb_parc( 1 ) );
}
hb_xfree( pCurDir) ;
szZipFileName = hb___CheckFile( szFile );
if ( hb_arrayLen(FileToZip) > 0 )
{
PHB_ITEM pProgress = ISBLOCK( 9 ) ? hb_itemNew( hb_param( 9, HB_IT_BLOCK ) ) : hb_itemNew( NULL );
bRet = hb_CompressFile( szZipFileName,
FileToZip,
ISNUM( 3 ) ? hb_parni( 3 ) : ( -1 ),
@@ -469,12 +481,11 @@ HB_FUNC( HB_ZIPFILE )
ISCHAR( 6 ) ? hb_parc( 6 ) : NULL,
ISLOG( 7 ) ? hb_parl( 7 ) : 0,
ISLOG( 8 ) ? hb_parl( 8 ) : 0,
&iProgress );
pProgress );
ResetAttribs();
hb_itemRelease( pProgress );
}
hb_itemClear( &iProgress );
hb_xfree( szZipFileName );
hb_itemRelease(ExcludeFile);
}
@@ -539,28 +550,30 @@ HB_FUNC( HB_ZIPFILEBYTDSPAN )
if ( pParam )
{
char szFile[ _POSIX_PATH_MAX ];
PHB_ITEM pProgress = hb_param( 10, HB_IT_BLOCK );
PHB_ITEM pExclude = hb_param( 11, HB_IT_STRING | HB_IT_ARRAY );
HB_ITEM iProgress;
char *szZipFileName;
BYTE *pCurDir;
iProgress.type = HB_IT_NIL;
/* by JGS */
BOOL bFullPath = TRUE;
#if defined(HB_WIN32_IO)
if ( ISLOG( 12 ) )
{
bFullPath = hb_parl( 12 );
}
#endif
/* by JGS */
pCurDir = ( BYTE * )hb_xstrcpy( NULL, OS_PATH_DELIMITER_STRING, ( const char * )hb_fsCurDir( 0 ) , NULL );
ZipCreateExclude( pExclude );
ZipCreateArray( pParam, pCurDir );
ZipCreateArray( pParam, pCurDir, bFullPath ); /* bFullPath by JGS */
hb_fsChDir( pCurDir );
/* by JGS, wait until adding the directory to the file name if not specified
hb_xfree( pCurDir );
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
// add current dir to file name if not specified
*/
if ( ! strchr( szFile, OS_PATH_DELIMITER ) )
{
strcpy( szFile, (char *) pCurDir );
@@ -571,11 +584,12 @@ HB_FUNC( HB_ZIPFILEBYTDSPAN )
{
strcpy( szFile, hb_parc( 1 ) );
}
hb_xfree( pCurDir ) ; /* by JGS */
szZipFileName = hb___CheckFile( szFile );
if ( hb_arrayLen(FileToZip) > 0 )
{
PHB_ITEM pProgress = ISBLOCK( 10 ) ? hb_itemNew( hb_param( 10, HB_IT_BLOCK ) ) : hb_itemNew( NULL );
bRet = hb_CmpTdSpan( szZipFileName,
FileToZip,
ISNUM( 3 ) ? hb_parni( 3 ) : ( -1 ),
@@ -585,12 +599,11 @@ HB_FUNC( HB_ZIPFILEBYTDSPAN )
ISNUM( 7 ) ? hb_parni( 7 ) : 0,
ISLOG( 8 ) ? hb_parl( 8 ) : 0,
ISLOG( 9 ) ? hb_parl( 9 ) : 0,
&iProgress );
pProgress );
ResetAttribs();
hb_itemRelease( pProgress );
}
hb_itemClear( &iProgress );
hb_xfree( szZipFileName );
hb_itemRelease(ExcludeFile);
}
@@ -610,32 +623,48 @@ HB_FUNC( HB_ZIPFILEBYPKSPAN )
if ( pParam )
{
char szFile[ _POSIX_PATH_MAX ];
PHB_ITEM pProgress = hb_param( 9, HB_IT_BLOCK );
PHB_ITEM pExclude = hb_param( 10, HB_IT_STRING | HB_IT_ARRAY );
HB_ITEM iProgress;
char *szZipFileName;
BYTE * pCurDir ;
iProgress.type = HB_IT_NIL;
/* by JGS */
BOOL bFullPath = TRUE;
#if defined(HB_WIN32_IO)
if ( ISLOG( 11 ) )
{
bFullPath = hb_parl( 11 );
}
#endif
/* by JGS */
pCurDir = ( BYTE * )hb_xstrcpy( NULL, OS_PATH_DELIMITER_STRING, ( const char * )hb_fsCurDir( 0 ) , NULL );
ZipCreateExclude( pExclude );
ZipCreateArray( pParam, pCurDir );
ZipCreateArray( pParam, pCurDir, bFullPath ); /* bFullPath by JGS */
hb_fsChDir( pCurDir ) ;
/* by JGS, wait until adding the directory to the file name if not specified
hb_xfree( pCurDir ) ;
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
strcpy( szFile, hb_parc( 1 ) );
*/
if ( ! strchr( szFile, OS_PATH_DELIMITER ) )
{
strcpy( szFile, (char *) pCurDir );
strcat( szFile, OS_PATH_DELIMITER_STRING) ;
strcat( szFile, hb_parc( 1 ) ) ;
}
else
{
strcpy( szFile, hb_parc( 1 ) );
}
hb_xfree( pCurDir );
/* by JGS */
szZipFileName = hb___CheckFile( szFile );
if ( hb_arrayLen(FileToZip) > 0 )
{
PHB_ITEM pProgress = ISBLOCK( 9 ) ? hb_itemNew( hb_param( 9, HB_IT_BLOCK ) ) : hb_itemNew( NULL );
bRet = hb_CmpPkSpan( szZipFileName,
FileToZip,
ISNUM( 3 ) ? hb_parni( 3 ) : ( -1 ),
@@ -644,11 +673,11 @@ HB_FUNC( HB_ZIPFILEBYPKSPAN )
ISCHAR( 6 ) ? hb_parc( 6 ) : NULL,
ISLOG( 7 ) ? hb_parl( 7 ) : 0,
ISLOG( 8 ) ? hb_parl( 8 ) : 0,
&iProgress );
pProgress );
ResetAttribs();
hb_itemRelease( pProgress );
}
hb_itemClear( &iProgress );
hb_xfree( szZipFileName );
hb_itemRelease(ExcludeFile);
}
@@ -664,34 +693,21 @@ HB_FUNC( HB_UNZIPFILE )
if( ISCHAR( 1 ) && ( ISARRAY( 6 ) || ISCHAR( 6 ) ) )
{
char szFile[ _POSIX_PATH_MAX ];
PHB_ITEM pProgress = hb_param( 7, HB_IT_BLOCK );
PHB_ITEM pUnzip = hb_param( 6, HB_IT_ANY );
HB_ITEM iProgress;
// PHB_ITEM Temp;
char *szZipFileName;
BYTE *pCurDir;
//Temp.type = HB_IT_NIL;
iProgress.type = HB_IT_NIL;
pCurDir = ( BYTE * )hb_xstrcpy( NULL, OS_PATH_DELIMITER_STRING, ( const char * )hb_fsCurDir( 0 ) , NULL );
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
strcpy( szFile, hb_parc( 1 ) );
szZipFileName = hb___CheckFile( szFile );
UnzipFiles= hb_itemNew( NULL);
hb_arrayNew( UnzipFiles, 0 );
UnzipFiles = hb_itemArrayNew(0);
if( hb_TestForPKS( szZipFileName ) <=0 )
if( hb_TestForPKS( szZipFileName ) <=0 )
{
hb___GetFileNamesFromZip( szZipFileName, TRUE );
if( pUnzip )
{
@@ -719,21 +735,22 @@ HB_FUNC( HB_UNZIPFILE )
else
{
//s.r. change "*.*" to "*" because file without extension were ignored
UnzipCreateArray( szZipFileName, "*", 1 );
UnzipCreateArray( szZipFileName, (char*) "*", 1 );
}
if ( hb_arrayLen(UnzipFiles) > 0 )
{
PHB_ITEM pProgress = ISBLOCK( 7 ) ? hb_itemNew( hb_param( 7 , HB_IT_BLOCK ) ) : hb_itemNew( NULL );
bRet = hb_UnzipSel( szZipFileName,
hb_param( 2, HB_IT_BLOCK ),
ISLOG( 3 ) ? hb_parl( 3 ) : 0,
ISCHAR( 4 ) ? hb_parc( 4 ) : NULL,
ISCHAR( 5 ) ? hb_parc( 5 ) : ".\\",
UnzipFiles,
&iProgress );
pProgress );
hb_itemRelease( pProgress );
}
hb_xfree( szZipFileName );
hb_itemClear( &iProgress );
hb_itemRelease( UnzipFiles );
hb_fsChDir( pCurDir ) ;
hb_xfree( pCurDir ) ;
@@ -758,8 +775,7 @@ HB_FUNC( HB_ZIPDELETEFILES )
{
PHB_ITEM pDelZip = hb_param( 2, HB_IT_STRING | HB_IT_ARRAY | HB_IT_NUMERIC );
DelZip = hb_itemNew(NULL);
hb_arrayNew( DelZip, 0 );
DelZip = hb_itemArrayNew(0);
if ( pDelZip )
{
@@ -815,7 +831,7 @@ HB_FUNC( HB_ZIPDELETEFILES )
{
int iIndex = hb_itemGetNI( pDelZip );
PHB_ITEM Temp;
if( iIndex > 0 && iIndex <= ulLen )
{
@@ -886,20 +902,11 @@ HB_FUNC( HB_UNZIPFILEINDEX )
if ( pDelZip )
{
char szFile[ _POSIX_PATH_MAX ];
PHB_ITEM pProgress = hb_param( 7, HB_IT_BLOCK );
PHB_ITEM Temp,DelZip;
HB_ITEM iProgress ;
char* szZipFileName;
int ulLen;
iProgress.type = HB_IT_NIL;
DelZip = hb_itemNew( NULL);
hb_arrayNew( DelZip, 0 );
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
DelZip = hb_itemArrayNew(0);
strcpy( szFile, hb_parc( 1 ) );
szZipFileName = hb___CheckFile( szFile );
@@ -937,17 +944,18 @@ HB_FUNC( HB_UNZIPFILEINDEX )
if( hb_arrayLen(DelZip) > 0 )
{
PHB_ITEM pProgress = ISBLOCK( 7 ) ? hb_itemNew( hb_param( 7 , HB_IT_BLOCK ) ) : hb_itemNew( NULL );
bRet = hb_UnzipSelIndex( szZipFileName,
hb_param( 2, HB_IT_BLOCK ),
ISLOG( 3 ) ? hb_parl( 3 ) : 0,
ISCHAR( 4 ) ? hb_parc( 4 ) : NULL,
hb_parc( 5 ),
DelZip,
&iProgress );
pProgress );
hb_itemRelease( pProgress );
}
hb_itemRelease( DelZip );
hb_itemClear( &iProgress );
hb_xfree( szZipFileName );
hb_itemClear( ZipArray );
hb_itemRelease( ZipArray );
@@ -984,23 +992,22 @@ HB_FUNC(SETZIPREADONLY)
HB_FUNC(HB_UNZIPALLFILE)
{
PHB_ITEM pProgress = hb_param( 7, HB_IT_BLOCK );
HB_ITEM iProgress;
iProgress.type = HB_IT_NIL;
if( pProgress )
{
hb_itemCopy( &iProgress, pProgress );
}
if ( ! ISCHAR(6) && ! ISARRAY(6) )
{
{
char szFile[_POSIX_PATH_MAX];
char *szZipFile;
PHB_ITEM pProgress = ISBLOCK( 7 ) ? hb_itemNew( hb_param( 7, HB_IT_BLOCK ) ) : hb_itemNew( NULL );
strcpy(szFile, hb_parc(1));
szZipFile = hb___CheckFile(szFile);
hb_retl(hb_UnzipAll(szZipFile, hb_param( 2, HB_IT_BLOCK),ISLOG(3) ? hb_parl(3) : 0 ,hb_parc(4),ISCHAR(5) ? hb_parc(5) : NULL,hb_param( 6, HB_IT_BLOCK),&iProgress));
hb_retl( hb_UnzipAll( szZipFile,
hb_param( 2, HB_IT_BLOCK),
ISLOG(3) ? hb_parl(3) : 0,
hb_parc(4),
ISCHAR(5) ? hb_parc(5) : NULL,
hb_param( 6, HB_IT_BLOCK ),
pProgress ) );
hb_xfree( szZipFile );
hb_itemRelease( pProgress );
}
}

View File

@@ -84,10 +84,12 @@ bool CZipFile::Open(LPCTSTR lpszFileName, UINT openFlags, bool bThrow)
m_hFile = ZipPlatform::OpenFile(lpszFileName, iNewFlags, openFlags & 0x1C);
if (m_hFile == -1)
{
if (bThrow)
ThrowError();
else
return false;
}
m_szFileName = lpszFileName;
return true;
}

View File

@@ -682,7 +682,7 @@ int hb_UnzipSel( char *szFile, PHB_ITEM pBlock, BOOL lWithPath, char *szPassWord
catch( CZipException& e )
{
HB_SYMBOL_UNUSED( e );
iReturn = false;
szZip.CloseFile( NULL, true);
/* szZip.CloseNewFile(true);*/
}
@@ -874,7 +874,7 @@ int hb_UnzipSelIndex( char *szFile, PHB_ITEM pBlock, BOOL lWithPath, char *szPas
catch( CZipException& e )
{
HB_SYMBOL_UNUSED( e );
iReturn = false;
szZip.CloseFile( NULL, true);
}
}
@@ -1000,7 +1000,7 @@ DWORD GetCurrentFileSize( LPCTSTR szFile )
#endif
int hb_UnzipAll(char *szFile,PHB_ITEM pBlock,BOOL bWithPath,char *szPassWord,char *pbyBuffer,PHB_ITEM pDiskBlock,PHB_ITEM pProgress)
int hb_UnzipAll(char *szFile,PHB_ITEM pBlock, BOOL bWithPath,char *szPassWord,char *pbyBuffer,PHB_ITEM pDiskBlock,PHB_ITEM pProgress)
{
bool iReturn=true;
uLong uiCount=0;

View File

@@ -220,20 +220,24 @@ ZIPINLINE void ZipPlatform::AnsiOem(CZipAutoBuffer& buffer, bool bAnsiToOem)
ZIPINLINE bool ZipPlatform::RemoveFile(LPCTSTR lpszFileName, bool bThrow)
{
if (!::DeleteFile((LPTSTR)lpszFileName))
{
if (bThrow)
CZipException::Throw(CZipException::notRemoved, lpszFileName);
else
return false;
}
return true;
}
ZIPINLINE bool ZipPlatform::RenameFile( LPCTSTR lpszOldName, LPCTSTR lpszNewName, bool bThrow)
{
if (!::MoveFile((LPTSTR)lpszOldName, (LPTSTR)lpszNewName))
{
if (bThrow)
CZipException::Throw(CZipException::notRenamed, lpszOldName);
else
return false;
}
return true;
}

View File

@@ -52,10 +52,12 @@ DWORD CZipStorage::Read(void *pBuf, DWORD iSize, bool bAtOnce)
{
iRead = m_pFile->Read(pBuf, iSize);
if (!iRead)
{
if (IsSpanMode())
ChangeDisk(m_iCurrentDisk + 1);
else
ThrowError(CZipException::badZipFile);
}
}
if (iRead == iSize)

View File

@@ -3,7 +3,7 @@
*/
Version 0.9.9 RC1 (2008-06-04) tag: RC1
Version 1.0.0 RC1 (2008-06-04) tag: RC1
General
=============================
@@ -286,12 +286,14 @@ Contrib
- added automatic ACE version detection during building ADSRDD
- added many new Ads*() functions wrappers and cleaned code for
possible GPFs when wrong parameters were passed to some functions
- added HBHPDF - interface for Haru Free PDF Library.- added HBVPDF - Viktor K's PDF Library + Pritpal Bedi's OOP extension.
- added HBHPDF - interface for Haru Free PDF Library.
- added HBVPDF - Viktor K's PDF Library + Pritpal Bedi's OOP extension.
- enhanced and fixed HBW32 library - OLE and printing
Utilities
=============================
- added HBDOT utility program. It's a "Dot Prompt" Console for the Harbour Language
- added HBDOT utility program. It's a "Dot Prompt" Console for the
Harbour Language
Syntax: hbdot [<hrbfile[.prg]> [<parameters,...>]]
It should look and work in similar way to pp/xBaseScript
by Ron Pinkas but unlike xBaseScript is does not have preprocessor

View File

@@ -25,8 +25,8 @@
######################################################################
%define name harbour-ce
%define version 0.0.0
%define releasen 0
%define version 1.0.0
%define releasen RC1
%define hb_pref hbce
%define hb_ccpath /opt/mingw32ce/bin
%define hb_ccpref arm-wince-mingw32ce-
@@ -97,7 +97,7 @@ export HB_ARCHITECTURE=w32
export HB_COMPILER=cemgw
mkdir -p source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}
ln -s ../../linux/gcc/hbppgen source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/hbppgen.exe
ln -s ../../linux/gcc/hbpp source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/hbpp.exe
mkdir -p source/main/${HB_ARCHITECTURE}/${HB_COMPILER}
ln -s ../../linux/gcc/harbour source/main/${HB_ARCHITECTURE}/${HB_COMPILER}/harbour.exe
@@ -172,7 +172,7 @@ make -r -i install
${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
# remove unused files
rm -fR ${HB_BIN_INSTALL}/{harbour,hbdoc,hbdot,hbmake,hbpp,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR $HB_INC_INSTALL
# Create a README file for people using this RPM.

View File

@@ -25,8 +25,8 @@
######################################################################
%define name harbour-w32
%define version 0.0.0
%define releasen 0
%define version 1.0.0
%define releasen RC1
%define hb_pref hbw
%define hb_ccpath /opt/xmingw/bin
%define hb_ccpref i386-mingw32-
@@ -97,7 +97,7 @@ export HB_ARCHITECTURE=w32
export HB_COMPILER=mingw32
mkdir -p source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}
ln -s ../../linux/gcc/hbppgen source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/hbppgen.exe
ln -s ../../linux/gcc/hbpp source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/hbpp.exe
mkdir -p source/main/${HB_ARCHITECTURE}/${HB_COMPILER}
ln -s ../../linux/gcc/harbour source/main/${HB_ARCHITECTURE}/${HB_COMPILER}/harbour.exe
@@ -172,7 +172,7 @@ make -r -i install
${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
# remove unused files
rm -fR ${HB_BIN_INSTALL}/{harbour,hbdoc,hbdot,hbmake,hbpp,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest,hbverfix,hbpptest}.exe
rm -fR $HB_INC_INSTALL
# Create a README file for people using this RPM.

View File

@@ -60,8 +60,8 @@
%define name harbour
%define dname Harbour
%define version 0.9.9-RC1
%define releasen 0
%define version 1.0.0
%define releasen RC1
%define hb_pref hb
%define hb_arch export HB_ARCHITECTURE=linux
%define hb_cc export HB_COMPILER=gcc
@@ -328,7 +328,7 @@ then
export L_USR="${CC_L_USR} -L${HB_LIB_INSTALL} -l%{name} -lncurses %{!?_without_gtsln:-lslang} %{!?_without_gpm:-lgpm} %{!?_without_x11:-L/usr/X11R6/%{_lib} -lX11} %{?_with_pgsql4:/usr/lib/libpq.so.4} %{?_with_pgsql:-lpq} %{?_with_gd:-lgd}"
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\" ${PRG_USR}"
for utl in hbmake hbrun hbdot hbpp hbdoc
for utl in hbmake hbrun hbdot hbdoc
do
pushd utils/${utl}
rm -fR "./${HB_ARCHITECTURE}/${HB_COMPILER}"
@@ -492,6 +492,7 @@ rm -rf $RPM_BUILD_ROOT
%verify(not md5 mtime) %config /etc/harbour.cfg
%verify(not md5 mtime) %config /etc/harbour/hb-charmap.def
%{_bindir}/harbour
%{_bindir}/hbpp
%{_bindir}/hb-mkslib
%{_bindir}/%{hb_pref}-build
%{_bindir}/%{hb_pref}cc
@@ -501,7 +502,6 @@ rm -rf $RPM_BUILD_ROOT
#%{_bindir}/hbtest
%{_bindir}/hbrun
%{_bindir}/hbdot
%{_bindir}/hbpp
%{_bindir}/hbmake
%{_mandir}/man1/*.1*
%dir %{_includedir}/%{name}

View File

@@ -123,7 +123,7 @@
#define HB_GTI_FONTW_NORMAL 2
#define HB_GTI_FONTW_BOLD 3
/* Font sizes */
/* Font qualities */
#define HB_GTI_FONTQ_DRAFT 1
#define HB_GTI_FONTQ_NORMAL 2
#define HB_GTI_FONTQ_HIGH 3

View File

@@ -55,11 +55,12 @@
/* NOTE: One of these next three fields can be incremented by the hbverfix program */
#define HB_VER_MAJOR 0 /* Major version number */
#define HB_VER_MINOR 9 /* Minor version number */
#define HB_VER_REVISION 9 /* Revision number */
#define HB_VER_MAJOR 1 /* Major version number */
#define HB_VER_MINOR 0 /* Minor version number */
#define HB_VER_REVISION 0 /* Revision number */
#define HB_VER_STATUS "RC1" /* Build status */
#define HB_VERSION 0x000909 /* Three bytes: Major + Minor + Revision */
#define HB_VERSION 0x010000 /* Three bytes: Major + Minor +
Revision */
/* #include "hb_verbld.h" */