diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-06-25 20:55:59 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-06-25 20:55:59 +0200 |
commit | ab841afa5cb39058d9ab2cebb67cfe6369443f6e (patch) | |
tree | 64961342a79003ee865b3f9f8f41f99f09f37a2e /src/util/file.c | |
parent | 49120f48474fc8fdc2448c75d961bc238213cfac (diff) |
New upstream version 0.28.3upstream/0.28.3
Diffstat (limited to 'src/util/file.c')
-rw-r--r-- | src/util/file.c | 1666 |
1 files changed, 728 insertions, 938 deletions
diff --git a/src/util/file.c b/src/util/file.c index 2afe738..ccb75a9 100644 --- a/src/util/file.c +++ b/src/util/file.c @@ -1,4 +1,4 @@ -/* file.c generated by valac 0.36.6, the Vala compiler +/* file.c generated by valac 0.40.4, the Vala compiler * generated from file.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -12,6 +12,7 @@ /**/ /* This function is thread-safe.*/ + #include <glib.h> #include <glib-object.h> #include <gio/gio.h> @@ -27,105 +28,125 @@ typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -gboolean claim_file (GFile* file, GError** error); -GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collision, GError** error); -void disassemble_filename (const gchar* basename, gchar* * name, gchar* * ext); -glong find_last_offset (const gchar* str, gchar c); -guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error); -void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, void* monitor_target, guint64 file_count, GCancellable* cancellable, GError** error); -time_t query_file_modified (GFile* file, GError** error); +gboolean claim_file (GFile* file, + GError** error); +GFile* generate_unique_file (GFile* dir, + const gchar* basename, + gboolean* collision, + GError** error); +void disassemble_filename (const gchar* basename, + gchar* * name, + gchar* * ext); +glong find_last_offset (const gchar* str, + gchar c); +guint64 query_total_file_size (GFile* file_or_dir, + GCancellable* cancellable, + GError** error); +void delete_all_files (GFile* dir, + GeeSet* exceptions, + ProgressMonitor monitor, + void* monitor_target, + guint64 file_count, + GCancellable* cancellable, + GError** error); +time_t query_file_modified (GFile* file, + GError** error); gboolean query_is_directory (GFile* file); -gboolean query_is_directory_empty (GFile* dir, GError** error); +gboolean query_is_directory_empty (GFile* dir, + GError** error); gchar* get_display_pathname (GFile* file); gchar* strip_pretty_path (const gchar* path); gchar* get_file_info_id (GFileInfo* info); -void skip_uint64 (GInputStream* input, guint64 skip_amount, GError** error); -guint64 count_files_in_directory (GFile* dir, GError** error); -gboolean file_equal (GFile* a, GFile* b); +void skip_uint64 (GInputStream* input, + guint64 skip_amount, + GError** error); +guint64 count_files_in_directory (GFile* dir, + GError** error); +gboolean file_equal (GFile* a, + GFile* b); guint file_hash (GFile* file); -static gpointer _g_error_copy0 (gpointer self) { +static gpointer +_g_error_copy0 (gpointer self) +{ #line 23 "/home/jens/Source/shotwell/src/util/file.vala" return self ? g_error_copy (self) : NULL; -#line 52 "file.c" +#line 76 "file.c" } -gboolean claim_file (GFile* file, GError** error) { +gboolean +claim_file (GFile* file, + GError** error) +{ gboolean result = FALSE; - gboolean _tmp11_ = FALSE; + gboolean _tmp9_ = FALSE; GError * _inner_error_ = NULL; #line 12 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (file), FALSE); -#line 62 "file.c" +#line 89 "file.c" { - GFile* _tmp0_; + GFileOutputStream* _tmp0_; GFileOutputStream* _tmp1_; - GFileOutputStream* _tmp2_; -#line 14 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = file; #line 14 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_create (_tmp0_, G_FILE_CREATE_NONE, NULL, &_inner_error_); + _tmp0_ = g_file_create (file, G_FILE_CREATE_NONE, NULL, &_inner_error_); #line 14 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 14 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp2_); + _g_object_unref0 (_tmp1_); #line 14 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 77 "file.c" +#line 101 "file.c" goto __catch0_g_error; } #line 17 "/home/jens/Source/shotwell/src/util/file.vala" result = TRUE; #line 17 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 84 "file.c" +#line 108 "file.c" } goto __finally0; __catch0_g_error: { GError* err = NULL; - GError* _tmp3_; + GError* _tmp2_; #line 13 "/home/jens/Source/shotwell/src/util/file.vala" err = _inner_error_; #line 13 "/home/jens/Source/shotwell/src/util/file.vala" _inner_error_ = NULL; #line 20 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = err; + _tmp2_ = err; #line 20 "/home/jens/Source/shotwell/src/util/file.vala" - if (!g_error_matches (_tmp3_, G_IO_ERROR, G_IO_ERROR_EXISTS)) { -#line 99 "file.c" - GFile* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; + if (!g_error_matches (_tmp2_, G_IO_ERROR, G_IO_ERROR_EXISTS)) { +#line 123 "file.c" + gchar* _tmp3_; + gchar* _tmp4_; + GError* _tmp5_; + const gchar* _tmp6_; GError* _tmp7_; - const gchar* _tmp8_; - GError* _tmp9_; - GError* _tmp10_; -#line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = file; + GError* _tmp8_; #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = g_file_get_path (_tmp4_); + _tmp3_ = g_file_get_path (file); #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = _tmp5_; + _tmp4_ = _tmp3_; #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = err; + _tmp5_ = err; #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = _tmp7_->message; + _tmp6_ = _tmp5_->message; #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - g_warning ("file.vala:21: claim_file %s: %s", _tmp6_, _tmp8_); + g_warning ("file.vala:21: claim_file %s: %s", _tmp4_, _tmp6_); #line 21 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp6_); + _g_free0 (_tmp4_); #line 23 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = err; + _tmp7_ = err; #line 23 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = _g_error_copy0 (_tmp9_); + _tmp8_ = _g_error_copy0 (_tmp7_); #line 23 "/home/jens/Source/shotwell/src/util/file.vala" - _inner_error_ = _tmp10_; + _inner_error_ = _tmp8_; #line 23 "/home/jens/Source/shotwell/src/util/file.vala" _g_error_free0 (err); -#line 129 "file.c" +#line 150 "file.c" goto __finally0; } #line 26 "/home/jens/Source/shotwell/src/util/file.vala" @@ -134,55 +155,48 @@ gboolean claim_file (GFile* file, GError** error) { _g_error_free0 (err); #line 26 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 138 "file.c" +#line 159 "file.c" } __finally0: #line 13 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 13 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp11_; -#line 145 "file.c" + return _tmp9_; +#line 166 "file.c" } -GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collision, GError** error) { +GFile* +generate_unique_file (GFile* dir, + const gchar* basename, + gboolean* collision, + GError** error) +{ gboolean _vala_collision = FALSE; GFile* result = NULL; GFile* file = NULL; GFile* _tmp0_; - const gchar* _tmp1_; + gboolean _tmp1_ = FALSE; GFile* _tmp2_; - gboolean _tmp3_ = FALSE; - GFile* _tmp4_; - gboolean _tmp5_; gchar* name = NULL; gchar* ext = NULL; - const gchar* _tmp6_; - gchar* _tmp7_ = NULL; - gchar* _tmp8_ = NULL; - GFile* _tmp28_; - gchar* _tmp29_; - gchar* _tmp30_; - const gchar* _tmp31_; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp22_; + gchar* _tmp23_; GError * _inner_error_ = NULL; #line 36 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (dir), NULL); #line 36 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (basename != NULL, NULL); #line 38 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = dir; + _tmp0_ = g_file_get_child (dir, basename); #line 38 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = basename; -#line 38 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = g_file_get_child (_tmp0_, _tmp1_); -#line 38 "/home/jens/Source/shotwell/src/util/file.vala" - file = _tmp2_; + file = _tmp0_; #line 39 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = file; + _tmp2_ = file; #line 39 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = claim_file (_tmp4_, &_inner_error_); -#line 39 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = _tmp5_; + _tmp1_ = claim_file (_tmp2_, &_inner_error_); #line 39 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 39 "/home/jens/Source/shotwell/src/util/file.vala" @@ -191,10 +205,10 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis _g_object_unref0 (file); #line 39 "/home/jens/Source/shotwell/src/util/file.vala" return NULL; -#line 195 "file.c" +#line 209 "file.c" } #line 39 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp3_) { + if (_tmp1_) { #line 40 "/home/jens/Source/shotwell/src/util/file.vala" _vala_collision = FALSE; #line 42 "/home/jens/Source/shotwell/src/util/file.vala" @@ -203,128 +217,120 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis if (collision) { #line 42 "/home/jens/Source/shotwell/src/util/file.vala" *collision = _vala_collision; -#line 207 "file.c" +#line 221 "file.c" } #line 42 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 211 "file.c" +#line 225 "file.c" } #line 46 "/home/jens/Source/shotwell/src/util/file.vala" _vala_collision = TRUE; #line 49 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = basename; -#line 49 "/home/jens/Source/shotwell/src/util/file.vala" - disassemble_filename (_tmp6_, &_tmp7_, &_tmp8_); + disassemble_filename (basename, &_tmp3_, &_tmp4_); #line 49 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (name); #line 49 "/home/jens/Source/shotwell/src/util/file.vala" - name = _tmp7_; + name = _tmp3_; #line 49 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (ext); #line 49 "/home/jens/Source/shotwell/src/util/file.vala" - ext = _tmp8_; -#line 227 "file.c" + ext = _tmp4_; +#line 239 "file.c" { gint ctr = 0; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" ctr = 1; -#line 232 "file.c" +#line 244 "file.c" { - gboolean _tmp9_ = FALSE; + gboolean _tmp5_ = FALSE; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = TRUE; + _tmp5_ = TRUE; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" while (TRUE) { -#line 239 "file.c" - gint _tmp11_; - gchar* _tmp12_ = NULL; - const gchar* _tmp13_; +#line 251 "file.c" + gint _tmp7_; + gchar* _tmp8_ = NULL; + const gchar* _tmp9_; gchar* new_name = NULL; - gchar* _tmp21_; - GFile* _tmp22_; - const gchar* _tmp23_; - GFile* _tmp24_; - gboolean _tmp25_ = FALSE; - GFile* _tmp26_; - gboolean _tmp27_; + gchar* _tmp17_; + const gchar* _tmp18_; + GFile* _tmp19_; + gboolean _tmp20_ = FALSE; + GFile* _tmp21_; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - if (!_tmp9_) { -#line 253 "file.c" - gint _tmp10_; + if (!_tmp5_) { +#line 263 "file.c" + gint _tmp6_; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = ctr; + _tmp6_ = ctr; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - ctr = _tmp10_ + 1; -#line 259 "file.c" + ctr = _tmp6_ + 1; +#line 269 "file.c" } #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = FALSE; + _tmp5_ = FALSE; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp11_ = ctr; + _tmp7_ = ctr; #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - if (!(_tmp11_ < G_MAXINT)) { + if (!(_tmp7_ < G_MAXINT)) { #line 52 "/home/jens/Source/shotwell/src/util/file.vala" break; -#line 269 "file.c" +#line 279 "file.c" } #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp13_ = ext; + _tmp9_ = ext; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp13_ != NULL) { -#line 275 "file.c" - const gchar* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; + if (_tmp9_ != NULL) { +#line 285 "file.c" + const gchar* _tmp10_; + gint _tmp11_; + const gchar* _tmp12_; + gchar* _tmp13_; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp14_ = name; + _tmp10_ = name; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp15_ = ctr; + _tmp11_ = ctr; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp16_ = ext; + _tmp12_ = ext; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp17_ = g_strdup_printf ("%s_%d.%s", _tmp14_, _tmp15_, _tmp16_); + _tmp13_ = g_strdup_printf ("%s_%d.%s", _tmp10_, _tmp11_, _tmp12_); #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp12_); + _g_free0 (_tmp8_); #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp12_ = _tmp17_; -#line 292 "file.c" + _tmp8_ = _tmp13_; +#line 302 "file.c" } else { - const gchar* _tmp18_; - gint _tmp19_; - gchar* _tmp20_; + const gchar* _tmp14_; + gint _tmp15_; + gchar* _tmp16_; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp18_ = name; + _tmp14_ = name; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp19_ = ctr; + _tmp15_ = ctr; #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp20_ = g_strdup_printf ("%s_%d", _tmp18_, _tmp19_); + _tmp16_ = g_strdup_printf ("%s_%d", _tmp14_, _tmp15_); #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp12_); + _g_free0 (_tmp8_); #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp12_ = _tmp20_; -#line 307 "file.c" + _tmp8_ = _tmp16_; +#line 317 "file.c" } #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp21_ = g_strdup (_tmp12_); + _tmp17_ = g_strdup (_tmp8_); #line 53 "/home/jens/Source/shotwell/src/util/file.vala" - new_name = _tmp21_; -#line 55 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp22_ = dir; + new_name = _tmp17_; #line 55 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp23_ = new_name; + _tmp18_ = new_name; #line 55 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp24_ = g_file_get_child (_tmp22_, _tmp23_); + _tmp19_ = g_file_get_child (dir, _tmp18_); #line 55 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (file); #line 55 "/home/jens/Source/shotwell/src/util/file.vala" - file = _tmp24_; -#line 56 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp26_ = file; + file = _tmp19_; #line 56 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp27_ = claim_file (_tmp26_, &_inner_error_); + _tmp21_ = file; #line 56 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp25_ = _tmp27_; + _tmp20_ = claim_file (_tmp21_, &_inner_error_); #line 56 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 56 "/home/jens/Source/shotwell/src/util/file.vala" @@ -332,7 +338,7 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis #line 56 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (new_name); #line 56 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp12_); + _g_free0 (_tmp8_); #line 56 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (ext); #line 56 "/home/jens/Source/shotwell/src/util/file.vala" @@ -341,16 +347,16 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis _g_object_unref0 (file); #line 56 "/home/jens/Source/shotwell/src/util/file.vala" return NULL; -#line 345 "file.c" +#line 351 "file.c" } #line 56 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp25_) { + if (_tmp20_) { #line 57 "/home/jens/Source/shotwell/src/util/file.vala" result = file; #line 57 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (new_name); #line 57 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp12_); + _g_free0 (_tmp8_); #line 57 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (ext); #line 57 "/home/jens/Source/shotwell/src/util/file.vala" @@ -359,32 +365,28 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis if (collision) { #line 57 "/home/jens/Source/shotwell/src/util/file.vala" *collision = _vala_collision; -#line 363 "file.c" +#line 369 "file.c" } #line 57 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 367 "file.c" +#line 373 "file.c" } #line 52 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (new_name); #line 52 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp12_); -#line 373 "file.c" + _g_free0 (_tmp8_); +#line 379 "file.c" } } } #line 60 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp28_ = dir; -#line 60 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp29_ = g_file_get_path (_tmp28_); + _tmp22_ = g_file_get_path (dir); #line 60 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp30_ = _tmp29_; + _tmp23_ = _tmp22_; #line 60 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp31_ = basename; + g_warning ("file.vala:60: generate_unique_filename %s for %s: unable to claim file", _tmp23_, basename); #line 60 "/home/jens/Source/shotwell/src/util/file.vala" - g_warning ("file.vala:60: generate_unique_filename %s for %s: unable to claim file", _tmp30_, _tmp31_); -#line 60 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp30_); + _g_free0 (_tmp23_); #line 62 "/home/jens/Source/shotwell/src/util/file.vala" result = NULL; #line 62 "/home/jens/Source/shotwell/src/util/file.vala" @@ -397,275 +399,213 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis if (collision) { #line 62 "/home/jens/Source/shotwell/src/util/file.vala" *collision = _vala_collision; -#line 401 "file.c" +#line 403 "file.c" } #line 62 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 405 "file.c" +#line 407 "file.c" } -static glong string_strnlen (gchar* str, glong maxlen) { +static glong +string_strnlen (gchar* str, + glong maxlen) +{ glong result = 0L; gchar* end = NULL; gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 428 "file.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp1_; +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = memchr (str, 0, (gsize) maxlen); +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + end = _tmp0_; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = end; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ == NULL) { +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = maxlen; +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 436 "file.c" +#line 431 "file.c" } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp2_; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = end; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (glong) (_tmp2_ - str); +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 448 "file.c" +#line 440 "file.c" } } -static gchar* string_substring (const gchar* self, glong offset, glong len) { +static gchar* +string_substring (const gchar* self, + glong offset, + glong len) +{ gchar* result = NULL; glong string_length = 0L; gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + glong _tmp6_; + gchar* _tmp7_; +#line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 472 "file.c" - glong _tmp2_; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = len; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = _tmp2_ >= ((glong) 0); -#line 478 "file.c" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset >= ((glong) 0)) { +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = len >= ((glong) 0); +#line 461 "file.c" } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = FALSE; -#line 482 "file.c" +#line 465 "file.c" } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp0_) { -#line 486 "file.c" - glong _tmp3_; - glong _tmp4_; - glong _tmp5_; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = offset; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = len; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = _tmp5_; -#line 498 "file.c" +#line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = string_strnlen ((gchar*) self, offset + len); +#line 471 "file.c" } else { - gint _tmp6_; - gint _tmp7_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = strlen (self); -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = _tmp6_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = (glong) _tmp7_; -#line 508 "file.c" + gint _tmp1_; + gint _tmp2_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = strlen (self); +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = (glong) _tmp2_; +#line 481 "file.c" } -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = offset; -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp8_ < ((glong) 0)) { -#line 514 "file.c" - glong _tmp9_; - glong _tmp10_; - glong _tmp11_; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = string_length; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = offset; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - offset = _tmp9_ + _tmp10_; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = offset; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); -#line 528 "file.c" +#line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset < ((glong) 0)) { +#line 485 "file.c" + glong _tmp3_; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + offset = _tmp3_ + offset; +#line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset >= ((glong) 0), NULL); +#line 493 "file.c" } else { - glong _tmp12_; - glong _tmp13_; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = offset; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = string_length; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); -#line 538 "file.c" + glong _tmp4_; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = string_length; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset <= _tmp4_, NULL); +#line 500 "file.c" } -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = len; -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp14_ < ((glong) 0)) { -#line 544 "file.c" - glong _tmp15_; - glong _tmp16_; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = offset; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp15_ - _tmp16_; -#line 553 "file.c" +#line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (len < ((glong) 0)) { +#line 504 "file.c" + glong _tmp5_; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp5_ = string_length; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + len = _tmp5_ - offset; +#line 510 "file.c" } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail ((offset + len) <= _tmp6_, NULL); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp7_; +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 573 "file.c" +#line 522 "file.c" } -void disassemble_filename (const gchar* basename, gchar* * name, gchar* * ext) { +void +disassemble_filename (const gchar* basename, + gchar* * name, + gchar* * ext) +{ gchar* _vala_name = NULL; gchar* _vala_ext = NULL; glong offset = 0L; - const gchar* _tmp0_; - glong _tmp1_; - glong _tmp2_; + glong _tmp0_; #line 65 "/home/jens/Source/shotwell/src/util/file.vala" g_return_if_fail (basename != NULL); #line 66 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = basename; -#line 66 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = find_last_offset (_tmp0_, '.'); -#line 66 "/home/jens/Source/shotwell/src/util/file.vala" - offset = _tmp1_; + offset = find_last_offset (basename, '.'); #line 67 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = offset; + _tmp0_ = offset; #line 67 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp2_ <= ((glong) 0)) { -#line 596 "file.c" - const gchar* _tmp3_; - gchar* _tmp4_; + if (_tmp0_ <= ((glong) 0)) { +#line 543 "file.c" + gchar* _tmp1_; #line 68 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = basename; -#line 68 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = g_strdup (_tmp3_); + _tmp1_ = g_strdup (basename); #line 68 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_name); #line 68 "/home/jens/Source/shotwell/src/util/file.vala" - _vala_name = _tmp4_; + _vala_name = _tmp1_; #line 69 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_ext); #line 69 "/home/jens/Source/shotwell/src/util/file.vala" _vala_ext = NULL; -#line 611 "file.c" +#line 555 "file.c" } else { - const gchar* _tmp5_; - glong _tmp6_; - gchar* _tmp7_; - const gchar* _tmp8_; - glong _tmp9_; - gchar* _tmp10_; -#line 71 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = basename; + glong _tmp2_; + gchar* _tmp3_; + glong _tmp4_; + gchar* _tmp5_; #line 71 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = offset; + _tmp2_ = offset; #line 71 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = string_substring (_tmp5_, (glong) 0, _tmp6_); + _tmp3_ = string_substring (basename, (glong) 0, _tmp2_); #line 71 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_name); #line 71 "/home/jens/Source/shotwell/src/util/file.vala" - _vala_name = _tmp7_; -#line 72 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = basename; + _vala_name = _tmp3_; #line 72 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = offset; + _tmp4_ = offset; #line 72 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = string_substring (_tmp8_, _tmp9_ + 1, (glong) -1); + _tmp5_ = string_substring (basename, _tmp4_ + 1, (glong) -1); #line 72 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_ext); #line 72 "/home/jens/Source/shotwell/src/util/file.vala" - _vala_ext = _tmp10_; -#line 639 "file.c" + _vala_ext = _tmp5_; +#line 577 "file.c" } #line 65 "/home/jens/Source/shotwell/src/util/file.vala" if (name) { #line 65 "/home/jens/Source/shotwell/src/util/file.vala" *name = _vala_name; -#line 645 "file.c" +#line 583 "file.c" } else { #line 65 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_name); -#line 649 "file.c" +#line 587 "file.c" } #line 65 "/home/jens/Source/shotwell/src/util/file.vala" if (ext) { #line 65 "/home/jens/Source/shotwell/src/util/file.vala" *ext = _vala_ext; -#line 655 "file.c" +#line 593 "file.c" } else { #line 65 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (_vala_ext); -#line 659 "file.c" +#line 597 "file.c" } } -guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error) { +guint64 +query_total_file_size (GFile* file_or_dir, + GCancellable* cancellable, + GError** error) +{ guint64 result = 0ULL; GFileType type = 0; - GFile* _tmp0_; - GFileType _tmp1_; - GFileType _tmp2_; + GFileType _tmp0_; GFileEnumerator* enumerator = NULL; guint64 total_bytes = 0ULL; GFileInfo* info = NULL; @@ -675,99 +615,85 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE #line 77 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable), 0ULL); #line 78 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = file_or_dir; -#line 78 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); -#line 78 "/home/jens/Source/shotwell/src/util/file.vala" - type = _tmp1_; + type = g_file_query_file_type (file_or_dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); #line 79 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = type; + _tmp0_ = type; #line 79 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp2_ == G_FILE_TYPE_REGULAR) { -#line 688 "file.c" + if (_tmp0_ == G_FILE_TYPE_REGULAR) { +#line 624 "file.c" GFileInfo* info = NULL; - GFileInfo* _tmp17_; - gint64 _tmp18_; + GFileInfo* _tmp12_; #line 80 "/home/jens/Source/shotwell/src/util/file.vala" info = NULL; -#line 694 "file.c" +#line 629 "file.c" { - GFileInfo* _tmp3_ = NULL; - GFile* _tmp4_; - GCancellable* _tmp5_; - GFileInfo* _tmp6_; - GFileInfo* _tmp7_; -#line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = file_or_dir; + GFileInfo* _tmp1_ = NULL; + GFileInfo* _tmp2_; + GFileInfo* _tmp3_; #line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = cancellable; + _tmp2_ = g_file_query_info (file_or_dir, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_); #line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = g_file_query_info (_tmp4_, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp5_, &_inner_error_); -#line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = _tmp6_; + _tmp1_ = _tmp2_; #line 82 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 711 "file.c" +#line 640 "file.c" goto __catch1_g_error; } #line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = _tmp3_; + _tmp3_ = _tmp1_; #line 82 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = NULL; + _tmp1_ = NULL; #line 82 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 82 "/home/jens/Source/shotwell/src/util/file.vala" - info = _tmp7_; + info = _tmp3_; #line 81 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp3_); -#line 724 "file.c" + _g_object_unref0 (_tmp1_); +#line 653 "file.c" } goto __finally1; __catch1_g_error: { GError* err = NULL; - GError* _tmp8_; - GFile* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_; - GError* _tmp14_; - const gchar* _tmp15_; + GError* _tmp4_; + gchar* _tmp7_; + gchar* _tmp8_; + GError* _tmp9_; + const gchar* _tmp10_; #line 81 "/home/jens/Source/shotwell/src/util/file.vala" err = _inner_error_; #line 81 "/home/jens/Source/shotwell/src/util/file.vala" _inner_error_ = NULL; #line 85 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = err; + _tmp4_ = err; #line 85 "/home/jens/Source/shotwell/src/util/file.vala" - if (g_error_matches (_tmp8_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { -#line 744 "file.c" - GError* _tmp9_; - GError* _tmp10_; + if (g_error_matches (_tmp4_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { +#line 672 "file.c" + GError* _tmp5_; + GError* _tmp6_; #line 86 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = err; + _tmp5_ = err; #line 86 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = _g_error_copy0 (_tmp9_); + _tmp6_ = _g_error_copy0 (_tmp5_); #line 86 "/home/jens/Source/shotwell/src/util/file.vala" - _inner_error_ = _tmp10_; + _inner_error_ = _tmp6_; #line 86 "/home/jens/Source/shotwell/src/util/file.vala" _g_error_free0 (err); -#line 755 "file.c" +#line 683 "file.c" goto __finally1; } #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp11_ = file_or_dir; -#line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp12_ = g_file_get_path (_tmp11_); + _tmp7_ = g_file_get_path (file_or_dir); #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp13_ = _tmp12_; + _tmp8_ = _tmp7_; #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp14_ = err; + _tmp9_ = err; #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp15_ = _tmp14_->message; + _tmp10_ = _tmp9_->message; #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - g_debug ("file.vala:88: Unable to query filesize for %s: %s", _tmp13_, _tmp15_); + g_debug ("file.vala:88: Unable to query filesize for %s: %s", _tmp8_, _tmp10_); #line 88 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp13_); + _g_free0 (_tmp8_); #line 90 "/home/jens/Source/shotwell/src/util/file.vala" result = (guint64) 0; #line 90 "/home/jens/Source/shotwell/src/util/file.vala" @@ -776,120 +702,112 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE _g_object_unref0 (info); #line 90 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 780 "file.c" +#line 706 "file.c" } __finally1: #line 81 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 785 "file.c" - guint64 _tmp16_ = 0ULL; +#line 711 "file.c" + guint64 _tmp11_ = 0ULL; #line 81 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 81 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 81 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp16_; -#line 793 "file.c" + return _tmp11_; +#line 719 "file.c" } #line 93 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp17_ = info; -#line 93 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp18_ = g_file_info_get_size (_tmp17_); + _tmp12_ = info; #line 93 "/home/jens/Source/shotwell/src/util/file.vala" - result = (guint64) _tmp18_; + result = (guint64) g_file_info_get_size (_tmp12_); #line 93 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 93 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 805 "file.c" +#line 729 "file.c" } else { - GFileType _tmp19_; + GFileType _tmp13_; #line 94 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp19_ = type; + _tmp13_ = type; #line 94 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp19_ != G_FILE_TYPE_DIRECTORY) { + if (_tmp13_ != G_FILE_TYPE_DIRECTORY) { #line 95 "/home/jens/Source/shotwell/src/util/file.vala" result = (guint64) 0; #line 95 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 816 "file.c" +#line 740 "file.c" } } { - GFileEnumerator* _tmp20_ = NULL; - GFile* _tmp21_; - GCancellable* _tmp22_; - GFileEnumerator* _tmp23_; - GFileEnumerator* _tmp24_; - GFileEnumerator* _tmp25_; -#line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp21_ = file_or_dir; + GFileEnumerator* _tmp14_ = NULL; + GFileEnumerator* _tmp15_; + GFileEnumerator* _tmp16_; + GFileEnumerator* _tmp17_; #line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp22_ = cancellable; + _tmp15_ = g_file_enumerate_children (file_or_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_); #line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp23_ = g_file_enumerate_children (_tmp21_, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp22_, &_inner_error_); -#line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp20_ = _tmp23_; + _tmp14_ = _tmp15_; #line 100 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 836 "file.c" +#line 754 "file.c" goto __catch2_g_error; } #line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp24_ = _tmp20_; + _tmp16_ = _tmp14_; #line 100 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp20_ = NULL; + _tmp14_ = NULL; #line 100 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 100 "/home/jens/Source/shotwell/src/util/file.vala" - enumerator = _tmp24_; + enumerator = _tmp16_; #line 102 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp25_ = enumerator; + _tmp17_ = enumerator; #line 102 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp25_ == NULL) { + if (_tmp17_ == NULL) { #line 103 "/home/jens/Source/shotwell/src/util/file.vala" result = (guint64) 0; #line 103 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp20_); + _g_object_unref0 (_tmp14_); #line 103 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 103 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 859 "file.c" +#line 777 "file.c" } #line 99 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp20_); -#line 863 "file.c" + _g_object_unref0 (_tmp14_); +#line 781 "file.c" } goto __finally2; __catch2_g_error: { GError* err = NULL; - gboolean _tmp26_ = FALSE; - GError* _tmp27_; - GError* _tmp29_; - GError* _tmp30_; + gboolean _tmp18_ = FALSE; + GError* _tmp19_; + GError* _tmp21_; + GError* _tmp22_; #line 99 "/home/jens/Source/shotwell/src/util/file.vala" err = _inner_error_; #line 99 "/home/jens/Source/shotwell/src/util/file.vala" _inner_error_ = NULL; #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp27_ = err; + _tmp19_ = err; #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - if (g_error_matches (_tmp27_, G_FILE_ERROR, G_FILE_ERROR_PERM)) { + if (g_error_matches (_tmp19_, G_FILE_ERROR, G_FILE_ERROR_PERM)) { #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp26_ = TRUE; -#line 883 "file.c" + _tmp18_ = TRUE; +#line 801 "file.c" } else { - GError* _tmp28_; + GError* _tmp20_; #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp28_ = err; + _tmp20_ = err; #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp26_ = g_error_matches (_tmp28_, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED); -#line 890 "file.c" + _tmp18_ = g_error_matches (_tmp20_, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED); +#line 808 "file.c" } #line 106 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp26_) { + if (_tmp18_) { #line 107 "/home/jens/Source/shotwell/src/util/file.vala" result = (guint64) 0; #line 107 "/home/jens/Source/shotwell/src/util/file.vala" @@ -898,31 +816,31 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE _g_object_unref0 (enumerator); #line 107 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 902 "file.c" +#line 820 "file.c" } #line 109 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp29_ = err; + _tmp21_ = err; #line 109 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp30_ = _g_error_copy0 (_tmp29_); + _tmp22_ = _g_error_copy0 (_tmp21_); #line 109 "/home/jens/Source/shotwell/src/util/file.vala" - _inner_error_ = _tmp30_; + _inner_error_ = _tmp22_; #line 109 "/home/jens/Source/shotwell/src/util/file.vala" _g_error_free0 (err); -#line 912 "file.c" +#line 830 "file.c" goto __finally2; } __finally2: #line 99 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 918 "file.c" - guint64 _tmp31_ = 0ULL; +#line 836 "file.c" + guint64 _tmp23_ = 0ULL; #line 99 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 99 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 99 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp31_; -#line 926 "file.c" + return _tmp23_; +#line 844 "file.c" } #line 112 "/home/jens/Source/shotwell/src/util/file.vala" total_bytes = (guint64) 0; @@ -930,35 +848,29 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE info = NULL; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" while (TRUE) { -#line 934 "file.c" - GFileInfo* _tmp32_ = NULL; - GFileEnumerator* _tmp33_; - GCancellable* _tmp34_; - GFileInfo* _tmp35_; - GFileInfo* _tmp37_; - GFileInfo* _tmp38_; - guint64 _tmp39_ = 0ULL; - GFile* _tmp40_; - GFileInfo* _tmp41_; - const gchar* _tmp42_; - GFile* _tmp43_; - GFile* _tmp44_; - GCancellable* _tmp45_; - guint64 _tmp46_; - guint64 _tmp47_; - guint64 _tmp49_; -#line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp33_ = enumerator; +#line 852 "file.c" + GFileInfo* _tmp24_ = NULL; + GFileEnumerator* _tmp25_; + GFileInfo* _tmp26_; + GFileInfo* _tmp28_; + GFileInfo* _tmp29_; + guint64 _tmp30_ = 0ULL; + GFileInfo* _tmp31_; + const gchar* _tmp32_; + GFile* _tmp33_; + GFile* _tmp34_; + guint64 _tmp35_; + guint64 _tmp37_; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp34_ = cancellable; + _tmp25_ = enumerator; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp35_ = g_file_enumerator_next_file (_tmp33_, _tmp34_, &_inner_error_); + _tmp26_ = g_file_enumerator_next_file (_tmp25_, cancellable, &_inner_error_); #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp32_ = _tmp35_; + _tmp24_ = _tmp26_; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 961 "file.c" - guint64 _tmp36_ = 0ULL; +#line 873 "file.c" + guint64 _tmp27_ = 0ULL; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 115 "/home/jens/Source/shotwell/src/util/file.vala" @@ -966,70 +878,64 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE #line 115 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp36_; -#line 971 "file.c" + return _tmp27_; +#line 883 "file.c" } #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp37_ = _tmp32_; + _tmp28_ = _tmp24_; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp32_ = NULL; + _tmp24_ = NULL; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - info = _tmp37_; + info = _tmp28_; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp38_ = info; + _tmp29_ = info; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - if (!(_tmp38_ != NULL)) { + if (!(_tmp29_ != NULL)) { #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp32_); + _g_object_unref0 (_tmp24_); #line 115 "/home/jens/Source/shotwell/src/util/file.vala" break; -#line 989 "file.c" +#line 901 "file.c" } #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp40_ = file_or_dir; -#line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp41_ = info; + _tmp31_ = info; #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp42_ = g_file_info_get_name (_tmp41_); + _tmp32_ = g_file_info_get_name (_tmp31_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp43_ = g_file_get_child (_tmp40_, _tmp42_); + _tmp33_ = g_file_get_child (file_or_dir, _tmp32_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp44_ = _tmp43_; + _tmp34_ = _tmp33_; #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp45_ = cancellable; + _tmp35_ = query_total_file_size (_tmp34_, cancellable, &_inner_error_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp46_ = query_total_file_size (_tmp44_, _tmp45_, &_inner_error_); + _g_object_unref0 (_tmp34_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp47_ = _tmp46_; -#line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp44_); -#line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp39_ = _tmp47_; + _tmp30_ = _tmp35_; #line 116 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1013 "file.c" - guint64 _tmp48_ = 0ULL; +#line 919 "file.c" + guint64 _tmp36_ = 0ULL; #line 116 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp32_); + _g_object_unref0 (_tmp24_); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp48_; -#line 1025 "file.c" + return _tmp36_; +#line 931 "file.c" } #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp49_ = total_bytes; + _tmp37_ = total_bytes; #line 116 "/home/jens/Source/shotwell/src/util/file.vala" - total_bytes = _tmp49_ + _tmp39_; + total_bytes = _tmp37_ + _tmp30_; #line 115 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp32_); -#line 1033 "file.c" + _g_object_unref0 (_tmp24_); +#line 939 "file.c" } #line 118 "/home/jens/Source/shotwell/src/util/file.vala" result = total_bytes; @@ -1039,19 +945,23 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE _g_object_unref0 (enumerator); #line 118 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1043 "file.c" +#line 949 "file.c" } -void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, void* monitor_target, guint64 file_count, GCancellable* cancellable, GError** error) { +void +delete_all_files (GFile* dir, + GeeSet* exceptions, + ProgressMonitor monitor, + void* monitor_target, + guint64 file_count, + GCancellable* cancellable, + GError** error) +{ GFileType type = 0; - GFile* _tmp0_; - GFileType _tmp1_; - GFileType _tmp2_; + GFileType _tmp0_; GFileEnumerator* enumerator = NULL; - GFile* _tmp10_; - GCancellable* _tmp11_; - GFileEnumerator* _tmp12_; + GFileEnumerator* _tmp7_; GFileInfo* info = NULL; guint64 i = 0ULL; GError * _inner_error_ = NULL; @@ -1062,64 +972,53 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, #line 125 "/home/jens/Source/shotwell/src/util/file.vala" g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable)); #line 127 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = dir; -#line 127 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); -#line 127 "/home/jens/Source/shotwell/src/util/file.vala" - type = _tmp1_; + type = g_file_query_file_type (dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); #line 128 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = type; + _tmp0_ = type; #line 128 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp2_ != G_FILE_TYPE_DIRECTORY) { -#line 1075 "file.c" - GFile* _tmp3_; + if (_tmp0_ != G_FILE_TYPE_DIRECTORY) { +#line 981 "file.c" + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - GError* _tmp8_; - GError* _tmp9_; -#line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = dir; + GError* _tmp5_; + GError* _tmp6_; #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = g_file_get_path (_tmp3_); + _tmp1_ = g_file_get_path (dir); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = _tmp4_; + _tmp2_ = _tmp1_; #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = g_strdup_printf ("%s is not a directory", _tmp5_); + _tmp3_ = g_strdup_printf ("%s is not a directory", _tmp2_); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = _tmp6_; + _tmp4_ = _tmp3_; #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, _tmp7_); + _tmp5_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, _tmp4_); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = _tmp8_; + _tmp6_ = _tmp5_; #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp7_); + _g_free0 (_tmp4_); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp5_); + _g_free0 (_tmp2_); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" - _inner_error_ = _tmp9_; + _inner_error_ = _tmp6_; #line 129 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 129 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1107 "file.c" +#line 1010 "file.c" } #line 131 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = dir; -#line 131 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp11_ = cancellable; + _tmp7_ = g_file_enumerate_children (dir, "standard::name,standard::type", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_); #line 131 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp12_ = g_file_enumerate_children (_tmp10_, "standard::name,standard::type", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp11_, &_inner_error_); -#line 131 "/home/jens/Source/shotwell/src/util/file.vala" - enumerator = _tmp12_; + enumerator = _tmp7_; #line 131 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 131 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 131 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1123 "file.c" +#line 1022 "file.c" } #line 133 "/home/jens/Source/shotwell/src/util/file.vala" info = NULL; @@ -1127,33 +1026,25 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, i = (guint64) 0; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" while (TRUE) { -#line 1131 "file.c" - GFileInfo* _tmp13_ = NULL; - GFileEnumerator* _tmp14_; - GCancellable* _tmp15_; - GFileInfo* _tmp16_; - GFileInfo* _tmp17_; - GFileInfo* _tmp18_; - GFileInfo* _tmp19_; - GFileType _tmp20_; - gboolean _tmp21_ = FALSE; - GeeSet* _tmp22_; +#line 1030 "file.c" + GFileInfo* _tmp8_ = NULL; + GFileEnumerator* _tmp9_; + GFileInfo* _tmp10_; + GFileInfo* _tmp11_; + GFileInfo* _tmp12_; + GFileInfo* _tmp13_; + gboolean _tmp14_ = FALSE; GFile* file = NULL; - GFile* _tmp27_; - GFileInfo* _tmp28_; - const gchar* _tmp29_; - GFile* _tmp30_; - gboolean _tmp38_ = FALSE; - ProgressMonitor _tmp39_; - void* _tmp39__target; -#line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp14_ = enumerator; + GFileInfo* _tmp17_; + const gchar* _tmp18_; + GFile* _tmp19_; + gboolean _tmp26_ = FALSE; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp15_ = cancellable; + _tmp9_ = enumerator; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp16_ = g_file_enumerator_next_file (_tmp14_, _tmp15_, &_inner_error_); + _tmp10_ = g_file_enumerator_next_file (_tmp9_, cancellable, &_inner_error_); #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp13_ = _tmp16_; + _tmp8_ = _tmp10_; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 135 "/home/jens/Source/shotwell/src/util/file.vala" @@ -1164,94 +1055,79 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, _g_object_unref0 (enumerator); #line 135 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1168 "file.c" +#line 1059 "file.c" } #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp17_ = _tmp13_; + _tmp11_ = _tmp8_; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp13_ = NULL; + _tmp8_ = NULL; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - info = _tmp17_; + info = _tmp11_; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp18_ = info; + _tmp12_ = info; #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - if (!(_tmp18_ != NULL)) { + if (!(_tmp12_ != NULL)) { #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp13_); + _g_object_unref0 (_tmp8_); #line 135 "/home/jens/Source/shotwell/src/util/file.vala" break; -#line 1186 "file.c" +#line 1077 "file.c" } #line 136 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp19_ = info; -#line 136 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp20_ = g_file_info_get_file_type (_tmp19_); + _tmp13_ = info; #line 136 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp20_ != G_FILE_TYPE_REGULAR) { + if (g_file_info_get_file_type (_tmp13_) != G_FILE_TYPE_REGULAR) { #line 137 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp13_); + _g_object_unref0 (_tmp8_); #line 137 "/home/jens/Source/shotwell/src/util/file.vala" continue; -#line 1198 "file.c" +#line 1087 "file.c" } #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp22_ = exceptions; + if (exceptions != NULL) { +#line 1091 "file.c" + GFileInfo* _tmp15_; + const gchar* _tmp16_; #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp22_ != NULL) { -#line 1204 "file.c" - GeeSet* _tmp23_; - GFileInfo* _tmp24_; - const gchar* _tmp25_; - gboolean _tmp26_; -#line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp23_ = exceptions; -#line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp24_ = info; -#line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp25_ = g_file_info_get_name (_tmp24_); + _tmp15_ = info; #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp26_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_); + _tmp16_ = g_file_info_get_name (_tmp15_); #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp21_ = _tmp26_; -#line 1219 "file.c" + _tmp14_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (exceptions, GEE_TYPE_COLLECTION, GeeCollection), _tmp16_); +#line 1100 "file.c" } else { #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp21_ = FALSE; -#line 1223 "file.c" + _tmp14_ = FALSE; +#line 1104 "file.c" } #line 139 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp21_) { + if (_tmp14_) { #line 140 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp13_); + _g_object_unref0 (_tmp8_); #line 140 "/home/jens/Source/shotwell/src/util/file.vala" continue; -#line 1231 "file.c" +#line 1112 "file.c" } #line 142 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp27_ = dir; -#line 142 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp28_ = info; + _tmp17_ = info; #line 142 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp29_ = g_file_info_get_name (_tmp28_); + _tmp18_ = g_file_info_get_name (_tmp17_); #line 142 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp30_ = g_file_get_child (_tmp27_, _tmp29_); + _tmp19_ = g_file_get_child (dir, _tmp18_); #line 142 "/home/jens/Source/shotwell/src/util/file.vala" - file = _tmp30_; -#line 1243 "file.c" + file = _tmp19_; +#line 1122 "file.c" { - GFile* _tmp31_; - GCancellable* _tmp32_; -#line 144 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp31_ = file; + GFile* _tmp20_; #line 144 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp32_ = cancellable; + _tmp20_ = file; #line 144 "/home/jens/Source/shotwell/src/util/file.vala" - g_file_delete (_tmp31_, _tmp32_, &_inner_error_); + g_file_delete (_tmp20_, cancellable, &_inner_error_); #line 144 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1255 "file.c" +#line 1131 "file.c" goto __catch3_g_error; } } @@ -1259,32 +1135,32 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, __catch3_g_error: { GError* err = NULL; - GFile* _tmp33_; - gchar* _tmp34_; - gchar* _tmp35_; - GError* _tmp36_; - const gchar* _tmp37_; + GFile* _tmp21_; + gchar* _tmp22_; + gchar* _tmp23_; + GError* _tmp24_; + const gchar* _tmp25_; #line 143 "/home/jens/Source/shotwell/src/util/file.vala" err = _inner_error_; #line 143 "/home/jens/Source/shotwell/src/util/file.vala" _inner_error_ = NULL; #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp33_ = file; + _tmp21_ = file; #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp34_ = g_file_get_path (_tmp33_); + _tmp22_ = g_file_get_path (_tmp21_); #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp35_ = _tmp34_; + _tmp23_ = _tmp22_; #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp36_ = err; + _tmp24_ = err; #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp37_ = _tmp36_->message; + _tmp25_ = _tmp24_->message; #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - g_warning ("file.vala:146: Unable to delete file %s: %s", _tmp35_, _tmp37_); + g_warning ("file.vala:146: Unable to delete file %s: %s", _tmp23_, _tmp25_); #line 146 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp35_); + _g_free0 (_tmp23_); #line 143 "/home/jens/Source/shotwell/src/util/file.vala" _g_error_free0 (err); -#line 1288 "file.c" +#line 1164 "file.c" } __finally3: #line 143 "/home/jens/Source/shotwell/src/util/file.vala" @@ -1294,304 +1170,273 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, #line 143 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (file); #line 143 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp13_); + _g_object_unref0 (_tmp8_); #line 143 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 143 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 143 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1305 "file.c" +#line 1181 "file.c" } #line 149 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp39_ = monitor; -#line 149 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp39__target = monitor_target; + if (monitor != NULL) { #line 149 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp39_ != NULL) { -#line 1313 "file.c" - guint64 _tmp40_; -#line 149 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp40_ = file_count; -#line 149 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp38_ = _tmp40_ > ((guint64) 0); -#line 1319 "file.c" + _tmp26_ = file_count > ((guint64) 0); +#line 1187 "file.c" } else { #line 149 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp38_ = FALSE; -#line 1323 "file.c" + _tmp26_ = FALSE; +#line 1191 "file.c" } #line 149 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp38_) { -#line 1327 "file.c" - ProgressMonitor _tmp41_; - void* _tmp41__target; - guint64 _tmp42_; - guint64 _tmp43_; - guint64 _tmp44_; -#line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp41_ = monitor; -#line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp41__target = monitor_target; -#line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp42_ = file_count; + if (_tmp26_) { +#line 1195 "file.c" + guint64 _tmp27_; + guint64 _tmp28_; #line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp43_ = i; + _tmp27_ = i; #line 150 "/home/jens/Source/shotwell/src/util/file.vala" - i = _tmp43_ + 1; + i = _tmp27_ + 1; #line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp44_ = i; + _tmp28_ = i; #line 150 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp41_ (_tmp42_, _tmp44_, TRUE, _tmp41__target); -#line 1347 "file.c" + monitor (file_count, _tmp28_, TRUE, monitor_target); +#line 1206 "file.c" } #line 135 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (file); #line 135 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp13_); -#line 1353 "file.c" + _g_object_unref0 (_tmp8_); +#line 1212 "file.c" } #line 125 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 125 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); -#line 1359 "file.c" +#line 1218 "file.c" } -time_t query_file_modified (GFile* file, GError** error) { +time_t +query_file_modified (GFile* file, + GError** error) +{ time_t result = 0; GFileInfo* info = NULL; - GFile* _tmp0_; - GFileInfo* _tmp1_; - GTimeVal _tmp3_ = {0}; - glong _tmp4_; + GFileInfo* _tmp0_; + GTimeVal _tmp2_ = {0}; + glong _tmp3_; GError * _inner_error_ = NULL; #line 154 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (file), 0); #line 155 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = file; -#line 155 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_query_info (_tmp0_, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); + _tmp0_ = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); #line 155 "/home/jens/Source/shotwell/src/util/file.vala" - info = _tmp1_; + info = _tmp0_; #line 155 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1381 "file.c" - time_t _tmp2_ = 0; +#line 1240 "file.c" + time_t _tmp1_ = 0; #line 155 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 155 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp2_; -#line 1387 "file.c" + return _tmp1_; +#line 1246 "file.c" } #line 158 "/home/jens/Source/shotwell/src/util/file.vala" - g_file_info_get_modification_time (info, &_tmp3_); + g_file_info_get_modification_time (info, &_tmp2_); #line 158 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = _tmp3_.tv_sec; + _tmp3_ = _tmp2_.tv_sec; #line 158 "/home/jens/Source/shotwell/src/util/file.vala" - result = (time_t) _tmp4_; + result = (time_t) _tmp3_; #line 158 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 158 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1399 "file.c" +#line 1258 "file.c" } -gboolean query_is_directory (GFile* file) { +gboolean +query_is_directory (GFile* file) +{ gboolean result = FALSE; - GFile* _tmp0_; - GFileType _tmp1_; #line 161 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (file), FALSE); #line 162 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = file; -#line 162 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); -#line 162 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp1_ == G_FILE_TYPE_DIRECTORY; + result = g_file_query_file_type (file, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_DIRECTORY; #line 162 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1417 "file.c" +#line 1272 "file.c" } -gboolean query_is_directory_empty (GFile* dir, GError** error) { +gboolean +query_is_directory_empty (GFile* dir, + GError** error) +{ gboolean result = FALSE; - GFile* _tmp0_; - GFileType _tmp1_; GFileEnumerator* enumerator = NULL; - GFile* _tmp2_; - GFileEnumerator* _tmp3_; - GFileEnumerator* _tmp5_; - GFileInfo* _tmp6_ = NULL; - GFileEnumerator* _tmp7_; - GFileInfo* _tmp8_; + GFileEnumerator* _tmp0_; + GFileEnumerator* _tmp2_; + GFileInfo* _tmp3_ = NULL; + GFileEnumerator* _tmp4_; + GFileInfo* _tmp5_; GError * _inner_error_ = NULL; #line 165 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (dir), FALSE); #line 166 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = dir; -#line 166 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL); -#line 166 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp1_ != G_FILE_TYPE_DIRECTORY) { + if (g_file_query_file_type (dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) != G_FILE_TYPE_DIRECTORY) { #line 167 "/home/jens/Source/shotwell/src/util/file.vala" result = FALSE; #line 167 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1445 "file.c" +#line 1296 "file.c" } #line 169 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = dir; -#line 169 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = g_file_enumerate_children (_tmp2_, "standard::name", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); + _tmp0_ = g_file_enumerate_children (dir, "standard::name", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); #line 169 "/home/jens/Source/shotwell/src/util/file.vala" - enumerator = _tmp3_; + enumerator = _tmp0_; #line 169 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1455 "file.c" - gboolean _tmp4_ = FALSE; +#line 1304 "file.c" + gboolean _tmp1_ = FALSE; #line 169 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 169 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp4_; -#line 1461 "file.c" + return _tmp1_; +#line 1310 "file.c" } #line 171 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = enumerator; + _tmp2_ = enumerator; #line 171 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp5_ == NULL) { + if (_tmp2_ == NULL) { #line 172 "/home/jens/Source/shotwell/src/util/file.vala" result = FALSE; #line 172 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 172 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1473 "file.c" +#line 1322 "file.c" } #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = enumerator; + _tmp4_ = enumerator; #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = g_file_enumerator_next_file (_tmp7_, NULL, &_inner_error_); + _tmp5_ = g_file_enumerator_next_file (_tmp4_, NULL, &_inner_error_); #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = _tmp8_; + _tmp3_ = _tmp5_; #line 174 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1483 "file.c" - gboolean _tmp9_ = FALSE; +#line 1332 "file.c" + gboolean _tmp6_ = FALSE; #line 174 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 174 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp9_; -#line 1491 "file.c" + return _tmp6_; +#line 1340 "file.c" } #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp6_ == NULL; + result = _tmp3_ == NULL; #line 174 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp6_); + _g_object_unref0 (_tmp3_); #line 174 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 174 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1501 "file.c" +#line 1350 "file.c" } -gchar* get_display_pathname (GFile* file) { +gchar* +get_display_pathname (GFile* file) +{ gchar* result = NULL; gchar* path = NULL; - GFile* _tmp0_; - gchar* _tmp1_; + gchar* _tmp0_; gchar* home = NULL; - const gchar* _tmp2_; - gchar* _tmp3_; + const gchar* _tmp1_; + gchar* _tmp2_; + const gchar* _tmp3_; const gchar* _tmp4_; - const gchar* _tmp5_; + const gchar* _tmp6_; const gchar* _tmp7_; - const gchar* _tmp8_; - gboolean _tmp9_; #line 177 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (file), NULL); #line 179 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = file; -#line 179 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_get_parse_name (_tmp0_); + _tmp0_ = g_file_get_parse_name (file); #line 179 "/home/jens/Source/shotwell/src/util/file.vala" - path = _tmp1_; + path = _tmp0_; #line 180 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = g_get_home_dir (); + _tmp1_ = g_get_home_dir (); #line 180 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = g_strdup (_tmp2_); + _tmp2_ = g_strdup (_tmp1_); #line 180 "/home/jens/Source/shotwell/src/util/file.vala" - home = _tmp3_; + home = _tmp2_; #line 182 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = path; + _tmp3_ = path; #line 182 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = home; + _tmp4_ = home; #line 182 "/home/jens/Source/shotwell/src/util/file.vala" - if (g_strcmp0 (_tmp4_, _tmp5_) == 0) { -#line 1538 "file.c" - gchar* _tmp6_; + if (g_strcmp0 (_tmp3_, _tmp4_) == 0) { +#line 1385 "file.c" + gchar* _tmp5_; #line 183 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = g_strdup ("~"); + _tmp5_ = g_strdup ("~"); #line 183 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp6_; + result = _tmp5_; #line 183 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (home); #line 183 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (path); #line 183 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1550 "file.c" +#line 1397 "file.c" } #line 185 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = path; + _tmp6_ = path; #line 185 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = home; + _tmp7_ = home; #line 185 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = g_str_has_prefix (_tmp7_, _tmp8_); -#line 185 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp9_) { -#line 1560 "file.c" - const gchar* _tmp10_; - const gchar* _tmp11_; - gint _tmp12_; - gint _tmp13_; + if (g_str_has_prefix (_tmp6_, _tmp7_)) { +#line 1405 "file.c" + const gchar* _tmp8_; + const gchar* _tmp9_; + gint _tmp10_; + gint _tmp11_; + gchar* _tmp12_; + gchar* _tmp13_; gchar* _tmp14_; gchar* _tmp15_; - gchar* _tmp16_; - gchar* _tmp17_; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = path; + _tmp8_ = path; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp11_ = home; + _tmp9_ = home; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp12_ = strlen (_tmp11_); + _tmp10_ = strlen (_tmp9_); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp13_ = _tmp12_; + _tmp11_ = _tmp10_; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp14_ = string_substring (_tmp10_, (glong) _tmp13_, (glong) -1); + _tmp12_ = string_substring (_tmp8_, (glong) _tmp11_, (glong) -1); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp15_ = _tmp14_; + _tmp13_ = _tmp12_; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp16_ = g_strdup_printf ("~%s", _tmp15_); + _tmp14_ = g_strdup_printf ("~%s", _tmp13_); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp17_ = _tmp16_; + _tmp15_ = _tmp14_; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp15_); + _g_free0 (_tmp13_); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp17_; + result = _tmp15_; #line 186 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (home); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" _g_free0 (path); #line 186 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1595 "file.c" +#line 1440 "file.c" } #line 188 "/home/jens/Source/shotwell/src/util/file.vala" result = path; @@ -1599,213 +1444,180 @@ gchar* get_display_pathname (GFile* file) { _g_free0 (home); #line 188 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1603 "file.c" +#line 1448 "file.c" } -gchar* strip_pretty_path (const gchar* path) { +gchar* +strip_pretty_path (const gchar* path) +{ gchar* result = NULL; - const gchar* _tmp0_; - gboolean _tmp1_; - const gchar* _tmp4_; - const gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; + const gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; #line 191 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (path != NULL, NULL); #line 192 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = path; -#line 192 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_str_has_prefix (_tmp0_, "~"); -#line 192 "/home/jens/Source/shotwell/src/util/file.vala" - if (!_tmp1_) { -#line 1625 "file.c" - const gchar* _tmp2_; - gchar* _tmp3_; + if (!g_str_has_prefix (path, "~")) { +#line 1465 "file.c" + gchar* _tmp0_; #line 193 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = path; + _tmp0_ = g_strdup (path); #line 193 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 193 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp3_; + result = _tmp0_; #line 193 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1636 "file.c" +#line 1473 "file.c" } #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = g_get_home_dir (); -#line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = path; + _tmp1_ = g_get_home_dir (); #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = string_substring (_tmp5_, (glong) 1, (glong) -1); + _tmp2_ = string_substring (path, (glong) 1, (glong) -1); #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = _tmp6_; + _tmp3_ = _tmp2_; #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp8_ = g_strconcat (_tmp4_, _tmp7_, NULL); + _tmp4_ = g_strconcat (_tmp1_, _tmp3_, NULL); #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = _tmp8_; + _tmp5_ = _tmp4_; #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - _g_free0 (_tmp7_); + _g_free0 (_tmp3_); #line 195 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp9_; + result = _tmp5_; #line 195 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1656 "file.c" +#line 1491 "file.c" } -gchar* get_file_info_id (GFileInfo* info) { +gchar* +get_file_info_id (GFileInfo* info) +{ gchar* result = NULL; - GFileInfo* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; + const gchar* _tmp0_; + gchar* _tmp1_; #line 198 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); #line 199 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = info; -#line 199 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = g_file_info_get_attribute_string (_tmp0_, G_FILE_ATTRIBUTE_ID_FILE); + _tmp0_ = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILE); #line 199 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = g_strdup (_tmp1_); + _tmp1_ = g_strdup (_tmp0_); #line 199 "/home/jens/Source/shotwell/src/util/file.vala" - result = _tmp2_; + result = _tmp1_; #line 199 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1677 "file.c" +#line 1511 "file.c" } -void skip_uint64 (GInputStream* input, guint64 skip_amount, GError** error) { +void +skip_uint64 (GInputStream* input, + guint64 skip_amount, + GError** error) +{ GError * _inner_error_ = NULL; #line 203 "/home/jens/Source/shotwell/src/util/file.vala" g_return_if_fail (G_IS_INPUT_STREAM (input)); #line 204 "/home/jens/Source/shotwell/src/util/file.vala" while (TRUE) { -#line 1687 "file.c" - guint64 _tmp0_; - guint64 _tmp1_; -#line 204 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = skip_amount; #line 204 "/home/jens/Source/shotwell/src/util/file.vala" - if (!(_tmp0_ > ((guint64) 0))) { + if (!(skip_amount > ((guint64) 0))) { #line 204 "/home/jens/Source/shotwell/src/util/file.vala" break; -#line 1696 "file.c" +#line 1529 "file.c" } #line 206 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = skip_amount; -#line 206 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp1_ >= ((guint64) G_MAXSSIZE)) { -#line 1702 "file.c" - GInputStream* _tmp2_; - guint64 _tmp3_; -#line 207 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = input; + if (skip_amount >= ((guint64) G_MAXSSIZE)) { #line 207 "/home/jens/Source/shotwell/src/util/file.vala" - g_input_stream_skip (_tmp2_, (gsize) G_MAXSSIZE, NULL, &_inner_error_); + g_input_stream_skip (input, (gsize) G_MAXSSIZE, NULL, &_inner_error_); #line 207 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 207 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 207 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1715 "file.c" +#line 1541 "file.c" } #line 208 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = skip_amount; -#line 208 "/home/jens/Source/shotwell/src/util/file.vala" - skip_amount = _tmp3_ - G_MAXSSIZE; -#line 1721 "file.c" + skip_amount = skip_amount - G_MAXSSIZE; +#line 1545 "file.c" } else { - GInputStream* _tmp4_; - guint64 _tmp5_; #line 210 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = input; -#line 210 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = skip_amount; -#line 210 "/home/jens/Source/shotwell/src/util/file.vala" - g_input_stream_skip (_tmp4_, (gsize) _tmp5_, NULL, &_inner_error_); + g_input_stream_skip (input, (gsize) skip_amount, NULL, &_inner_error_); #line 210 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 210 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 210 "/home/jens/Source/shotwell/src/util/file.vala" return; -#line 1737 "file.c" +#line 1555 "file.c" } #line 211 "/home/jens/Source/shotwell/src/util/file.vala" skip_amount = (guint64) 0; -#line 1741 "file.c" +#line 1559 "file.c" } } } -guint64 count_files_in_directory (GFile* dir, GError** error) { +guint64 +count_files_in_directory (GFile* dir, + GError** error) +{ guint64 result = 0ULL; - GFile* _tmp0_; - gboolean _tmp1_; guint64 count = 0ULL; GFileEnumerator* enumerator = NULL; - GFile* _tmp2_; - GFileEnumerator* _tmp3_; + GFileEnumerator* _tmp0_; GFileInfo* info = NULL; GError * _inner_error_ = NULL; #line 217 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail (G_IS_FILE (dir), 0ULL); #line 218 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = dir; -#line 218 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = query_is_directory (_tmp0_); -#line 218 "/home/jens/Source/shotwell/src/util/file.vala" - if (!_tmp1_) { + if (!query_is_directory (dir)) { #line 219 "/home/jens/Source/shotwell/src/util/file.vala" result = (guint64) 0; #line 219 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1769 "file.c" +#line 1583 "file.c" } #line 221 "/home/jens/Source/shotwell/src/util/file.vala" count = (guint64) 0; #line 222 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = dir; + _tmp0_ = g_file_enumerate_children (dir, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); #line 222 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = g_file_enumerate_children (_tmp2_, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_); -#line 222 "/home/jens/Source/shotwell/src/util/file.vala" - enumerator = _tmp3_; + enumerator = _tmp0_; #line 222 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1781 "file.c" - guint64 _tmp4_ = 0ULL; +#line 1593 "file.c" + guint64 _tmp1_ = 0ULL; #line 222 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 222 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp4_; -#line 1787 "file.c" + return _tmp1_; +#line 1599 "file.c" } #line 225 "/home/jens/Source/shotwell/src/util/file.vala" info = NULL; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" while (TRUE) { -#line 1793 "file.c" - GFileInfo* _tmp5_ = NULL; - GFileEnumerator* _tmp6_; +#line 1605 "file.c" + GFileInfo* _tmp2_ = NULL; + GFileEnumerator* _tmp3_; + GFileInfo* _tmp4_; + GFileInfo* _tmp6_; GFileInfo* _tmp7_; - GFileInfo* _tmp9_; - GFileInfo* _tmp10_; - guint64 _tmp11_; + guint64 _tmp8_; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = enumerator; + _tmp3_ = enumerator; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp7_ = g_file_enumerator_next_file (_tmp6_, NULL, &_inner_error_); + _tmp4_ = g_file_enumerator_next_file (_tmp3_, NULL, &_inner_error_); #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = _tmp7_; + _tmp2_ = _tmp4_; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1808 "file.c" - guint64 _tmp8_ = 0ULL; +#line 1620 "file.c" + guint64 _tmp5_ = 0ULL; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" g_propagate_error (error, _inner_error_); #line 226 "/home/jens/Source/shotwell/src/util/file.vala" @@ -1813,34 +1625,34 @@ guint64 count_files_in_directory (GFile* dir, GError** error) { #line 226 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (enumerator); #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - return _tmp8_; -#line 1818 "file.c" + return _tmp5_; +#line 1630 "file.c" } #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp9_ = _tmp5_; + _tmp6_ = _tmp2_; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = NULL; + _tmp2_ = NULL; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" _g_object_unref0 (info); #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - info = _tmp9_; + info = _tmp6_; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp10_ = info; + _tmp7_ = info; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - if (!(_tmp10_ != NULL)) { + if (!(_tmp7_ != NULL)) { #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp5_); + _g_object_unref0 (_tmp2_); #line 226 "/home/jens/Source/shotwell/src/util/file.vala" break; -#line 1836 "file.c" +#line 1648 "file.c" } #line 227 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp11_ = count; + _tmp8_ = count; #line 227 "/home/jens/Source/shotwell/src/util/file.vala" - count = _tmp11_ + 1; + count = _tmp8_ + 1; #line 226 "/home/jens/Source/shotwell/src/util/file.vala" - _g_object_unref0 (_tmp5_); -#line 1844 "file.c" + _g_object_unref0 (_tmp2_); +#line 1656 "file.c" } #line 229 "/home/jens/Source/shotwell/src/util/file.vala" result = count; @@ -1850,93 +1662,71 @@ guint64 count_files_in_directory (GFile* dir, GError** error) { _g_object_unref0 (enumerator); #line 229 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1854 "file.c" +#line 1666 "file.c" } -gboolean file_equal (GFile* a, GFile* b) { +gboolean +file_equal (GFile* a, + GFile* b) +{ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - GFile* _tmp2_; #line 233 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail ((a == NULL) || G_IS_FILE (a), FALSE); #line 233 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail ((b == NULL) || G_IS_FILE (b), FALSE); #line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = a; -#line 234 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp2_ != NULL) { -#line 1871 "file.c" - GFile* _tmp3_; -#line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = b; + if (a != NULL) { #line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = _tmp3_ != NULL; -#line 1877 "file.c" + _tmp1_ = b != NULL; +#line 1685 "file.c" } else { #line 234 "/home/jens/Source/shotwell/src/util/file.vala" _tmp1_ = FALSE; -#line 1881 "file.c" +#line 1689 "file.c" } #line 234 "/home/jens/Source/shotwell/src/util/file.vala" if (_tmp1_) { -#line 1885 "file.c" - GFile* _tmp4_; - GFile* _tmp5_; - gboolean _tmp6_; #line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp4_ = a; -#line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp5_ = b; -#line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp6_ = g_file_equal (_tmp4_, _tmp5_); -#line 234 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = _tmp6_; -#line 1897 "file.c" + _tmp0_ = g_file_equal (a, b); +#line 1695 "file.c" } else { #line 234 "/home/jens/Source/shotwell/src/util/file.vala" _tmp0_ = FALSE; -#line 1901 "file.c" +#line 1699 "file.c" } #line 234 "/home/jens/Source/shotwell/src/util/file.vala" result = _tmp0_; #line 234 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1907 "file.c" +#line 1705 "file.c" } -guint file_hash (GFile* file) { +guint +file_hash (GFile* file) +{ guint result = 0U; guint _tmp0_ = 0U; - GFile* _tmp1_; #line 238 "/home/jens/Source/shotwell/src/util/file.vala" g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), 0U); #line 239 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp1_ = file; -#line 239 "/home/jens/Source/shotwell/src/util/file.vala" - if (_tmp1_ != NULL) { -#line 1921 "file.c" - GFile* _tmp2_; - guint _tmp3_; -#line 239 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp2_ = file; -#line 239 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp3_ = g_file_hash (_tmp2_); + if (file != NULL) { #line 239 "/home/jens/Source/shotwell/src/util/file.vala" - _tmp0_ = _tmp3_; -#line 1930 "file.c" + _tmp0_ = g_file_hash (file); +#line 1720 "file.c" } else { #line 239 "/home/jens/Source/shotwell/src/util/file.vala" _tmp0_ = (guint) 0; -#line 1934 "file.c" +#line 1724 "file.c" } #line 239 "/home/jens/Source/shotwell/src/util/file.vala" result = _tmp0_; #line 239 "/home/jens/Source/shotwell/src/util/file.vala" return result; -#line 1940 "file.c" +#line 1730 "file.c" } |