Handle the newline in DEBUG_N() macro instead of adding one
authorLaurent Monin <geeqie@norz.org>
Thu, 24 Apr 2008 00:15:03 +0000 (00:15 +0000)
committerLaurent Monin <geeqie@norz.org>
Thu, 24 Apr 2008 00:15:03 +0000 (00:15 +0000)
in each debug message string.

30 files changed:
src/bar_info.c
src/cache.c
src/cache_maint.c
src/collect-io.c
src/collect-table.c
src/collect.c
src/color-man.c
src/dupe.c
src/exif-common.c
src/exiv2.cc
src/filelist.c
src/format_raw.c
src/fullscreen.c
src/image-load.c
src/image.c
src/layout.c
src/layout_image.c
src/main.c
src/main.h
src/pan-calendar.c
src/pan-view.c
src/pixbuf-renderer.c
src/print.c
src/remote.c
src/secure_save.c
src/thumb.c
src/thumb_standard.c
src/utilops.c
src/view_file_icon.c
src/view_file_list.c

index 393e064..b97f2f3 100644 (file)
@@ -111,7 +111,7 @@ static gint comment_legacy_write(FileData *fd, GList *keywords, const gchar *com
                {
                gchar *comment_pathl;
 
-               DEBUG_1("Saving comment: %s\n", comment_path);
+               DEBUG_1("Saving comment: %s", comment_path);
 
                comment_pathl = path_from_utf8(comment_path);
 
index d8a802d..1f93e52 100644 (file)
@@ -457,7 +457,7 @@ CacheData *cache_sim_data_load(const gchar *path)
        if (fread(&buf, sizeof(char), 9, f) != 9 ||
            strncmp(buf, "SIMcache", 8) != 0)
                {
-               DEBUG_1("%s is not a cache file\n", cd->path);
+               DEBUG_1("%s is not a cache file", cd->path);
                success = 0;
                }
 
@@ -601,7 +601,7 @@ gint cache_ensure_dir_exists(gchar *path, mode_t mode)
                                        }
                                if (!isdir(path))
                                        {
-                                       DEBUG_1("creating sub dir:%s\n", path);
+                                       DEBUG_1("creating sub dir:%s", path);
                                        if (!mkdir_utf8(path, mode))
                                                {
                                                printf("create dir failed: %s\n", path);
@@ -770,7 +770,7 @@ gint cache_time_valid(const gchar *cache, const gchar *path)
                        if (utime(cachel, &ut) < 0 &&
                            errno == EPERM)
                                {
-                               DEBUG_1("cache permission workaround: %s\n", cachel);
+                               DEBUG_1("cache permission workaround: %s", cachel);
                                ret = TRUE;
                                }
                        }
index 4a9954b..1c10006 100644 (file)
@@ -155,7 +155,7 @@ static gint cache_maintain_home_cb(gpointer data)
 
        if (!cm->list)
                {
-               DEBUG_1("purge chk done.\n");
+               DEBUG_1("purge chk done.");
                cm->idle_id = -1;
                cache_maintain_home_stop(cm);
                return FALSE;
@@ -163,7 +163,7 @@ static gint cache_maintain_home_cb(gpointer data)
 
        path = cm->list->data;
 
-       DEBUG_1("purge chk (%d) \"%s\"\n", (cm->clear && !cm->metadata), path);
+       DEBUG_1("purge chk (%d) \"%s\"", (cm->clear && !cm->metadata), path);
 
        if (g_list_find(cm->done_list, path) == NULL)
                {
@@ -357,7 +357,7 @@ gint cache_maintain_home_dir(const gchar *dir, gint recursive, gint clear)
        GList *flist = NULL;
        gint still_have_a_file = FALSE;
 
-       DEBUG_1("maintainance check: %s\n", dir);
+       DEBUG_1("maintainance check: %s", dir);
 
        base_length = strlen(homedir()) + strlen("/") + strlen(GQ_CACHE_RC_THUMB);
        base = g_strconcat(homedir(), "/", GQ_CACHE_RC_THUMB, dir, NULL);
@@ -373,7 +373,7 @@ gint cache_maintain_home_dir(const gchar *dir, gint recursive, gint clear)
                        if (recursive && strlen(path) > base_length &&
                            !cache_maintain_home_dir(path + base_length, recursive, clear))
                                {
-                               DEBUG_1("Deleting thumb dir: %s\n", path);
+                               DEBUG_1("Deleting thumb dir: %s", path);
                                if (!rmdir_utf8(path))
                                        {
                                        printf("Unable to delete dir: %s\n", path);
@@ -454,7 +454,7 @@ gint cache_maintain_dir(const gchar *dir, gint recursive, gint clear)
                                {
                                if (!unlink_file(path))
                                        {
-                                       DEBUG_1("Failed to remove cache file %s\n", path);
+                                       DEBUG_1("Failed to remove cache file %s", path);
                                        still_have_a_file = TRUE;
                                        }
                                }
@@ -495,7 +495,7 @@ static void cache_file_move(const gchar *src, const gchar *dest)
 
        if (!move_file(src, dest))
                {
-               DEBUG_1("Failed to move cache file %s\nto %s\n", src, dest);
+               DEBUG_1("Failed to move cache file \"%s\" to \"%s\"", src, dest);
                /* we remove it anyway - it's stale */
                unlink_file(src);
                }
@@ -556,7 +556,7 @@ static void cache_file_remove(const gchar *path)
 {
        if (path && isfile(path) && !unlink_file(path))
                {
-               DEBUG_1("Failed to remove cache file %s\n", path);
+               DEBUG_1("Failed to remove cache file %s", path);
                }
 }
 
@@ -597,7 +597,7 @@ void cache_maint_copied(FileData *fd)
                path = cache_get_location(CACHE_TYPE_METADATA, fd->change->dest, TRUE, NULL);
                if (!copy_file(src_cache, path))
                        {
-                       DEBUG_1("failed to copy metadata %s to %s\n", src_cache, path);
+                       DEBUG_1("failed to copy metadata %s to %s", src_cache, path);
                        }
                g_free(path);
                }
@@ -928,7 +928,7 @@ static gint cache_manager_standard_clean_clear_cb(gpointer data)
                next_path = cd->list->data;
                cd->list = g_list_remove(cd->list, next_path);
 
-               DEBUG_1("thumb removed: %s\n", next_path);
+               DEBUG_1("thumb removed: %s", next_path);
 
                unlink_file(next_path);
                g_free(next_path);
@@ -956,7 +956,7 @@ static void cache_manager_standard_clean_valid_cb(const gchar *path, gint valid,
                {
                if (!valid)
                        {
-                       DEBUG_1("thumb cleaned: %s\n", path);
+                       DEBUG_1("thumb cleaned: %s", path);
                        unlink_file(path);
                        }
 
index 5128834..2705213 100644 (file)
@@ -92,7 +92,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
 
        if (!path) path = cd->path;
 
-       DEBUG_1("collection load: append=%d flush=%d only_geometry=%d path=%s\n",
+       DEBUG_1("collection load: append=%d flush=%d only_geometry=%d path=%s",
                          append, flush, only_geometry, path);
 
        /* load it */
@@ -156,7 +156,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                                changed |= collect_manager_process_action(entry, &buf);
 
                        valid = (buf[0] == '/' && collection_add_check(cd, file_data_new_simple(buf), FALSE, TRUE));
-                       if (!valid) DEBUG_1("collection invalid file: %s\n", buf);
+                       if (!valid) DEBUG_1("collection invalid file: %s", buf);
                        g_free(buf);
 
                        total++;
@@ -175,7 +175,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                        }
                }
 
-       DEBUG_1("collection files: total = %d fail = %d official=%d gqview=%d geometry=%d\n",
+       DEBUG_1("collection files: total = %d fail = %d official=%d gqview=%d geometry=%d",
                          total, fail, has_official_header, has_gqview_header, has_geometry_header);
 
        fclose(f);
@@ -292,7 +292,7 @@ static void collection_load_thumb_step(CollectionData *cd)
        if (!thumb_loader_start(cd->thumb_loader, ci->fd->path))
                {
                /* error, handle it, do next */
-               DEBUG_1("error loading thumb for %s\n", ci->fd->path);
+               DEBUG_1("error loading thumb for %s", ci->fd->path);
                collection_load_thumb_do(cd);
                collection_load_thumb_step(cd);
                }
@@ -721,7 +721,7 @@ static void collect_manager_refresh(void)
 
 static void collect_manager_process_actions(gint max)
 {
-       if (collection_manager_action_list) DEBUG_1("collection manager processing actions\n");
+       if (collection_manager_action_list) DEBUG_1("collection manager processing actions");
        
        while (collection_manager_action_list != NULL && max > 0)
                {
@@ -820,13 +820,13 @@ static gint collect_manager_process_cb(gpointer data)
 
        if (collect_manager_process_entry_list()) return TRUE;
 
-       DEBUG_1("collection manager is up to date\n");
+       DEBUG_1("collection manager is up to date");
        return FALSE;
 }
 
 static gint collect_manager_timer_cb(gpointer data)
 {
-       DEBUG_1("collection manager timer expired\n");
+       DEBUG_1("collection manager timer expired");
 
        g_idle_add_full(G_PRIORITY_LOW, collect_manager_process_cb, NULL, NULL);
 
@@ -848,7 +848,7 @@ static void collect_manager_timer_push(gint stop)
                {
                collection_manager_timer_id = g_timeout_add(COLLECT_MANAGER_FLUSH_DELAY,
                                                            collect_manager_timer_cb, NULL);
-               DEBUG_1("collection manager timer started\n");
+               DEBUG_1("collection manager timer started");
                }
 }
 
@@ -925,6 +925,6 @@ void collect_manager_flush(void)
 {
        collect_manager_timer_push(TRUE);
 
-       DEBUG_1("collection manager flushing\n");
+       DEBUG_1("collection manager flushing");
        while (collect_manager_process_cb(NULL));
 }
index c8bb8f8..e27c0a8 100644 (file)
@@ -406,7 +406,7 @@ static void collection_table_select_region_util(CollectTable *ct, CollectInfo *s
                col2 = t;
                }
 
-       DEBUG_1("table: %d x %d to %d x %d\n", row1, col1, row2, col2);
+       DEBUG_1("table: %d x %d to %d x %d", row1, col1, row2, col2);
 
        for (i = row1; i <= row2; i++)
                {
@@ -1652,7 +1652,7 @@ static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint
 
        collection_table_populate(ct, TRUE);
 
-       DEBUG_1("col tab pop cols=%d rows=%d\n", ct->columns, ct->rows);
+       DEBUG_1("col tab pop cols=%d rows=%d", ct->columns, ct->rows);
 }
 
 static void collection_table_sync(CollectTable *ct)
@@ -2072,7 +2072,7 @@ static void collection_table_dnd_receive(GtkWidget *widget, GdkDragContext *cont
        CollectInfo *drop_info;
        GList *work;
 
-       DEBUG_1("%s\n", selection_data->data);
+       DEBUG_1("%s", selection_data->data);
 
        collection_table_scroll(ct, FALSE);
        collection_table_insert_marker(ct, NULL, FALSE);
index 431b996..bfaa8f3 100644 (file)
@@ -365,7 +365,7 @@ void collection_free(CollectionData *cd)
 {
        if (!cd) return;
 
-       DEBUG_1("collection \"%s\" freed\n", cd->name);
+       DEBUG_1("collection \"%s\" freed", cd->name);
 
        collection_load_stop(cd);
        collection_list_free(cd->list);
@@ -384,14 +384,14 @@ void collection_ref(CollectionData *cd)
 {
        cd->ref++;
 
-       DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
+       DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref);
 }
 
 void collection_unref(CollectionData *cd)
 {
        cd->ref--;
 
-       DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref);
+       DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref);
 
        if (cd->ref < 1)
                {
@@ -624,7 +624,7 @@ gint collection_add_check(CollectionData *cd, FileData *fd, gint sorted, gint mu
 
                ci = collection_info_new_if_not_exists(cd, &st, fd);
                if (!ci) return FALSE;
-               DEBUG_3("add to collection: %s\n", fd->path);
+               DEBUG_3("add to collection: %s", fd->path);
 
                cd->list = collection_list_add(cd->list, ci, sorted ? cd->sort_method : SORT_NONE);
                cd->changed = TRUE;
@@ -660,7 +660,7 @@ gint collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci,
                ci = collection_info_new_if_not_exists(cd, &st, fd);
                if (!ci) return FALSE;
 
-               DEBUG_3("insert in collection: %s\n", fd->path);
+               DEBUG_3("insert in collection: %s", fd->path);
 
                cd->list = collection_list_insert(cd->list, ci, insert_ci, sorted ? cd->sort_method : SORT_NONE);
                cd->changed = TRUE;
index 28500cd..1b69150 100644 (file)
@@ -164,7 +164,7 @@ static ColorManCache *color_man_cache_new(ColorManProfileType in_type, const gch
 
        if (!cc->profile_in || !cc->profile_out)
                {
-               DEBUG_1("failed to load color profile for %s: %d %s\n",
+               DEBUG_1("failed to load color profile for %s: %d %s",
                                  (!cc->profile_in) ? "input" : "screen",
                                  (!cc->profile_in) ? cc->profile_in_type : cc->profile_out_type,
                                  (!cc->profile_in) ? cc->profile_in_file : cc->profile_out_file);
@@ -181,7 +181,7 @@ static ColorManCache *color_man_cache_new(ColorManProfileType in_type, const gch
 
        if (!cc->transform)
                {
-               DEBUG_1("failed to create color profile transform\n");
+               DEBUG_1("failed to create color profile transform");
 
                color_man_cache_unref(cc);
                return NULL;
index 2969363..e2b5c0d 100644 (file)
@@ -965,7 +965,7 @@ static GList *dupe_match_unlink_by_rank(DupeItem *child, DupeItem *parent, GList
                GList *work;
                gdouble rank;
 
-               DEBUG_2("link found %s to %s [%d]\n", child->fd->name, parent->fd->name, g_list_length(parent->group));
+               DEBUG_2("link found %s to %s [%d]", child->fd->name, parent->fd->name, g_list_length(parent->group));
 
                work = parent->group;
                while (work)
@@ -994,7 +994,7 @@ static GList *dupe_match_unlink_by_rank(DupeItem *child, DupeItem *parent, GList
                }
        else
                {
-               DEBUG_2("unlinking %s and %s\n", child->fd->name, parent->fd->name);
+               DEBUG_2("unlinking %s and %s", child->fd->name, parent->fd->name);
 
                dupe_match_unlink(child, parent);
                }
@@ -1099,9 +1099,9 @@ static void dupe_match_rank(DupeWindow *dw)
 
        if (debug >= 2) dupe_match_print_list(list);
 
-       DEBUG_1("Similar items: %d\n", g_list_length(list));
+       DEBUG_1("Similar items: %d", g_list_length(list));
        list = dupe_match_group_trim(list, dw);
-       DEBUG_1("Unique groups: %d\n", g_list_length(list));
+       DEBUG_1("Unique groups: %d", g_list_length(list));
 
        dupe_match_sort_groups(list);
 
@@ -1185,7 +1185,7 @@ static gint dupe_match(DupeItem *a, DupeItem *b, DupeMatchType mask, gdouble *ra
 
                if (f < m) return FALSE;
 
-               DEBUG_3("similar: %32s %32s = %f\n", a->fd->name, b->fd->name, f);
+               DEBUG_3("similar: %32s %32s = %f", a->fd->name, b->fd->name, f);
                }
 
        return TRUE;
@@ -1340,7 +1340,7 @@ static void dupe_thumb_step(DupeWindow *dw)
        if (!thumb_loader_start(dw->thumb_loader, di->fd->path))
                {
                /* error, handle it, do next */
-               DEBUG_1("error loading thumb for %s\n", di->fd->path);
+               DEBUG_1("error loading thumb for %s", di->fd->path);
                dupe_thumb_do(dw);
                dupe_thumb_step(dw);
                }
index e761acf..efafc87 100644 (file)
@@ -644,7 +644,7 @@ gint exif_jpeg_parse_color(ExifData *exif, unsigned char *data, guint size)
                                }
                        memcpy(cp_data, data + chunk_offset[i], chunk_length[i]);
                        }
-               DEBUG_1("Found embedded icc profile in jpeg\n");
+               DEBUG_1("Found embedded icc profile in jpeg");
                exif_add_jpeg_color_profile(exif, cp_data, cp_length);
 
                return TRUE;
index cf55d41..8483579 100644 (file)
@@ -84,7 +84,7 @@ struct _ExifData
                image->readMetadata();
 
 #if EXIV2_TEST_VERSION(0,16,0)
-               DEBUG_2("xmp count %li\n", image->xmpData().count());
+               DEBUG_2("xmp count %li", image->xmpData().count());
                if (sidecar_path && image->xmpData().empty())
                        {
                        gchar *sidecar_pathl = path_from_utf8(sidecar_path);
@@ -92,7 +92,7 @@ struct _ExifData
                        g_free(sidecar_pathl);
                        sidecar->readMetadata();
                        have_sidecar = sidecar->good();
-                       DEBUG_2("sidecar xmp count %li\n", sidecar->xmpData().count());
+                       DEBUG_2("sidecar xmp count %li", sidecar->xmpData().count());
                        }
 
 #endif
@@ -145,7 +145,7 @@ extern "C" {
 
 ExifData *exif_read(gchar *path, gchar *sidecar_path)
 {
-       DEBUG_1("exif read %s,  sidecar: %s\n", path, sidecar_path ? sidecar_path : "-");
+       DEBUG_1("exif read %s, sidecar: %s", path, sidecar_path ? sidecar_path : "-");
        try {
                return new ExifData(path, sidecar_path);
        }
@@ -769,7 +769,7 @@ extern "C" gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
        try {
                RawFile rf(fd);
                offset = rf.preview_offset();
-               DEBUG_1("%s: offset %lu\n", path, offset);
+               DEBUG_1("%s: offset %lu", path, offset);
        }
        catch (Exiv2::AnyError& e) {
                std::cout << "Caught Exiv2 exception '" << e << "'\n";
index 5d91913..750d34a 100644 (file)
@@ -199,7 +199,7 @@ void filter_add_defaults(void)
                        i++;
                        }
 
-               DEBUG_1("loader reported [%s] [%s] [%s]\n", name, desc, filter->str);
+               DEBUG_1("loader reported [%s] [%s] [%s]", name, desc, filter->str);
 
                filter_add_if_missing(name, desc, filter->str, FORMAT_CLASS_IMAGE, TRUE);
 
@@ -767,7 +767,7 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
 {
        FileData *fd;
 
-       DEBUG_1("file_data_new: '%s' %d\n", path_utf8, check_sidecars);
+       DEBUG_1("file_data_new: '%s' %d", path_utf8, check_sidecars);
 
        if (!file_data_pool)
                file_data_pool = g_hash_table_new (g_str_hash, g_str_equal);
@@ -776,7 +776,7 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
        if (fd)
                {
                file_data_check_changed_files(fd, st);
-               DEBUG_1("file_data_pool hit: '%s'\n", fd->path);
+               DEBUG_1("file_data_pool hit: '%s'", fd->path);
                return file_data_ref(fd);
                }
 
@@ -930,7 +930,7 @@ void file_data_unref(FileData *fd)
        g_assert(fd->magick == 0x12345678);
 
        fd->ref--;
-       DEBUG_1("file_data_unref (%d): '%s'\n", fd->ref, fd->path);
+       DEBUG_1("file_data_unref (%d): '%s'", fd->ref, fd->path);
 
        if (fd->ref == 0)
                {
@@ -952,7 +952,7 @@ void file_data_unref(FileData *fd)
 
                /* none of parent/children is referenced, we can free everything */
 
-               DEBUG_1("file_data_unref: deleting '%s', parent '%s'\n", fd->path, parent->path);
+               DEBUG_1("file_data_unref: deleting '%s', parent '%s'", fd->path, parent->path);
 
                work = parent->sidecar_files;
                while (work)
index c32ed4c..fc62896 100644 (file)
@@ -244,7 +244,7 @@ static gint format_raw_parse(FormatRawEntry *entry,
 
        if (!entry || !entry->func_parse) return FALSE;
 
-       DEBUG_1("RAW using file parser for %s\n", entry->description);
+       DEBUG_1("RAW using file parser for %s", entry->description);
 
        found = entry->func_parse(data, len, &io, &eo);
 
@@ -334,7 +334,7 @@ gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
 
                if (!match) return FALSE;
 
-               DEBUG_1("RAW file parser extension match\n");
+               DEBUG_1("RAW file parser extension match");
                }
 
        /* FIXME:
@@ -427,7 +427,7 @@ gint format_exif_makernote_parse(ExifData *exif, unsigned char *tiff, guint offs
 
        if (!entry || !entry->func_parse) return FALSE;
 
-       DEBUG_1("EXIF using makernote parser for %s\n", entry->description);
+       DEBUG_1("EXIF using makernote parser for %s", entry->description);
 
        return entry->func_parse(exif, tiff, offset, size, bo);
 }
index 252b15b..86a5c03 100644 (file)
@@ -235,7 +235,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
        fs->stop_func = stop_func;
        fs->stop_data = stop_data;
 
-       DEBUG_1("full screen requests screen %d\n", options->fullscreen.screen);
+       DEBUG_1("full screen requests screen %d", options->fullscreen.screen);
        fullscreen_prefs_get_geometry(options->fullscreen.screen, window, &x, &y, &w, &h,
                                      &screen, &same);
 
@@ -407,7 +407,7 @@ GList *fullscreen_prefs_list(void)
                        sd->width = rect.width;
                        sd->height = rect.height;
 
-                       DEBUG_1("Screen %d %30s %4d,%4d (%4dx%4d)\n",
+                       DEBUG_1("Screen %d %30s %4d,%4d (%4dx%4d)",
                                          sd->number, sd->description, sd->x, sd->y, sd->width, sd->height);
 
                        list = g_list_append(list, sd);
@@ -567,7 +567,7 @@ gint fullscreen_prefs_find_screen_for_widget(GtkWidget *widget)
 
        n = (gdk_screen_get_number(screen)+1) * 100 + monitor + 1;
 
-       DEBUG_1("Screen appears to be %d\n", n);
+       DEBUG_1("Screen appears to be %d", n);
 
        return n;
 }
index e9558b0..e5647d5 100644 (file)
@@ -180,7 +180,7 @@ static void image_loader_error(ImageLoader *il)
 {
        image_loader_stop(il);
 
-       DEBUG_1("pixbuf_loader reported load error for: %s\n", image_loader_path(il));
+       DEBUG_1("pixbuf_loader reported load error for: %s", image_loader_path(il));
 
        if (il->func_error) il->func_error(il, il->data_error);
 }
@@ -237,7 +237,7 @@ static gint image_loader_begin(ImageLoader *il)
        if (b > 0 &&
            format_raw_img_exif_offsets_fd(il->load_fd, image_loader_path(il), il->read_buffer, b, &offset, NULL))
                {
-               DEBUG_1("Raw file %s contains embedded image\n", image_loader_path(il));
+               DEBUG_1("Raw file %s contains embedded image", image_loader_path(il));
 
                b = read(il->load_fd, il->read_buffer, il->read_buffer_size);
                }
@@ -350,7 +350,7 @@ static ImageLoader *image_loader_new_real(FileData *fd, const gchar *path)
        il->requested_width = 0;
        il->requested_height = 0;
        il->shrunk = FALSE;
-       DEBUG_1("new image loader %p, bufsize=%u idle_loop=%u\n", il, il->read_buffer_size, il->idle_read_loop_count);
+       DEBUG_1("new image loader %p, bufsize=%u idle_loop=%u", il, il->read_buffer_size, il->idle_read_loop_count);
        return il;
 }
 
@@ -374,7 +374,7 @@ void image_loader_free(ImageLoader *il)
        if (il->fd) file_data_unref(il->fd);
        if (il->path) g_free(il->path);
        if (il->read_buffer) g_free(il->read_buffer);
-       DEBUG_1("freeing image loader %p bytes_read=%d\n", il, il->bytes_read);
+       DEBUG_1("freeing image loader %p bytes_read=%d", il, il->bytes_read);
        g_free(il);
 }
 
index aa55560..ffe5fce 100644 (file)
@@ -121,7 +121,7 @@ static void image_complete_util(ImageWindow *imd, gint preload)
 {
        if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return;
 
-       DEBUG_1("%s image load completed \"%s\" (%s)\n", get_exec_time(),
+       DEBUG_1("%s image load completed \"%s\" (%s)", get_exec_time(),
                          (preload) ? (imd->read_ahead_fd ? imd->read_ahead_fd->path : "null") :
                                      (imd->image_fd ? imd->image_fd->path : "null"),
                          (preload) ? "preload" : "current");
@@ -297,7 +297,7 @@ static void image_alter_real(ImageWindow *imd, AlterType type, gint clamp)
 
        if (exif_rotate) image_state_set(imd, IMAGE_STATE_ROTATE_AUTO);
        layout_image_overlay_update(layout_find_by_image(imd));
-       DEBUG_1("%s image postprocess done: %s\n", get_exec_time(), imd->image_fd->name);
+       DEBUG_1("%s image postprocess done: %s", get_exec_time(), imd->image_fd->name);
 }
 
 static void image_post_process_alter(ImageWindow *imd, gint clamp)
@@ -322,7 +322,7 @@ static void image_post_process_color_cb(ColorMan *cm, ColorManReturnType type, g
 
        imd->cm = NULL;
        image_state_set(imd, IMAGE_STATE_COLOR_ADJ);
-       DEBUG_1("%s image postprocess cm done: %s\n", get_exec_time(), imd->image_fd->name);
+       DEBUG_1("%s image postprocess cm done: %s", get_exec_time(), imd->image_fd->name);
 
        image_post_process_alter(imd, FALSE);
 
@@ -399,7 +399,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                                input_file = NULL;
                                imd->color_profile_from_image = COLOR_PROFILE_SRGB;
 
-                               DEBUG_1("Found EXIF ColorSpace of sRGB\n");
+                               DEBUG_1("Found EXIF ColorSpace of sRGB");
                                }
                        if (cs == 2 || (interop_index && !strcmp(interop_index, "R03")))
                                {
@@ -407,7 +407,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                                input_file = NULL;
                                imd->color_profile_from_image = COLOR_PROFILE_ADOBERGB;
 
-                               DEBUG_1("Found EXIF ColorSpace of AdobeRGB\n");
+                               DEBUG_1("Found EXIF ColorSpace of AdobeRGB");
                                }
 
                        g_free(interop_index);
@@ -416,7 +416,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
 
        if (profile)
                {
-               DEBUG_1("Found embedded color profile\n");
+               DEBUG_1("Found embedded color profile");
                imd->color_profile_from_image = COLOR_PROFILE_MEM;
 
                cm = color_man_new_embedded(run_in_bg ? imd : NULL, NULL,
@@ -456,7 +456,7 @@ static void image_post_process(ImageWindow *imd, gint clamp)
 
        if (!image_get_pixbuf(imd)) return;
 
-       DEBUG_1("%s image postprocess: %s\n", get_exec_time(), imd->image_fd->name);
+       DEBUG_1("%s image postprocess: %s", get_exec_time(), imd->image_fd->name);
 
        if (options->image.exif_rotate_enable ||
            (imd->color_profile_enable && imd->color_profile_use_image) )
@@ -617,7 +617,7 @@ void image_alter(ImageWindow *imd, AlterType type)
 
 static void image_read_ahead_cancel(ImageWindow *imd)
 {
-       DEBUG_1("%s read ahead cancelled for :%s\n", get_exec_time(), imd->read_ahead_fd ? imd->read_ahead_fd->path : "null");
+       DEBUG_1("%s read ahead cancelled for :%s", get_exec_time(), imd->read_ahead_fd ? imd->read_ahead_fd->path : "null");
 
        image_loader_free(imd->read_ahead_il);
        imd->read_ahead_il = NULL;
@@ -633,7 +633,7 @@ static void image_read_ahead_done_cb(ImageLoader *il, gpointer data)
 {
        ImageWindow *imd = data;
 
-       DEBUG_1("%s read ahead done for :%s\n", get_exec_time(), imd->read_ahead_fd->path);
+       DEBUG_1("%s read ahead done for :%s", get_exec_time(), imd->read_ahead_fd->path);
 
        imd->read_ahead_pixbuf = image_loader_get_pixbuf(imd->read_ahead_il);
        if (imd->read_ahead_pixbuf)
@@ -664,7 +664,7 @@ static void image_read_ahead_start(ImageWindow *imd)
        /* still loading ?, do later */
        if (imd->il /*|| imd->cm*/) return;
 
-       DEBUG_1("%s read ahead started for :%s\n", get_exec_time(), imd->read_ahead_fd->path);
+       DEBUG_1("%s read ahead started for :%s", get_exec_time(), imd->read_ahead_fd->path);
 
        imd->read_ahead_il = image_loader_new(imd->read_ahead_fd);
 
@@ -684,7 +684,7 @@ static void image_read_ahead_set(ImageWindow *imd, FileData *fd)
 
        imd->read_ahead_fd = file_data_ref(fd);
 
-       DEBUG_1("read ahead set to :%s\n", imd->read_ahead_fd->path);
+       DEBUG_1("read ahead set to :%s", imd->read_ahead_fd->path);
 
        image_read_ahead_start(imd);
 }
@@ -715,7 +715,7 @@ static void image_post_buffer_set(ImageWindow *imd, FileData *fd, GdkPixbuf *pix
                imd->prev_color_row = -1;
                }
 
-       DEBUG_1("%s post buffer set: %s\n", get_exec_time(), fd ? fd->path : "null");
+       DEBUG_1("%s post buffer set: %s", get_exec_time(), fd ? fd->path : "null");
 }
 
 static gint image_post_buffer_get(ImageWindow *imd)
@@ -785,7 +785,7 @@ static void image_load_done_cb(ImageLoader *il, gpointer data)
 {
        ImageWindow *imd = data;
 
-       DEBUG_1 ("%s image done\n", get_exec_time());
+       DEBUG_1("%s image done", get_exec_time());
 
        g_object_set(G_OBJECT(imd->pr), "loading", FALSE, NULL);
        image_state_unset(imd, IMAGE_STATE_LOADING);
@@ -807,7 +807,7 @@ static void image_load_done_cb(ImageLoader *il, gpointer data)
 
 static void image_load_error_cb(ImageLoader *il, gpointer data)
 {
-       DEBUG_1 ("%s image error\n", get_exec_time());
+       DEBUG_1("%s image error", get_exec_time());
 
        /* even on error handle it like it was done,
         * since we have a pixbuf with _something_ */
@@ -888,7 +888,7 @@ static gint image_read_ahead_check(ImageWindow *imd)
 
 static gint image_load_begin(ImageWindow *imd, FileData *fd)
 {
-       DEBUG_1 ("%s image begin \n", get_exec_time());
+       DEBUG_1("%s image begin", get_exec_time());
 
        if (imd->il) return FALSE;
 
@@ -897,13 +897,13 @@ static gint image_load_begin(ImageWindow *imd, FileData *fd)
 
        if (image_post_buffer_get(imd))
                {
-               DEBUG_1("from post buffer: %s\n", imd->image_fd->path);
+               DEBUG_1("from post buffer: %s", imd->image_fd->path);
                return TRUE;
                }
 
        if (image_read_ahead_check(imd))
                {
-               DEBUG_1("from read ahead buffer: %s\n", imd->image_fd->path);
+               DEBUG_1("from read ahead buffer: %s", imd->image_fd->path);
                return TRUE;
                }
 
@@ -926,7 +926,7 @@ static gint image_load_begin(ImageWindow *imd, FileData *fd)
 
        if (!image_loader_start(imd->il, image_load_done_cb, imd))
                {
-               DEBUG_1("image start error\n");
+               DEBUG_1("image start error");
 
                g_object_set(G_OBJECT(imd->pr), "loading", FALSE, NULL);
 
@@ -953,7 +953,7 @@ static void image_reset(ImageWindow *imd)
 {
        /* stops anything currently being done */
 
-       DEBUG_1("%s image reset\n", get_exec_time());
+       DEBUG_1("%s image reset", get_exec_time());
 
        g_object_set(G_OBJECT(imd->pr), "loading", FALSE, NULL);
 
index efaaa3f..6c4c63c 100644 (file)
@@ -1032,7 +1032,7 @@ void layout_refresh(LayoutWindow *lw)
 {
        if (!layout_valid(&lw)) return;
 
-       DEBUG_1("layout refresh\n");
+       DEBUG_1("layout refresh");
 
        layout_refresh_lists(lw);
 
@@ -1053,7 +1053,7 @@ static gint layout_check_for_update_cb(gpointer data)
 
                if (new_time > 0 && new_time > lw->last_time)
                        {
-                       DEBUG_1("layout path time changed, refreshing...\n");
+                       DEBUG_1("layout path time changed, refreshing...");
                        layout_refresh_by_time(lw);
                        }
                }
index 2560969..71c7b39 100644 (file)
@@ -858,7 +858,7 @@ static void layout_image_dnd_receive(GtkWidget *widget, GdkDragContext *context,
                }
        if (i < MAX_SPLIT_IMAGES)
                {
-               DEBUG_1("dnd image activate %d\n", i);
+               DEBUG_1("dnd image activate %d", i);
                layout_image_activate(lw, i);
                }
 
@@ -938,7 +938,7 @@ static void layout_image_dnd_get(GtkWidget *widget, GdkDragContext *context,
                }
        if (i < MAX_SPLIT_IMAGES)
                {
-               DEBUG_1("dnd get from %d\n", i);
+               DEBUG_1("dnd get from %d", i);
                fd = image_get_fd(lw->split_images[i]);
                }
        else
@@ -1571,7 +1571,7 @@ static void layout_image_scroll_cb(ImageWindow *imd, GdkScrollDirection directio
 
        if (i != -1)
                {
-               DEBUG_1("image activate scroll %d\n", i);
+               DEBUG_1("image activate scroll %d", i);
                layout_image_activate(lw, i);
                }
 
index 4da5551..607f739 100644 (file)
@@ -220,7 +220,7 @@ static void help_browser_command(const gchar *command, const gchar *path)
 
        if (!command || !path) return;
 
-       DEBUG_1("Help command pre \"%s\", \"%s\"\n", command, path);
+       DEBUG_1("Help command pre \"%s\", \"%s\"", command, path);
 
        buf = g_strdup(command);
        begin = strstr(buf, "%s");
@@ -238,7 +238,7 @@ static void help_browser_command(const gchar *command, const gchar *path)
                }
        g_free(buf);
 
-       DEBUG_1("Help command post [%s]\n", result);
+       DEBUG_1("Help command post [%s]", result);
 
        system(result);
 
@@ -1162,7 +1162,7 @@ static void parse_command_line_for_debug_option(int argc, char *argv[])
                        }
                }
 
-       DEBUG_1("debugging output enabled (level %d)\n", debug);
+       DEBUG_1("debugging output enabled (level %d)", debug);
 #endif
 }
 
index bf182fb..254c9f0 100644 (file)
                                        {               \
                                        if (debug != 1) printf("%s:%d: ", __FILE__, __LINE__); \
                                        printf(__VA_ARGS__); \
+                                       putchar('\n'); \
                                        } \
                                } while (0)
 #else
index a480fde..b6f315f 100644 (file)
@@ -236,7 +236,7 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
                        }
                }
 
-       DEBUG_1("biggest day contains %d images\n", day_max);
+       DEBUG_1("biggest day contains %d images", day_max);
 
        grid = (gint)(sqrt((double)day_max) + 0.5) * (PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2 + PAN_THUMB_GAP);
        day_width = MAX(PAN_CAL_DAY_WIDTH, grid);
index 16b9e6c..cd975b1 100644 (file)
@@ -773,7 +773,7 @@ static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_siz
        row = row * 2 - 1;
        col = col * 2 - 1;
 
-       DEBUG_1("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size);
+       DEBUG_1("intersect speedup grid is %dx%d, based on %d average per grid", col, row, grid_size);
 
        for (j = 0; j < row; j++)
            for (i = 0; i < col; i++)
@@ -791,7 +791,7 @@ static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_siz
 
                        pw->list_grid = g_list_prepend(pw->list_grid, pg);
 
-                       DEBUG_1("grid section: %d,%d (%dx%d)\n", pg->x, pg->y, pg->w, pg->h);
+                       DEBUG_1("grid section: %d,%d (%dx%d)", pg->x, pg->y, pg->w, pg->h);
                        }
                }
 
@@ -961,7 +961,7 @@ static void pan_layout_compute(PanWindow *pw, const gchar *path,
 
        pan_cache_free(pw);
 
-       DEBUG_1("computed %d objects\n", g_list_length(pw->list));
+       DEBUG_1("computed %d objects", g_list_length(pw->list));
 }
 
 static GList *pan_layout_intersect_l(GList *list, GList *item_list,
@@ -1117,7 +1117,7 @@ static gint pan_layout_update_idle_cb(gpointer data)
                {
                gdouble align;
 
-               DEBUG_1("Canvas size is %d x %d\n", width, height);
+               DEBUG_1("Canvas size is %d x %d", width, height);
 
                pan_grid_build(pw, width, height, 1000);
 
@@ -1499,7 +1499,7 @@ static void pan_info_update(PanWindow *pw, PanItem *pi)
 
        if (!pi) return;
 
-       DEBUG_1("info set to %s\n", pi->fd->path);
+       DEBUG_1("info set to %s", pi->fd->path);
 
        pbox = pan_item_box_new(pw, NULL, pi->x + pi->width + 4, pi->y, 10, 10,
                                PAN_POPUP_BORDER,
index b5a4f61..9b6abc8 100644 (file)
@@ -2988,7 +2988,7 @@ static void pr_update_signal(PixbufRenderer *pr)
 #if 0
        printf("FIXME: send updated signal\n");
 #endif
-       DEBUG_1("%s pixbuf renderer updated - started drawing %p\n", get_exec_time(), pr);
+       DEBUG_1("%s pixbuf renderer updated - started drawing %p", get_exec_time(), pr);
        pr->debug_updated = TRUE;
 }
 
@@ -3016,7 +3016,7 @@ static void pr_render_complete_signal(PixbufRenderer *pr)
                }
        if (pr->debug_updated)
                {
-               DEBUG_1("%s pixbuf renderer done %p\n", get_exec_time(), pr);
+               DEBUG_1("%s pixbuf renderer done %p", get_exec_time(), pr);
                pr->debug_updated = FALSE;
                }
 }
index c1b7c62..9dc490d 100644 (file)
@@ -932,7 +932,7 @@ static GList *print_window_list_printers(void)
                while (*end != '\0' && *end != '\n' && *end != ' ' && *end != '\t') end++;
                *end = '\0';
                list = g_list_append(list, g_strdup(ptr));
-               DEBUG_1("adding printer: %s\n", ptr);
+               DEBUG_1("adding printer: %s", ptr);
                }
 
        pclose(p);
index dce5ec4..0729ea7 100644 (file)
@@ -97,7 +97,8 @@ static gboolean remote_server_client_cb(GIOChannel *source, GIOCondition conditi
                {
                rc->clients = g_list_remove(rc->clients, client);
 
-               DEBUG_1("HUP detected, closing client.\nclient count %d\n", g_list_length(rc->clients));
+               DEBUG_1("HUP detected, closing client.");
+               DEBUG_1("client count %d", g_list_length(rc->clients));
                
                g_source_remove(client->channel_id);
                close(client->fd);
@@ -129,7 +130,7 @@ static void remote_server_client_add(RemoteConnection *rc, int fd)
        g_io_channel_unref(channel);
 
        rc->clients = g_list_append(rc->clients, client);
-       DEBUG_1("client count %d\n", g_list_length(rc->clients));
+       DEBUG_1("client count %d", g_list_length(rc->clients));
 }
 
 static void remote_server_clients_close(RemoteConnection *rc)
@@ -252,7 +253,7 @@ RemoteConnection *remote_client_open(const gchar *path)
        strncpy(addr.sun_path, path, sun_path_len);
        if (connect(fd, &addr, sizeof(addr)) == -1)
                {
-               DEBUG_1("error connecting to socket: %s\n", strerror(errno));
+               DEBUG_1("error connecting to socket: %s", strerror(errno));
                close(fd);
                return NULL;
                }
index 9dad66e..fa8768f 100644 (file)
@@ -287,7 +287,7 @@ secure_close(SecureSaveInfo *ssi)
                                utime(ssi->tmp_file_name, &tb);
                                }
                        }
-               DEBUG_3("rename %s -> %s\n", ssi->tmp_file_name, ssi->file_name);
+               DEBUG_3("rename %s -> %s", ssi->tmp_file_name, ssi->file_name);
                if (g_rename(ssi->tmp_file_name, ssi->file_name) == -1) {
                        ret = errno;
                        secsave_errno = SS_ERR_RENAME;
index 18ee96e..94f3015 100644 (file)
@@ -55,7 +55,7 @@ static gint thumb_loader_save_to_cache(ThumbLoader *tl)
                cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path),
                                         GQ_CACHE_EXT_THUMB, NULL);
 
-               DEBUG_1("Saving thumb: %s\n", cache_path);
+               DEBUG_1("Saving thumb: %s", cache_path);
 
                pathl = path_from_utf8(cache_path);
                success = pixbuf_to_file_as_png(tl->pixbuf, pathl);
@@ -72,7 +72,7 @@ static gint thumb_loader_save_to_cache(ThumbLoader *tl)
                        }
                else
                        {
-                       DEBUG_1("Saving failed: %s\n", pathl);
+                       DEBUG_1("Saving failed: %s", pathl);
                        }
 
                g_free(pathl);
@@ -103,7 +103,7 @@ static gint thumb_loader_mark_failure(ThumbLoader *tl)
                cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path),
                                         GQ_CACHE_EXT_THUMB, NULL);
 
-               DEBUG_1("marking thumb failure: %s\n", cache_path);
+               DEBUG_1("marking thumb failure: %s", cache_path);
 
                pathl = path_from_utf8(cache_path);
                f = fopen(pathl, "w");
@@ -146,12 +146,12 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
        gint pw, ph;
        gint save;
 
-       DEBUG_1("thumb done: %s\n", tl->path);
+       DEBUG_1("thumb done: %s", tl->path);
 
        pixbuf = image_loader_get_pixbuf(tl->il);
        if (!pixbuf)
                {
-               DEBUG_1("...but no pixbuf: %s\n", tl->path);
+               DEBUG_1("...but no pixbuf: %s", tl->path);
                thumb_loader_error_cb(tl->il, tl);
                return;
                }
@@ -162,7 +162,7 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
        if (tl->cache_hit && pw != tl->max_w && ph != tl->max_h)
                {
                /* requested thumbnail size may have changed, load original */
-               DEBUG_1("thumbnail size mismatch, regenerating: %s\n", tl->path);
+               DEBUG_1("thumbnail size mismatch, regenerating: %s", tl->path);
                tl->cache_hit = FALSE;
 
                thumb_loader_setup(tl, tl->path);
@@ -172,7 +172,7 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
                        image_loader_free(tl->il);
                        tl->il = NULL;
 
-                       DEBUG_1("regeneration failure: %s\n", tl->path);
+                       DEBUG_1("regeneration failure: %s", tl->path);
                        thumb_loader_error_cb(tl->il, tl);
                        }
                return;
@@ -227,7 +227,7 @@ static void thumb_loader_error_cb(ImageLoader *il, gpointer data)
                return;
                }
 
-       DEBUG_1("thumb error: %s\n", tl->path);
+       DEBUG_1("thumb error: %s", tl->path);
 
        image_loader_free(tl->il);
        tl->il = NULL;
@@ -332,16 +332,16 @@ gint thumb_loader_start(ThumbLoader *tl, const gchar *path)
                        {
                        if (cache_time_valid(cache_path, tl->path))
                                {
-                               DEBUG_1("Found in cache:%s\n", tl->path);
+                               DEBUG_1("Found in cache:%s", tl->path);
 
                                if (filesize(cache_path) == 0)
                                        {
-                                       DEBUG_1("Broken image mark found:%s\n", cache_path);
+                                       DEBUG_1("Broken image mark found:%s", cache_path);
                                        g_free(cache_path);
                                        return FALSE;
                                        }
 
-                               DEBUG_1("Cache location:%s\n", cache_path);
+                               DEBUG_1("Cache location:%s", cache_path);
                                }
                        else
                                {
index 7a5d199..e4caf2c 100644 (file)
@@ -235,7 +235,8 @@ static gint thumb_loader_std_fail_check(ThumbLoaderStd *tl)
                        if (mtime_str && strtol(mtime_str, NULL, 10) == tl->source_mtime)
                                {
                                result = TRUE;
-                               DEBUG_1("thumb fail valid: %s\n           thumb: %s\n", tl->source_path, fail_path);
+                               DEBUG_1("thumb fail valid: %s", tl->source_path);
+                               DEBUG_1("           thumb: %s", fail_path);
                                }
 
                        g_object_unref(G_OBJECT(pixbuf));
@@ -332,7 +333,8 @@ static void thumb_loader_std_save(ThumbLoaderStd *tl, GdkPixbuf *pixbuf)
                }
        g_free(base_path);
 
-       DEBUG_1("thumb saving: %s\n       saved: %s\n", tl->source_path, tl->thumb_path);
+       DEBUG_1("thumb saving: %s", tl->source_path);
+       DEBUG_1("       saved: %s", tl->thumb_path);
 
        /* save thumb, using a temp file then renaming into place */
        tmp_path = unique_filename(tl->thumb_path, ".tmp", "_", 2);
@@ -367,10 +369,10 @@ static void thumb_loader_std_save(ThumbLoaderStd *tl, GdkPixbuf *pixbuf)
                g_free(mark_app);
 
                g_free(tmp_path);
-               if (!success && debug)
+               if (!success)
                        {
-                       printf("thumb save failed: %s\n", tl->source_path);
-                       printf("            thumb: %s\n", tl->thumb_path);
+                       DEBUG_1("thumb save failed: %s", tl->source_path);
+                       DEBUG_1("            thumb: %s", tl->thumb_path);
                        }
 
                }
@@ -451,7 +453,7 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf,
 
                        tl->cache_hit = FALSE;
 
-                       DEBUG_1("thumb copied: %s\n", tl->source_path);
+                       DEBUG_1("thumb copied: %s", tl->source_path);
 
                        thumb_loader_std_save(tl, pixbuf);
                        }
@@ -500,7 +502,7 @@ static gint thumb_loader_std_next_source(ThumbLoaderStd *tl, gint remove_broken)
                {
                if (!tl->thumb_path_local && remove_broken)
                        {
-                       DEBUG_1("thumb broken, unlinking: %s\n", tl->thumb_path);
+                       DEBUG_1("thumb broken, unlinking: %s", tl->thumb_path);
                        unlink_file(tl->thumb_path);
                        }
 
@@ -532,12 +534,13 @@ static void thumb_loader_std_done_cb(ImageLoader *il, gpointer data)
        ThumbLoaderStd *tl = data;
        GdkPixbuf *pixbuf;
 
-       DEBUG_1("thumb image done: %s\n            from: %s\n", tl->source_path, tl->il->path);
+       DEBUG_1("thumb image done: %s", tl->source_path);
+       DEBUG_1("            from: %s", tl->il->path);
 
        pixbuf = image_loader_get_pixbuf(tl->il);
        if (!pixbuf)
                {
-               DEBUG_1("...but no pixbuf\n");
+               DEBUG_1("...but no pixbuf");
                thumb_loader_std_error_cb(il, data);
                return;
                }
@@ -568,7 +571,8 @@ static void thumb_loader_std_error_cb(ImageLoader *il, gpointer data)
                return;
                }
        
-       DEBUG_1("thumb image error: %s\n             from: %s\n", tl->source_path, tl->il->fd->path);
+       DEBUG_1("thumb image error: %s", tl->source_path);
+       DEBUG_1("             from: %s", tl->il->fd->path);
 
        if (thumb_loader_std_next_source(tl, TRUE)) return;
 
@@ -805,7 +809,7 @@ static void thumb_loader_std_thumb_file_validate_done_cb(ThumbLoaderStd *tl, gpo
                                {
                                struct stat st;
 
-                               DEBUG_1("thumb uri foreign, doing day check: %s\n", uri);
+                               DEBUG_1("thumb uri foreign, doing day check: %s", uri);
 
                                if (stat_utf8(tv->path, &st))
                                        {
@@ -886,7 +890,7 @@ static void thumb_std_maint_remove_one(const gchar *source, const gchar *uri, gi
                                          local, subfolder);
        if (isfile(thumb_path))
                {
-               DEBUG_1("thumb removing: %s\n", thumb_path);
+               DEBUG_1("thumb removing: %s", thumb_path);
                unlink_file(thumb_path);
                }
        g_free(thumb_path);
@@ -975,12 +979,12 @@ static void thumb_std_maint_move_validate_cb(const gchar *path, gint valid, gpoi
                        tm->tl->thumb_path = NULL;
                        tm->tl->thumb_path_local = FALSE;
 
-                       DEBUG_1("thumb move attempting save:\n");
+                       DEBUG_1("thumb move attempting save:");
 
                        thumb_loader_std_save(tm->tl, pixbuf);
                        }
 
-               DEBUG_1("thumb move unlink: %s\n", tm->thumb_path);
+               DEBUG_1("thumb move unlink: %s", tm->thumb_path);
                unlink_file(tm->thumb_path);
                }
 
index 3800aea..bbb9c02 100644 (file)
@@ -1370,7 +1370,7 @@ static gint file_util_safe_number(gint64 free_space)
                fd = list->data;
                list = g_list_remove(list, fd);
 
-               DEBUG_1("expunging from trash for space: %s\n", fd->name);
+               DEBUG_1("expunging from trash for space: %s", fd->name);
                if (!unlink_file(fd->path) && !warned)
                        {
                        file_util_warning_dialog(_("Delete failed"),
@@ -1428,7 +1428,7 @@ static gint file_util_unlink(FileData *fd)
 
        if (!isdir(options->file_ops.safe_delete_path))
                {
-               DEBUG_1("creating trash: %s\n", options->file_ops.safe_delete_path);
+               DEBUG_1("creating trash: %s", options->file_ops.safe_delete_path);
                if (!options->file_ops.safe_delete_path || !mkdir_utf8(options->file_ops.safe_delete_path, 0755))
                        {
                        result = _("Could not create folder");
@@ -1443,7 +1443,7 @@ static gint file_util_unlink(FileData *fd)
                dest = file_util_safe_dest(fd->path);
                if (dest)
                        {
-                       DEBUG_1("safe deleting %s to %s\n", fd->path, dest);
+                       DEBUG_1("safe deleting %s to %s", fd->path, dest);
                        success = move_file(fd->path, dest);
                        }
                else
@@ -2101,7 +2101,7 @@ static void file_util_rename_multiple(RenameDataMult *rd)
                                }
                        else
                                {
-                               DEBUG_1("closed by #%d\n", row);
+                               DEBUG_1("closed by #%d", row);
 
                                file_dialog_close(rd->fdlg);
                                }
@@ -3183,7 +3183,7 @@ FileData *file_util_delete_dir_empty_path(FileData *fd, gint real_content, gint
        GList *work;
        FileData *fail = NULL;
 
-       DEBUG_1("deltree into: %s\n", fd->path);
+       DEBUG_1("deltree into: %s", fd->path);
 
        level++;
        if (level > UTILITY_DELETE_MAX_DEPTH)
@@ -3213,7 +3213,7 @@ FileData *file_util_delete_dir_empty_path(FileData *fd, gint real_content, gint
                lfd = work->data;
                work = work->next;
 
-               DEBUG_1("deltree child: %s\n", lfd->path);
+               DEBUG_1("deltree child: %s", lfd->path);
 
                if (real_content && !islink(lfd->path))
                        {
@@ -3233,7 +3233,7 @@ FileData *file_util_delete_dir_empty_path(FileData *fd, gint real_content, gint
                fail = file_data_ref(fd);
                }
 
-       DEBUG_1("deltree done: %s\n", fd->path);
+       DEBUG_1("deltree done: %s", fd->path);
 
        return fail;
 }
@@ -3280,7 +3280,7 @@ static void file_util_delete_dir_ok_cb(GenericDialog *gd, gpointer data)
                        fd = work->data;
                        work = work->next;
 
-                       DEBUG_1("deltree unlink: %s\n", fd->path);
+                       DEBUG_1("deltree unlink: %s", fd->path);
 
                        if (islink(fd->path))
                                {
index fb9fe88..59bedc3 100644 (file)
@@ -909,7 +909,7 @@ static void vficon_select_region_util(ViewFileIcon *vfi, IconData *start, IconDa
                col2 = t;
                }
 
-       DEBUG_1("table: %d x %d to %d x %d\n", row1, col1, row2, col2);
+       DEBUG_1("table: %d x %d to %d x %d", row1, col1, row2, col2);
 
        for (i = row1; i <= row2; i++)
                {
@@ -1743,7 +1743,7 @@ static void vficon_populate_at_new_size(ViewFileIcon *vfi, gint w, gint h, gint
 
        vficon_populate(vfi, TRUE, TRUE);
 
-       DEBUG_1("col tab pop cols=%d rows=%d\n", vfi->columns, vfi->rows);
+       DEBUG_1("col tab pop cols=%d rows=%d", vfi->columns, vfi->rows);
 }
 
 static void vficon_sync(ViewFileIcon *vfi)
@@ -2010,7 +2010,7 @@ static gint vficon_thumb_next(ViewFileIcon *vfi)
        if (!thumb_loader_start(vfi->thumbs_loader, fd->path))
                {
                /* set icon to unknown, continue */
-               DEBUG_1("thumb loader start failed %s\n", vfi->thumbs_loader->path);
+               DEBUG_1("thumb loader start failed %s", vfi->thumbs_loader->path);
                vficon_thumb_do(vfi, vfi->thumbs_loader, fd);
 
                return TRUE;
@@ -2626,7 +2626,7 @@ gint vficon_maint_removed(ViewFileIcon *vfi, FileData *fd, GList *ignore_list)
                        if (ignore_list)
                                {
                                new_row = vficon_maint_find_closest(vfi, row, n, ignore_list);
-                               DEBUG_1("row = %d, closest is %d\n", row, new_row);
+                               DEBUG_1("row = %d, closest is %d", row, new_row);
                                }
                        else
                                {
index f70768f..931855b 100644 (file)
@@ -1246,7 +1246,7 @@ static gint vflist_thumb_next(ViewFileList *vfl)
        if (!thumb_loader_start(vfl->thumbs_loader, fd->path))
                {
                /* set icon to unknown, continue */
-               DEBUG_1("thumb loader start failed %s\n", vfl->thumbs_loader->path);
+               DEBUG_1("thumb loader start failed %s", vfl->thumbs_loader->path);
                vflist_thumb_do(vfl, vfl->thumbs_loader, fd);
 
                return TRUE;
@@ -2246,7 +2246,7 @@ gint vflist_maint_removed(ViewFileList *vfl, FileData *fd, GList *ignore_list)
                if (ignore_list)
                        {
                        new_row = vflist_maint_find_closest(vfl, row, n, ignore_list);
-                       DEBUG_1("row = %d, closest is %d\n", row, new_row);
+                       DEBUG_1("row = %d, closest is %d", row, new_row);
                        }
                else
                        {