<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/interface-curses, branch libxcurses</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>WIP</title>
<updated>2025-08-26T18:33:40+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-25T11:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d1c20b8388105fd1027ea2aaf65dad772f9fe16f'/>
<id>d1c20b8388105fd1027ea2aaf65dad772f9fe16f</id>
<content type='text'>
This is mostly for XDG/4 compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is mostly for XDG/4 compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>fully support NetBSD with its native libcurses</title>
<updated>2025-08-21T23:48:24+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-11T08:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f740ad3774c1adc7844451dd561c7de143766635'/>
<id>f740ad3774c1adc7844451dd561c7de143766635</id>
<content type='text'>
* It requires a forced refresh on startup (even though that should be the
  default). Otherwise, it wouldn't print the info line correctly.
* Redirect stdin and pass it to newterm() to fix key queuing.
  Probably necessary for supporting ncurses on NetBSD as well.
* Avoid doupdate() if screen is too small: fixes crashes for very
  small windows.
* Updated Scintilla: There were some implicit typing assumptions,
  that are broken by this platform.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It requires a forced refresh on startup (even though that should be the
  default). Otherwise, it wouldn't print the info line correctly.
* Redirect stdin and pass it to newterm() to fix key queuing.
  Probably necessary for supporting ncurses on NetBSD as well.
* Avoid doupdate() if screen is too small: fixes crashes for very
  small windows.
* Updated Scintilla: There were some implicit typing assumptions,
  that are broken by this platform.
</pre>
</div>
</content>
</entry>
<entry>
<title>curses: fixed configuration for native netbsd-curses and ncurses (several corner cases)</title>
<updated>2025-08-18T23:30:36+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-17T19:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9ec7d0f1e6ee4f7f45b4950d483006ab53786901'/>
<id>9ec7d0f1e6ee4f7f45b4950d483006ab53786901</id>
<content type='text'>
* pkg-config check for `ncurses` fails if it failed previously for `ncursesw`.
  This is the case e.g. for ncurses from NetBSD's pkgsrc.
* No longer assume that any libncurses is not enhanced (X/Open compatible).
* SciTECO and Scinterm require to find a curses.h in the include paths.
  The ncurses check must therefore not be limited to the first best
  ncurses/ncurses.h and the like.
* We now always check for X/Open compatibility and always require
  a curses.h in the standard directories or as given by pkg-config.
* AX_WITH_CURSES was radically rewritten and is now called AX_WITH_NCURSES.
* --with-interface=netbsd-curses gets its own detection code.
  It always requires a curses.h in the standard paths and a libcurses.
  It should now be fixed for real NetBSD installations if the ncurses
  port is installed as well.
* Unified all of the curses-arguments to CURSES_CFLAGS and CURSES_LIBS.
  There is no reason we need PDCURSES_CFLAGS, XCURSES_CFLAGS etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* pkg-config check for `ncurses` fails if it failed previously for `ncursesw`.
  This is the case e.g. for ncurses from NetBSD's pkgsrc.
* No longer assume that any libncurses is not enhanced (X/Open compatible).
* SciTECO and Scinterm require to find a curses.h in the include paths.
  The ncurses check must therefore not be limited to the first best
  ncurses/ncurses.h and the like.
* We now always check for X/Open compatibility and always require
  a curses.h in the standard directories or as given by pkg-config.
* AX_WITH_CURSES was radically rewritten and is now called AX_WITH_NCURSES.
* --with-interface=netbsd-curses gets its own detection code.
  It always requires a curses.h in the standard paths and a libcurses.
  It should now be fixed for real NetBSD installations if the ncurses
  port is installed as well.
* Unified all of the curses-arguments to CURSES_CFLAGS and CURSES_LIBS.
  There is no reason we need PDCURSES_CFLAGS, XCURSES_CFLAGS etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>UNIX curses: some clarifications on what is done during teco_interface_init_screen()</title>
<updated>2025-08-16T13:53:08+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-16T13:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=37da097963cf0e988f0afc94bd63075965846ea0'/>
<id>37da097963cf0e988f0afc94bd63075965846ea0</id>
<content type='text'>
User messages printed in interative mode aren't currently fully preserved on stdout/stderr
since they are redirected to /dev/null.
Only messages that are not flushed out will be preserved.
Unless you redirect stdout/stderr of SciTECO of course since in this case no redirection
is necessary.

This is probably tolerable esp. once we support multi-line messages in the UIs.
At least it would be tricky to work around.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
User messages printed in interative mode aren't currently fully preserved on stdout/stderr
since they are redirected to /dev/null.
Only messages that are not flushed out will be preserved.
Unless you redirect stdout/stderr of SciTECO of course since in this case no redirection
is necessary.

