<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src, 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>allow messages to be of arbitrary length: fixes crashes</title>
<updated>2025-08-10T08:40:03+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-10T08:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f22bc5171f733d1f9a6f3daeab8233386e79c320'/>
<id>f22bc5171f733d1f9a6f3daeab8233386e79c320</id>
<content type='text'>
* Messages can be arbitrarily long, e.g. the following could provoke crashes in interactive mode
  `1000&lt;@I/X/&gt; HX$`
  It's hard to turn into a test case, though, as you could always increase the buffer
  size in teco_interface_msg().
* The message length is now only limited by RAM.
* This implementation is less effective, but code opting for efficience,
  including all programmable user messages, should not rely on the printf-API anyway
  but use teco_interface_msg_literal().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Messages can be arbitrarily long, e.g. the following could provoke crashes in interactive mode
  `1000&lt;@I/X/&gt; HX$`
  It's hard to turn into a test case, though, as you could always increase the buffer
  size in teco_interface_msg().
* The message length is now only limited by RAM.
* This implementation is less effective, but code opting for efficience,
  including all programmable user messages, should not rely on the printf-API anyway
  but use teco_interface_msg_literal().
</pre>
</div>
</content>
</entry>
<entry>
<title>Win32: avoid any automatic LF to CRLF conversions when writing to stdout</title>
<updated>2025-08-09T16:45:56+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-09T16:45:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=acae72517bc892911bf9b0f261ef41356e7e2c44'/>
<id>acae72517bc892911bf9b0f261ef41356e7e2c44</id>
<content type='text'>
* At least the MSVCRT does this by default, i.e. the translation mode of stdout
  is not _O_BINARY.
* This broke piping through SciTECO with --stdin --stdout, as this relies on SciTECO's
  builtin EOL normalization. Instead, you would get DOS linebreaks on output even if the
  source stream contains only UNIX linebreaks.
* It would also break binary filters.
* It seems to be safe to print only LF also for regular stdio (help and error messages),
  so I simply disaply the stdout (and stdin and stderr) EOL translation globally.
* Also fixes Troff warnings due to the .in preprocessor writing output with DOS linebreaks.
* Added a test case. All future platforms shouldn't perform any unexpected EOL translations
  on output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* At least the MSVCRT does this by default, i.e. the translation mode of stdout
  is not _O_BINARY.
* This broke piping through SciTECO with --stdin --stdout, as this relies on SciTECO's
  builtin EOL normalization. Instead, you would get DOS linebreaks on output even if the
  source stream contains only UNIX linebreaks.
* It would also break binary filters.
* It seems to be safe to print only LF also for regular stdio (help and error messages),
  so I simply disaply the stdout (and stdin and stderr) EOL translation globally.
* Also fixes Troff warnings due to the .in preprocessor writing output with DOS linebreaks.
* Added a test case. All future platforms shouldn't perform any unexpected EOL translations
  on output.
</pre>
</div>
</content>
</entry>
<entry>
<title>command-line arguments are no longer passed via the unnamed buffer, but via special Q-registers ^Ax</title>
<updated>2025-08-06T13:46:37+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-06T13:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=280cb9da39fc7b5357f6071926d511394f6d0152'/>
<id>280cb9da39fc7b5357f6071926d511394f6d0152</id>
<content type='text'>
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine
  --stdin with passing command-line arguments to macros.
* The old approach of passing command-line arguments via lines in the
  unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF.
  This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO.
* You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`.
  You can practically use SciTECO as a pager.
* htbl.tes is now a command-line filter (uses -qio).
* grosciteco.tes reads Troff intermediate code from stdin, so we no longer need
  "*.intermediate" temporary files.
* added a getopt.tes test case to the testsuite.
* This change unfortunately breaks most macros accepting command-line arguments,
  even if they used getopt.tes.
  It also requires updating ~/.teco_ini - see fallback.teco_ini.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine
  --stdin with passing command-line arguments to macros.
* The old approach of passing command-line arguments via lines in the
  unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF.
  This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO.
* You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`.
  You can practically use SciTECO as a pager.
* htbl.tes is now a command-line filter (uses -qio).
* grosciteco.tes reads Troff intermediate code from stdin, so we no longer need
  "*.intermediate" temporary files.
* added a getopt.tes test case to the testsuite.
* This change unfortunately breaks most macros accepting command-line arguments,
  even if they used getopt.tes.
  It also requires updating ~/.teco_ini - see fallback.teco_ini.
</pre>
</div>
</content>
</entry>
<entry>
<title>simplified the htbl.tes preprocessor and the SUBST_MACRO using new --quiet, --stdin and --stdout options</title>
<updated>2025-08-03T15:01:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-03T14:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c5510d684e4879ab9a5295b4a1981888a4268627'/>
<id>c5510d684e4879ab9a5295b4a1981888a4268627</id>
<content type='text'>
* htbl.tes now reads from stdin and writes to stdout.
  Allows avoiding temporary `*.htbl` files
* grosciteco.tes still cannot be simplified since --stdin cannot be combined with
  passing command-line arguments (FIXME).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* htbl.tes now reads from stdin and writes to stdout.
  Allows avoiding temporary `*.htbl` files
* grosciteco.tes still cannot be simplified since --stdin cannot be combined with
  passing command-line arguments (FIXME).
