summaryrefslogtreecommitdiffstats
path: root/util.c
AgeCommit message (Collapse)Author
2021-09-16Rename, Update Docs and Prepare for Release (#9)Berke Kocaoğlu
Co-authored-by: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com> Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com> Co-authored-by: NRK <nrk@disroot.org> Co-authored-by: Arthur Williams <taaparthur@gmail.com> Co-authored-by: eylles <ed.ylles1997@gmail.com>
2018-07-30Don't skip dot files when cleaning cacheKacper Gutowski
2017-12-07Replace utf8codepoint with Chris Wellons' utf8_decodeBert Münnich
Code under a different license should be kept in a separate file. This implemention is a single header file with ~65 lines, so it better fits this requirement.
2017-12-07Try to match a fallback font if neededSquibby
Fixes #276 Instead of rendering the entire filename at once, Xft will let us do it character by character. This will allow sxiv to query fontconfig for a font that can provide any missing codepoints, if needed. A known issue of this patch is that the "..." dots rendering will not work properly for very long multibyte filenames. That is because we cannot easily predict the final width of the rendered filename before drawing it. I couldn't figure out a clean way to deal with this, so I ended up just truncating the offending filenames.
2017-10-16One header file for type definitions and function declarationsBert Münnich
2016-09-28Allow opening directories non-recursivelyParide Legovini
2015-12-28Fix option -q; commit d3a70a2 completely broke it; fixes issue #223Bert Münnich
2015-10-28Simplified r_mkdir()Bert Münnich
2015-10-28Revised error handlingBert Münnich
- 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-28Prefix safe allocation functions with 'e' instead of 's_'Bert Münnich
2015-10-28Removed unnecessary buffer size constantsBert Münnich
2015-10-28Use XSI realpath(3)Bert Münnich
2015-10-28Use POSIX.1-2008 getline(3)Bert Münnich
2015-10-28Removed feature test macro definitions from source filesBert Münnich
2015-10-28Removed overcautious parameter checksBert Münnich
2014-08-22Bug #165: Deletion of unnecessary null pointer checksMarkus Elfring
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-01Made argument of s_strdup constlucas8
2014-06-10Create thumbnail cache dir automaticallyBert Münnich
2013-02-11Ignore dotfiles for -rBert Münnich
2013-02-08Refactored function definitions to use dangling braceBert Münnich
2013-02-08Updated/corrected license headerBert Münnich
2012-02-15Already in the year 2012Bert Münnich
2012-02-11Removed slideshow supportBert Münnich
2011-10-14Updated contact informationBert Münnich
2011-10-13Strictly adhere to ANSI-C standardBert Münnich
2011-10-12Use void for empty argument listsBert Münnich
2011-09-29Made all conditionals more preciseBert Münnich
2011-09-29Transformed function macros in util.h to inline functionsBert Münnich
2011-09-26Added STREQ macroBert Münnich
2011-09-26make use of EXIT_ macrosrck
2011-09-10Added slideshow supportBert
2011-09-08Strict conformance to IEEE Std 1003.1-2001Bert
2011-09-06Avoid conflicting macrosBert
2011-09-03Reformated license headerBert
2011-09-02Data driven timeout handlingBert
2011-08-19Added support for gif animationBert
2011-08-18Corrected FSF address in license headersBert
2011-08-18Revised handling of file names & pathsBert
2011-07-26Major code refactoringBert
- Configurable key and mouse mappings in config.h - Put event handling code from main.c into events.[ch]
2011-05-29Use getline instead of readlineBert
2011-04-08Refactored recursive directory util functionsBert
2011-04-07Moved read_dir_rec into util.cBert
2011-04-07Use directory structure in cache dirBert
2011-04-07Write cache file for thumbnail directly after creating itBert
2011-04-07Write thumbnail cache files on exitBert
2011-02-15Fixed empty lines in readline()Bert
2011-02-14More appropriate buffer sizesBert
2011-02-14Read filenames from stdinBert
2011-02-03Display filesize in window titleBert
2011-02-03Fixed die/warn in util.cBert