Commit graph

340 commits

Author SHA1 Message Date
Dmitrij D. Czarkoff d0b041f17c Use realloc(3) for extending buffer
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-28 11:07:41 +01:00
Harry Jeffery f4373a1f83 Merge pull request #66 from czarkoff/master
Drop `obj` target
2015-12-27 15:05:49 +00:00
Dmitrij D. Czarkoff 96bd50edc9 Drop "obj" target
It was introduced to make object files depend on $(BUILDDIR) so that creating it
could be moved into separate rule, executed once.  That was a bad idea, because
"obj" had to be phony, thus making all targets that depend on it obsolete
between runs of make.  This change introduces order-only rule that makes object
files depend on $(BUILDDIR) without obsoleting other targets.
2015-12-27 12:33:38 +01:00
Harry Jeffery a339d07ec6 Merge pull request #65 from czarkoff/build
More changes to build infrastructure
2015-12-26 13:14:43 +00:00
Dmitrij D. Czarkoff cbecdeba3b Use simply expanded variables wherever possible
Recursively expanded variables (VAR = CONTENT) are evaluated when used.  Simply
extended variables (VAR := CONTENT) are expanded immediately, and remain stable
throughout lifetime of the process, reducing fragility of build system.
2015-12-26 14:09:52 +01:00
Dmitrij D. Czarkoff 5f3ebdd39e Generate all files in build directory
* Allow building off read-only source tree.
 * Allow setting build directory from environment.

These changes allow parallel building of imv for multiple architectures, which
is used by package management systems of some operating systems.
2015-12-26 14:09:41 +01:00
Dmitrij D. Czarkoff 4263e95ae0 Make "uninstall" target remove the same files "install" installs 2015-12-26 12:17:09 +01:00
Harry Jeffery 174b3a1a1a Fix usage examples
Fixes #61
2015-12-26 03:09:42 +00:00
Harry Jeffery 6562cfbd42 Improve readability of g_options
The default options block was getting quite ridiculous to try and read.
Let's improve the readability.
2015-12-26 03:02:39 +00:00
Harry Jeffery 1332a920f5 Merge pull request #64 from czarkoff/master
Build infrastructure improvements
2015-12-26 02:58:08 +00:00
Harry Jeffery 5f006803ee Merge pull request #62 from czarkoff/font
Use default font
2015-12-26 02:51:26 +00:00
Dmitrij D. Czarkoff 54560c988d Document default font change in help text 2015-12-25 23:50:18 +01:00
Dmitrij D. Czarkoff c681f5c58e Document default font in manual
Also reference the fonts.conf(5) manual, which explains fonts configuration.
2015-12-25 23:48:59 +01:00
Dmitrij D. Czarkoff 447e86d35d Fix verbose build 2015-12-25 23:27:11 +01:00
Harry Jeffery 3ae2fd34d3 Merge pull request #63 from czarkoff/stdin
Don't use "stdin" variable name
2015-12-25 21:58:16 +00:00
Dmitrij D. Czarkoff c42ab08819 Add verbose mode
If V variable is set to any value, commands will be echoed to standard output.
2015-12-25 17:52:01 +01:00
Dmitrij D. Czarkoff 77827c838e Make installation locations more configurable
This might be desired when platform has its own, custom layout (eg. OpenBSD or
Solaris), or when user wants to install the program to his home directory.
2015-12-25 15:29:12 +01:00
Dmitrij D. Czarkoff 6de6b358e8 Use "shell" macro in CFLAGS
When CFLAGS contain "`cmd`" construct, the "cmd" command is executed every time
when make issues shell command with expanded CFLAGS.  Using "$(shell cmd)"
instead forces make to expand output of "cmd" into CFLAGS.
2015-12-25 15:27:00 +01:00
Dmitrij D. Czarkoff 57d83b7b37 Respect default CFLAGS and LDFLAGS if set in environment
Some package management systems allow users to set default CFLAGS and LDFLAGS
and then supply them to the make via environment.  This change makes build
infrastructure respect such settings.