This is probably tolerable esp. once we support multi-line messages in the UIs.
At least it would be tricky to work around.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented the ^W command for refreshing the screen in loops, for sleeping and also the CTRL+L immediate editing command</title>
<updated>2025-08-01T19:53:54+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-01T19:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=daead48672e56af966911abc4efe1e54573c02cc'/>
<id>daead48672e56af966911abc4efe1e54573c02cc</id>
<content type='text'>
* ^W can be added to loops in order to view progress in interactive mode.
  It also sleeps for a given number of milliseconds (10ms by default).
* In batch mode it is therefore the sleep command.
* Since CTRL+W is an immediate editing command, you will usually type it Caret+W.
  ASCII 23 however will also be accepted.
* While ^W only updates the screen, you can force a complete redraw by pressing CTRL+L.
  This is what most terminal applications use for redrawing.
  It will make it harder to insert ASCII 12, but this is seldom necessary since it
  is a form feed.
  ^L (ASCII 12 and the upcaret variant ) is still a whitespace character and therefore treated as a NOP.
* DEC TECO had CTRL+W as the refresh immediate editing command.
  Video TECO uses &lt;ET&gt; as a regular command for refreshign in loops.
  I'd rather keep ET reserved as a potential terminal configuration command
  as in DEC TECO, though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ^W can be added to loops in order to view progress in interactive mode.
  It also sleeps for a given number of milliseconds (10ms by default).
* In batch mode it is therefore the sleep command.
* Since CTRL+W is an immediate editing command, you will usually type it Caret+W.
  ASCII 23 however will also be accepted.
* While ^W only updates the screen, you can force a complete redraw by pressing CTRL+L.
  This is what most terminal applications use for redrawing.
  It will make it harder to insert ASCII 12, but this is seldom necessary since it
  is a form feed.
  ^L (ASCII 12 and the upcaret variant ) is still a whitespace character and therefore treated as a NOP.
* DEC TECO had CTRL+W as the refresh immediate editing command.
  Video TECO uses &lt;ET&gt; as a regular command for refreshign in loops.
  I'd rather keep ET reserved as a potential terminal configuration command
  as in DEC TECO, though.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented ^T command: allows typing by code and getting characters from stdin or the user</title>
<updated>2025-07-30T21:33:43+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-30T20:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2ec568579823c991b919fa3a2c8583a8db21cb81'/>
<id>2ec568579823c991b919fa3a2c8583a8db21cb81</id>
<content type='text'>
* n:^T always prints bytes (cf. :^A)
* ^T without arguments returns a codepoint or byte from stdin.
  In interactive mode, this currentply places a cursor in the message line and waits for a keypress.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* n:^T always prints bytes (cf. :^A)
* ^T without arguments returns a codepoint or byte from stdin.
  In interactive mode, this currentply places a cursor in the message line and waits for a keypress.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented the &lt;^A&gt; command for printing arbitrary strings</title>
<updated>2025-07-25T21:42:15+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-24T22:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=eee669a76b3c0b1928475d55d9e1333b3d15bb8c'/>
<id>eee669a76b3c0b1928475d55d9e1333b3d15bb8c</id>
<content type='text'>
* Greatly improved usability as a scripting language.
* The command is in DEC TECO, but in contrast to DEC TECO, we also
  support string building constructs in ^A.
* Required some refactoring: As we want it to write everything verbatim
  to stdout, the per-interface method is now teco_interface_msg_literal()
  and it has to deal with unprintable characters.
  When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel
  functions/widgets to deal with possible control codes.
* Numbers printed with `=` have to be written with a trailing linefeed,
  which would also be visible as a reverse "LF" in the UI.
  Not sure whether this is acceptable - the alternative would be to strip
  the strings before displaying them.
* Messages written to stdout are also auto-flushed at the moment.
  In the future we might want to put flushing under control of the language.
  Perhaps :^A could inhibit the flushing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Greatly improved usability as a scripting language.
* The command is in DEC TECO, but in contrast to DEC TECO, we also
  support string building constructs in ^A.
* Required some refactoring: As we want it to write everything verbatim
  to stdout, the per-interface method is now teco_interface_msg_literal()
  and it has to deal with unprintable characters.
  When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel
  functions/widgets to deal with possible control codes.
* Numbers printed with `=` have to be written with a trailing linefeed,
  which would also be visible as a reverse "LF" in the UI.
  Not sure whether this is acceptable - the alternative would be to strip
  the strings before displaying them.
