<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/file-utils.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>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>fixed rub out of file writes to non-existing symlinks</title>
<updated>2025-12-09T00:12:57+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-09T00:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a886813f86f88b4b1cc874a81229b7b59d0d463a'/>
<id>a886813f86f88b4b1cc874a81229b7b59d0d463a</id>
<content type='text'>
* teco_file_get_absolute_path() does not currently guarantee to resolve
  non-existent parts of the path.
  When opening a symbolic link to a non-existing file, it would only
  be created when writing out the file.
  The undo token to remove it, however would remove the original
  unresolved path.
  When rubbing out the EW, the symlink would get removed instead
  of the newly written file.
* We now resolve/canonicalize the path again immediately after
  opening the new file, which should ensure that it resolves.
* As an alternative, we might have also tried to reliably canonicalize
  non-existent symlinks. This however is tricky and there would have
  to be a break condition to guard against cyclic symlinke.
  In the end there is no guarantee to be able to resolve a path
  exactly like the OS does.
  Therefore, teco_file_get_absolute_path() was not touched,
  not even on UNIX.
* A test case was not added since it would rely on creating real symlinks.
  It wouldn't work on MSYS when `ln -s` falls back to hardlinks.
  Perhaps other non-UNIX platforms would have similar restrictions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* teco_file_get_absolute_path() does not currently guarantee to resolve
  non-existent parts of the path.
  When opening a symbolic link to a non-existing file, it would only
  be created when writing out the file.
  The undo token to remove it, however would remove the original
  unresolved path.
  When rubbing out the EW, the symlink would get removed instead
  of the newly written file.
* We now resolve/canonicalize the path again immediately after
  opening the new file, which should ensure that it resolves.
* As an alternative, we might have also tried to reliably canonicalize
  non-existent symlinks. This however is tricky and there would have
  to be a break condition to guard against cyclic symlinke.
  In the end there is no guarantee to be able to resolve a path
  exactly like the OS does.
  Therefore, teco_file_get_absolute_path() was not touched,
  not even on UNIX.
* A test case was not added since it would rely on creating real symlinks.
  It wouldn't work on MSYS when `ln -s` falls back to hardlinks.
  Perhaps other non-UNIX platforms would have similar restrictions.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed clicking the file completion popup in ~/</title>
<updated>2025-03-01T00:31:19+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-01T00:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5b54cd8f79fc877c0447f42bffcac40ec1f30beb'/>
<id>5b54cd8f79fc877c0447f42bffcac40ec1f30beb</id>
<content type='text'>
* Popup entries are added with expanded directory names, so we have to skip the
  expanded directory names from the clicked popup entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Popup entries are added with expanded directory names, so we have to skip the
  expanded directory names from the clicked popup entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>support mouse interaction with popup windows</title>
<updated>2025-02-23T01:52:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-14T22:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=428dafa568923d5632101c716fb20a3de35d27be'/>
<id>428dafa568923d5632101c716fb20a3de35d27be</id>
<content type='text'>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</pre>
</div>
</content>
</entry>
<entry>
<title>file and directory auto completions can now be case-insensitive</title>
<updated>2025-01-19T00:28:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-01-18T06:19:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=eddc89a5d18c6fb7b745b45228079306dda13f7a'/>
<id>eddc89a5d18c6fb7b745b45228079306dda13f7a</id>
<content type='text'>
* This is not simply determined at compile-time but queries the concrete path
  at least on Windows and OS X.
* The Windows implementation is kind of hacky and relies on undocumented behavior.
  It's also not even tested yet!
* On Linux and FreeBSD completions will always be case-sensitive as they used to be.
  There does not appear to be any API to query case sensitivity of a given path or even
  the entire file system.
  At most, we could white-list a number of case-insensitive file systems.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is not simply determined at compile-time but queries the concrete path
  at least on Windows and OS X.
