<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nsxiv/nsxiv.h, 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-26T07:06:17Z</updated>
<entry>
<title>make assertions opt-in (#447)</title>
<updated>2023-05-26T07:06:17Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-05-26T07:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=40480596cad8654dca225e7fb136f4151f5df5c0'/>
<id>urn:sha1:40480596cad8654dca225e7fb136f4151f5df5c0</id>
<content type='text'>
slight addendum to 657080a7e55843e351fa6ce41e4ce315eab62b67

instead of disabling asserts by adding -DNDEBUG to config.mk, this
disables asserts by default in the source code itself. this way, if
someone compiles with `make CFLAGS="-O3 -march=native"` without knowing
about asserts/-DNDEBUG then he won't accidentally get a build with
assertions in it.

this basically makes the assertions opt-in, if someone wants it, he'll
need to *explicitly* set `-DDEBUG` to get it. so that it's not possible
to accidentally end up with assertions enabled.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/447
Reviewed-by: TAAPArthur &lt;taaparthur@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>img_t: rename alpha -&gt; alpha_layer for consistency</title>
<updated>2023-01-28T10:23:11Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-17T09:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=6ffc64a04e5e4200103db9df6bd85f958a942d9f'/>
<id>urn:sha1:6ffc64a04e5e4200103db9df6bd85f958a942d9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add cli flag --alpha-layer</title>
<updated>2023-01-28T10:23:11Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-17T09:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=1f788a318bedc0e6a83632c1f126e747c0430d6c'/>
<id>urn:sha1:1f788a318bedc0e6a83632c1f126e747c0430d6c</id>
<content type='text'>
now that we have long-opts, we don't have to worry about exhausting the
alphabet list for short-opts. so adding a cli flag to set/unset the
checker background makes sense.

ref: https://codeberg.org/nsxiv/nsxiv/issues/404
</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>fix potential truncation of cli arguments (#367)</title>
<updated>2022-09-14T04:58:41Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-09-14T04:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=daee34477a87f7eb97aa537577a48ddcf5a7d30b'/>
<id>urn:sha1:daee34477a87f7eb97aa537577a48ddcf5a7d30b</id>
<content type='text'>
strtol() returns a `long`, but we're storing the result in an `int`
which might end up getting truncated. change `n` to `long` and guard
against &gt;INT_MAX arguments in cases where it matters.

use a float for storing argument of `-S`

change `opt.slideshow` to `unsigned` similar to `img.ss.delay`

Co-authored-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/367
Reviewed-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
Reviewed-by: explosion-mental &lt;explosion-mental@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>rename: aa -&gt; anti_alias</title>
<updated>2022-09-10T13:43:14Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-09-10T13:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=e356add07c6246b8a27a5d193e2e89da4afee6ad'/>
<id>urn:sha1:e356add07c6246b8a27a5d193e2e89da4afee6ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>allow disabling anti-aliasing via cli flag</title>
<updated>2022-09-10T13:43:07Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-08-17T14:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=88a480c9388d698f123bf892f33197d7bd1cfb9b'/>
<id>urn:sha1:88a480c9388d698f123bf892f33197d7bd1cfb9b</id>
<content type='text'>
simply running nsxiv with `--anti-alias` will enable anti-aliasing, and
running it with `--anti-alias=no` will disable it.

the cli flag will overwrite the config.h default.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/349
</content>
</entry>
<entry>
<title>autoreload: simplify and cleanup (#342)</title>
<updated>2022-07-30T08:05:10Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-07-30T08:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=94d531fd827457cf71fe7f3808c7a2f531dceba5'/>
<id>urn:sha1:94d531fd827457cf71fe7f3808c7a2f531dceba5</id>
<content type='text'>
the current code is quite hacky and complex as it mixes multiple pointers. all
of this complexity is unnecessary. drop it by introducing an explicit scratch
buffer instead of implicitly abusing `arl-&gt;filename` as one. this also reduces
some unnecessary allocation overhead.

additionally, the argument to arl_setup must be the result of `realpath(3)` (as
commented in `nsxiv.h`). instead of commenting it, assert it.

and lastly, rename `arl_setup` to `arl_add` since it's not doing any "setup"
but rather *adding* a file to watch.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/342
Reviewed-by: explosion-mental &lt;explosion-mental@noreply.codeberg.org&gt;
</content>
</entry>
</feed>
