aboutsummaryrefslogtreecommitdiff
path: root/src/navigator.c
AgeCommit message (Collapse)Author
2019-08-07navigator: Don't pickup child directories when non-recursiveHarry Jeffery
2019-08-07navigator: Use generic list implementationHarry Jeffery
2019-07-30navigator: Small refactorHarry Jeffery
2019-07-24Improve select_relAndreas Stallinger
select_rel was capped to -1 and 1 before
2019-07-19navigator: Remove unused variableHarry Jeffery
2019-05-26Expand relative paths (fixes #149)vglfr
2019-02-16navigator: Simplify file pollingHarry Jeffery
We don't need to know when all paths were last touched, just when we switched to the current path, and the last time that the file changed. This also fixes a bug where imv would double-load images as it refreshed its internal mtime.
2019-02-10Tweak allocation sizeof operator usageHarry Jeffery
2019-01-14Provide backup PATH_MAX value for HurdHarry Jeffery
2018-01-07Never return null from imv_navigator_selectionHarry Jeffery
This fixes a crash where a null pointer would be used to set an environment variable. Fixes #123
2017-11-25Don't duplicate license text in all source filesHarry Jeffery
If moving to dual-licensing, this text will be confusing. It's also a lot of noise.
2017-11-24Make the navigator interface opaqueHarry Jeffery
2017-11-23Move remaining actions to bindable commandsHarry Jeffery
2017-08-22Remove year from copyright noticesHarry Jeffery
It was falling out of date, and has no legal bearing to my knowledge.
2017-08-20Implement documented -l flagHarry Jeffery
2017-04-14Refactor navigator poll rate limitingHarry Jeffery
2017-04-14Refactor navigator to new styleHarry Jeffery
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-29Remember files' modification times, not their directories'Dmitrij D. Czarkoff
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
2016-04-26Add vim modelinesDmitrij D. Czarkoff
2016-04-02Add -x switch to exit imv when reaching end of file list.Hannes Koerber
2016-01-17Fix memory leak in imv_navigator_destroyHarry Jeffery
2016-01-13Use PATH_MAX for buffers holding pathsDmitrij D. Czarkoff
2015-12-30Reduce amount of stat(2) callsDmitrij D. Czarkoff
Add 8-bit variable that is passed to imv_navigator_poll_changed(). Decrement it on each run of main loop. When it gets to 0, call stat(2).
2015-12-28Remove names from file copyright headersHarry Jeffery
2015-12-28Add checks for malloc(3)Dmitrij D. Czarkoff
Exit(3) if memory allocation fails.
2015-12-28Use stat(2) to monitor file changesDmitrij D. Czarkoff
Makes file monitoring in imv completely POSIX.
2015-12-28Use realloc(3) for extending bufferDmitrij D. Czarkoff
It may save some CPU cycles if there is enough space to grow the array without copying memory chunks. Two side effects of the change: proper error checking added and dangerous memcpy(3) call removed.
2015-12-08Refactor imv_navigator interfaceHarry Jeffery
2015-11-28Fix memory corruption bug in imv_navigator_remove_pathHarry Jeffery
2015-11-28Load still images in the backgroundHarry Jeffery
2015-11-27add imv_navigator_remove_path functionHarry Jeffery
2015-11-20Remove unnecessary malloc castsHarry Jeffery
2015-11-20Add support for -n PATH starting specifierHarry Jeffery
Fixes #36
2015-11-13imv_navigator_set_pathMichal Koutenský
2015-11-12Relicence imv to GPLv2+Harry Jeffery
2015-11-11Update makefile to use a build directoryHarry Jeffery