[code] [SCINTERM] API documentation mistake and Scintilla patch

From: Robin Haberkorn <robin.haberkorn.att.googlemail.com>
Date: Tue, 3 Mar 2015 04:49:28 +0100

Hello,

the Scinterm documentation contains a severe mistake. It is said that

"scintilla_delete (sci)

Deletes the given Scintilla window. This function does not delete the
curses WINDOW associated with it. You will have to delete the WINDOW
manually."

This is wrong. Scinterm does call delwin() on the WINDOW. But for some
strange reason it never seems to do any harm on NCurses. I had this
wrong (deleted the WINDOW before calling scintilla_delete()) in SciTECO
for a long time - probably double-freeing the Curses windows thousands
of times. But when I tried compiling on MinGW/PDCurses again, it
crashed immediately.

Also I fixed a bug in Scintilla that's related to Scinterm. You may
have found that hard tabs are laid out wrong in Scintilla/Scinterm. I
painstakingly traced this down in Scintilla (see attachment). It has to
be discussed with the Scintilla maintainers, as the padding applied in
the calculation may have a use in graphical UIs. Couldn't find any
explanation for it in the Scintilla commit history. But for the time
being you can apply it as a patch on the Scintilla code tree like I do.

By the way, for SciTECO I'm now handling the Scintilla library insanity
by keeping mirrors of Scintilla and Scinterm on Github and adding them
as submodules to the SciTECO repository. This means my (few) users no
longer have to download Scintilla and Scinterm manually copying it
together and manually applying patches. The latter can be achieved by
means of a sciteco branch on the Scintilla/Scinterm repositories.
But this approach has its own disadvantages e.g. when it comes to
supporting out of tree builds...

cheers,
Robin

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 02 Mar 2015 - 22:49:28 EST

This archive was generated by hypermail 2.2.0 : Tue 03 Mar 2015 - 06:44:23 EST