* contrib/hbnetio/netiocli.c
* strip connection parameters (server name, port, password,...) from
second parameter of hb_vfRename(), hb_vfLink() and hb_vfSymLink()
functions redirected to HBNETIO if it's the same as in the first
parameter.
Now it's possible to use above functions with path containing connection
parameters in second argument. Please only remember that both parameters
have to point to the same server in above functions. If not then DOS
error 2 is set.
In case of hb_vfCopy() the parameters can point to different servers
so it's possible to copy files between different HBNETIO servers or
even different Harbour File IO redirectors.
* src/rtl/hbsocket.c
! fixed typo (unnecessary parenthesis) in previous commit
* enabled getnameinfo() in MSVS 2015 builds
; thanks to Viktor for the information about above items
* src/rtl/hbbfsock.c
! typo in comment
* src/rtl/mlcfunc.c
* casting
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* formatting and few modifications to reduce some differences between
core and Viktor's branch
* include/hbapigt.h
* src/rtl/inkeyapi.c
+ added new C function:
int hb_inkeyKeyExt( int iKey );
It extracts function/edit key code value HB_KX_* from Harbour extended
key code. If passed keycode is not valid extended keycode which points
to function/edit key then 0 is returned.
* include/harbour.hbx
* src/rtl/inkey.c
+ added new PRG function hb_keyExt() - it's wrapper to hb_inkeyKeyExt()
* include/harbour.hbx
* src/rtl/mlcfunc.c
! restored original Cl*pper behavior in memo line functions,
test shows that inside MemoEdit() Cl*pper internally uses a little
bit different rules to format text then in memo line functions,
It's Cl*pper bug but hard to fix because any differences to Cl*pper
in this area cause that someone reports them as bug. So I decided
to leave original Cl*pper behavior for compatibility and add new
function which can be used in MemoEdit() and related code.
+ added new memo line function:
hb_MLEval( <cString>, <bCode>, [ <nLineLength>=79 ],
[ <nTabSize>=4 ], [ <lWrap>=.T. ],
[ <nPos> ], [ @<nRow> ], [ @<nCol> ] ) -> <nLines>
it formats texts using rules like in Cl*pper MemoEdit() not Cl*pper
memo lines functions. For each processed line <bCode> is executed
with 2 parameters: <cLine> and <lSoftCR>. It recognizes and accepts
any EOLs just like hb_ATokens( <cText>, .T. ) and strips or converts
soft CRs depending on word wrap mode.
* src/rtl/teditor.prg
* Use hb_MLEval() to format text
% minor optimization
* src/rtl/memoedit.prg
* enabled Harbour extended key codes
* small optimization
! fixed ME_BOTTOMRIGHT processing
! fixed initial line size calculation
* src/vm/thread.c
* removed dymmy code
* src/vm/hvm.c
! delay locking of main HVM thread stack until HVM is initialized,
it fixes issue #107
! protect access to HB_STACK_TLS_PRELOAD by s_fHVMActive in
hb_vmLockForce()
* src/rtl/hbcom.c
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* added workaround for bug in some Linux kernels (i.e.
3.13.0-64-generic Ubuntu) in which select() unconditionally
accepts terminal device for reading if c_cc[ VMIN ] = 0
It's very serious problem, i.e. in GTTRM no input is possible
in such kernels without this workaround.
* src/rtl/dirscan.prg
* modified hb_DirScan() and hb_DirRemoveAll() to work with Harbour
File IO API (hb_vf*() functions)
+ added new PRG function:
hb_FileDelete( <cFileMask> [, <cAttr> ] ) -> <lResult>
this function removes files which match given <cFileMask>
(it may contain path) and returns .T. if at least one file
was deleted. Optional <cAttr> parameter can be used to include
system ("S") and hidden ("H") files. If <cAttr> contains "R"
letter then before deleting READONLY attribute is removed from
files (it's necessary to remove files with READONLY attribute
in systems like DOS, MS-Windows or OS2). This function uses
Harbour File IO API (hb_vf*() functions)
* remove READONLY attribute from files in hb_DirRemoveAll()
* include/harbour.hbx
+ added hb_DirRemoveAll() and hb_FileDelete()
* contrib/hbct/files.c
! do not allow to remove empty directories by FileDelete() function
even if user explicitly sets directory attribute - CT3 compatible fix.
! remove READONLY attribute before deleting READONLY files if 2-nd
parameter of FileDelete() contains READONLY bit
* src/rtl/filesys.c
* formatting
* ChangeLog.txt
! typo
* utils/hbmk2/hbmk2.prg
+ Partially merge 8f16b6731 from vszakats/harbour-core:
"refined the way pkg-config queries the package version. Now
it does it in a separate call to make some pkg-config versions
happy where version query option cannot be mixed with --cflags
and similar options (f.e. pkg-config 0.28 in current homebrew)."
* src/common/hbffind.c
+ added support for link attribute (HB_FA_LINK -> "L") passed to
Directory() and other functions using hb_fsFindFirst()/hb_fsFindNext()
When this attribute is passed then softlinks are presented "as is"
without following target.
* src/rtl/dirscan.prg
+ added new PRG function hb_DirRemoveAll( <cDir> ) -> <lResult>
BE CAREFUL! This function removed recursively whole directories
with it's body so hb_DirRemoveAll( hb_ps() ) can remove all
files and directories from your disk.
* src/rtl/hbproces.c
! added protection against writing more then 4096 bytes to unblocked
pipe in MS-Windows builds of hb_fsProcessRun()
! close write side of child stdin handle if all data is sent in OS2
builds of hb_fsProcessRun()
* src/rtl/hbproces.c
* In OS2 builds use fGentle parameter of hb_fsProcessClose() to
control if kill signal should be send only to child process or
also to its all descendant processes.
* src/rtl/fscopy.c
* pacified BCC warning
* src/rtl/hbproces.c
* added HB_PROCESS_USEFILES macro which enable child process
standard IO handles redirection to files instead of pipes
in hb_fsProcessRun() function. It's enabled by default in
DOS and WinCE builds
* enable HB_PROCESS_USEFILES for tests in OS2 builds
* include/hbapicls.h
* src/vm/classes.c
* minor modification in variable name
* src/rtl/filebuf.c
* src/rtl/fscopy.c
* src/rtl/fslink.c
* src/rtl/vfile.c
* cleaned FError() setting. It should not be changed by C file IO
functions because they can be activated from RDD code so accessing
work area field could change the FError() result, i.e. this code
does not work when FError() is changed by C level IO operations:
AnyFunc( FSeek( hFile, 0, FS_END ), field->MEMOVAL, FError() )
Even simple field access may cause file IO operations in RDD code
when relations are set because records in child area are repositioned
only when necessary (when user tries to make some operations on this
area). In the past RDD code was full of constructions like:
uiSaveError = hb_fsFError();
// make some IO operations
hb_fsSetFerror( uiSaveError );
to eliminate such overhead I separated PRG level FError() from
C level IOError(). Please keep it.
* ChangeLog.txt
! few typos
* include/hbvmpub.h
* src/vm/hvm.c
+ added support for hb_vmAtInit(), hb_vmAtExit() and hb_vmAtQuit()
functions for dynamically loaded libraries
This modification should also fix issue #33
* src/rtl/gttrm/gttrm.c
- removed unused macros and definitions
* formatting and minor cleanup
* src/rtl/gtcrs/gtcrs.h
* src/rtl/gtcrs/gtcrs.c
+ added support for extended key codes, GTCRS does not support
unicode so it's not fully functional just like in GTTRM
* src/rtl/filesys.c
* clear ERROR_BROKEN_PIPE (109) in MS-Windows and OS2 builds reported
when pear closes the write end of the pipe.
Now hb_PRead() returns -1 with FError() = 0 in such case in all builds.
* src/rtl/filesys.c
+ added code for anonymous pipes emulation by named pipes,
now nonblocking access to pipe streams in OS2 builds should work
* src/rtl/hbproces.c
* pacified warnings in OS2 builds
* contrib/hbhpdf/3rd/libhpdf/hpdfimac.c
! removed obsolete memory.h
* contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
* rediffed
* include/hbdate.h
* enabled reentrant safe version of localtime() and gmtime() in all
OpenWatcom builds
* src/vm/estack.c
! protect access to HB_STACK_TLS_PRELOAD by hb_stack_ready() macro,
it's necessary for MT builds which do not use direct TLS access
but need TLS key initialization, i.e. OS2
* src/vm/hvm.c
! protect access to HB_STACK_TLS_PRELOAD by s_fHVMActive
* src/rtl/filesys.c
* implemented hb_fsSetDevMode() only for DOS builds,
all other platforms always use O_BINARY mode
* utils/hbmk2/hbmk2.prg
! fixed EOL handling in stdout and stderr output
* src/nortl/nortl.c
+ added hb_fsSetError()
* include/hbapifs.h
* src/common/hbfsapi.c
+ added new C function for OS2 builds: hb_fsOS2QueryPathInfo()
Unlike DosQueryPathInfo() it uses dir entries so it does not need to
open the file what can create file sharing violation problem.
+ added new C function for OS2 builds: hb_isWSeB()
It returns true if OS2 version supports long file API
(IBM OS/2 Warp Server for e-Business)
+ added new C functions for OS2 builds:
hb_fsOS2DosOpenL(), hb_fsOS2DosSetFileLocksL(),
hb_fsOS2DosSetFilePtrL(), hb_fsOS2DosSetFileSizeL()
These are dynamically initialized wrappers to OS2 long file API
functions if such functions exists in given OS2 version.
* src/common/hbfsapi.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsNameExists(),
hb_fsFileExists() and hb_fsDirExists()
* src/common/hbffind.c
+ added support for long files (longer then 4GB) in OS2 builds.
It also detects OS2 version to check if long file API is supported.
! fixed file error setting in OS2 builds
* src/rtl/filesys.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsGetFileTime() and
hb_fsGetAttr()
* use hb_fsOS2*() functions for long files
* src/rtl/fssize.c
* use hb_fsQueryPathInfo() in OS2 builds of hb_fsFSize()
; please make real life tests in OS2
* src/rtl/gtos2/gtos2.c
+ added support for HB_GTI_CODEPAGE
! removed code which sets CP437 at application start
Now the default codepage is the same set by system.
If someone wants to use CP437 regardless of default OS2 settings
then he should add to his code:
hb_gtInfo( HB_GTI_CODEPAGE, 437 )
* src/rtl/hbproces.c
* use native OS2 system functions in hb_fsProcessOpen(),
hb_fsProcessValue(), hb_fsProcessClose() - please test it
; TODO: change hb_fsProcessRun() to use real assynchrous execution in
OS2 builds
* src/rtl/disksphb.c
* src/rtl/filesys.c
* use native system functions for disk and file IO operations in OS2
builds.
+ added support for long files (> 2GB) in OS2 builds
! fixed file IO error setting in OS2 builds
; For above modifications I had to change nearly all file IO functions
in OS2 build. I would like to OS2 users to make tests.
In next step I'll update hb_process*() functions.
* include/hbdefs.h
* changed reference 32-bit reference counters in Win64 builds to 64-bit
ones. It resolves problems with data alignment in memory allocated
by hb_xgrab().
* src/vm/asort.c
* removed hack for MinGW64 build from new array sort code,
after switching to 64bit reference counters it should not
be longer necessary because allocated that has 64bit alignment
* include/hbapifs.h
* src/rtl/filebuf.c
* added new C function hb_fileLoadData() - it can be used to load data
from already opened regular files and streams
* include/harbour.hbx
* src/rtl/vfile.c
+ added new PRG function:
hb_vfLoad( <cFileName>, [ <nMaxSize> ] ) -> <cFileBody> | NIL
* src/vm/runner.c
* use hb_fileLoadData()
* contrib/hbwin/win_bmp.c
* use hb_fileLoad()