* *
* 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/mlcfunc.c
! do not access trailing 0 byte in empty strings passed to hb_MLEval()
(thanks to Abe for information and example illustrating the problem)
* respect in return value also empty line after last EOL
* 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/gtxwc/gtxwc.c
* src/rtl/mlcfunc.c
* pacified new GCC C++ warnings
* src/rtl/hbsocket.c
* do not execute select() if HVM exception was generated when
socket handlers are extracted but return an error immediately
* 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 )
* (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