* Messages written to stdout are also auto-flushed at the moment.
  In the future we might want to put flushing under control of the language.
  Perhaps :^A could inhibit the flushing.
</pre>
</div>
</content>
</entry>
<entry>
<title>ncurses: support the window title on XTerm-like emulators</title>
<updated>2025-07-23T13:27:02+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-23T13:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f7a11166d4a376867235bee213eeffddc05a8d78'/>
<id>f7a11166d4a376867235bee213eeffddc05a8d78</id>
<content type='text'>
* Many terminal emulators won't have the status-line terminfo capabilities
  but still support OSC-0 escape sequences for setting the window title.
  This affects the real XTerm, rxvt-based and many emulators that claim to be
  XTerm via $TERM (e.g. GNOME Console).
* It seems we can safely assume that any emulator with $TERM beginning with "xterm" or
  "rxvt" does in fact have OSC-0 or at least ignores it.
  The number of whitelisted emulators might be extended later on.
  This way, we don't have to add another ED flag.
* We still give precendence to the to_status_line/from_status_line capabilities
  if they are in terminfo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Many terminal emulators won't have the status-line terminfo capabilities
  but still support OSC-0 escape sequences for setting the window title.
  This affects the real XTerm, rxvt-based and many emulators that claim to be
  XTerm via $TERM (e.g. GNOME Console).
* It seems we can safely assume that any emulator with $TERM beginning with "xterm" or
  "rxvt" does in fact have OSC-0 or at least ignores it.
  The number of whitelisted emulators might be extended later on.
  This way, we don't have to add another ED flag.
* We still give precendence to the to_status_line/from_status_line capabilities
  if they are in terminfo.
</pre>
</div>
</content>
</entry>
<entry>
<title>make some array declarations real constants</title>
<updated>2025-07-17T22:12:45+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-17T22:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=45b9dea901cec7045be1a98f61d48d41dc965a9f'/>
<id>45b9dea901cec7045be1a98f61d48d41dc965a9f</id>
<content type='text'>
* `static const char *p = "FOO"` is not a true constant since
  the variable p can still be changed.
  It has to be declared as `static const char *const p = "FOO"`,
  so that the pointer itself is constant.
* In case of string constants, it's easier however to use `static const char p[] = "FOO"`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* `static const char *p = "FOO"` is not a true constant since
  the variable p can still be changed.
  It has to be declared as `static const char *const p = "FOO"`,
  so that the pointer itself is constant.
* In case of string constants, it's easier however to use `static const char p[] = "FOO"`.
</pre>
</div>
</content>
</entry>
<entry>
<title>the primary clipboard is now chosen by the 10th bit in the ED flags</title>
<updated>2025-07-15T21:15:33+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-15T21:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4794367ce0c31f820bf2bd72d44c886984e3f7ed'/>
<id>4794367ce0c31f820bf2bd72d44c886984e3f7ed</id>
<content type='text'>
* `[q]~` was broken and resulted in crashes since it reset the clipboard character to 0.
  In fact, if we don't want to break the `[a]b` idiom we cannot use the numeric cell
  of register `~`.
* Therefore we no longer use the numeric part of register `~`.
  Once the clipboard registers are initialized they completely replace
  any existing register with the same name that may have been
  set in the profile.
  So we still don't leak any memory.
  (But perhaps it would now be better to fail with an error
  if one of the clipboard registers already exist?)
* Instead, bit 10 (1024) of ED is now used to change the default
  clipboard to the primary selection.
  The alternative might have been an EJ flag or even a special register containing
  the name of the default clipboard register.
* partially reverses 8c6de6cc718debf44f6056a4c34c4fbb13bc5020
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* `[q]~` was broken and resulted in crashes since it reset the clipboard character to 0.
  In fact, if we don't want to break the `[a]b` idiom we cannot use the numeric cell
  of register `~`.
* Therefore we no longer use the numeric part of register `~`.
  Once the clipboard registers are initialized they completely replace
  any existing register with the same name that may have been
  set in the profile.
  So we still don't leak any memory.
  (But perhaps it would now be better to fail with an error
  if one of the clipboard registers already exist?)
* Instead, bit 10 (1024) of ED is now used to change the default
  clipboard to the primary selection.
  The alternative might have been an EJ flag or even a special register containing
  the name of the default clipboard register.
* partially reverses 8c6de6cc718debf44f6056a4c34c4fbb13bc5020
</pre>
</div>
</content>
</entry>
</feed>
