* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* src/rtl/memoedit.prg
* always returned reformatted string after CTRL+W even if user has not
made any modifications in edited data - Cl*pper compatible behavior.
* 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/rtl/chruni.c
* added new functions hb_BStuff() and hb_UStuff()
* src/rtl/Makefile
- src/rtl/padc.c
- src/rtl/padl.c
- src/rtl/padr.c
+ src/rtl/padx.c
* added new functions hb_BPadL(), hb_BPadR(), hb_BPadC(),
hb_UPadL(), hb_UPadR() and hb_UPadC()
* include/harbour.hbx
* updated
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* use hb_U*() functions for string manipulation - now it works
correctly with mulitbyte encodings even if HVM CP does enabled
character indexing, i.e. "UTF8"
* src/rtl/vfile.c
* pacified BCC warnin
* src/rtl/filesys.c
* src/rtl/fssize.c
* use GetFileAttributesEx() if available in given windows version
to get file size and time
* src/rtl/mlcfunc.c
! fixed MPosToLC() results for position in last line which have to
be moved after analyzing rest of line due to word wrapping.
* src/rtl/teditor.prg
* rewritten whole internal code critical for basic functionality.
+ resolved the problem with keycode conflicts for GTs which
support extended keycodes.
+ added support missing MemoEdit() editor functionality.
; Number of bugs and mistakes was to big to try to update it.
New code is smaller and simpler. I tried to keep compatibility
with previous version and added to new version most of "helper"
methods which are not used in MemoEdit() at all anyhow I cannot
guaranty that all existing code using TEditor will work without
modifications, i.e. I had to remove :SetPos() and all logic bound
with it because it was to hard for my brain to understand this
idea and/or functionality.
If someone needs strict compatibility with previous version then
he should add to his source code copy of old code.
Current code should addressed most of MemoEdit() problems with
text formatting and editing reported in the past though probably
not all. I have no spare time for precise tests of Cl*pper's
MemoEdit().
* src/rtl/memoedit.prg
* overload :InsertState() method to show <insert> SCOREBOARD message
* changed "Abort Edit? (Y/N)" message position to be Clipper compatible
* removed redundant keycode comparison
* do not ::SetPos HBEditor method - this method has been removed
* src/rtl/mlcfunc.c
* modified unpadded MemoLine() mode to return last blank
character in the line
* src/rtl/teditor.prg
! fixed typo in MemoLine() parameters
+ added lSoftCR parameter to GetText() - when it's true returned
text contains SoftCRs
* src/rtl/memoedit.prg
! return text with SoftCRs - Cl*pper compatible
; Above modifications fix initial and result text formatting
in MemoEdit() (#33)
* src/rtl/memoedit.prg
! fixed repeat condition for ME_INIT initial user function call
(correctly fixes#21)
* src/rtl/mlcfunc.c
* added temporary extension to MemoLine() which will be removed and
replaced in the future
* src/rtl/teditor.prg
! use temporary MemoLine() extension to fix problem with line trailing
spaces I introduced with previous modification
* src/rtl/replic.c
% optimization for Replicate( <cStr>, 1 )
* include/hbznet.h
* src/rtl/hbinet.c
* src/rtl/hbinetz.c
* moved HB_INET_ERR_* macros to header file
+ added error and errorStr functions to hb_inet*() socket read/write
wrappers
! call close function of hb_inet*() socket read/write wrappers before
closing the socket
+ added hb_znetInetFD() C function
* src/rtl/teditor.prg
! use hb_ATokens( <cText>, .T. ) and MemoLine() to divide text into lines
to improve performance and fix TABs decoding
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* applied recent fixes and cleanups from Viktor's branch.
* src/rtl/tgetlist.prg
* applied recent fixes from Viktor's branch:
; (2014-12-19 01:00 UTC+0100 Viktor Szakats)
! HBGetList():GUIApplyKey(): fixed bug introduced with UNICODE
support in 93d3a46d84 (upstream).
That patch had an undocumented workaround for the problem inside
ListBox():findText(), which was not Cl*pper compatible, so
it was later removed in 6f8508ff54a3955822b36bf4a65a2775a11bab23.
This patch hopefully fixes the root cause.
Reported here: https://groups.google.com/d/msg/harbour-devel/7Cpax5TdHnY/n5XfXX8N9vMJ
* include/hbsocket.ch
+ added HB_SOCKET_ERR_NONE
* src/rtl/hbsocket.c
* clear socket error when hb_socketRecv*() or hb_socketSend*() returns
value greater then 0
% removed unnecessary error code setting in MS-Windows builds
of hb_socketGetIFaces()
* src/rtl/filesys.c
! allocate dynamically buffer for current directory name if default
one is too small when current disk is checked
* src/rtl/hbzlib.c
* use hb_xalloc()/hb_xfree() to allocate/free memory during
ZLIB compression and decompression instead of ZLIB default
ones (finished code started in Viktor's branch)
* src/rtl/tlabel.prg
* src/rtl/treport.prg
% use hb_ATokens() instead of local functions ListAsArray()
* simplified reading labels and reports from files
* src/rtl/teditor.prg
* src/rtl/tget.prg
* src/rtl/tlabel.prg
* src/rtl/treport.prg
* synced with Viktor's branch:
removed explicit NIL from parameters, formatting, updated comments
and variable names, use FOR EACH and SWITCH statements,
use hb_defaultValue(), use hb_StrShrink(), formatting, few fixes
* src/rtl/langcomp.prg
* synced with Viktor's branch
* src/rtl/memoedit.prg
* synced with Viktor's branch, optimizations, formatting and fixes:
; 2014-03-28 13:09 UTC+0100 Viktor Szakats
+ MemoEdit(): allow BLOCK and SYMBOL types for user callbacks
(only in the default, non-strict mode)
! MemoEdit(): fixed to only handle certain types of events in ME_INIT
stage in harmony with Cl*pper documentation
! MemoEdit(): fixed to not get into an infinite loop on initialization
when user callback is returning unhandled value
https://github.com/harbour/core/issues/21
! MemoEdit()/HBMemoEditor():KeyboardHook(): fixed to fall back to
default handling of K_ESC if getting called recursively
https://github.com/harbour/core/issues/21
+ HBMemoEditor():HandleUserKey(): now returns whether the event was
handled (as logical value) (previously: Self) [INCOMPATIBLE]
* fixed some misleading variable names
; 2014-01-28 03:11 UTC+0100 Viktor Szakáts
! MemoEdit() fixed to pass-through without interactivity
when the user function is a boolean .F.
; 2014-01-27 15:15 UTC+0100 Viktor Szakáts
% abort key checking optimized and made unicode compatible
* src/rtl/listbox.prg
* synced with Viktor's branch, optimizations, formatting and fixes:
; 2014-07-21 08:56 UTC+0200 Viktor Szakats
! ListBox():findData(): fixed to be able to search for non-string
data, to the same extent Cl*ipper is able to.
! ListBox():findData(): fixed exact/case-insensitive regression
from 6f8508ff54a3955822b36bf4a65a2775a11bab23
; 2014-07-21 03:26 UTC+0200 Viktor Szakats
+ LISTBOX object instance area made compatible with Cl*pper
(relevant when object is accessed as array)
; 2014-07-21 01:20 UTC+0200 Viktor Szakats
* renamed variable and macro to reflect their type
+ ListBox():findData(): documented potential RTE
; 2014-07-21 01:04 UTC+0200 Viktor Szakats
% ListBox():findText(), ListBox():findData(): use hb_LeftEq[I]()
! ListBox():findText(), ListBox():findData(): fixed to not RTrim()
while searching in EXACT mode. Regression from f61409bf19
+ ListBox():findText(), ListBox():findData(): allow to search
for any type of data in HB_CLP_STRICT mode to mimic Cl*pper behavior
! ListBox():findText(): fixed to allow zero length search text,
like Cl*pper. Regression from 93d3a46d84
! ListBox():addItem( cText, cData ): fixed to allow any type for cData,
not just NIL and string, like Cl*pper
+ ListBox():setData(): documented a Cl*pper bug
; 2014-03-09 18:19 UTC+0100 Viktor Szakáts
! ListBox():scroll() fixed to ignore non-numeric parameter
(like Cl*pper) instead of an RTE
* (all files)
* stripped svn header
* minor cleanups
; use following command to find out the history of files:
git log
git log --follow
git blame
git annotate