/*
* Geeqie
* (C) 2004 John Ellis
- * Copyright (C) 2008 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
*-------------------------------------------------------------------
*/
-static gint cache_sim_write_dimensions(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_dimensions(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->dimensions) return FALSE;
return TRUE;
}
-static gint cache_sim_write_date(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_date(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->have_date) return FALSE;
return TRUE;
}
-static gint cache_sim_write_checksum(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_checksum(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->have_checksum) return FALSE;
return TRUE;
}
-static gint cache_sim_write_md5sum(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_md5sum(SecureSaveInfo *ssi, CacheData *cd)
{
gchar *text;
return TRUE;
}
-static gint cache_sim_write_similarity(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_similarity(SecureSaveInfo *ssi, CacheData *cd)
{
guint x, y;
guint8 buf[3 * 32];
guint8 *avg_g = &cd->sim->avg_g[s];
guint8 *avg_b = &cd->sim->avg_b[s];
guint n = 0;
-
+
for (x = 0; x < 32; x++)
{
buf[n++] = avg_r[x];
return TRUE;
}
-gint cache_sim_data_save(CacheData *cd)
+gboolean cache_sim_data_save(CacheData *cd)
{
SecureSaveInfo *ssi;
gchar *pathl;
*-------------------------------------------------------------------
*/
-static gint cache_sim_read_skipline(FILE *f, gint s)
+static gboolean cache_sim_read_skipline(FILE *f, gint s)
{
if (!f) return FALSE;
return FALSE;
}
-static gint cache_sim_read_comment(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_comment(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return cache_sim_read_skipline(f, s - 1);
}
-static gint cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_date(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_date(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_checksum(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_checksum(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_md5sum(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_md5sum(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
cd->similarity = TRUE;
}
-gint cache_sim_data_filled(ImageSimilarityData *sd)
+gboolean cache_sim_data_filled(ImageSimilarityData *sd)
{
if (!sd) return FALSE;
return sd->filled;
path = g_build_filename(base, cache_local, name, NULL);
g_free(name);
g_free(base);
-
+
return path;
}
const gchar *cache_rc;
const gchar *cache_local;
const gchar *cache_ext;
- gint prefer_local;
+ gboolean prefer_local;
if (!source) return NULL;
return path;
}
-gint cache_time_valid(const gchar *cache, const gchar *path)
+gboolean cache_time_valid(const gchar *cache, const gchar *path)
{
struct stat cache_st;
struct stat path_st;
gchar *cachel;
gchar *pathl;
- gint ret = FALSE;
+ gboolean ret = FALSE;
if (!cache || !path) return FALSE;