<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib/compat, branch master</title>
<subtitle>A new set of tools and libraries for working with SquashFS images</subtitle>
<id>https://git.infraroot.at/squashfs-tools-ng.git/atom?h=master</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2023-06-15T16:13:26+00:00</updated>
<entry>
<title>libcompat: Add a helper to get/set OS error state</title>
<updated>2023-06-15T16:13:26+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2023-06-15T16:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8bff2715bfdfd2e6ce0c707f1310b169d4e454d0'/>
<id>urn:sha1:8bff2715bfdfd2e6ce0c707f1310b169d4e454d0</id>
<content type='text'>
On Unix like OSes, this saves/restores errno, on Windows both errno
and GetLastError state are saved/restored.

This should make it simpler to preserve that across function calls.

Additionally, while tracking down uses of GetLastError, some places
where the error code was printed out directly where replaced with
instances of w32_perror.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Move library source into src sub-directory</title>
<updated>2023-01-31T12:51:49+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2023-01-31T10:21:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=cdccc69c62579b0c13b35fad0728079652b8f3c9'/>
<id>urn:sha1:cdccc69c62579b0c13b35fad0728079652b8f3c9</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Make some string functions from libcompat available to libsquashfs</title>
<updated>2022-11-21T14:27:10+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-11-21T13:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=91e8aafc8259115b7fff81d46bee82bca036526e'/>
<id>urn:sha1:91e8aafc8259115b7fff81d46bee82bca036526e</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Typo fix</title>
<updated>2022-06-03T12:22:07+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-06-03T12:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=1230f4e8020b918ea136fff4f0a4c33ac6cb0fa9'/>
<id>urn:sha1:1230f4e8020b918ea136fff4f0a4c33ac6cb0fa9</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: libsqfs: sqfs_dir_reader_find_by_path</title>
<updated>2022-06-02T15:26:53+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-06-01T12:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=9d474f278d21ddc452d8a1a722b3735fae94115c'/>
<id>urn:sha1:9d474f278d21ddc452d8a1a722b3735fae94115c</id>
<content type='text'>
Split out several repated patterns into helper functions and move the
rest of the code back into dir_reader.c

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Windows: redirect standard I/O and convert text to UTF-16</title>
<updated>2022-03-10T20:53:29+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-03-10T20:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=6447b191eef8bf8f4942569e55c9a0f297c67a8e'/>
<id>urn:sha1:6447b191eef8bf8f4942569e55c9a0f297c67a8e</id>
<content type='text'>
Preprocessor magic is used to redirect putc/fputc/fputs/printf/fprintf
to custom implementations.

The custom implementations try to figure out if we are printing to the
console and, if so, convert the resulting strings to UTF-16 and print
them through ConsoleWriteW. If the output is redirected to a file or
a pipe, the original (presummed) UTF-8 is kept.

Simply setting the console output codepage to UTF-8 does not work,
because the standard I/O facilities of MSVCRT either does not support
unicode (in non-wchar mode), or has half-broken support through fputs,
which can still break up multi-byte sequences through its internal
buffering.

Likewise, changing the codepage and using ConsoleWriteA, or trying to
use fputws did not work in a test VM either.

This approach is the one that worked most consistently among the
ones tried, but also has problems. E.g. it breaks when setting the
codepage to UTF-8 manually (using `chcp 65001`).

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix Windows main wrapper after mingw upgrade</title>
<updated>2021-12-14T19:54:40+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-12-14T19:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8e1a2644968ce048feecd7f480ed4cce7dec7f6b'/>
<id>urn:sha1:8e1a2644968ce048feecd7f480ed4cce7dec7f6b</id>
<content type='text'>
Apparently, mingw implicitly included stdlib.h indirectly from either
windows.h or shellapi.h. After an upgrade, the windows build now
fails with EXIT_FAILURE being undefined.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add a wrapper for the main function on Windows</title>
<updated>2021-12-05T09:29:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-11-26T12:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=4a4dbe027a082e546512b5ccb2999753651a9a28'/>
<id>urn:sha1:4a4dbe027a082e546512b5ccb2999753651a9a28</id>
<content type='text'>
A macro and forward declaration are added to compat.h that rename
the main() function programs using compat.h into sqfs_tools_main.

An actual main() function is added to libcompat.a, that uses the
shell API to get the UTF-16 command line arguments, convert them
to UTF-8 and call sqfs_tools_main.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Provide Musl derived fallbacks for getopt/getopt_long/getsubopt</title>
<updated>2021-03-24T22:35:30+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-24T15:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=cad65de2a9a9b7d29b98f0d2997772c057f92e29'/>
<id>urn:sha1:cad65de2a9a9b7d29b98f0d2997772c057f92e29</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: libcompat: add missing stdio includes</title>
<updated>2021-03-20T16:46:14+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-20T16:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=b575a98826184fc34750ef2cce4fa1503938b7f2'/>
<id>urn:sha1:b575a98826184fc34750ef2cce4fa1503938b7f2</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
