Commit Graph

46 Commits

Author SHA1 Message Date
Paride Legovini
86dc6860f9 Allow opening directories non-recursively 2016-09-28 19:27:48 +02:00
Bert Münnich
53a72c7b65 Fix option -q; commit d3a70a2 completely broke it; fixes issue #223 2015-12-28 17:00:21 +01:00
Bert Münnich
a7d39b0ab8 Simplified r_mkdir() 2015-10-28 23:21:12 +01:00
Bert Münnich
d3a70a285d Revised error handling
- Functions warn() and die() replaced by GNU-like error(3) function
- Register cleanup() with atexit(3)
- Functions called by cleanup() are marked with CLEANUP and are not allowed to
  call exit(3)
2015-10-28 23:03:37 +01:00
Bert Münnich
851e4288c1 Prefix safe allocation functions with 'e' instead of 's_' 2015-10-28 22:29:01 +01:00
Bert Münnich
b096cbd536 Removed unnecessary buffer size constants 2015-10-28 22:23:28 +01:00
Bert Münnich
9a7e97cd89 Use XSI realpath(3) 2015-10-28 21:52:41 +01:00
Bert Münnich
66c3c55759 Use POSIX.1-2008 getline(3) 2015-10-28 21:50:17 +01:00
Bert Münnich
e574a6d0dd Removed feature test macro definitions from source files 2015-10-28 21:37:45 +01:00
Bert Münnich
e0e96977b3 Removed overcautious parameter checks 2015-10-28 21:01:24 +01:00
Markus Elfring
0f6cb93a09 Bug #165: Deletion of unnecessary null pointer checks
The function "free" performs input parameter validation.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html

It is therefore not needed to check a passed pointer before this function call.
A corresponding update suggestion was generated by the software "Coccinelle"
from the following semantic patch approach.
http://coccinelle.lip6.fr/

@Remove_unnecessary_pointer_checks1@
expression x;
@@
-if (x != \(0 \| NULL\))
    free(x);

@Remove_unnecessary_pointer_checks2@
expression x;
@@
-if (x != \(0 \| NULL\)) {
    free(x);
    x = \(0 \| NULL\);
-}

@Remove_unnecessary_pointer_checks3@
expression a, b;
@@
-if (a != \(0 \| NULL\) && b != \(0 \| NULL\))
+if (a)
    free(b);

@Remove_unnecessary_pointer_checks4@
expression a, b;
@@
-if (a != \(0 \| NULL\) && b != \(0 \| NULL\)) {
+if (a) {
    free(b);
    b = \(0 \| NULL\);
 }

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2014-08-22 19:24:08 +02:00
lucas8
3b8a79fb8b Made argument of s_strdup const 2014-08-01 20:29:06 +02:00
Bert Münnich
5cfae63620 Create thumbnail cache dir automatically 2014-06-10 23:15:04 +02:00
Bert Münnich
408b75a0b4 Ignore dotfiles for -r 2013-02-11 21:39:41 +01:00
Bert Münnich
08ae25da22 Refactored function definitions to use dangling brace 2013-02-08 22:05:31 +01:00
Bert Münnich
6d3bbc6d5e Updated/corrected license header 2013-02-08 21:52:41 +01:00
Bert Münnich
d407dd65d5 Already in the year 2012 2012-02-15 19:16:24 +01:00
Bert Münnich
c3c95ab218 Removed slideshow support 2012-02-11 02:34:18 +01:00
Bert Münnich
36177fb180 Updated contact information 2011-10-14 10:40:49 +02:00
Bert Münnich
4383a651c7 Strictly adhere to ANSI-C standard 2011-10-13 16:50:06 +02:00
Bert Münnich
a09b20c5e6 Use void for empty argument lists 2011-10-12 18:38:29 +02:00
Bert Münnich
8dcf682de9 Made all conditionals more precise 2011-09-29 12:43:36 +02:00
Bert Münnich
22d4e991d5 Transformed function macros in util.h to inline functions 2011-09-29 10:16:13 +02:00
Bert Münnich
d721d8453e Added STREQ macro 2011-09-26 21:53:52 +02:00
rck
3a81af41ac make use of EXIT_ macros 2011-09-26 15:40:07 +02:00
Bert
510512714d Added slideshow support 2011-09-10 18:41:20 +02:00
Bert
6e575b0f72 Strict conformance to IEEE Std 1003.1-2001 2011-09-08 20:54:24 +02:00
Bert
711494ad36 Avoid conflicting macros 2011-09-06 09:11:03 +02:00
Bert
d585b86354 Reformated license header 2011-09-03 23:11:45 +02:00
Bert
1e84773276 Data driven timeout handling 2011-09-02 04:33:44 +02:00
Bert
8b3ae5027e Added support for gif animation 2011-08-19 15:22:16 +02:00
Bert
8763f6930f Corrected FSF address in license headers 2011-08-18 01:18:26 +02:00
Bert
ff013dd009 Revised handling of file names & paths 2011-08-18 00:38:55 +02:00
Bert
b8ff1677b1 Major code refactoring
- Configurable key and mouse mappings in config.h
- Put event handling code from main.c into events.[ch]
2011-07-26 18:01:29 +02:00
Bert
ea23115af4 Use getline instead of readline 2011-05-29 11:45:58 +02:00
Bert
a90bd1c833 Refactored recursive directory util functions 2011-04-08 10:23:42 +02:00
Bert
e9996882cb Moved read_dir_rec into util.c 2011-04-07 19:15:00 +02:00
Bert
92709b2b2f Use directory structure in cache dir 2011-04-07 17:29:59 +02:00
Bert
f93f4d887c Write cache file for thumbnail directly after creating it 2011-04-07 16:17:10 +02:00
Bert
c21a3e3f28 Write thumbnail cache files on exit 2011-04-07 14:33:57 +02:00
Bert
e8ed491ba9 Fixed empty lines in readline() 2011-02-15 15:30:37 +01:00
Bert
cfed65d36f More appropriate buffer sizes 2011-02-14 19:22:02 +01:00
Bert
26cc5aff69 Read filenames from stdin 2011-02-14 17:51:04 +01:00
Bert
bad9a70a48 Display filesize in window title 2011-02-03 14:32:02 +01:00
Bert
e8cf8da208 Fixed die/warn in util.c 2011-02-03 10:54:31 +01:00
Bert
8f4af658ae Refactored, new files util.[ch], C89 2011-02-03 10:15:01 +01:00