From d6ce8fce69d8bbb6b0dd344151212189fbb318bd Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 27 May 2002 01:31:48 +0000 Subject: [PATCH] use "%lld" when printing or parsing file sizes because AC_SYS_LARGEFILE 2002-05-27 Michael Natterer * app/core/gimpimagefile.c: use "%lld" when printing or parsing file sizes because AC_SYS_LARGEFILE makes off_t a long long. --- ChangeLog | 5 +++++ app/core/gimpimagefile.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3024a7eab1..03febfc3e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-27 Michael Natterer + + * app/core/gimpimagefile.c: use "%lld" when printing or parsing + file sizes because AC_SYS_LARGEFILE makes off_t a long long. + 2002-05-27 Sven Neumann * HACKING diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c index 3debf758a6..a78c45883f 100644 --- a/app/core/gimpimagefile.c +++ b/app/core/gimpimagefile.c @@ -436,10 +436,10 @@ gimp_imagefile_save_fail_thumb (GimpImagefile *imagefile, return; pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 1, 1); - + desc = g_strdup_printf ("Thumbnail failure for %s", uri); - t_str = g_strdup_printf ("%ld", image_mtime); - s_str = g_strdup_printf ("%ld", image_size); + t_str = g_strdup_printf ("%ld", image_mtime); + s_str = g_strdup_printf ("%lld", image_size); if (! gdk_pixbuf_save (pixbuf, thumb_name, "png", &error, TAG_DESCRIPTION, desc, @@ -828,7 +828,7 @@ gimp_imagefile_read_png_thumb (GimpImagefile *imagefile, goto cleanup; option = gdk_pixbuf_get_option (pixbuf, TAG_THUMB_SIZE); - if (!option || sscanf (option, "%ld", &thumb_image_size) != 1) + if (!option || sscanf (option, "%lld", &thumb_image_size) != 1) goto cleanup; if (thumb_image_mtime == imagefile->image_mtime && @@ -940,11 +940,11 @@ gimp_imagefile_save_png_thumb (GimpImagefile *imagefile, type_str = g_enum_get_value (enum_class, type)->value_nick; desc = g_strdup_printf ("Thumbnail of %s", uri); - t_str = g_strdup_printf ("%ld", image_mtime); - w_str = g_strdup_printf ("%d", gimage->width); - h_str = g_strdup_printf ("%d", gimage->height); - s_str = g_strdup_printf ("%ld", image_size); - l_str = g_strdup_printf ("%d", gimage->layers->num_children); + t_str = g_strdup_printf ("%ld", image_mtime); + w_str = g_strdup_printf ("%d", gimage->width); + h_str = g_strdup_printf ("%d", gimage->height); + s_str = g_strdup_printf ("%lld", image_size); + l_str = g_strdup_printf ("%d", gimage->layers->num_children); success = gdk_pixbuf_save (pixbuf, thumb_name, "png", &error, TAG_DESCRIPTION, desc,