</pre>
</div>
</content>
</entry>
<entry>
<title>added --quiet, --stdin and --stdout for easier integration into UNIX pipelines</title>
<updated>2025-08-03T13:09:33+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-03T12:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=51bd183f064d0c0ea5e0184d9f6b6b62e5c01e50'/>
<id>51bd183f064d0c0ea5e0184d9f6b6b62e5c01e50</id>
<content type='text'>
* In principle --stdin and --stdout could have been done in pure TECO code using the
  &lt;^T&gt; command.
  Having built-in command-line arguments however has several advantages:
  * Significantly faster than reading byte-wise with ^T.
  * Performs EOL normalization unless specifying --8bit of course.
  * Significantly shortens command-lines.
    `sciteco -qio` and `sciteco -qi` can be real replacements for sed and awk.
* You can even place SciTECO into the middle of a pipeline while editing
  interactively:
  foo | sciteco -qio --no-profile | bar
  Unfortunately, this will not currently work when munging the profile
  as command-line parameters are also transmitted via the unnamed buffer.
  This should be changed to use special Q-registers (FIXME).
* --quiet can help to improve the test suite (TODO).
  Should probably be the default in TE_CHECK().
* --stdin and --stdout allow to simplify many SciTECO scripts, avoiding
  temporary files, especially for womenpage generation (TODO).
* For processing potentially infinite streams, you will still have to
  read using ^T.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* In principle --stdin and --stdout could have been done in pure TECO code using the
  &lt;^T&gt; command.
  Having built-in command-line arguments however has several advantages:
  * Significantly faster than reading byte-wise with ^T.
  * Performs EOL normalization unless specifying --8bit of course.
  * Significantly shortens command-lines.
    `sciteco -qio` and `sciteco -qi` can be real replacements for sed and awk.
* You can even place SciTECO into the middle of a pipeline while editing
  interactively:
  foo | sciteco -qio --no-profile | bar
  Unfortunately, this will not currently work when munging the profile
  as command-line parameters are also transmitted via the unnamed buffer.
  This should be changed to use special Q-registers (FIXME).
* --quiet can help to improve the test suite (TODO).
  Should probably be the default in TE_CHECK().
* --stdin and --stdout allow to simplify many SciTECO scripts, avoiding
  temporary files, especially for womenpage generation (TODO).
* For processing potentially infinite streams, you will still have to
  read using ^T.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed serious bug with certain alternative string termination chars in commands with multiple string arguments</title>
<updated>2025-08-02T10:16:16+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-02T10:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e46352bc614cf9777ca76deb47330fb408bc1a23'/>
<id>e46352bc614cf9777ca76deb47330fb408bc1a23</id>
<content type='text'>
* When `@`-modifying a command with several string arguments and choosing `{` as the alternative
  string termination character, the parser would get totally confused.
  Any sequence of `{` would be ignored and only the first non-`{` would become the termination character.
  Consequently you also couldn't choose a new terminator after the closing `}`.
  So even a documented code example from sciteco(7) wouldn't work.
  The same was true when using $ (escape) or ^A as the alternative termination character.
* We can now correctly parse e.g. `@FR{foo}{bar}` or `@FR$foo$bar$` (even though the
  latter one is quite pointless).
* has probably been broken forever (has been broken even before v2.0).
* Whitespace is now ignored in front of alternative termination characters as in TECO-64, so
  we can also write `@S /foo/` or even
  ```
  @^Um
  {
    !* blabla *!
  }
  ```
  I wanted to disallow whitespace termination characters, so the alternative would have been
  to throw an error.
  The new implementation at least adds some functionality.
  * Avoid redundancies when parsing no-op characters via teco_is_noop().
    I assume that this is inlined and drawn into any jump-table what would be
    generated for the switch-statement in teco_state_start_input().
 * Alternative termination characters are still case-folded, even if they are Unicode glyphs,
   so `@IЖfooж` would work and insert `foo`.
   This should perhaps be restricted to ANSI characters?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When `@`-modifying a command with several string arguments and choosing `{` as the alternative
  string termination character, the parser would get totally confused.
  Any sequence of `{` would be ignored and only the first non-`{` would become the termination character.
  Consequently you also couldn't choose a new terminator after the closing `}`.
  So even a documented code example from sciteco(7) wouldn't work.
  The same was true when using $ (escape) or ^A as the alternative termination character.
* We can now correctly parse e.g. `@FR{foo}{bar}` or `@FR$foo$bar$` (even though the
  latter one is quite pointless).
* has probably been broken forever (has been broken even before v2.0).
* Whitespace is now ignored in front of alternative termination characters as in TECO-64, so
  we can also write `@S /foo/` or even
  ```
  @^Um
  {
    !* blabla *!
  }
  ```
  I wanted to disallow whitespace termination characters, so the alternative would have been
  to throw an error.
  The new implementation at least adds some functionality.
  * Avoid redundancies when parsing no-op characters via teco_is_noop().
    I assume that this is inlined and drawn into any jump-table what would be
    generated for the switch-statement in teco_state_start_input().
 * Alternative termination characters are still case-folded, even if they are Unicode glyphs,
   so `@IЖfooж` would work and insert `foo`.
   This should perhaps be restricted to ANSI characters?
</pre>
</div>
</content>
</entry>
</feed>
