<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/interface-curses, branch v2.0.0</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>fixed caret scrolling on startup</title>
<updated>2023-06-18T15:50:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-06-18T15:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=493504f12f79990dae7791efa27366b560151f2c'/>
<id>493504f12f79990dae7791efa27366b560151f2c</id>
<content type='text'>
* Since Scintilla no longer automatically scrolls the caret (see 941f48da6dde691a7800290cc729aaaacd051392),
  the caret wouldn't always end up in the view on startup.
* Added teco_interface_refresh() which includes SCI_SCROLLCARET and
  is invoked on startup. This helps with the Curses backend.
  It also reduces code redundancies.
* On Gtk, the caret cannot be easily scrolled on startup as long as no size is allocated
  to the window, so we also added a size-allocate callback to the
  window's event box. Sizes are less often allocated to the event box than to the
  window itself for some strange reason.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Since Scintilla no longer automatically scrolls the caret (see 941f48da6dde691a7800290cc729aaaacd051392),
  the caret wouldn't always end up in the view on startup.
* Added teco_interface_refresh() which includes SCI_SCROLLCARET and
  is invoked on startup. This helps with the Curses backend.
  It also reduces code redundancies.
* On Gtk, the caret cannot be easily scrolled on startup as long as no size is allocated
  to the window, so we also added a size-allocate callback to the
  window's event box. Sizes are less often allocated to the event box than to the
  window itself for some strange reason.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed CTRL+C interruptions on Windows; optimized CTRL+C polling on Gtk+</title>
<updated>2023-05-09T17:08:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-05-09T17:08:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f557af9a9112955d3b65f6ad0d54c0791189f961'/>
<id>f557af9a9112955d3b65f6ad0d54c0791189f961</id>
<content type='text'>
* teco_interrupt() turned out to be unsuitable to kill child processes (eg. when &lt;EB&gt; hangs).
  Instead, we have Win32-specific code now.
* Since SIGINT can be ignored on UNIX, pressing CTRL+C was not guaranteed to kill the
  child process (eg. when &lt;EB&gt; hangs).
  At the same time, it makes sense to send SIGINT first, so programs can terminate gracefully.
  The behaviour has therefore been adapted: Interrupting with CTRL+C the first time will kill
  gracefully. The second time, a more agressive signal is sent to kill the child process.
  Unfortunately, this would be relatively tricky and complicated to do on Windows, so CTRL+C will always
  "hard-kill" the child process.
* Moreover, teco_interrupt() killed the entire process on Windows when called the second time.
  This resulted in any interruption to terminate SciTECO unexpectedly when tried the second time on Gtk/Win32.
* teco_sigint_occurred renamed to teco_interrupted:
  There may be several different sources for setting this flag.
* Checking for CTRL+C on Gtk involves driving the main event loop repeatedly.
  This is a very expensive operation. We now do that only every 100ms. This is still sufficient since
  keyboard input comes from humans.
  This optimization saves 75% runtime on Windows and 90% on Linux.
  * The same optimization turned out to be contraproductive on PDCurses/WinGUI.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* teco_interrupt() turned out to be unsuitable to kill child processes (eg. when &lt;EB&gt; hangs).
  Instead, we have Win32-specific code now.
* Since SIGINT can be ignored on UNIX, pressing CTRL+C was not guaranteed to kill the
  child process (eg. when &lt;EB&gt; hangs).
  At the same time, it makes sense to send SIGINT first, so programs can terminate gracefully.
  The behaviour has therefore been adapted: Interrupting with CTRL+C the first time will kill
  gracefully. The second time, a more agressive signal is sent to kill the child process.
  Unfortunately, this would be relatively tricky and complicated to do on Windows, so CTRL+C will always
  "hard-kill" the child process.
* Moreover, teco_interrupt() killed the entire process on Windows when called the second time.
  This resulted in any interruption to terminate SciTECO unexpectedly when tried the second time on Gtk/Win32.
* teco_sigint_occurred renamed to teco_interrupted:
  There may be several different sources for setting this flag.
* Checking for CTRL+C on Gtk involves driving the main event loop repeatedly.
  This is a very expensive operation. We now do that only every 100ms. This is still sufficient since
  keyboard input comes from humans.
  This optimization saves 75% runtime on Windows and 90% on Linux.
  * The same optimization turned out to be contraproductive on PDCurses/WinGUI.
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: do not allow typing any non-ASCII characters - fixes crashes on PDCurses/WinGUI</title>
<updated>2023-04-20T10:23:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-04-20T10:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5470fc3a63ff1cb15d7d5128e5c9d682dda28341'/>
<id>5470fc3a63ff1cb15d7d5128e5c9d682dda28341</id>
<content type='text'>
* we can neither display, nor parse Unicode characters properly, so this does not worsen anything
* makes it harder to confuse the parser as long as we do not support Unicode.
* behaves like on Gtk: pressing a non-ASCII char will simply be ignored
* Most importantly, this fixes crashes on PDCurses/WinGUI.
  It apparently couldn't handle the negative integers that resulted from passing a value &gt;= 0x80 &lt;= 0xFF
  into gchar (which is a signed integer).
  Changing everything into guchar is not worth the effort - we need full Unicode support anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* we can neither display, nor parse Unicode characters properly, so this does not worsen anything
