<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/slcl/cftw.c, branch decode-url</title>
<subtitle>Small and lightweight cloud storage written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/slcl/atom?h=decode-url</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/slcl/atom?h=decode-url'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/'/>
<updated>2023-07-11T11:27:49+00:00</updated>
<entry>
<title>cftw: Allow user callback to stop recursive search</title>
<updated>2023-07-11T11:27:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-11T11:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=59e17afe291f9df52d2334b92e88a889c2fe8f6a'/>
<id>urn:sha1:59e17afe291f9df52d2334b92e88a889c2fe8f6a</id>
<content type='text'>
So far, cftw would search through all directories and files recursively,
until all objects are processed. However, it is interesting for the user
callback to be able to stop this process under specific circumstances.

Now, cftw will pass a pointer to a bool, initialised to false by
default, that can be optionally assigned to true by the user
callback.

Future commits will make use of this feature. For example, this will be
used to limit the number of search results when a user enters a search
term that is too generic and would otherwise generate a large amount of
search results.
</content>
</entry>
<entry>
<title>cftw: Allow directories to call the user callback</title>
<updated>2023-07-08T00:30:31+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-08T00:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=74ca76a58fca114140d0d0cc13a1216d6dffbee0'/>
<id>urn:sha1:74ca76a58fca114140d0d0cc13a1216d6dffbee0</id>
<content type='text'>
This provides a few benefits:

- This will allow searching for directories by name.
- Future commits will allow to remove files and directories, so this
  change was also required for cftw.
</content>
</entry>
<entry>
<title>cftw.c: Check errors from readdir(3)</title>
<updated>2023-07-05T23:56:43+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-05T23:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=74b7f7a902d9916dddb07d6adb26c63e765a6349'/>
<id>urn:sha1:74b7f7a902d9916dddb07d6adb26c63e765a6349</id>
<content type='text'>
According to POSIX.1-2017, applications are advised to assign errno(3)
to 0 before a call to readdir(3), and compare errno(3) after the call to
check for errors.
</content>
</entry>
<entry>
<title>ctfw.c: Avoid trailing forward slash</title>
<updated>2023-06-06T01:48:51+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-06-06T01:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=6e9ce3a25b438a94ad870ba85dd8c9bf8a28e043'/>
<id>urn:sha1:6e9ce3a25b438a94ad870ba85dd8c9bf8a28e043</id>
<content type='text'>
Otherwise, this would generate strings such as "directory//resource" if
dirpath contained a trailing slash, which could be problematic for users
relying on ctfw.
</content>
</entry>
<entry>
<title>cftw.c: Add missing portability definition</title>
<updated>2023-05-28T10:07:38+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-05-28T09:42:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=95a0adfe7804e774b9e60bc528e32ff002127cb9'/>
<id>urn:sha1:95a0adfe7804e774b9e60bc528e32ff002127cb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cftw.c: Add missing call to closedir(2)</title>
<updated>2023-03-07T11:36:27+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-07T11:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=f33e1c90535c9abae0d7c3e29cdb29ba94fb96cd'/>
<id>urn:sha1:f33e1c90535c9abae0d7c3e29cdb29ba94fb96cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add cftw</title>
<updated>2023-03-06T04:06:30+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-03-06T04:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/slcl/commit/?id=804b8841f3fe59f7058c91fa25c1694f4433642a'/>
<id>urn:sha1:804b8841f3fe59f7058c91fa25c1694f4433642a</id>
<content type='text'>
POSIX functions ftw(3) and nftw(3) do not allow passing an opaque
pointer to the callback they call, so it forces the use of statically
allocated data.

ctfw (from "custom ftw") is a custom implementation that solves this,
while also removing unneeded stuff.

This function will be used by future commits.
</content>
</entry>
</feed>
