aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-14Move event handling into its own functionHarry Jeffery
2017-04-14Refactor navigator to new styleHarry Jeffery
2017-04-14Refactor viewport to new styleHarry Jeffery
2017-04-14Refactor texture to new styleHarry Jeffery
2017-04-14Refactor loader to new styleHarry Jeffery
2017-04-14Let's not have imv_commands use hidden globalsHarry Jeffery
2017-04-14Add some aliasesHarry Jeffery
2017-04-14Add basic alias supportHarry Jeffery
2017-04-14Add a rough command modeHarry Jeffery
2017-04-12Move basic functionality into commandsHarry Jeffery
2017-04-12Add basic command systemHarry Jeffery
2017-04-12Add generic list containerHarry Jeffery
2017-03-06Add command 'X' to remove image from disk tooNicolas Cornu
2017-02-09Show image scale in window titleMark Oteiza
2016-12-28Merge pull request #100 from crasm/masterHarry Jeffery
Store getopt() return in a signed variable
2016-12-28Store getopt() return in a signed variablecrasm
On certain platforms [0] a char may be unsigned [1]. The loop for getopt would loop forever because: (char)-1 => 255 and 255 != -1 A signed char also worked. I don't know what that would mean for performance or portability. int feels simpler to me. [0]: I'm using Arch Linux ARM on the Samsung Chromebook 2, which is armv7h. Not sure about other ARM platforms. With this fix, imv appears to work correctly. details: https://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook-2 [1]: http://stackoverflow.com/questions/2054939/is-char-signed-or-unsigned-by-default#2054941
2016-12-23Fix indentation errorHarry Jeffery
2016-11-23Merge pull request #99 from eXeC64/wall-of-textHarry Jeffery
Unconditionally echo build commands
2016-11-22Simplify VERSION handlingDmitrij D. Czarkoff
Also, use default abbreviation length, so that abbreviated object name in VERSION would match github's display of commit IDs.
2016-11-22Unconditionally echo build commandsDmitrij D. Czarkoff
2016-11-22Separate preprocessor flags from compiler flags, libs from linker flagsDmitrij D. Czarkoff
PR #98 hints that we were venturing into downstream's territory: compiler and linker flags may be OS-specific, while preprocessor flags and libraries are our responsibility. Provide clean separation between these categories. Downstreams may still need to provide "--std=c99" in CFLAGS though.
2016-11-17Describe command "d" in manualDmitrij D. Czarkoff
Fixes #97.
2016-11-16Reset slideshow timer when image changed via 'x'Harry Jeffery
When the user hits left/right to change image, the time left until the slideshow changes images is reset. If the user changes image by closing the current image, the timer is not reset. This patch resolves that.
2016-10-23Don't advertise hash sign usage with '-b' optionDmitrij D. Czarkoff
Most shells would interpret the hash sign as start of the comment, so command with an unescaped hash sign will result in rather puzzling error message: $ imv -b #C0C0C0 files... Unknown argument 'b'. Aborting. Although there is obvious workaround (detect 'b' in '?' case of getopt switch and put more appropriate message), it generally makes more sense to suggest plain hex values for input.
2016-10-23Simplify hex color parserDmitrij D. Czarkoff
It is actually a trivial task for strtoul + some bit shifting, so there is no need for two separate functions.
2016-10-22Release v2.1.3Harry Jeffery
2016-10-22Enable testsDmitrij D. Czarkoff
Once cmocka is built, it is cached, so that subsequent builds only need to install it and update linker configuration.
2016-10-21Fix leak of images awaiting collection in loaderHarry Jeffery
2016-10-21Rework thread resource leakHarry Jeffery
2016-10-20Cap playback delta-time to 100 msHarry Jeffery
This prevents imv from trying to "catch up" on the time that it was asleep for by playing the gif back at high speed.
2016-10-09Be more correct in read_from_stdin()Dmitrij D. Czarkoff
From read(2) manual page on OpenBSD: Error checks should explicitly test for -1. Code such as while ((nr = read(fd, buf, sizeof(buf))) > 0) is not maximally portable, as some platforms allow for nbytes to range between SSIZE_MAX and SIZE_MAX - 2, in which case the return value of an error-free read() may appear as a negative number distinct from -1. Proper loops should use while ((nr = read(fd, buf, sizeof(buf))) != -1 && nr != 0) Distingushing between error and eof would also help for debugging.
2016-09-28Fix thread resource leak in loaderHarry Jeffery
2016-09-27Fix minor memory leak in load_font()Harry Jeffery
2016-09-27Fix GetWidth/GetHeight typo in main.cHarry Jeffery
2016-05-27Merge pull request #96 from gktrk/test-linking-fixHarry Jeffery
Fix the linking order of tests in the Makefile for --as-needed
2016-05-25Fix the linking order of tests in the Makefile for --as-neededGöktürk Yüksek
When '--as-needed' linker flag is added to LDFLAGS, linker strips out the symbols from the libraries needed for the tests due to the order in which the libraries appear on the command line. List the source files before the libraries to fix the linking issue. For more information, see: https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
2016-05-15Release v2.1.2Harry Jeffery
2016-05-13Fix build of imv on GNU libcDmitrij D. Czarkoff
Previously imv used -std=gnu11 flag which activated GNU "extensions" of C11 standard. This masked a portability issue in imv: strduo(3) should not have been visible in `src/loader.c` without inclusion of `<string.h>` header. This have been fixed. To remidy GNU libc's stange choice to hide X/Open interfaces in C99 code by default _XOPEN_SOURCE macro was also set. (This should have no effect on most other platforms.)
2016-05-13Remove "-std=gnu11" from .travis.ymlDmitrij D. Czarkoff
This reverts commit 9e3db8bdaad7d7752b24df5d9832b980a21f4496. The effort was futile.
2016-05-13Continue to use -std=gnu11 for TravisDmitrij D. Czarkoff
This way we may continue using strict flags for detecting issues while still allowing old compiler versions elsewhere.
2016-05-13Release v2.1.1Dmitrij D. Czarkoff
2016-05-12Fix compatibility with older gcc versionsDmitrij D. Czarkoff
2016-05-01Make imv_navigator_add() return an integer valueDmitrij D. Czarkoff
In case of error return non-zero value instead of cleaning up navigator. This way main loop may do some more cleanup, or maybe even act differently.
2016-05-01Remove buf_size from struct imv_navigatorDmitrij D. Czarkoff
Implementation details should not leak to other parts of the code. While at it, clean up initialization and destruction of navigator.
2016-04-29Fix uninitialized use of "last_time"Dmitrij D. Czarkoff
Set "last_time" to current time at declaration time, so that it holds at least something by the time it is used.
2016-04-29Remember files' modification times, not their directories'Dmitrij D. Czarkoff
2016-04-29Use single buffer for title and overlayDmitrij D. Czarkoff
This allows to drop extra printing steps and memory allocations.
2016-04-27Release v2.1.0Harry Jeffery
2016-04-26Reimplement '-x' flagDmitrij D. Czarkoff
This change effectively backs out f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a, implementing the same functionality in a simpler and more correct way. Implementation details: * imv_navigator.wrapped - a new field that has value "0" by default; once navigator wraps around the list, this field recieves value "1". * imv_navigator_wrapped(&nav) - a new function that returns non-zero value iff navigator wrapped around the list. Currently just returns value of imv_navigator.wrapped. While at it, expanded "test_navigator_remove" and merged it with "test_navigator_add". Resulting test is called "test_navigator_add_remove". Fixes #94.
2016-04-26Fix segmentation violationDmitrij D. Czarkoff
When non-cycling mode prevents navigator from wrapping to the other end of list, undo change to nav->cur_path. Otherwise it will remain out-of-bounds, so that subsequent calls to navigator functions may produce unexpected results, up to segmentation violation. Fixes #93