<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nsxiv/main.c, branch master</title>
<subtitle>Nsxiv image view custom build
</subtitle>
<id>https://git.krolyxon.com/nsxiv/atom?h=master</id>
<link rel='self' href='https://git.krolyxon.com/nsxiv/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/'/>
<updated>2023-05-23T03:01:44Z</updated>
<entry>
<title>move load/cache messages to right side (#446)</title>
<updated>2023-05-23T03:01:44Z</updated>
<author>
<name>a1337xyz</name>
<email>a1337xyz@noreply.codeberg.org</email>
</author>
<published>2023-05-23T03:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=e4fceab18f4b7856a2ef6fbabebe1988c1fbfaea'/>
<id>urn:sha1:e4fceab18f4b7856a2ef6fbabebe1988c1fbfaea</id>
<content type='text'>
this avoids overwriting the left side bar,
which might contain more important information,
for e.g output of the thumb-info script.

Co-authored-by: A1337Xyz &lt;blindwizard@tutanota.com&gt;
Co-authored-by: NRK &lt;nrk@disroot.org&gt;
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/446
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
Reviewed-by: NRK &lt;nrk@disroot.org&gt;
Co-authored-by: a1337xyz &lt;a1337xyz@noreply.codeberg.org&gt;
Co-committed-by: a1337xyz &lt;a1337xyz@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>apply clang-format</title>
<updated>2023-03-11T12:37:04Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-02-10T05:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550'/>
<id>urn:sha1:f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550</id>
<content type='text'>
minus the bogus changes

Co-authored-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
</content>
</entry>
<entry>
<title>make some changes prepping for clang-format</title>
<updated>2023-03-11T12:36:26Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-07-02T15:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=2434e83807360bfe43e3c404be12438f00a894ab'/>
<id>urn:sha1:2434e83807360bfe43e3c404be12438f00a894ab</id>
<content type='text'>
Co-authored-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
</content>
</entry>
<entry>
<title>fix: thumbnail leak when removing the last file (#423)</title>
<updated>2023-03-04T07:01:19Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-03-04T07:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=19b47192f21939b46a8f46d131c31f138aaa3b33'/>
<id>urn:sha1:19b47192f21939b46a8f46d131c31f138aaa3b33</id>
<content type='text'>
bf6c062 tried to fixed the thumbnail leak, but it was done inside a
`if (n+1 &lt; filecnt)` branch, meaning the thumbnail was still leaking
away whenever the last file was removed.

we need to unload the thumb regardless of whether it's in the middle or
not. this bug was caught due to the recent `assert`s that were added in
01f3cf2.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/422
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/423
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
Reviewed-by: explosion-mental &lt;explosion-mental@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>update copyright year</title>
<updated>2023-01-28T10:29:36Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-15T09:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=a051ad210dc0571ec581c89171dc25b9ab35f4be'/>
<id>urn:sha1:a051ad210dc0571ec581c89171dc25b9ab35f4be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>don't spoil errno in sig handler (#411)</title>
<updated>2023-01-26T16:26:32Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-26T16:26:32Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=fddad757c6d2645ed7b2d8f64931818d5b3b7a00'/>
<id>urn:sha1:fddad757c6d2645ed7b2d8f64931818d5b3b7a00</id>
<content type='text'>
reported by thread-sanitizer.

the sighandler's spoiled `errno` was causing xlib to incorrectly assume some
error occurred and thus causing the crash described in #391.

to reproduce:

* Open an nsxiv window
* Open another terminal and run the following:

	var=$(pidof nsxiv); while :; do kill -s SIGCHLD $var; done

putting the `pid` into a variable is actually important because doing
`$(pidof nsxiv)` inside the loop makes it really hard to reproduce the
issue, I presume because of the extra process invocation it was sending
less SIGCHLD and so putting it into a variable avoids that overhead and
is able to generate more signals.

instead of reaping the zombies manually, we now pass the
`SA_NOCLDSTOP|SA_NOCLDWAIT` for SIGCHLD instead so that the zombies are
reaped automatically.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/391
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/411
Reviewed-by: explosion-mental &lt;explosion-mental@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>read win-title in non-blocking manner (#314)</title>
<updated>2023-01-09T08:12:30Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-09T08:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=34d42951032c6bad6057d9c82893add1c94ade38'/>
<id>urn:sha1:34d42951032c6bad6057d9c82893add1c94ade38</id>
<content type='text'>
Closes: https://codeberg.org/nsxiv/nsxiv/issues/313
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/314
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>spawn(): improve performance and simplify API</title>
<updated>2023-01-09T05:07:24Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-06-22T03:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=49d11f0d1fae43ae1e5f61204ed051e889062767'/>
<id>urn:sha1:49d11f0d1fae43ae1e5f61204ed051e889062767</id>
<content type='text'>
posix_spawn() is designed especially for this purpose, and thus it's
much more lightweight and efficient than manually fork/dup/exec-ing.

on my system, it improves the performance of spawn() by about 10x. given
that we make frequent calls to potentially multiple scripts, the
increased efficiency will add up overtime.

using posix_spawn() also simplifies the logic quite a bit, despite the
very verbose function names. however it does make cleanup a bit more
complicated.

this patch uses the linux kernel style cleanup strategy [0] (which I'm
personally not a huge fan of, but it fits this situation quite nicely)
with a "stack-like" unwinding via `goto`-s.

additionally simplify the spawn() API by taking in {read,write}fd
pointers and returning the pid instead of using some custom struct.

this coincidently also fixes #299

[0]: https://www.kernel.org/doc/html/v4.10/process/coding-style.html?highlight=goto#centralized-exiting-of-functions
</content>
</entry>
<entry>
<title>add brightness and contrast (#396)</title>
<updated>2022-12-22T11:21:40Z</updated>
<author>
<name>Berke Kocaoğlu</name>
<email>kberke@metu.edu.tr</email>
</author>
<published>2022-12-22T11:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=95bc9b463b87236d30d86626e1052e6979d6510f'/>
<id>urn:sha1:95bc9b463b87236d30d86626e1052e6979d6510f</id>
<content type='text'>
* Imlib2 supports modifying gamma, brightness and contrast directly
  while sxiv only supports gamma. Makes sense to extend it to brightness
  and contrast as well.

* Since color corrections need to be aware of each other, they have been
  refactored into one centralized function.

* This also makes the code more hackable as it makes it easier to add
  more color correction functions without them interfering with each
  other.

Co-authored-by: 0ion9 &lt;finticemo@gmail.com&gt;
Co-authored-by: NRK &lt;nrk@disroot.org&gt;
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/396
Reviewed-by: NRK &lt;nrk@disroot.org&gt;
Reviewed-by: TAAPArthur &lt;taaparthur@noreply.codeberg.org&gt;
Co-authored-by: Berke Kocaoğlu &lt;kberke@metu.edu.tr&gt;
Co-committed-by: Berke Kocaoğlu &lt;kberke@metu.edu.tr&gt;
</content>
</entry>
<entry>
<title>accept directory via stdin (-i) (#383)</title>
<updated>2022-10-30T18:18:44Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-10-30T18:18:44Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=045abbd117dc327a8636a5afd19252c53d6880aa'/>
<id>urn:sha1:045abbd117dc327a8636a5afd19252c53d6880aa</id>
<content type='text'>
this basically just extracts the logic that was previously inside
`main()` into a seperate function `add_entry()` so that it can be used
for accepting entries form stdin as well.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/382

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/383
Reviewed-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
</content>
</entry>
</feed>
