in each debug message string.
{
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);
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;
}
}
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);
if (utime(cachel, &ut) < 0 &&
errno == EPERM)
{
- DEBUG_1("cache permission workaround: %s\n", cachel);
+ DEBUG_1("cache permission workaround: %s", cachel);
ret = TRUE;
}
}
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;
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)
{
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);
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);
{
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;
}
}
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);
}
{
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);
}
}
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);
}
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);
{
if (!valid)
{
- DEBUG_1("thumb cleaned: %s\n", path);
+ DEBUG_1("thumb cleaned: %s", path);
unlink_file(path);
}
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 */
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++;
}
}
- 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);
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);
}
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)
{
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);
{
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");
}
}
{
collect_manager_timer_push(TRUE);
- DEBUG_1("collection manager flushing\n");
+ DEBUG_1("collection manager flushing");
while (collect_manager_process_cb(NULL));
}
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++)
{
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)
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);
{
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);
{
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)
{
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;
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;
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);
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;
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)
}
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);
}
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);
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;
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);
}
}
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;
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);
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
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);
}
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";
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);
{
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);
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);
}
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)
{
/* 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)
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);
if (!match) return FALSE;
- DEBUG_1("RAW file parser extension match\n");
+ DEBUG_1("RAW file parser extension match");
}
/* FIXME:
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);
}
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);
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);
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;
}
{
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);
}
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);
}
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;
}
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);
}
{
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");
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)
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);
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")))
{
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);
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,
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) )
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;
{
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)
/* 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);
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);
}
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)
{
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);
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_ */
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;
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;
}
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);
{
/* 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);
{
if (!layout_valid(&lw)) return;
- DEBUG_1("layout refresh\n");
+ DEBUG_1("layout refresh");
layout_refresh_lists(lw);
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);
}
}
}
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);
}
}
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
if (i != -1)
{
- DEBUG_1("image activate scroll %d\n", i);
+ DEBUG_1("image activate scroll %d", i);
layout_image_activate(lw, i);
}
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");
}
g_free(buf);
- DEBUG_1("Help command post [%s]\n", result);
+ DEBUG_1("Help command post [%s]", result);
system(result);
}
}
- DEBUG_1("debugging output enabled (level %d)\n", debug);
+ DEBUG_1("debugging output enabled (level %d)", debug);
#endif
}
{ \
if (debug != 1) printf("%s:%d: ", __FILE__, __LINE__); \
printf(__VA_ARGS__); \
+ putchar('\n'); \
} \
} while (0)
#else
}
}
- 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);
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++)
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);
}
}
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,
{
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);
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,
#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;
}
}
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;
}
}
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);
{
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);
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)
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;
}
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;
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);
}
else
{
- DEBUG_1("Saving failed: %s\n", pathl);
+ DEBUG_1("Saving failed: %s", pathl);
}
g_free(pathl);
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");
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;
}
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);
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;
return;
}
- DEBUG_1("thumb error: %s\n", tl->path);
+ DEBUG_1("thumb error: %s", tl->path);
image_loader_free(tl->il);
tl->il = NULL;
{
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
{
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));
}
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);
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);
}
}
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);
}
{
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);
}
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;
}
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;
{
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))
{
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);
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);
}
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"),
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");
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
}
else
{
- DEBUG_1("closed by #%d\n", row);
+ DEBUG_1("closed by #%d", row);
file_dialog_close(rd->fdlg);
}
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)
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))
{
fail = file_data_ref(fd);
}
- DEBUG_1("deltree done: %s\n", fd->path);
+ DEBUG_1("deltree done: %s", fd->path);
return fail;
}
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))
{
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++)
{
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)
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;
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
{
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;
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
{