* The Windows implementation is kind of hacky and relies on undocumented behavior.
  It's also not even tested yet!
* On Linux and FreeBSD completions will always be case-sensitive as they used to be.
  There does not appear to be any API to query case sensitivity of a given path or even
  the entire file system.
  At most, we could white-list a number of case-insensitive file systems.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2025</title>
<updated>2025-01-12T23:39:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-01-12T23:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d842eaee19e2723f845d4b8314a230cf68e82653'/>
<id>d842eaee19e2723f845d4b8314a230cf68e82653</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed some common typos: "ie." and "eg.", "ocur" instead of "occur"</title>
<updated>2024-11-18T13:30:59+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-18T13:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=52d66c5783d39a23027102c3087eac8ef1c0f02f'/>
<id>52d66c5783d39a23027102c3087eac8ef1c0f02f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup: fixed Windows builds</title>
<updated>2024-11-05T12:35:28+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-05T12:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2406e37ebe06d564a81b7ead8a56ffd8716b3ad4'/>
<id>2406e37ebe06d564a81b7ead8a56ffd8716b3ad4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fully support relocatable binaries, improving AppImages</title>
<updated>2024-11-05T09:32:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-04T22:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9cce7d263ea3f2984a619cdfcb54d264c6a4c51d'/>
<id>9cce7d263ea3f2984a619cdfcb54d264c6a4c51d</id>
<content type='text'>
* You can now specify `--with-scitecodatadir` as a relative path,
  that will be interpreted relative to the binary's location.
* Win32 binaries already were relocatable, but this was a Windows-specific
  hack. Win32 binaries are now built with `--with-scitecodatadir=.`
  since everything is in a single directory.
* Ubuntu packages are now also built `--with-scitecodatadir=../share/sciteco`.
  This is not crucial for ordinary installations, but is meant for AppImage creation.
* Since AppImages are now built from relocatable packages,
  we no longer need the unionfs-workaround from pkg2appimage.
  This should fix the strange root contents when autocompleting in
  AppImage builds.
* This might also fix the appimage.github.io CI issues.
  I assume that because I could reproduce the issue on FreeBSD's
  Linuxulator in dependence of pkg2appimage's "union"-setting.
  See https://github.com/AppImage/appimage.github.io/pull/3402
* Determining the binary location actually turned out be hard and
  very platform-dependant. There are now implementations for Windows
  (which could also read argv[0]), Linux and generic UNIX (which
  works on FreeBSD, but I am not sure about the others).
  I believe this could also be useful on Mac OS to create app bundles,
  but this needs to be tested - currently the Mac OS binaries are
  installed into fixed locations and don't use relocation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* You can now specify `--with-scitecodatadir` as a relative path,
  that will be interpreted relative to the binary's location.
* Win32 binaries already were relocatable, but this was a Windows-specific
  hack. Win32 binaries are now built with `--with-scitecodatadir=.`
  since everything is in a single directory.
* Ubuntu packages are now also built `--with-scitecodatadir=../share/sciteco`.
  This is not crucial for ordinary installations, but is meant for AppImage creation.
* Since AppImages are now built from relocatable packages,
  we no longer need the unionfs-workaround from pkg2appimage.
  This should fix the strange root contents when autocompleting in
  AppImage builds.
* This might also fix the appimage.github.io CI issues.
  I assume that because I could reproduce the issue on FreeBSD's
  Linuxulator in dependence of pkg2appimage's "union"-setting.
  See https://github.com/AppImage/appimage.github.io/pull/3402
* Determining the binary location actually turned out be hard and
  very platform-dependant. There are now implementations for Windows
  (which could also read argv[0]), Linux and generic UNIX (which
  works on FreeBSD, but I am not sure about the others).
  I believe this could also be useful on Mac OS to create app bundles,
  but this needs to be tested - currently the Mac OS binaries are
  installed into fixed locations and don't use relocation.
</pre>
</div>
</content>
</entry>
</feed>
