New Windows version of TSE - v4.50 rc15

25 views
Skip to first unread message

S.E. Mitchell

unread,
Dec 15, 2023, 2:31:41 PM12/15/23
to TSEPro Support
https://semware.com/files/tse-pro-install/tse-setup-4.50-rc15.zip
---------------------------------------------------------------------------------
15 Dec 2023 v4.50 release candidate 15
---------------------------------------------------------------------------------
When writing files to stdout, tsort was adding an additional CR.
This is because Windows opens stdout in text mode.
To fix this, the following was added to tsort:
setmode(fileno(stdout), O_BINARY);
Thanks to Carlo Hogeveen for the report.

When writing the config file from Full Configuration, turn off
entab_on_save. Thanks to Fred Holmes for the report.

Don't add chr(0) after view finds/view grep's filenames. This
was added in RC 13, but has been reverted.
Thanks to Joachim Merkel for the report.

In CompareLines(), use _IGNORE_CASE_ and _FILTER_SPACES_.
_DESCENDING_ now supported.
Thanks to Carlo Hogeveen for the suggestions.

The maximum key len for both the internal and external sort is now
set at 16,000 characters. Thanks to Carlo Hogeveen for helping
with this.

Update the external sort to be stable when sorting in reverse
order. Thanks to Carlo Hogeveen for the report.

Carlo Hogeveen

unread,
Dec 16, 2023, 8:58:36 AM12/16/23
to sem...@googlegroups.com

@Sammy,

Muchas gracias for the sort and CompareLines() improvements!
Especially a reliable sort is very important to me.


@All,

Contrary to what the TSE read.me says, the syntax of CompareLines() is:


Syntax: integer CompareLines( integer line1,
integer line2 [ ,
integer flags [ ,
integer buffer1 [ ,
integer buffer2 ]]] )

line1 and line2 are the numbers of the lines to compare.

flags is optional and can be
_DEFAULT_, _IGNORE_CASE_, _FILTER_SPACES_, _DESCENDING_,
or any of them combined by the bitwise-or "|".

For example, use flags _IGNORE_CASE_|_DESCENDING_|_FILTER_SPACES_
to change all of CompareLines()' default options.

_IGNORE_CASE_ and _DESCENDING_ work like they do in Sort().

_IGNORE_CASE_ makes CompareLines() ignore the difference between
upper and lower case letters.

_FILTER_SPACES_ makes CompareLines() equal any sequence of spaces
and tab characters with any other sequence of spaces and tab
characters.

For example, with the _FILETER_SPACES_ flag,
"A B C"
in line1 will equal
"A B" + Chr(9) + " C"
in line2.

_DESCENDING_ will compare the two lines in the reverse order.
Just like it will make Sort() sort in the reverse orden.
Technically it will multiply CompareLines' default result by -1.

buffer1 and buffer2 are optional and respectively indicate from
which buffers to compare line1 and line2.
If either is omitted then the current buffer is used.

For example, CompareLines(1, 2, _DEFAULT_, 50) compares line 1
from buffer 50 with line 2 from the current buffer.


Returns: Default:
-1 if line1 has a lower order than line2,
0 if line1 and line2 have equal order,
1 if line1 has a higher order than line 1.

This is very comparable with how the Sort() statement works.


Carlo





Reply all
Reply to author
Forward
0 new messages