summaryrefslogtreecommitdiff
path: root/src/job-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/job-manager.c')
-rw-r--r--src/job-manager.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/job-manager.c b/src/job-manager.c
index 1f37595..002ca06 100644
--- a/src/job-manager.c
+++ b/src/job-manager.c
@@ -40,7 +40,7 @@
typedef struct {
TGallerySetup *setup;
TAlbum *items;
- const char *dst_dir;
+ const gchar *dst_dir;
gboolean force_update;
} TJob;
@@ -48,10 +48,10 @@ typedef struct {
static void
-mirror_files (TGallerySetup *setup, char **files, const char *src_tree, const char *dst_dir, const char *label)
+mirror_files (TGallerySetup *setup, gchar **files, const gchar *src_tree, const gchar *dst_dir, const gchar *label)
{
- char **extra;
- char *s1, *s2, *s3;
+ gchar **extra;
+ gchar *s1, *s2, *s3;
int processed = 0;
if (files && g_strv_length (files) > 0) {
@@ -103,9 +103,9 @@ static gpointer
thread_func (gpointer data)
{
TIndexItem *item;
- char *imgname;
+ gchar *imgname;
int i;
- char *s1, *s2, *s3;
+ gchar *s1, *s2, *s3;
int total, index, real_index;
TJob *job = data;
gboolean updated;
@@ -180,21 +180,21 @@ thread_func (gpointer data)
*/
gboolean
build_tree (TGallerySetup *setup,
- const char *src_tree,
- const char *dst_dir,
+ const gchar *src_tree,
+ const gchar *dst_dir,
TAlbum *parent_index,
int parent_item_index,
int jobs)
{
- char *idx_file;
+ gchar *idx_file;
TAlbum *items;
TIndexItem *item;
- char *s1, *s2, *s3;
- char *thumb_dir;
- char *img_big_dir;
- char *img_orig_dir;
- char *template;
- char *dst_album_file;
+ gchar *s1, *s2, *s3;
+ gchar *thumb_dir;
+ gchar *img_big_dir;
+ gchar *img_orig_dir;
+ gchar *template;
+ gchar *dst_album_file;
gboolean res;
int i;
TJob *job;
@@ -230,8 +230,7 @@ build_tree (TGallerySetup *setup,
}
/* Read the index file and fill items array */
- items = malloc (sizeof (TAlbum));
- memset (items, 0, sizeof (TAlbum));
+ items = g_malloc0 (sizeof (TAlbum));
if (! parse_album_xml (idx_file, items)) {
log_error ("error reading index file '%s'\n", idx_file);
g_free (idx_file);