<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/qreg.c, branch v2.5.2</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>fixed auto completion of two-character Q-register names</title>
<updated>2026-01-31T23:49:55+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-31T23:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d0b9287ed3557efd11603afc30aa7781b03e262a'/>
<id>d0b9287ed3557efd11603afc30aa7781b03e262a</id>
<content type='text'>
* this was noticable only after the first character, i.e. after `#x`.
* Q-register tables are case sensitive, so we must not call
  teco_rb3str_auto_complete() with case_sensitive == FALSE.
  And it's also entirely unnecesary since the Q-register name
  for two-character Q-registers is already case-folded.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* this was noticable only after the first character, i.e. after `#x`.
* Q-register tables are case sensitive, so we must not call
  teco_rb3str_auto_complete() with case_sensitive == FALSE.
  And it's also entirely unnecesary since the Q-register name
  for two-character Q-registers is already case-folded.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2026</title>
<updated>2026-01-01T06:59:49+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-01T06:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2feb2a6f71fc9adb20226fb3c2260c236e974e0'/>
<id>c2feb2a6f71fc9adb20226fb3c2260c236e974e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>teco_string_t is now passed by value like a scalar if the callee isn't expected to modify it</title>
<updated>2025-12-28T19:57:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T15:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ea0a23645f03a42252ab1ce8df45ae4076ebae75'/>
<id>ea0a23645f03a42252ab1ce8df45ae4076ebae75</id>
<content type='text'>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>TECO_DEFINE_STATE() no longer constructs callback names for mandatory callbacks, but tries to use static assertions</title>
<updated>2025-12-26T17:10:42+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-26T17:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2114fa0af73b42bc1ef302f7511ef87690cc0b1'/>
<id>c2114fa0af73b42bc1ef302f7511ef87690cc0b1</id>
<content type='text'>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup 9425ad37ec95a40dc039169031259161c92cc217: fixed error handling in ED hooks</title>
<updated>2025-09-02T14:53:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-09-02T14:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5e97f97cb7ca9cf459b47d3409da85177e385af2'/>
<id>5e97f97cb7ca9cf459b47d3409da85177e385af2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>the computed go-to command (O) is now 0-indexed and all invalid indexes and empty labels are ignored</title>
<updated>2025-08-30T17:51:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-30T17:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e82dc6639e829490cb11267fa4a49ef97c6459ae'/>
<id>e82dc6639e829490cb11267fa4a49ef97c6459ae</id>
<content type='text'>
* This has long been a TECO-11 incompatibility.
* The first label in a list has index 0, i.e. `1Ofoo,bar$` jumps to label `!bar!`.
  Consequently 0 is also implied, so `Olabel$` continues to do what you expect.
* `0Ofoo$` was previously also jumping to `!foo!` which was inconsistent:
  All invalid indexes should do nothing, i.e. execution continues after the go-to command.
* Fixed handling of empty labels as in `1Ofoo,,bar$` - execution should also continue
  after the command.
  This eases writing "default" clauses immediately after the go-to.
* The ED hook values now also begin at 0, so most existing ED hook macros should
  continue to work.
* Similarily, the mouse events returned by -EJ also begin at 0 now,
  so fnkeys.tes continues to work as expected.
* It's still very possible of course that this breaks existing code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This has long been a TECO-11 incompatibility.
* The first label in a list has index 0, i.e. `1Ofoo,bar$` jumps to label `!bar!`.
  Consequently 0 is also implied, so `Olabel$` continues to do what you expect.
* `0Ofoo$` was previously also jumping to `!foo!` which was inconsistent:
  All invalid indexes should do nothing, i.e. execution continues after the go-to command.
* Fixed handling of empty labels as in `1Ofoo,,bar$` - execution should also continue
  after the command.
  This eases writing "default" clauses immediately after the go-to.
* The ED hook values now also begin at 0, so most existing ED hook macros should
  continue to work.
* Similarily, the mouse events returned by -EJ also begin at 0 now,
  so fnkeys.tes continues to work as expected.
* It's still very possible of course that this breaks existing code.
</pre>
</div>
</content>
</entry>
<entry>
<title>special Q-registers `$` (working directory) and the clipboard registers now support the append operation (:Xq, :^Uq...)</title>
<updated>2025-07-19T19:34:57+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-19T19:34:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ac180a94ff749f5df7705279d3d08258417b9b34'/>
<id>ac180a94ff749f5df7705279d3d08258417b9b34</id>
<content type='text'>
Works via a default implementation in the "external" Q-register "class"
by first querying the string, appending and re-setting it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Works via a default implementation in the "external" Q-register "class"
by first querying the string, appending and re-setting it.
</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>
<entry>
<title>implemented &lt;ER&gt; command for reading a file into the current buffer</title>
<updated>2025-07-13T15:35:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-07-13T15:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=fbab5e252f22de37d42cc6c2a014d690a9312565'/>
<id>fbab5e252f22de37d42cc6c2a014d690a9312565</id>
<content type='text'>
* This command exists in Video TECO.
  In Video TECO it also supports reading multiple files with a glob pattern -- we do not support that
  as I am not convinced of its usefulness.
* teco_view_load() has been extended, so it can read into dot without
  discarding the existing document.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This command exists in Video TECO.
  In Video TECO it also supports reading multiple files with a glob pattern -- we do not support that
  as I am not convinced of its usefulness.
* teco_view_load() has been extended, so it can read into dot without
  discarding the existing document.
</pre>
</div>
</content>
</entry>
</feed>
