<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/fd.h, branch master</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-08-01T20:18:30Z</updated>
<entry>
<title>fd: Simplify para_mmap() and mmap_full_file().</title>
<updated>2026-08-01T20:18:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-06-23T20:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=f1c667892d1a69cd150807a3d7073fcbe3740e06'/>
<id>urn:sha1:f1c667892d1a69cd150807a3d7073fcbe3740e06</id>
<content type='text'>
The latter calls the former, both check for zero length but return different
error codes in this case. Avoid the redundant check, return consistent error
codes, and fix the type of the map pointer argument.
</content>
</entry>
<entry>
<title>client/audioc: Create ~/.paraslash in interactive mode.</title>
<updated>2026-07-04T20:46:44Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-06-23T19:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3123128dbf3900fb7baf6c2a4577b76340ae4404'/>
<id>urn:sha1:3123128dbf3900fb7baf6c2a4577b76340ae4404</id>
<content type='text'>
If this directory does not exist, para_play creates it at startup. However,
para_client and para_audioc do not do that, hence they fail to write the
history file on exit.

Teach para_client and para_audioc to create ~/.paraslash just as para_play
does. Replace para_mkdir() by create_dot_paraslash() as this is what all
callers need.
</content>
</entry>
<entry>
<title>Move xrename() from fd.c to afh.c and make it static.</title>
<updated>2026-07-04T20:39:38Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-06-23T19:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=263c1d8b1faafeea5ec927c0e2e99d89200f66da'/>
<id>urn:sha1:263c1d8b1faafeea5ec927c0e2e99d89200f66da</id>
<content type='text'>
It's only used there.
</content>
</entry>
<entry>
<title>Switch to SPDX identifiers.</title>
<updated>2026-03-17T22:45:43Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-15T14:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ea0cecf96e08c489fdcc94d046019f4ce46f58e2'/>
<id>urn:sha1:ea0cecf96e08c489fdcc94d046019f4ce46f58e2</id>
<content type='text'>
Generated with

	sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h

followed by manually tweaking the result a bit. No license change intended.
</content>
</entry>
<entry>
<title>fd: Modify xwrite() and write_all() to take void * buffer argument.</title>
<updated>2025-06-04T18:32:08Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-06-02T21:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=88f32f1aee78700647bd1f834e592cdb5e8adbf7'/>
<id>urn:sha1:88f32f1aee78700647bd1f834e592cdb5e8adbf7</id>
<content type='text'>
That's what the underlying call to writev(2) expects.
</content>
</entry>
<entry>
<title>fd: Simplify and move for_each_file_in_dir().</title>
<updated>2023-05-07T18:45:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2022-09-25T19:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=6f6d8eb1f8f88d9bc51530ae9c14089a20ad76ab'/>
<id>urn:sha1:6f6d8eb1f8f88d9bc51530ae9c14089a20ad76ab</id>
<content type='text'>
With only one user it can be static in aft.c. Modify the function
so that it no longer changes the current working directory, remove
para_opendir() because it is unused now, dedox the documentation and
streamline it a bit.
</content>
</entry>
<entry>
<title>fd: Revamp para_mkdir().</title>
<updated>2023-05-07T18:45:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2022-09-25T20:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=da171f28894c6a3fc29b58bf8ee783bc7d28598c'/>
<id>urn:sha1:da171f28894c6a3fc29b58bf8ee783bc7d28598c</id>
<content type='text'>
It has two callers which both pass the mode value 0777 and contain
extra code to regard the EEXIST error case as a success. Move the
common bits into the wrapper and improve the documentation.
</content>
</entry>
<entry>
<title>fd: Improve read_pattern(), rename it to read_and_compare().</title>
<updated>2023-05-07T18:45:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2022-09-25T20:01:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=d1b7b2dbccd20ef72c54b7e06117ef1f92500c04'/>
<id>urn:sha1:d1b7b2dbccd20ef72c54b7e06117ef1f92500c04</id>
<content type='text'>
The old name was a poor choice because the pattern argument actually
is neither a regular expression nor a filename pattern.

More importantly, the function receives a buffer size and tries
to read this many bytes but then compares only the first part of
the received buffer to the expected string. This is a rather weird
calling convention.

The only two callers are the http sender and receiver which both
call the function during the initial handshake where no other data is
available. Thus we can change the function to read only the minimal
amount of data (length of the expected string), and drop the bufsize
parameter.

Remove the unnecessary log message in the error case and streamline
the documentation while at it.
</content>
</entry>
<entry>
<title>fd: Open-code para_chdir().</title>
<updated>2023-05-07T18:45:14Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2022-09-25T18:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=15f6e433432a6ba8e021c74b0f28ecd545721d42'/>
<id>urn:sha1:15f6e433432a6ba8e021c74b0f28ecd545721d42</id>
<content type='text'>
Another public trivial wrapper that can go away because it has only
a single caller. POSIX says

	Upon successful completion, 0 shall be returned. Otherwise, −1 shall
	be returned, the current working directory shall remain unchanged,
	and errno shall be set to indicate the error.

So the new check against zero is equivalent to the old code which
checked whether the return value is non-negative.
</content>
</entry>
<entry>
<title>fd: Remove file_exists().</title>
<updated>2023-03-26T14:30:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2022-09-25T18:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=a25f6bb7169f0ea86522a0c613a8ec1dad358103'/>
<id>urn:sha1:a25f6bb7169f0ea86522a0c613a8ec1dad358103</id>
<content type='text'>
Open-coding this function actually improves code readability. The
function name was a misnomer anyway because any error from the stat()
call (such as EACCES) was reported as "file does not exist".
</content>
</entry>
</feed>