* makes it harder to confuse the parser as long as we do not support Unicode.
* behaves like on Gtk: pressing a non-ASCII char will simply be ignored
* Most importantly, this fixes crashes on PDCurses/WinGUI.
  It apparently couldn't handle the negative integers that resulted from passing a value &gt;= 0x80 &lt;= 0xFF
  into gchar (which is a signed integer).
  Changing everything into guchar is not worth the effort - we need full Unicode support anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>no longer try to avoid automatic scrolling - this is patched out of Scintilla now</title>
<updated>2023-04-18T09:11:55+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-04-18T09:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=941f48da6dde691a7800290cc729aaaacd051392'/>
<id>941f48da6dde691a7800290cc729aaaacd051392</id>
<content type='text'>
* The patch avoids all automatic scrolling consistently, including in SCI_UNDO.
  This speads up Undo (especially after interruptions).
* Also, the patch disables a very costly and pointless (in SciTECO) algorithm that
  effectively made &lt;Ix$&gt; uninterruptible.
* Effectively reverts large parts of 8ef010da59743fcc4927c790f585ba414ec7b129.
  I have never liked using unintuitive Scintilla messages to avoid scrolling.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The patch avoids all automatic scrolling consistently, including in SCI_UNDO.
  This speads up Undo (especially after interruptions).
* Also, the patch disables a very costly and pointless (in SciTECO) algorithm that
  effectively made &lt;Ix$&gt; uninterruptible.
* Effectively reverts large parts of 8ef010da59743fcc4927c790f585ba414ec7b129.
  I have never liked using unintuitive Scintilla messages to avoid scrolling.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Scintilla to v5.3.4, Scinterm to v4.1 and Lexilla to v5.2.4</title>
<updated>2023-04-16T09:59:50+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-04-16T09:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2344b11599ce696ebc0bd7773befada44246897c'/>
<id>2344b11599ce696ebc0bd7773befada44246897c</id>
<content type='text'>
* actually everything is updated to their current HEADs but the aforementioned versions are close.
* Scintilla uses threads now, so we added checks for pthread.
  To be on the safe side, we imported AX_PTHREAD from the Autoconf archives.
  The flags are kept out of the ordinary build system, though and used only for compiling Scintilla
  and for linking.
  SciTECO may also use threads, but via Glib.
