Commit 68037c4d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

strip unneded parts from giblib, part 1

Not all functions were examined yet. Also TODO:
* check strdup / malloc calls (some are apparently unchecked in giblib),
  maybe use estrdup / emalloc for those
* Check includes and update dependency list if needed
parent c7d0afa8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3,6 +3,12 @@ git HEAD
    * feh-cam and gen-cam-menu are no longer installed by default. Use
      make install cam=1 to install them or make uninstall cam=1 to remove
      them permanently
    * feh no longer depends on giblib. Instead, the relevant parts of the
      giblib source were imported into the feh source.
      Rationale: giblib is unmaintained and, as far as I know, only used by
      three projects (one of which is feh). There is at least one known bug
      in it, and as I do not have the time to take over giblib development,
      importing the library seems to be the best solution.

Sun, 27 Apr 2014 20:28:02 +0200  Daniel Friesel <derf+feh@finalrewind.org>

+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ feh - Imlib2 based image viewer
Dependencies
------------

 * giblib
 * Imlib2
 * libcurl (disable with make curl=0)
 * libpng
+5 −1
Original line number Diff line number Diff line
@@ -57,7 +57,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <math.h>

#include <Imlib2.h>
#include <giblib/giblib.h>
#include "gib_hash.h"
#include "gib_imlib.h"
#include "gib_list.h"
#include "gib_style.h"
#include "gib_utils.h"

#include "structs.h"
#include "menu.h"
+3 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ void *gib_hash_get(gib_hash *hash, char *key)
	return n?n->data:NULL;
}

/* unused

void      gib_hash_remove(gib_hash *hash, char *key)
{
	gib_list *n = gib_list_find(GIB_LIST(hash->base), gib_hash_find_callback, key);
@@ -142,3 +144,4 @@ void gib_hash_foreach(gib_hash *hash, void (*foreach_cb)(gib_hash_node *nod
	return;
}

*/
+3 −0
Original line number Diff line number Diff line
@@ -61,9 +61,12 @@ void gib_hash_free_and_data(gib_hash *hash);

void      gib_hash_set(gib_hash *hash, char *key, void *data);
void     *gib_hash_get(gib_hash *hash, char *key);

/* unused
void      gib_hash_remove(gib_hash *hash, char *key);

void      gib_hash_foreach(gib_hash *hash, void (*foreach_cb)(gib_hash_node *node, void *data), void *data);
*/

#ifdef __cplusplus
}
Loading