Also, don't force non-essential flags.
2015-12-25 15:11:32 +01:00
Dmitrij D. Czarkoff ab0c27611b Use "PREFIX" instead of "prefix"
Most package management systems already expect "PREFIX" macro to control
installation path.
2015-12-25 15:07:03 +01:00
Dmitrij D. Czarkoff 4823142b49 Use default font
"Monospace" is a font name reserved for default monospace font, which is
supposed to be set to particular font user prefers.
2015-12-25 15:02:58 +01:00
Dmitrij D. Czarkoff b07d09fd22 Don't use "stdin" variable name
At least on OpenBSD stdin, stdout and stderr are macros, and thus they are
expanded before compilation.
2015-12-25 14:57:19 +01:00
Harry Jeffery a01f3b3b1a Merge pull request #55 from khanley6/LinkingFix
Fixed linking order to properly link libraries. Linking failed prior
2015-12-12 18:11:50 +00:00
Kenneth Hanley 083bf9e5ee Fixed linking order to properly link libraries. Linking failed prior 2015-12-12 17:13:35 +00:00
Harry Jeffery f7365c85bd Release v1.2.0 2015-12-11 15:46:17 +00:00
Harry Jeffery 33790ffb7d Update README 2015-12-11 15:38:26 +00:00
Harry Jeffery 6b65212399 Document default background color 2015-12-11 15:32:42 +00:00
Harry Jeffery 6f369cc075 Merge pull request #53 from alekskosiacka/master
don't create chequered bg if its not used
2015-12-10 19:22:54 +00:00
Aleksandra Kosiacka 7d15d1b520 don't create chequered bg if its not used
fixes #40
2015-12-10 19:20:58 +00:00
Harry Jeffery 76e4f48ca9 Merge pull request #52 from alekskosiacka/master
hide mouse on key press
2015-12-10 19:12:58 +00:00
Aleksandra Kosiacka 9b73560f7f hide mouse on key press
fixes #37
2015-12-10 19:10:07 +00:00
Harry Jeffery edad12139b Merge pull request #51 from eXeC64/imv_reload
Add support for reloading files
2015-12-10 17:56:25 +00:00
Jose Diez 8684b7654d Add support for reloading files
Closes #8.
2015-12-10 16:59:08 +00:00
Harry Jeffery c2871c5323 Tell gcc to be pedantic 2015-12-10 15:55:29 +00:00
Harry Jeffery c73baf2e86 Move text rendering into a util function 2015-12-10 15:53:43 +00:00
Harry Jeffery 3e1523d6a7 Make imv_loader_get_image more informative 2015-12-10 15:26:01 +00:00
Harry Jeffery 6cd76000aa Clean up redraw logic 2015-12-10 15:16:13 +00:00
Harry Jeffery c083cc66fc Merge pull request #50 from alekskosiacka/master
fix images not resizing when toggling fullscreen mode
2015-12-10 14:24:21 +00:00
Aleksandra Kosiacka 76da412075 fix images not resizing when toggling fullscreen mode
fixes #31
2015-12-10 14:20:17 +00:00
Harry Jeffery 2153397c8e Merge pull request #49 from alekskosiacka/master
add -l option for listing all open images on exit
2015-12-10 14:09:03 +00:00
Aleksandra Kosiacka a08087af7a add -l option for listing all open images on exit
fixes #43
2015-12-10 14:02:47 +00:00
Harry Jeffery 40003f9a45 Add -t synopsis to manpage 2015-12-09 12:44:30 +00:00
Harry Jeffery 224f609318 Merge pull request #47 from whatevsz/slideshow
Add slideshow option.
2015-12-09 12:43:45 +00:00
Hannes Koerber 0dd3f6b104 Add slideshow option. 2015-12-09 10:50:16 +01:00
Harry Jeffery c8f4c755c3 Add testing infrastructure 2015-12-08 16:39:31 +00:00
Harry Jeffery ad1aca588a Refactor imv_navigator interface 2015-12-08 15:43:08 +00:00
Harry Jeffery 9f569a394b Permit falling back to software renderer 2015-12-07 00:59:35 +00:00
Harry Jeffery 71c7ff06d8 Handle null window/renderer gracefully 2015-12-04 22:18:19 +00:00
Harry Jeffery c36ef928e8 Comment main.c more thoroughly 2015-11-30 23:12:48 +00:00
Harry Jeffery 8bc695b889 Document imv_loader's methods 2015-11-30 22:50:01 +00:00