* Scinterm removed SCI_COLOR_PAIR(), so we re-added it to src/interface-curses/interface.c.
* There is an Asciidoc lexer now.
* The &lt;Ix$&gt; interruption bug (see TODO) is not fixed by this upgrade.
  Perhaps the Mac OS version runs better now. Feedback is needed (refs #12).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* actually everything is updated to their current HEADs but the aforementioned versions are close.
* Scintilla uses threads now, so we added checks for pthread.
  To be on the safe side, we imported AX_PTHREAD from the Autoconf archives.
  The flags are kept out of the ordinary build system, though and used only for compiling Scintilla
  and for linking.
  SciTECO may also use threads, but via Glib.
* Scinterm removed SCI_COLOR_PAIR(), so we re-added it to src/interface-curses/interface.c.
* There is an Asciidoc lexer now.
* The &lt;Ix$&gt; interruption bug (see TODO) is not fixed by this upgrade.
  Perhaps the Mac OS version runs better now. Feedback is needed (refs #12).
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2023</title>
<updated>2023-04-05T15:11:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-04-05T15:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0f7424e9b041646d782fb4c8b2f81a2f74856731'/>
<id>0f7424e9b041646d782fb4c8b2f81a2f74856731</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bumped required PDCursesMod version to v4.3.4 or later</title>
<updated>2022-11-20T17:07:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-11-20T17:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=101a8685268a188d1bb3f86146f61a090d8ea888'/>
<id>101a8685268a188d1bb3f86146f61a090d8ea888</id>
<content type='text'>
* allows us to get rid of some workarounds
* the workarounds themselves required relatively recent PDCursesMod
  versions, so we can just as well bump the version yet another time.
  We are probably the only ones building it (via Github actions) anyway.
* With v4.3.4 you should be able to link dynamically, but we are still
  linking statically for nightly builds to keep binary sizes small.
  Unfortunately, the glib builds shipping with MinGW still have
  dynamically linked helper executables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* allows us to get rid of some workarounds
* the workarounds themselves required relatively recent PDCursesMod
  versions, so we can just as well bump the version yet another time.
  We are probably the only ones building it (via Github actions) anyway.
* With v4.3.4 you should be able to link dynamically, but we are still
  linking statically for nightly builds to keep binary sizes small.
  Unfortunately, the glib builds shipping with MinGW still have
  dynamically linked helper executables.
</pre>
</div>
</content>
</entry>
<entry>
<title>PDCursesMod/WinGUI now uses the polling fallback again with a temporary workaround</title>
<updated>2022-06-22T13:10:36+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-06-22T13:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=147e53b63cb9f3e00c340bd32980eb2a51e972f0'/>
<id>147e53b63cb9f3e00c340bd32980eb2a51e972f0</id>
<content type='text'>
* The keyboard hook required polling as well and was actually much less performant
  than the generic getch() polling fallback.
  Furthemore it did at least not work on Wine.
* We instead now release the WinGUI-internal mutex and yield the thread giving
  it some time to process new key presses.
* This workaround is temporary and will probably be part of the the next PDCursesMod-release
  (v4.3.4). We still want to support the latest MSYS/MinGW version though which is
  currently at v4.3.2.
  The fix will also currently only work when statically linking in libpdcurses_wingui.a.
  This is what we do for nightly builds.
  See also https://github.com/Bill-Gray/PDCursesMod/issues/197
* Once the fix is released upstream and into MSYS, we should probably bump our
  minimal required PDCursesMod version.
  The color-table workaround (cf9ffc0cec0d2e55930238d1752209bca659c96d) can then also be removed.
* We should also consider dropping official support for the classic PDCurses and support
  only PDCursesMod - this will allow us to simplify interfaces-curses/interface.c a bit.
  Support for classic PDCurses is probably broken by now anyway and trying to support it
  is just too much.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The keyboard hook required polling as well and was actually much less performant
  than the generic getch() polling fallback.
  Furthemore it did at least not work on Wine.
* We instead now release the WinGUI-internal mutex and yield the thread giving
  it some time to process new key presses.
* This workaround is temporary and will probably be part of the the next PDCursesMod-release
  (v4.3.4). We still want to support the latest MSYS/MinGW version though which is
  currently at v4.3.2.
  The fix will also currently only work when statically linking in libpdcurses_wingui.a.
  This is what we do for nightly builds.
  See also https://github.com/Bill-Gray/PDCursesMod/issues/197
* Once the fix is released upstream and into MSYS, we should probably bump our
  minimal required PDCursesMod version.
  The color-table workaround (cf9ffc0cec0d2e55930238d1752209bca659c96d) can then also be removed.
* We should also consider dropping official support for the classic PDCurses and support
  only PDCursesMod - this will allow us to simplify interfaces-curses/interface.c a bit.
  Support for classic PDCurses is probably broken by now anyway and trying to support it
  is just too much.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2022 and updated TODO</title>
<updated>2022-06-21T01:41:16+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-06-21T01:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=70619bb88918e9cd057dbbc6a87e890cbce49a08'/>
<id>70619bb88918e9cd057dbbc6a87e890cbce49a08</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>better support recent versions of PDCursesMod (used to be the Win32a-port)</title>
<updated>2022-06-21T00:42:56+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-06-21T00:42:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=73cab56e058fe218fa855056f2d567a12b37955d'/>
<id>73cab56e058fe218fa855056f2d567a12b37955d</id>
<content type='text'>
* PDCursesMod is now the recommended PDCurses variant
* you should use at least v4.3.2 since earlier versions have problems
  inserting CTRL+C and CTRL+V.
* We now check for PDC_get_version() since initscr() was name-mangled at least
  for some time. The maintainers have now reverted to name-mangling endwin(),
  we still check for PDC_get_version() as it is probably safer in the future.
* Properly define PDC_FORCE_UTF8 now.
* We no longer have to check for PDC_set_resize_limits() since PDCursesMod
  now defines its own macro __PDCURSESMOD__ in curses.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PDCursesMod is now the recommended PDCurses variant
* you should use at least v4.3.2 since earlier versions have problems
  inserting CTRL+C and CTRL+V.
* We now check for PDC_get_version() since initscr() was name-mangled at least
  for some time. The maintainers have now reverted to name-mangling endwin(),
  we still check for PDC_get_version() as it is probably safer in the future.
* Properly define PDC_FORCE_UTF8 now.
* We no longer have to check for PDC_set_resize_limits() since PDCursesMod
  now defines its own macro __PDCURSESMOD__ in curses.h.
</pre>
</div>
</content>
</entry>
</feed>
