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/string.c | |
parent | 49120f48474fc8fdc2448c75d961bc238213cfac (diff) |
New upstream version 0.28.3upstream/0.28.3
Diffstat (limited to 'src/util/string.c')
-rw-r--r-- | src/util/string.c | 2168 |
1 files changed, 952 insertions, 1216 deletions
diff --git a/src/util/string.c b/src/util/string.c index 642e9fa..0b503fb 100644 --- a/src/util/string.c +++ b/src/util/string.c @@ -1,4 +1,4 @@ -/* string.c generated by valac 0.36.6, the Vala compiler +/* string.c generated by valac 0.40.4, the Vala compiler * generated from string.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ + #include <glib.h> #include <glib-object.h> #include <stdlib.h> @@ -30,288 +31,291 @@ typedef enum { -gint64 g_ascii_strtoll (const gchar* str, gchar** endptr, guint num_base); +gint64 g_ascii_strtoll (const gchar* str, + gchar** endptr, + guint num_base); #define DEFAULT_USER_TEXT_INPUT_LENGTH 1024 gboolean is_string_empty (const gchar* s); -gint utf8_cs_compare (void* a, void* b); -gint utf8_ci_compare (void* a, void* b); -gchar* uchar_array_to_string (guchar* data, int data_length1, gint length); -guchar* string_to_uchar_array (const gchar* str, int* result_length1); -static void _vala_array_add1 (guchar* * array, int* length, int* size, guchar value); +gint utf8_cs_compare (void* a, + void* b); +gint utf8_ci_compare (void* a, + void* b); +gchar* uchar_array_to_string (guchar* data, + int data_length1, + gint length); +guchar* string_to_uchar_array (const gchar* str, + int* result_length1); +static void _vala_array_add1 (guchar* * array, + int* length, + int* size, + guchar value); gchar* guarded_markup_escape_text (const gchar* plain); -glong find_last_offset (const gchar* str, gchar c); -gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1); +glong find_last_offset (const gchar* str, + gchar c); +gboolean is_in_ci_array (const gchar* str, + gchar** strings, + int strings_length1); GType prepare_input_text_options_get_type (void) G_GNUC_CONST; gchar* guess_convert (const gchar* text); -gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length); -gint64 parse_int64 (const gchar* str, gint num_base); -gboolean string_contains_char (const gchar* haystack, gunichar needle); -gboolean string_contains_str (const gchar* haystack, const gchar* needle); -gchar* string_sliced_at (const gchar* str, gint index); -gchar* string_sliced_at_first_str (const gchar* haystack, const gchar* needle, gint start_index); -gchar* string_sliced_at_last_str (const gchar* haystack, const gchar* needle, gint start_index); -gchar* string_sliced_at_first_char (const gchar* haystack, gunichar ch, gint start_index); -gchar* string_sliced_at_last_char (const gchar* haystack, gunichar ch, gint start_index); +gchar* prepare_input_text (const gchar* text, + PrepareInputTextOptions options, + gint dest_length); +gint64 parse_int64 (const gchar* str, + gint num_base); +gboolean string_contains_char (const gchar* haystack, + gunichar needle); +gboolean string_contains_str (const gchar* haystack, + const gchar* needle); +gchar* string_sliced_at (const gchar* str, + gint index); +gchar* string_sliced_at_first_str (const gchar* haystack, + const gchar* needle, + gint start_index); +gchar* string_sliced_at_last_str (const gchar* haystack, + const gchar* needle, + gint start_index); +gchar* string_sliced_at_first_char (const gchar* haystack, + gunichar ch, + gint start_index); +gchar* string_sliced_at_last_char (const gchar* haystack, + gunichar ch, + gint start_index); gchar* string_strip_leading_zeroes (const gchar* str); gchar* string_remove_diacritics (const gchar* istring); gchar* string_to_hex_string (const gchar* str); guint string_collated_hash (void* ptr); guint string_precollated_hash (void* ptr); -gint string_collated_compare (void* a, void* b); -gint string_precollated_compare (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey); -gboolean string_collated_equals (void* a, void* b); -gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey); - - -static gchar string_get (const gchar* self, glong index) { +gint string_collated_compare (void* a, + void* b); +gint string_precollated_compare (const gchar* astr, + const gchar* akey, + const gchar* bstr, + const gchar* bkey); +gboolean string_collated_equals (void* a, + void* b); +gboolean string_precollated_equals (const gchar* astr, + const gchar* akey, + const gchar* bstr, + const gchar* bkey); + + +static gchar +string_get (const gchar* self, + glong index) +{ gchar result = '\0'; - glong _tmp0_; - gchar _tmp1_; -#line 1110 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar _tmp0_; +#line 1124 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, '\0'); -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = ((gchar*) self)[_tmp0_]; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = ((gchar*) self)[index]; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp0_; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 81 "string.c" +#line 117 "string.c" } -inline gboolean is_string_empty (const gchar* s) { +inline gboolean +is_string_empty (const gchar* s) +{ gboolean result = FALSE; gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; #line 12 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = s; -#line 12 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp1_ == NULL) { + if (s == NULL) { #line 12 "/home/jens/Source/shotwell/src/util/string.vala" _tmp0_ = TRUE; -#line 95 "string.c" +#line 130 "string.c" } else { - const gchar* _tmp2_; - gchar _tmp3_; -#line 12 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = s; #line 12 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = string_get (_tmp2_, (glong) 0); -#line 12 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = _tmp3_ == '\0'; -#line 105 "string.c" + _tmp0_ = string_get (s, (glong) 0) == '\0'; +#line 134 "string.c" } #line 12 "/home/jens/Source/shotwell/src/util/string.vala" result = _tmp0_; #line 12 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 111 "string.c" +#line 140 "string.c" } -gint utf8_cs_compare (void* a, void* b) { +gint +utf8_cs_compare (void* a, + void* b) +{ gint result = 0; - void* _tmp0_; - void* _tmp1_; - gint _tmp2_; -#line 17 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = a; #line 17 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = b; -#line 17 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_utf8_collate ((const gchar*) _tmp0_, (const gchar*) _tmp1_); -#line 17 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_; + result = g_utf8_collate ((const gchar*) a, (const gchar*) b); #line 17 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 130 "string.c" +#line 153 "string.c" } -gint utf8_ci_compare (void* a, void* b) { +gint +utf8_ci_compare (void* a, + void* b) +{ gint result = 0; - void* _tmp0_; + gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; - void* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gint _tmp6_; - gint _tmp7_; -#line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = a; -#line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = g_utf8_strdown ((const gchar*) _tmp0_, (gssize) -1); -#line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = _tmp1_; + gchar* _tmp3_; + gint _tmp4_; #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = b; + _tmp0_ = g_utf8_strdown ((const gchar*) a, (gssize) -1); #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = g_utf8_strdown ((const gchar*) _tmp3_, (gssize) -1); + _tmp1_ = _tmp0_; #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = _tmp4_; + _tmp2_ = g_utf8_strdown ((const gchar*) b, (gssize) -1); #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = g_utf8_collate (_tmp2_, _tmp5_); + _tmp3_ = _tmp2_; #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = _tmp6_; + _tmp4_ = g_utf8_collate (_tmp1_, _tmp3_); #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp5_); + _g_free0 (_tmp3_); #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp2_); + _g_free0 (_tmp1_); #line 22 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp7_; + result = _tmp4_; #line 22 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 168 "string.c" +#line 185 "string.c" } -gchar* uchar_array_to_string (guchar* data, int data_length1, gint length) { +gchar* +uchar_array_to_string (guchar* data, + int data_length1, + gint length) +{ gchar* result = NULL; - gint _tmp0_; GString* builder = NULL; - GString* _tmp2_; - GString* _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; -#line 27 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = length; + GString* _tmp0_; + GString* _tmp9_; + const gchar* _tmp10_; + gchar* _tmp11_; #line 27 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp0_ < 0) { -#line 184 "string.c" - guchar* _tmp1_; - gint _tmp1__length1; -#line 28 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = data; -#line 28 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1__length1 = data_length1; + if (length < 0) { #line 28 "/home/jens/Source/shotwell/src/util/string.vala" - length = _tmp1__length1; -#line 193 "string.c" + length = data_length1; +#line 204 "string.c" } #line 30 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_string_new (""); + _tmp0_ = g_string_new (""); #line 30 "/home/jens/Source/shotwell/src/util/string.vala" - builder = _tmp2_; -#line 199 "string.c" + builder = _tmp0_; +#line 210 "string.c" { gint ctr = 0; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" ctr = 0; -#line 204 "string.c" +#line 215 "string.c" { - gboolean _tmp3_ = FALSE; + gboolean _tmp1_ = FALSE; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = TRUE; + _tmp1_ = TRUE; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 211 "string.c" - gint _tmp5_; - gint _tmp6_; - guchar* _tmp7_; - gint _tmp7__length1; - gint _tmp8_; - guchar _tmp9_; +#line 222 "string.c" + gint _tmp3_; + gint _tmp4_; + guchar _tmp5_; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - if (!_tmp3_) { -#line 220 "string.c" - gint _tmp4_; + if (!_tmp1_) { +#line 228 "string.c" + gint _tmp2_; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = ctr; + _tmp2_ = ctr; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - ctr = _tmp4_ + 1; -#line 226 "string.c" + ctr = _tmp2_ + 1; +#line 234 "string.c" } #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = FALSE; -#line 31 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = ctr; + _tmp1_ = FALSE; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = length; + _tmp3_ = ctr; #line 31 "/home/jens/Source/shotwell/src/util/string.vala" - if (!(_tmp5_ < _tmp6_)) { + if (!(_tmp3_ < length)) { #line 31 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 238 "string.c" +#line 244 "string.c" } #line 32 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = data; -#line 32 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7__length1 = data_length1; + _tmp4_ = ctr; #line 32 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = ctr; + _tmp5_ = data[_tmp4_]; #line 32 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = _tmp7_[_tmp8_]; -#line 32 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp9_ != ((guchar) '\0')) { -#line 250 "string.c" - GString* _tmp10_; - guchar* _tmp11_; - gint _tmp11__length1; - gint _tmp12_; - guchar _tmp13_; -#line 33 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = builder; -#line 33 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = data; + if (_tmp5_ != ((guchar) '\0')) { +#line 252 "string.c" + GString* _tmp6_; + gint _tmp7_; + guchar _tmp8_; #line 33 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11__length1 = data_length1; + _tmp6_ = builder; #line 33 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = ctr; + _tmp7_ = ctr; #line 33 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = _tmp11_[_tmp12_]; + _tmp8_ = data[_tmp7_]; #line 33 "/home/jens/Source/shotwell/src/util/string.vala" - g_string_append_c (_tmp10_, (gchar) _tmp13_); -#line 268 "string.c" + g_string_append_c (_tmp6_, (gchar) _tmp8_); +#line 264 "string.c" } else { #line 35 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 272 "string.c" +#line 268 "string.c" } } } } #line 38 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp14_ = builder; + _tmp9_ = builder; #line 38 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp15_ = _tmp14_->str; + _tmp10_ = _tmp9_->str; #line 38 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp16_ = g_strdup (_tmp15_); + _tmp11_ = g_strdup (_tmp10_); #line 38 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp16_; + result = _tmp11_; #line 38 "/home/jens/Source/shotwell/src/util/string.vala" _g_string_free0 (builder); #line 38 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 289 "string.c" +#line 285 "string.c" } -static void _vala_array_add1 (guchar* * array, int* length, int* size, guchar value) { +static void +_vala_array_add1 (guchar* * array, + int* length, + int* size, + guchar value) +{ #line 45 "/home/jens/Source/shotwell/src/util/string.vala" if ((*length) == (*size)) { #line 45 "/home/jens/Source/shotwell/src/util/string.vala" *size = (*size) ? (2 * (*size)) : 4; #line 45 "/home/jens/Source/shotwell/src/util/string.vala" *array = g_renew (guchar, *array, *size); -#line 300 "string.c" +#line 301 "string.c" } #line 45 "/home/jens/Source/shotwell/src/util/string.vala" (*array)[(*length)++] = value; -#line 304 "string.c" +#line 305 "string.c" } -guchar* string_to_uchar_array (const gchar* str, int* result_length1) { +guchar* +string_to_uchar_array (const gchar* str, + int* result_length1) +{ guchar* result = NULL; guchar* data = NULL; guchar* _tmp0_; gint data_length1; gint _data_size_; - guchar* _tmp11_; - gint _tmp11__length1; + guchar* _tmp8_; + gint _tmp8__length1; #line 42 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, NULL); #line 43 "/home/jens/Source/shotwell/src/util/string.vala" @@ -322,257 +326,224 @@ guchar* string_to_uchar_array (const gchar* str, int* result_length1) { data_length1 = 0; #line 43 "/home/jens/Source/shotwell/src/util/string.vala" _data_size_ = data_length1; -#line 326 "string.c" +#line 330 "string.c" { gint ctr = 0; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" ctr = 0; -#line 331 "string.c" +#line 335 "string.c" { gboolean _tmp1_ = FALSE; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" _tmp1_ = TRUE; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 338 "string.c" +#line 342 "string.c" gint _tmp3_; - const gchar* _tmp4_; + gint _tmp4_; gint _tmp5_; - gint _tmp6_; - guchar* _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; - gint _tmp9_; - gchar _tmp10_; + guchar* _tmp6_; + gint _tmp6__length1; + gint _tmp7_; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" if (!_tmp1_) { -#line 350 "string.c" +#line 351 "string.c" gint _tmp2_; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" _tmp2_ = ctr; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" ctr = _tmp2_ + 1; -#line 356 "string.c" +#line 357 "string.c" } #line 44 "/home/jens/Source/shotwell/src/util/string.vala" _tmp1_ = FALSE; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" _tmp3_ = ctr; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = str; -#line 44 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = strlen (_tmp4_); + _tmp4_ = strlen (str); #line 44 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = _tmp5_; + _tmp5_ = _tmp4_; #line 44 "/home/jens/Source/shotwell/src/util/string.vala" - if (!(_tmp3_ < _tmp6_)) { + if (!(_tmp3_ < _tmp5_)) { #line 44 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 372 "string.c" +#line 371 "string.c" } #line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = data; -#line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7__length1 = data_length1; + _tmp6_ = data; #line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = str; + _tmp6__length1 = data_length1; #line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = ctr; + _tmp7_ = ctr; #line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = string_get (_tmp8_, (glong) _tmp9_); -#line 45 "/home/jens/Source/shotwell/src/util/string.vala" - _vala_array_add1 (&data, &data_length1, &_data_size_, (guchar) _tmp10_); -#line 386 "string.c" + _vala_array_add1 (&data, &data_length1, &_data_size_, (guchar) string_get (str, (glong) _tmp7_)); +#line 381 "string.c" } } } #line 47 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = data; + _tmp8_ = data; #line 47 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11__length1 = data_length1; + _tmp8__length1 = data_length1; #line 47 "/home/jens/Source/shotwell/src/util/string.vala" if (result_length1) { #line 47 "/home/jens/Source/shotwell/src/util/string.vala" - *result_length1 = _tmp11__length1; -#line 398 "string.c" + *result_length1 = _tmp8__length1; +#line 393 "string.c" } #line 47 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp11_; + result = _tmp8_; #line 47 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 404 "string.c" +#line 399 "string.c" } -inline gchar* guarded_markup_escape_text (const gchar* plain) { +inline gchar* +guarded_markup_escape_text (const gchar* plain) +{ gchar* result = NULL; gchar* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; - const gchar* _tmp2_; - gboolean _tmp3_; #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = plain; + if (!is_string_empty (plain)) { +#line 411 "string.c" + gboolean _tmp2_; #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = is_string_empty (_tmp2_); + _tmp2_ = g_utf8_validate (plain, (gssize) -1, NULL); #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - if (!_tmp3_) { -#line 420 "string.c" - const gchar* _tmp4_; - gboolean _tmp5_; -#line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = plain; -#line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = g_utf8_validate (_tmp4_, (gssize) -1, NULL); -#line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = _tmp5_; -#line 429 "string.c" + _tmp1_ = _tmp2_; +#line 417 "string.c" } else { #line 58 "/home/jens/Source/shotwell/src/util/string.vala" _tmp1_ = FALSE; -#line 433 "string.c" +#line 421 "string.c" } #line 58 "/home/jens/Source/shotwell/src/util/string.vala" if (_tmp1_) { -#line 437 "string.c" - const gchar* _tmp6_; - gchar* _tmp7_; -#line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = plain; +#line 425 "string.c" + gchar* _tmp3_; #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = g_markup_escape_text (_tmp6_, (gssize) -1); + _tmp3_ = g_markup_escape_text (plain, (gssize) -1); #line 58 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (_tmp0_); #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = _tmp7_; -#line 448 "string.c" + _tmp0_ = _tmp3_; +#line 433 "string.c" } else { - gchar* _tmp8_; + gchar* _tmp4_; #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = g_strdup (""); + _tmp4_ = g_strdup (""); #line 58 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (_tmp0_); #line 58 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = _tmp8_; -#line 457 "string.c" + _tmp0_ = _tmp4_; +#line 442 "string.c" } #line 58 "/home/jens/Source/shotwell/src/util/string.vala" result = _tmp0_; #line 58 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 463 "string.c" +#line 448 "string.c" } -glong find_last_offset (const gchar* str, gchar c) { +glong +find_last_offset (const gchar* str, + gchar c) +{ glong result = 0L; glong offset = 0L; - const gchar* _tmp0_; + gint _tmp0_; gint _tmp1_; - gint _tmp2_; #line 61 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, 0L); #line 62 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = str; -#line 62 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = strlen (_tmp0_); + _tmp0_ = strlen (str); #line 62 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 62 "/home/jens/Source/shotwell/src/util/string.vala" - offset = (glong) _tmp2_; + offset = (glong) _tmp1_; #line 63 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 485 "string.c" +#line 470 "string.c" + glong _tmp2_; glong _tmp3_; glong _tmp4_; - const gchar* _tmp5_; - glong _tmp6_; - gchar _tmp7_; - gchar _tmp8_; #line 63 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = offset; + _tmp2_ = offset; #line 63 "/home/jens/Source/shotwell/src/util/string.vala" - offset = _tmp3_ - 1; + offset = _tmp2_ - 1; #line 63 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = offset; + _tmp3_ = offset; #line 63 "/home/jens/Source/shotwell/src/util/string.vala" - if (!(_tmp4_ >= ((glong) 0))) { + if (!(_tmp3_ >= ((glong) 0))) { #line 63 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 502 "string.c" +#line 484 "string.c" } #line 64 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = str; -#line 64 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = offset; -#line 64 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = string_get (_tmp5_, _tmp6_); -#line 64 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = c; + _tmp4_ = offset; #line 64 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp7_ == _tmp8_) { + if (string_get (str, _tmp4_) == c) { #line 65 "/home/jens/Source/shotwell/src/util/string.vala" result = offset; #line 65 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 518 "string.c" +#line 494 "string.c" } } #line 68 "/home/jens/Source/shotwell/src/util/string.vala" result = (glong) -1; #line 68 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 525 "string.c" +#line 501 "string.c" } -gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1) { +gboolean +is_in_ci_array (const gchar* str, + gchar** strings, + int strings_length1) +{ gboolean result = FALSE; gchar* strdown = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - gchar** _tmp2_; - gint _tmp2__length1; + gchar* _tmp0_; #line 73 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, FALSE); #line 74 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = str; -#line 74 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = g_utf8_strdown (_tmp0_, (gssize) -1); + _tmp0_ = g_utf8_strdown (str, (gssize) -1); #line 74 "/home/jens/Source/shotwell/src/util/string.vala" - strdown = _tmp1_; -#line 75 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = strings; -#line 75 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2__length1 = strings_length1; -#line 548 "string.c" + strdown = _tmp0_; +#line 519 "string.c" { gchar** str_element_collection = NULL; gint str_element_collection_length1 = 0; gint _str_element_collection_size_ = 0; gint str_element_it = 0; #line 75 "/home/jens/Source/shotwell/src/util/string.vala" - str_element_collection = _tmp2_; + str_element_collection = strings; #line 75 "/home/jens/Source/shotwell/src/util/string.vala" - str_element_collection_length1 = _tmp2__length1; + str_element_collection_length1 = strings_length1; #line 75 "/home/jens/Source/shotwell/src/util/string.vala" - for (str_element_it = 0; str_element_it < _tmp2__length1; str_element_it = str_element_it + 1) { -#line 560 "string.c" - gchar* _tmp3_; + for (str_element_it = 0; str_element_it < strings_length1; str_element_it = str_element_it + 1) { +#line 531 "string.c" + gchar* _tmp1_; gchar* str_element = NULL; #line 75 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = g_strdup (str_element_collection[str_element_it]); + _tmp1_ = g_strdup (str_element_collection[str_element_it]); #line 75 "/home/jens/Source/shotwell/src/util/string.vala" - str_element = _tmp3_; -#line 567 "string.c" + str_element = _tmp1_; +#line 538 "string.c" { - const gchar* _tmp4_; - const gchar* _tmp5_; + const gchar* _tmp2_; + const gchar* _tmp3_; #line 76 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = strdown; + _tmp2_ = strdown; #line 76 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = str_element; + _tmp3_ = str_element; #line 76 "/home/jens/Source/shotwell/src/util/string.vala" - if (g_strcmp0 (_tmp4_, _tmp5_) == 0) { + if (g_strcmp0 (_tmp2_, _tmp3_) == 0) { #line 77 "/home/jens/Source/shotwell/src/util/string.vala" result = TRUE; #line 77 "/home/jens/Source/shotwell/src/util/string.vala" @@ -581,11 +552,11 @@ gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1) _g_free0 (strdown); #line 77 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 585 "string.c" +#line 556 "string.c" } #line 75 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (str_element); -#line 589 "string.c" +#line 560 "string.c" } } } @@ -595,11 +566,13 @@ gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1) _g_free0 (strdown); #line 80 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 599 "string.c" +#line 570 "string.c" } -GType prepare_input_text_options_get_type (void) { +GType +prepare_input_text_options_get_type (void) +{ static volatile gsize prepare_input_text_options_type_id__volatile = 0; if (g_once_init_enter (&prepare_input_text_options_type_id__volatile)) { static const GFlagsValue values[] = {{PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL, "PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL", "empty-is-null"}, {PREPARE_INPUT_TEXT_OPTIONS_VALIDATE, "PREPARE_INPUT_TEXT_OPTIONS_VALIDATE", "validate"}, {PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL, "PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL", "invalid-is-null"}, {PREPARE_INPUT_TEXT_OPTIONS_STRIP, "PREPARE_INPUT_TEXT_OPTIONS_STRIP", "strip"}, {PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF, "PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF", "strip-crlf"}, {PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE, "PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE", "normalize"}, {PREPARE_INPUT_TEXT_OPTIONS_DEFAULT, "PREPARE_INPUT_TEXT_OPTIONS_DEFAULT", "default"}, {0, NULL, NULL}}; @@ -611,17 +584,18 @@ GType prepare_input_text_options_get_type (void) { } -gchar* guess_convert (const gchar* text) { +gchar* +guess_convert (const gchar* text) +{ gchar* result = NULL; gchar* output = NULL; gsize bytes_read = 0UL; const gchar* charset = NULL; const gchar* _tmp0_ = NULL; gboolean _tmp1_; - gsize _tmp30_; - const gchar* _tmp31_; - gint _tmp32_; - gint _tmp33_; + gsize _tmp23_; + gint _tmp24_; + gint _tmp25_; GError * _inner_error_ = NULL; #line 94 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (text != NULL, NULL); @@ -640,84 +614,69 @@ gchar* guess_convert (const gchar* text) { charset = _tmp0_; #line 101 "/home/jens/Source/shotwell/src/util/string.vala" if (!_tmp1_) { -#line 643 "string.c" - const gchar* _tmp2_; - const gchar* _tmp3_; - gint _tmp4_; - gint _tmp5_; - gsize _tmp6_ = 0UL; - gchar* _tmp7_; - gsize _tmp8_; - const gchar* _tmp9_; - gint _tmp10_; - gint _tmp11_; -#line 102 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = text; -#line 102 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = text; +#line 617 "string.c" + gint _tmp2_; + gint _tmp3_; + gsize _tmp4_ = 0UL; + gchar* _tmp5_; + gsize _tmp6_; + gint _tmp7_; + gint _tmp8_; #line 102 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = strlen (_tmp3_); + _tmp2_ = strlen (text); #line 102 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = _tmp4_; + _tmp3_ = _tmp2_; #line 102 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = g_locale_to_utf8 (_tmp2_, (gssize) _tmp5_, &_tmp6_, NULL, NULL); + _tmp5_ = g_locale_to_utf8 (text, (gssize) _tmp3_, &_tmp4_, NULL, NULL); #line 102 "/home/jens/Source/shotwell/src/util/string.vala" - bytes_read = _tmp6_; + bytes_read = _tmp4_; #line 102 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (output); #line 102 "/home/jens/Source/shotwell/src/util/string.vala" - output = _tmp7_; -#line 103 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = bytes_read; + output = _tmp5_; #line 103 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = text; + _tmp6_ = bytes_read; #line 103 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = strlen (_tmp9_); + _tmp7_ = strlen (text); #line 103 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = _tmp10_; + _tmp8_ = _tmp7_; #line 103 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp8_ == ((gsize) _tmp11_)) { -#line 680 "string.c" - const gchar* _tmp12_; + if (_tmp6_ == ((gsize) _tmp8_)) { +#line 645 "string.c" + const gchar* _tmp9_; #line 104 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = charset; + _tmp9_ = charset; #line 104 "/home/jens/Source/shotwell/src/util/string.vala" - g_debug ("string.vala:104: CONVERT: Locale is not UTF-8, convert from %s", _tmp12_); + g_debug ("string.vala:104: CONVERT: Locale is not UTF-8, convert from %s", _tmp9_); #line 105 "/home/jens/Source/shotwell/src/util/string.vala" result = output; #line 105 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 690 "string.c" +#line 655 "string.c" } } { - gchar* _tmp13_ = NULL; - const gchar* _tmp14_; - const gchar* _tmp15_; - gint _tmp16_; - gint _tmp17_; - gsize _tmp18_ = 0UL; - gchar* _tmp19_; - gchar* _tmp20_; -#line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp14_ = text; -#line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp15_ = text; + gchar* _tmp10_ = NULL; + gint _tmp11_; + gint _tmp12_; + gsize _tmp13_ = 0UL; + gchar* _tmp14_; + gchar* _tmp15_; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp16_ = strlen (_tmp15_); + _tmp11_ = strlen (text); #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp17_ = _tmp16_; + _tmp12_ = _tmp11_; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp19_ = g_convert (_tmp14_, (gssize) _tmp17_, "UTF-8", "WINDOWS-1252", &_tmp18_, NULL, &_inner_error_); + _tmp14_ = g_convert (text, (gssize) _tmp12_, "UTF-8", "WINDOWS-1252", &_tmp13_, NULL, &_inner_error_); #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - bytes_read = _tmp18_; + bytes_read = _tmp13_; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = _tmp19_; + _tmp10_ = _tmp14_; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 110 "/home/jens/Source/shotwell/src/util/string.vala" if (_inner_error_->domain == G_CONVERT_ERROR) { -#line 720 "string.c" +#line 679 "string.c" goto __catch6_g_convert_error; } #line 110 "/home/jens/Source/shotwell/src/util/string.vala" @@ -728,77 +687,71 @@ gchar* guess_convert (const gchar* text) { g_clear_error (&_inner_error_); #line 110 "/home/jens/Source/shotwell/src/util/string.vala" return NULL; -#line 731 "string.c" +#line 690 "string.c" } #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp20_ = _tmp13_; + _tmp15_ = _tmp10_; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = NULL; + _tmp10_ = NULL; #line 110 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (output); #line 110 "/home/jens/Source/shotwell/src/util/string.vala" - output = _tmp20_; + output = _tmp15_; #line 111 "/home/jens/Source/shotwell/src/util/string.vala" charset = "WINDOWS-1252"; #line 109 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp13_); -#line 745 "string.c" + _g_free0 (_tmp10_); +#line 704 "string.c" } goto __finally6; __catch6_g_convert_error: { GError* _error_ = NULL; - GError* _tmp21_; + GError* _tmp16_; #line 109 "/home/jens/Source/shotwell/src/util/string.vala" _error_ = _inner_error_; #line 109 "/home/jens/Source/shotwell/src/util/string.vala" _inner_error_ = NULL; #line 113 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp21_ = _error_; + _tmp16_ = _error_; #line 113 "/home/jens/Source/shotwell/src/util/string.vala" - if (g_error_matches (_tmp21_, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION)) { -#line 760 "string.c" + if (g_error_matches (_tmp16_, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION)) { +#line 719 "string.c" { - gchar* _tmp22_ = NULL; - const gchar* _tmp23_; - const gchar* _tmp24_; - gint _tmp25_; - gint _tmp26_; - gsize _tmp27_ = 0UL; - gchar* _tmp28_; - gchar* _tmp29_; -#line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp23_ = text; + gchar* _tmp17_ = NULL; + gint _tmp18_; + gint _tmp19_; + gsize _tmp20_ = 0UL; + gchar* _tmp21_; + gchar* _tmp22_; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp24_ = text; + _tmp18_ = strlen (text); #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp25_ = strlen (_tmp24_); + _tmp19_ = _tmp18_; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp26_ = _tmp25_; + _tmp21_ = g_convert (text, (gssize) _tmp19_, "UTF-8", "ISO-8859-1", &_tmp20_, NULL, &_inner_error_); #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp28_ = g_convert (_tmp23_, (gssize) _tmp26_, "UTF-8", "ISO-8859-1", &_tmp27_, NULL, &_inner_error_); + bytes_read = _tmp20_; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - bytes_read = _tmp27_; -#line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp22_ = _tmp28_; + _tmp17_ = _tmp21_; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 786 "string.c" +#line 739 "string.c" goto __catch7_g_error; } #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp29_ = _tmp22_; + _tmp22_ = _tmp17_; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp22_ = NULL; + _tmp17_ = NULL; #line 115 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (output); #line 115 "/home/jens/Source/shotwell/src/util/string.vala" - output = _tmp29_; + output = _tmp22_; #line 116 "/home/jens/Source/shotwell/src/util/string.vala" charset = "ISO-8859-1"; #line 114 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp22_); -#line 801 "string.c" + _g_free0 (_tmp17_); +#line 754 "string.c" } goto __finally7; __catch7_g_error: @@ -810,7 +763,7 @@ gchar* guess_convert (const gchar* text) { _inner_error_ = NULL; #line 114 "/home/jens/Source/shotwell/src/util/string.vala" _g_error_free0 (_error_); -#line 813 "string.c" +#line 766 "string.c" } __finally7: #line 114 "/home/jens/Source/shotwell/src/util/string.vala" @@ -827,12 +780,12 @@ gchar* guess_convert (const gchar* text) { g_clear_error (&_inner_error_); #line 114 "/home/jens/Source/shotwell/src/util/string.vala" return NULL; -#line 830 "string.c" +#line 783 "string.c" } } #line 109 "/home/jens/Source/shotwell/src/util/string.vala" _g_error_free0 (_error_); -#line 835 "string.c" +#line 788 "string.c" } __finally6: #line 109 "/home/jens/Source/shotwell/src/util/string.vala" @@ -845,29 +798,27 @@ gchar* guess_convert (const gchar* text) { g_clear_error (&_inner_error_); #line 109 "/home/jens/Source/shotwell/src/util/string.vala" return NULL; -#line 848 "string.c" +#line 801 "string.c" } #line 121 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp30_ = bytes_read; + _tmp23_ = bytes_read; #line 121 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp31_ = text; + _tmp24_ = strlen (text); #line 121 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp32_ = strlen (_tmp31_); + _tmp25_ = _tmp24_; #line 121 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp33_ = _tmp32_; -#line 121 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp30_ == ((gsize) _tmp33_)) { -#line 860 "string.c" - const gchar* _tmp34_; + if (_tmp23_ == ((gsize) _tmp25_)) { +#line 811 "string.c" + const gchar* _tmp26_; #line 122 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp34_ = charset; + _tmp26_ = charset; #line 122 "/home/jens/Source/shotwell/src/util/string.vala" - g_debug ("string.vala:122: CONVERT: Guessed conversion from %s", _tmp34_); + g_debug ("string.vala:122: CONVERT: Guessed conversion from %s", _tmp26_); #line 124 "/home/jens/Source/shotwell/src/util/string.vala" result = output; #line 124 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 870 "string.c" +#line 821 "string.c" } #line 127 "/home/jens/Source/shotwell/src/util/string.vala" result = NULL; @@ -875,826 +826,679 @@ gchar* guess_convert (const gchar* text) { _g_free0 (output); #line 127 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 878 "string.c" +#line 829 "string.c" } -static gchar* string_strip (const gchar* self) { +static gchar* +string_strip (const gchar* self) +{ gchar* result = NULL; gchar* _result_ = NULL; gchar* _tmp0_; const gchar* _tmp1_; -#line 1234 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1248 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = g_strdup (self); -#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _result_ = _tmp0_; -#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = _result_; -#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_strstrip (_tmp1_); -#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = _result_; -#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 901 "string.c" +#line 854 "string.c" } -static gchar* string_delimit (const gchar* self, const gchar* delimiters, gchar new_delimiter) { +static gchar* +string_delimit (const gchar* self, + const gchar* delimiters, + gchar new_delimiter) +{ gchar* result = NULL; gchar* _result_ = NULL; gchar* _tmp0_; const gchar* _tmp1_; - const gchar* _tmp2_; - gchar _tmp3_; -#line 1242 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1256 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1242 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1256 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (delimiters != NULL, NULL); -#line 1243 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1257 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = g_strdup (self); -#line 1243 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1257 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _result_ = _tmp0_; -#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1258 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = _result_; -#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = delimiters; -#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = new_delimiter; -#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_strdelimit (_tmp1_, _tmp2_, _tmp3_); -#line 1245 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1258 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_strdelimit (_tmp1_, delimiters, new_delimiter); +#line 1259 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = _result_; -#line 1245 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1259 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 932 "string.c" +#line 883 "string.c" } -gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length) { +gchar* +prepare_input_text (const gchar* text, + PrepareInputTextOptions options, + gint dest_length) +{ gchar* result = NULL; - const gchar* _tmp0_; gchar* prepped = NULL; - const gchar* _tmp1_; - gchar* _tmp2_; - PrepareInputTextOptions _tmp3_; - PrepareInputTextOptions _tmp12_; - PrepareInputTextOptions _tmp15_; - PrepareInputTextOptions _tmp18_; - gboolean _tmp21_ = FALSE; - PrepareInputTextOptions _tmp22_; - gint _tmp25_; -#line 131 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = text; + gchar* _tmp0_; + gboolean _tmp12_ = FALSE; #line 131 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp0_ == NULL) { + if (text == NULL) { #line 132 "/home/jens/Source/shotwell/src/util/string.vala" result = NULL; #line 132 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 957 "string.c" +#line 902 "string.c" } #line 134 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = text; -#line 134 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_strdup (_tmp1_); + _tmp0_ = g_strdup (text); #line 134 "/home/jens/Source/shotwell/src/util/string.vala" - prepped = _tmp2_; -#line 135 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = options; + prepped = _tmp0_; #line 135 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp3_ & PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) == PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) { -#line 969 "string.c" - const gchar* _tmp4_; - gboolean _tmp5_; -#line 136 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = text; + if ((options & PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) == PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) { +#line 910 "string.c" + gboolean _tmp1_; #line 136 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = g_utf8_validate (_tmp4_, (gssize) -1, NULL); + _tmp1_ = g_utf8_validate (text, (gssize) -1, NULL); #line 136 "/home/jens/Source/shotwell/src/util/string.vala" - if (!_tmp5_) { -#line 978 "string.c" - const gchar* _tmp6_; - gchar* _tmp7_; - const gchar* _tmp8_; + if (!_tmp1_) { +#line 916 "string.c" + gchar* _tmp2_; + const gchar* _tmp3_; #line 137 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = text; -#line 137 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = guess_convert (_tmp6_); + _tmp2_ = guess_convert (text); #line 137 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 137 "/home/jens/Source/shotwell/src/util/string.vala" - prepped = _tmp7_; + prepped = _tmp2_; #line 139 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = prepped; + _tmp3_ = prepped; #line 139 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp8_ == NULL) { -#line 994 "string.c" - const gchar* _tmp9_ = NULL; - PrepareInputTextOptions _tmp10_; - gchar* _tmp11_; -#line 140 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = options; + if (_tmp3_ == NULL) { +#line 929 "string.c" + const gchar* _tmp4_ = NULL; + gchar* _tmp5_; #line 140 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp10_ & PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) != 0) { + if ((options & PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) != 0) { #line 140 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = NULL; -#line 1004 "string.c" + _tmp4_ = NULL; +#line 936 "string.c" } else { #line 140 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = ""; -#line 1008 "string.c" + _tmp4_ = ""; +#line 940 "string.c" } #line 140 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = g_strdup (_tmp9_); + _tmp5_ = g_strdup (_tmp4_); #line 140 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp11_; + result = _tmp5_; #line 140 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 140 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1018 "string.c" +#line 950 "string.c" } } } #line 149 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = options; -#line 149 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp12_ & PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE) != 0) { -#line 1026 "string.c" - const gchar* _tmp13_; - gchar* _tmp14_; + if ((options & PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE) != 0) { +#line 956 "string.c" + const gchar* _tmp6_; + gchar* _tmp7_; #line 150 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = prepped; + _tmp6_ = prepped; #line 150 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp14_ = g_utf8_normalize (_tmp13_, (gssize) -1, G_NORMALIZE_NFC); + _tmp7_ = g_utf8_normalize (_tmp6_, (gssize) -1, G_NORMALIZE_NFC); #line 150 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 150 "/home/jens/Source/shotwell/src/util/string.vala" - prepped = _tmp14_; -#line 1037 "string.c" + prepped = _tmp7_; +#line 967 "string.c" } #line 152 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp15_ = options; -#line 152 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp15_ & PREPARE_INPUT_TEXT_OPTIONS_STRIP) != 0) { -#line 1043 "string.c" - const gchar* _tmp16_; - gchar* _tmp17_; + if ((options & PREPARE_INPUT_TEXT_OPTIONS_STRIP) != 0) { +#line 971 "string.c" + const gchar* _tmp8_; + gchar* _tmp9_; #line 153 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp16_ = prepped; + _tmp8_ = prepped; #line 153 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp17_ = string_strip (_tmp16_); + _tmp9_ = string_strip (_tmp8_); #line 153 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 153 "/home/jens/Source/shotwell/src/util/string.vala" - prepped = _tmp17_; -#line 1054 "string.c" + prepped = _tmp9_; +#line 982 "string.c" } #line 157 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp18_ = options; -#line 157 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp18_ & PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) != 0) { -#line 1060 "string.c" - const gchar* _tmp19_; - gchar* _tmp20_; + if ((options & PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) != 0) { +#line 986 "string.c" + const gchar* _tmp10_; + gchar* _tmp11_; #line 158 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp19_ = prepped; + _tmp10_ = prepped; #line 158 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp20_ = string_delimit (_tmp19_, "\n\r", ' '); + _tmp11_ = string_delimit (_tmp10_, "\n\r", ' '); #line 158 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 158 "/home/jens/Source/shotwell/src/util/string.vala" - prepped = _tmp20_; -#line 1071 "string.c" + prepped = _tmp11_; +#line 997 "string.c" } #line 160 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp22_ = options; -#line 160 "/home/jens/Source/shotwell/src/util/string.vala" - if ((_tmp22_ & PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL) != 0) { -#line 1077 "string.c" - const gchar* _tmp23_; - gboolean _tmp24_; -#line 160 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp23_ = prepped; + if ((options & PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL) != 0) { +#line 1001 "string.c" + const gchar* _tmp13_; #line 160 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp24_ = is_string_empty (_tmp23_); + _tmp13_ = prepped; #line 160 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp21_ = _tmp24_; -#line 1086 "string.c" + _tmp12_ = is_string_empty (_tmp13_); +#line 1007 "string.c" } else { #line 160 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp21_ = FALSE; -#line 1090 "string.c" + _tmp12_ = FALSE; +#line 1011 "string.c" } #line 160 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp21_) { + if (_tmp12_) { #line 161 "/home/jens/Source/shotwell/src/util/string.vala" result = NULL; #line 161 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 161 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1100 "string.c" +#line 1021 "string.c" } #line 166 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp25_ = dest_length; -#line 166 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp25_ >= 0) { -#line 1106 "string.c" + if (dest_length >= 0) { +#line 1025 "string.c" GString* sb = NULL; - const gchar* _tmp26_; - GString* _tmp27_; - GString* _tmp28_; - gint _tmp29_; - GString* _tmp30_; - const gchar* _tmp31_; - gchar* _tmp32_; + const gchar* _tmp14_; + GString* _tmp15_; + GString* _tmp16_; + GString* _tmp17_; + const gchar* _tmp18_; + gchar* _tmp19_; #line 167 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp26_ = prepped; + _tmp14_ = prepped; #line 167 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp27_ = g_string_new (_tmp26_); + _tmp15_ = g_string_new (_tmp14_); #line 167 "/home/jens/Source/shotwell/src/util/string.vala" - sb = _tmp27_; + sb = _tmp15_; #line 168 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp28_ = sb; + _tmp16_ = sb; #line 168 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp29_ = dest_length; -#line 168 "/home/jens/Source/shotwell/src/util/string.vala" - g_string_truncate (_tmp28_, (gsize) _tmp29_); + g_string_truncate (_tmp16_, (gsize) dest_length); #line 169 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp30_ = sb; + _tmp17_ = sb; #line 169 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp31_ = _tmp30_->str; + _tmp18_ = _tmp17_->str; #line 169 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp32_ = g_strdup (_tmp31_); + _tmp19_ = g_strdup (_tmp18_); #line 169 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp32_; + result = _tmp19_; #line 169 "/home/jens/Source/shotwell/src/util/string.vala" _g_string_free0 (sb); #line 169 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (prepped); #line 169 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1141 "string.c" +#line 1057 "string.c" } #line 173 "/home/jens/Source/shotwell/src/util/string.vala" result = prepped; #line 173 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1147 "string.c" +#line 1063 "string.c" } -gint64 parse_int64 (const gchar* str, gint num_base) { +gint64 +parse_int64 (const gchar* str, + gint num_base) +{ gint64 result = 0LL; - const gchar* _tmp0_; - gint _tmp1_; - gint64 _tmp2_; + gint64 _tmp0_; #line 176 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, 0LL); #line 177 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = str; -#line 177 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = num_base; + _tmp0_ = g_ascii_strtoll (str, NULL, (guint) num_base); #line 177 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_ascii_strtoll (_tmp0_, NULL, (guint) _tmp1_); -#line 177 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_; + result = _tmp0_; #line 177 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1168 "string.c" +#line 1081 "string.c" } -static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) { +static gint +string_index_of_char (const gchar* self, + gunichar c, + gint start_index) +{ gint result = 0; gchar* _result_ = NULL; - gint _tmp0_; - gunichar _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1031 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; + gchar* _tmp1_; +#line 1045 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = c; -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1193 "string.c" - gchar* _tmp4_; -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c); +#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ != NULL) { +#line 1104 "string.c" + gchar* _tmp2_; +#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _result_; +#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (gint) (_tmp2_ - ((gchar*) self)); +#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1201 "string.c" +#line 1112 "string.c" } else { -#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; -#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1207 "string.c" +#line 1118 "string.c" } } -inline gboolean string_contains_char (const gchar* haystack, gunichar needle) { +inline gboolean +string_contains_char (const gchar* haystack, + gunichar needle) +{ gboolean result = FALSE; - const gchar* _tmp0_; - gunichar _tmp1_; - gint _tmp2_; #line 182 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, FALSE); #line 183 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; -#line 183 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = needle; -#line 183 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = string_index_of_char (_tmp0_, _tmp1_, 0); -#line 183 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_ >= 0; + result = string_index_of_char (haystack, needle, 0) >= 0; #line 183 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1229 "string.c" +#line 1134 "string.c" } -static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) { +static gint +string_index_of (const gchar* self, + const gchar* needle, + gint start_index) +{ gint result = 0; gchar* _result_ = NULL; - gint _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; + gchar* _tmp1_; +#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (needle != NULL, 0); -#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = needle; -#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_); -#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1256 "string.c" - gchar* _tmp4_; -#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle); +#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ != NULL) { +#line 1159 "string.c" + gchar* _tmp2_; +#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _result_; +#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (gint) (_tmp2_ - ((gchar*) self)); +#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1264 "string.c" +#line 1167 "string.c" } else { -#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; -#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1270 "string.c" +#line 1173 "string.c" } } -inline gboolean string_contains_str (const gchar* haystack, const gchar* needle) { +inline gboolean +string_contains_str (const gchar* haystack, + const gchar* needle) +{ gboolean result = FALSE; - const gchar* _tmp0_; - const gchar* _tmp1_; - gint _tmp2_; #line 186 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, FALSE); #line 186 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (needle != NULL, FALSE); #line 187 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; -#line 187 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = needle; -#line 187 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = string_index_of (_tmp0_, _tmp1_, 0); -#line 187 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_ >= 0; + result = string_index_of (haystack, needle, 0) >= 0; #line 187 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1294 "string.c" +#line 1191 "string.c" } -static gchar* string_slice (const gchar* self, glong start, glong end) { +static gchar* +string_slice (const gchar* self, + glong start, + glong end) +{ gchar* result = NULL; glong string_length = 0L; gint _tmp0_; gint _tmp1_; - glong _tmp2_; - glong _tmp5_; - gboolean _tmp8_ = FALSE; - glong _tmp9_; - gboolean _tmp12_ = FALSE; - glong _tmp13_; - glong _tmp16_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - gchar* _tmp21_; -#line 1355 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gboolean _tmp4_ = FALSE; + gboolean _tmp6_ = FALSE; + gchar* _tmp8_; +#line 1369 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = strlen (self); -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = _tmp0_; -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" string_length = (glong) _tmp1_; -#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = start; -#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_ < ((glong) 0)) { -#line 1327 "string.c" +#line 1371 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (start < ((glong) 0)) { +#line 1217 "string.c" + glong _tmp2_; +#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = string_length; +#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + start = _tmp2_ + start; +#line 1223 "string.c" + } +#line 1374 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (end < ((glong) 0)) { +#line 1227 "string.c" glong _tmp3_; - glong _tmp4_; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp3_ = string_length; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = start; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - start = _tmp3_ + _tmp4_; -#line 1336 "string.c" - } -#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp5_ < ((glong) 0)) { -#line 1342 "string.c" - glong _tmp6_; - glong _tmp7_; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = string_length; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = end; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp6_ + _tmp7_; -#line 1351 "string.c" +#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + end = _tmp3_ + end; +#line 1233 "string.c" } -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = start; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp9_ >= ((glong) 0)) { -#line 1357 "string.c" - glong _tmp10_; - glong _tmp11_; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = start; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = string_length; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp10_ <= _tmp11_; -#line 1366 "string.c" +#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (start >= ((glong) 0)) { +#line 1237 "string.c" + glong _tmp5_; +#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp5_ = string_length; +#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = start <= _tmp5_; +#line 1243 "string.c" } else { -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = FALSE; -#line 1370 "string.c" +#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = FALSE; +#line 1247 "string.c" } -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp8_, NULL); -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = end; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13_ >= ((glong) 0)) { -#line 1378 "string.c" - glong _tmp14_; - glong _tmp15_; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = end; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ <= _tmp15_; -#line 1387 "string.c" +#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp4_, NULL); +#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (end >= ((glong) 0)) { +#line 1253 "string.c" + glong _tmp7_; +#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = string_length; +#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = end <= _tmp7_; +#line 1259 "string.c" } else { -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 1391 "string.c" +#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = FALSE; +#line 1263 "string.c" } -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_, NULL); -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = start; -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = end; -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = start; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = end; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = start; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp21_; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp6_, NULL); +#line 1379 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (start <= end, NULL); +#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp8_ = g_strndup (((gchar*) self) + start, (gsize) (end - start)); +#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp8_; +#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1413 "string.c" +#line 1275 "string.c" } -inline gchar* string_sliced_at (const gchar* str, gint index) { +inline gchar* +string_sliced_at (const gchar* str, + gint index) +{ gchar* result = NULL; gchar* _tmp0_ = NULL; - gint _tmp1_; #line 190 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, NULL); #line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = index; -#line 191 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp1_ >= 0) { -#line 1427 "string.c" - const gchar* _tmp2_; - gint _tmp3_; - const gchar* _tmp4_; - gint _tmp5_; - gint _tmp6_; - gchar* _tmp7_; -#line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = str; -#line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = index; -#line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = str; + if (index >= 0) { +#line 1289 "string.c" + gint _tmp1_; + gint _tmp2_; + gchar* _tmp3_; #line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = strlen (_tmp4_); + _tmp1_ = strlen (str); #line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = _tmp5_; + _tmp2_ = _tmp1_; #line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = string_slice (_tmp2_, (glong) _tmp3_, (glong) _tmp6_); + _tmp3_ = string_slice (str, (glong) index, (glong) _tmp2_); #line 191 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (_tmp0_); #line 191 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = _tmp7_; -#line 1450 "string.c" + _tmp0_ = _tmp3_; +#line 1303 "string.c" } else { #line 191 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (_tmp0_); #line 191 "/home/jens/Source/shotwell/src/util/string.vala" _tmp0_ = NULL; -#line 1456 "string.c" +#line 1309 "string.c" } #line 191 "/home/jens/Source/shotwell/src/util/string.vala" result = _tmp0_; #line 191 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1462 "string.c" +#line 1315 "string.c" } -inline gchar* string_sliced_at_first_str (const gchar* haystack, const gchar* needle, gint start_index) { +inline gchar* +string_sliced_at_first_str (const gchar* haystack, + const gchar* needle, + gint start_index) +{ gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gchar* _tmp5_; + gchar* _tmp0_; #line 194 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, NULL); #line 194 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (needle != NULL, NULL); #line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; -#line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = haystack; -#line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = needle; -#line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = start_index; -#line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = string_index_of (_tmp1_, _tmp2_, _tmp3_); -#line 195 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = string_sliced_at (_tmp0_, _tmp4_); + _tmp0_ = string_sliced_at (haystack, string_index_of (haystack, needle, start_index)); #line 195 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp5_; + result = _tmp0_; #line 195 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1494 "string.c" +#line 1336 "string.c" } -static gint string_last_index_of (const gchar* self, const gchar* needle, gint start_index) { +static gint +string_last_index_of (const gchar* self, + const gchar* needle, + gint start_index) +{ gint result = 0; gchar* _result_ = NULL; - gint _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1021 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; + gchar* _tmp1_; +#line 1035 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 1021 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1035 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (needle != NULL, 0); -#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = needle; -#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = g_strrstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_); -#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1024 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1024 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1521 "string.c" - gchar* _tmp4_; -#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1036 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle); +#line 1036 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1038 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1038 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ != NULL) { +#line 1361 "string.c" + gchar* _tmp2_; +#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _result_; +#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (gint) (_tmp2_ - ((gchar*) self)); +#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1529 "string.c" +#line 1369 "string.c" } else { -#line 1027 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1041 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; -#line 1027 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1041 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1535 "string.c" +#line 1375 "string.c" } } -inline gchar* string_sliced_at_last_str (const gchar* haystack, const gchar* needle, gint start_index) { +inline gchar* +string_sliced_at_last_str (const gchar* haystack, + const gchar* needle, + gint start_index) +{ gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gchar* _tmp5_; + gchar* _tmp0_; #line 198 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, NULL); #line 198 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (needle != NULL, NULL); #line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; -#line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = haystack; + _tmp0_ = string_sliced_at (haystack, string_last_index_of (haystack, needle, start_index)); #line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = needle; -#line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = start_index; -#line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = string_last_index_of (_tmp1_, _tmp2_, _tmp3_); -#line 199 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = string_sliced_at (_tmp0_, _tmp4_); -#line 199 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp5_; + result = _tmp0_; #line 199 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1568 "string.c" +#line 1397 "string.c" } -inline gchar* string_sliced_at_first_char (const gchar* haystack, gunichar ch, gint start_index) { +inline gchar* +string_sliced_at_first_char (const gchar* haystack, + gunichar ch, + gint start_index) +{ gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gunichar _tmp2_; - gint _tmp3_; - gint _tmp4_; - gchar* _tmp5_; + gchar* _tmp0_; #line 202 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, NULL); #line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; -#line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = haystack; -#line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = ch; + _tmp0_ = string_sliced_at (haystack, string_index_of_char (haystack, ch, start_index)); #line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = start_index; -#line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = string_index_of_char (_tmp1_, _tmp2_, _tmp3_); -#line 203 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = string_sliced_at (_tmp0_, _tmp4_); -#line 203 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp5_; + result = _tmp0_; #line 203 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1598 "string.c" +#line 1416 "string.c" } -static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) { +static gint +string_last_index_of_char (const gchar* self, + gunichar c, + gint start_index) +{ gint result = 0; gchar* _result_ = NULL; - gint _tmp0_; - gunichar _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1041 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; + gchar* _tmp1_; +#line 1055 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = c; -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1623 "string.c" - gchar* _tmp4_; -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_utf8_strrchr (((gchar*) self) + start_index, (gssize) -1, c); +#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ != NULL) { +#line 1439 "string.c" + gchar* _tmp2_; +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _result_; +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (gint) (_tmp2_ - ((gchar*) self)); +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1631 "string.c" +#line 1447 "string.c" } else { -#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; -#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1637 "string.c" +#line 1453 "string.c" } } -inline gchar* string_sliced_at_last_char (const gchar* haystack, gunichar ch, gint start_index) { +inline gchar* +string_sliced_at_last_char (const gchar* haystack, + gunichar ch, + gint start_index) +{ gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gunichar _tmp2_; - gint _tmp3_; - gint _tmp4_; - gchar* _tmp5_; + gchar* _tmp0_; #line 206 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (haystack != NULL, NULL); #line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = haystack; + _tmp0_ = string_sliced_at (haystack, string_last_index_of_char (haystack, ch, start_index)); #line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = haystack; -#line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = ch; -#line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = start_index; -#line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = string_last_index_of_char (_tmp1_, _tmp2_, _tmp3_); -#line 207 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = string_sliced_at (_tmp0_, _tmp4_); -#line 207 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp5_; + result = _tmp0_; #line 207 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1668 "string.c" +#line 1473 "string.c" } -static gunichar string_get_char (const gchar* self, glong index) { +static gunichar +string_get_char (const gchar* self, + glong index) +{ gunichar result = 0U; - glong _tmp0_; - gunichar _tmp1_; -#line 1140 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1154 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0U); -#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_); -#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = g_utf8_get_char (((gchar*) self) + index); +#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1686 "string.c" +#line 1488 "string.c" } -gchar* string_strip_leading_zeroes (const gchar* str) { +gchar* +string_strip_leading_zeroes (const gchar* str) +{ gchar* result = NULL; GString* stripped = NULL; GString* _tmp0_; gboolean prev_is_space = FALSE; - GString* _tmp16_; - const gchar* _tmp17_; - gchar* _tmp18_; + GString* _tmp12_; + const gchar* _tmp13_; + gchar* _tmp14_; #line 211 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, NULL); #line 212 "/home/jens/Source/shotwell/src/util/string.vala" @@ -1703,184 +1507,169 @@ gchar* string_strip_leading_zeroes (const gchar* str) { stripped = _tmp0_; #line 213 "/home/jens/Source/shotwell/src/util/string.vala" prev_is_space = TRUE; -#line 1706 "string.c" +#line 1510 "string.c" { const gchar* iter = NULL; - const gchar* _tmp1_; -#line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = str; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - iter = _tmp1_; -#line 1714 "string.c" + iter = str; +#line 1515 "string.c" { - gboolean _tmp2_ = FALSE; + gboolean _tmp1_ = FALSE; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = TRUE; + _tmp1_ = TRUE; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 1721 "string.c" - const gchar* _tmp5_; - gunichar _tmp6_; +#line 1522 "string.c" + const gchar* _tmp4_; gunichar ch = 0U; - const gchar* _tmp7_; - gunichar _tmp8_; - gboolean _tmp9_ = FALSE; - gboolean _tmp10_; + const gchar* _tmp5_; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - if (!_tmp2_) { -#line 1731 "string.c" + if (!_tmp1_) { +#line 1530 "string.c" + const gchar* _tmp2_; const gchar* _tmp3_; - const gchar* _tmp4_; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = iter; + _tmp2_ = iter; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = g_utf8_next_char (_tmp3_); + _tmp3_ = g_utf8_next_char (_tmp2_); #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - iter = _tmp4_; -#line 1740 "string.c" + iter = _tmp3_; +#line 1539 "string.c" } #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = FALSE; -#line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = iter; + _tmp1_ = FALSE; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = string_get_char (_tmp5_, (glong) 0); + _tmp4_ = iter; #line 214 "/home/jens/Source/shotwell/src/util/string.vala" - if (!(_tmp6_ != ((gunichar) 0))) { + if (!(string_get_char (_tmp4_, (glong) 0) != ((gunichar) 0))) { #line 214 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 1752 "string.c" +#line 1549 "string.c" } #line 215 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = iter; -#line 215 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = string_get_char (_tmp7_, (glong) 0); + _tmp5_ = iter; #line 215 "/home/jens/Source/shotwell/src/util/string.vala" - ch = _tmp8_; + ch = string_get_char (_tmp5_, (glong) 0); #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = prev_is_space; + _tmp7_ = prev_is_space; #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - if (!_tmp10_) { + if (!_tmp7_) { #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = TRUE; -#line 1766 "string.c" + _tmp6_ = TRUE; +#line 1561 "string.c" } else { - gunichar _tmp11_; + gunichar _tmp8_; #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = ch; + _tmp8_ = ch; #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = _tmp11_ != ((gunichar) '0'); -#line 1773 "string.c" + _tmp6_ = _tmp8_ != ((gunichar) '0'); +#line 1568 "string.c" } #line 217 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp9_) { -#line 1777 "string.c" - GString* _tmp12_; - gunichar _tmp13_; - gunichar _tmp14_; - gboolean _tmp15_; + if (_tmp6_) { +#line 1572 "string.c" + GString* _tmp9_; + gunichar _tmp10_; + gunichar _tmp11_; #line 218 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = stripped; + _tmp9_ = stripped; #line 218 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = ch; + _tmp10_ = ch; #line 218 "/home/jens/Source/shotwell/src/util/string.vala" - g_string_append_unichar (_tmp12_, _tmp13_); -#line 219 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp14_ = ch; + g_string_append_unichar (_tmp9_, _tmp10_); #line 219 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp15_ = g_unichar_isspace (_tmp14_); + _tmp11_ = ch; #line 219 "/home/jens/Source/shotwell/src/util/string.vala" - prev_is_space = _tmp15_; -#line 1794 "string.c" + prev_is_space = g_unichar_isspace (_tmp11_); +#line 1586 "string.c" } } } } #line 223 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp16_ = stripped; + _tmp12_ = stripped; #line 223 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp17_ = _tmp16_->str; + _tmp13_ = _tmp12_->str; #line 223 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp18_ = g_strdup (_tmp17_); + _tmp14_ = g_strdup (_tmp13_); #line 223 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp18_; + result = _tmp14_; #line 223 "/home/jens/Source/shotwell/src/util/string.vala" _g_string_free0 (stripped); #line 223 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1811 "string.c" +#line 1603 "string.c" } -static gboolean string_get_next_char (const gchar* self, gint* index, gunichar* c) { +static gboolean +string_get_next_char (const gchar* self, + gint* index, + gunichar* c) +{ gunichar _vala_c = 0U; gboolean result = FALSE; - gint _tmp0_; - gunichar _tmp1_; - gunichar _tmp2_; -#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gunichar _tmp0_; +#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, FALSE); -#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = *index; -#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_); -#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _vala_c = _tmp1_; -#line 1131 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = _vala_c; -#line 1131 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_ != ((gunichar) 0)) { -#line 1833 "string.c" - gint _tmp3_; - gchar* _tmp4_; -#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = *index; -#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = g_utf8_next_char (((gchar*) self) + _tmp3_); -#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - *index = (gint) (_tmp4_ - ((gchar*) self)); -#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1144 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _vala_c = g_utf8_get_char (((gchar*) self) + (*index)); +#line 1145 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = _vala_c; +#line 1145 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp0_ != ((gunichar) 0)) { +#line 1623 "string.c" + gchar* _tmp1_; +#line 1146 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = g_utf8_next_char (((gchar*) self) + (*index)); +#line 1146 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + *index = (gint) (_tmp1_ - ((gchar*) self)); +#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = TRUE; -#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (c) { -#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" *c = _vala_c; -#line 1848 "string.c" +#line 1635 "string.c" } -#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1852 "string.c" +#line 1639 "string.c" } else { -#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = FALSE; -#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (c) { -#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" *c = _vala_c; -#line 1860 "string.c" +#line 1647 "string.c" } -#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1864 "string.c" +#line 1651 "string.c" } -#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (c) { -#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" *c = _vala_c; -#line 1870 "string.c" +#line 1657 "string.c" } } -gchar* string_remove_diacritics (const gchar* istring) { +gchar* +string_remove_diacritics (const gchar* istring) +{ gchar* result = NULL; GString* builder = NULL; GString* _tmp0_; gunichar ch = 0U; gint i = 0; - GString* _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; + GString* _tmp9_; + const gchar* _tmp10_; + gchar* _tmp11_; #line 226 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (istring != NULL, NULL); #line 227 "/home/jens/Source/shotwell/src/util/string.vala" @@ -1891,43 +1680,37 @@ gchar* string_remove_diacritics (const gchar* istring) { i = 0; #line 230 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 1894 "string.c" - const gchar* _tmp1_; +#line 1683 "string.c" + gchar* _tmp1_; gchar* _tmp2_; - gchar* _tmp3_; - gunichar _tmp4_ = 0U; + gunichar _tmp3_ = 0U; + gboolean _tmp4_; gboolean _tmp5_; - gboolean _tmp6_; - gunichar _tmp7_; - GUnicodeType _tmp8_; - GString* _tmp9_; - gunichar _tmp10_; -#line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = istring; + gunichar _tmp6_; + GString* _tmp7_; + gunichar _tmp8_; #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_utf8_normalize (_tmp1_, (gssize) -1, G_NORMALIZE_DEFAULT); + _tmp1_ = g_utf8_normalize (istring, (gssize) -1, G_NORMALIZE_DEFAULT); #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = _tmp2_; + _tmp2_ = _tmp1_; #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = string_get_next_char (_tmp3_, &i, &_tmp4_); + _tmp4_ = string_get_next_char (_tmp2_, &i, &_tmp3_); #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - ch = _tmp4_; + ch = _tmp3_; #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = !_tmp5_; + _tmp5_ = !_tmp4_; #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp3_); + _g_free0 (_tmp2_); #line 230 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp6_) { + if (_tmp5_) { #line 230 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 1923 "string.c" +#line 1708 "string.c" } #line 231 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = ch; -#line 231 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = g_unichar_type (_tmp7_); + _tmp6_ = ch; #line 231 "/home/jens/Source/shotwell/src/util/string.vala" - switch (_tmp8_) { + switch (g_unichar_type (_tmp6_)) { #line 231 "/home/jens/Source/shotwell/src/util/string.vala" case G_UNICODE_CONTROL: #line 231 "/home/jens/Source/shotwell/src/util/string.vala" @@ -1940,50 +1723,51 @@ gchar* string_remove_diacritics (const gchar* istring) { case G_UNICODE_COMBINING_MARK: #line 231 "/home/jens/Source/shotwell/src/util/string.vala" case G_UNICODE_ENCLOSING_MARK: -#line 1943 "string.c" +#line 1726 "string.c" { #line 239 "/home/jens/Source/shotwell/src/util/string.vala" continue; -#line 1947 "string.c" +#line 1730 "string.c" } default: #line 231 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 1952 "string.c" +#line 1735 "string.c" } #line 241 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = builder; + _tmp7_ = builder; #line 241 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = ch; + _tmp8_ = ch; #line 241 "/home/jens/Source/shotwell/src/util/string.vala" - g_string_append_unichar (_tmp9_, _tmp10_); -#line 1960 "string.c" + g_string_append_unichar (_tmp7_, _tmp8_); +#line 1743 "string.c" } #line 243 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = builder; + _tmp9_ = builder; #line 243 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = _tmp11_->str; + _tmp10_ = _tmp9_->str; #line 243 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = g_strdup (_tmp12_); + _tmp11_ = g_strdup (_tmp10_); #line 243 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp13_; + result = _tmp11_; #line 243 "/home/jens/Source/shotwell/src/util/string.vala" _g_string_free0 (builder); #line 243 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 1974 "string.c" +#line 1757 "string.c" } -gchar* string_to_hex_string (const gchar* str) { +gchar* +string_to_hex_string (const gchar* str) +{ gchar* result = NULL; GString* builder = NULL; GString* _tmp0_; guint8* data = NULL; - const gchar* _tmp1_; - GString* _tmp7_; - const gchar* _tmp8_; - gchar* _tmp9_; + GString* _tmp6_; + const gchar* _tmp7_; + gchar* _tmp8_; #line 246 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (str != NULL, NULL); #line 247 "/home/jens/Source/shotwell/src/util/string.vala" @@ -1991,203 +1775,186 @@ gchar* string_to_hex_string (const gchar* str) { #line 247 "/home/jens/Source/shotwell/src/util/string.vala" builder = _tmp0_; #line 249 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = str; -#line 249 "/home/jens/Source/shotwell/src/util/string.vala" - data = (guint8*) _tmp1_; + data = (guint8*) str; #line 250 "/home/jens/Source/shotwell/src/util/string.vala" while (TRUE) { -#line 1999 "string.c" - guint8* _tmp2_; - const gchar* _tmp3_ = NULL; - guint8* _tmp4_; - GString* _tmp5_; - guint8* _tmp6_; +#line 1781 "string.c" + guint8* _tmp1_; + const gchar* _tmp2_ = NULL; + guint8* _tmp3_; + GString* _tmp4_; + guint8* _tmp5_; #line 250 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = data; + _tmp1_ = data; #line 250 "/home/jens/Source/shotwell/src/util/string.vala" - if (!(((gint) (*_tmp2_)) != 0)) { + if (!(((gint) (*_tmp1_)) != 0)) { #line 250 "/home/jens/Source/shotwell/src/util/string.vala" break; -#line 2011 "string.c" +#line 1793 "string.c" } #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = data; + _tmp3_ = data; #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - if (((gint) (*_tmp4_)) != 0) { + if (((gint) (*_tmp3_)) != 0) { #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = " "; -#line 2019 "string.c" + _tmp2_ = " "; +#line 1801 "string.c" } else { #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = ""; -#line 2023 "string.c" + _tmp2_ = ""; +#line 1805 "string.c" } #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = builder; + _tmp4_ = builder; #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = data; + _tmp5_ = data; #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - data = _tmp6_ + 1; + data = _tmp5_ + 1; #line 251 "/home/jens/Source/shotwell/src/util/string.vala" - g_string_append_printf (_tmp5_, "%02Xh%s", (guint) (*_tmp6_), _tmp3_); -#line 2033 "string.c" + g_string_append_printf (_tmp4_, "%02Xh%s", (guint) (*_tmp5_), _tmp2_); +#line 1815 "string.c" } #line 253 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = builder; + _tmp6_ = builder; #line 253 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = _tmp7_->str; + _tmp7_ = _tmp6_->str; #line 253 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = g_strdup (_tmp8_); + _tmp8_ = g_strdup (_tmp7_); #line 253 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp9_; + result = _tmp8_; #line 253 "/home/jens/Source/shotwell/src/util/string.vala" _g_string_free0 (builder); #line 253 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2047 "string.c" +#line 1829 "string.c" } -guint string_collated_hash (void* ptr) { +guint +string_collated_hash (void* ptr) +{ guint result = 0U; gchar* str = NULL; - void* _tmp0_; - gchar* _tmp1_; - GHashFunc _tmp2_; + gchar* _tmp0_; + GHashFunc _tmp1_; + gchar* _tmp2_; gchar* _tmp3_; - gchar* _tmp4_; - guint _tmp5_; - guint _tmp6_; -#line 273 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = ptr; + guint _tmp4_; #line 273 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = g_strdup ((const gchar*) _tmp0_); + _tmp0_ = g_strdup ((const gchar*) ptr); #line 273 "/home/jens/Source/shotwell/src/util/string.vala" - str = _tmp1_; + str = _tmp0_; #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = g_str_hash; + _tmp1_ = g_str_hash; #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = g_utf8_collate_key (str, (gssize) -1); + _tmp2_ = g_utf8_collate_key (str, (gssize) -1); #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = _tmp3_; + _tmp3_ = _tmp2_; #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = _tmp2_ (_tmp4_); + _tmp4_ = _tmp1_ (_tmp3_); #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = _tmp5_; + _g_free0 (_tmp3_); #line 275 "/home/jens/Source/shotwell/src/util/string.vala" - _g_free0 (_tmp4_); -#line 275 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp6_; + result = _tmp4_; #line 275 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (str); #line 275 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2085 "string.c" +#line 1863 "string.c" } -guint string_precollated_hash (void* ptr) { +guint +string_precollated_hash (void* ptr) +{ guint result = 0U; GHashFunc _tmp0_; - void* _tmp1_; - guint _tmp2_; #line 280 "/home/jens/Source/shotwell/src/util/string.vala" _tmp0_ = g_str_hash; #line 280 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = ptr; -#line 280 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = _tmp0_ ((const gchar*) _tmp1_); -#line 280 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_; + result = _tmp0_ ((const gchar*) ptr); #line 280 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2104 "string.c" +#line 1878 "string.c" } -gint string_collated_compare (void* a, void* b) { +gint +string_collated_compare (void* a, + void* b) +{ gint result = 0; gchar* astr = NULL; - void* _tmp0_; - gchar* _tmp1_; + gchar* _tmp0_; gchar* bstr = NULL; - void* _tmp2_; - gchar* _tmp3_; + gchar* _tmp1_; gint _result_ = 0; - const gchar* _tmp4_; - const gchar* _tmp5_; - gint _tmp6_; - gint _tmp7_ = 0; - gint _tmp8_; -#line 285 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = a; + const gchar* _tmp2_; + const gchar* _tmp3_; + gint _tmp4_ = 0; + gint _tmp5_; #line 285 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = g_strdup ((const gchar*) _tmp0_); + _tmp0_ = g_strdup ((const gchar*) a); #line 285 "/home/jens/Source/shotwell/src/util/string.vala" - astr = _tmp1_; + astr = _tmp0_; #line 286 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = b; + _tmp1_ = g_strdup ((const gchar*) b); #line 286 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = g_strdup ((const gchar*) _tmp2_); -#line 286 "/home/jens/Source/shotwell/src/util/string.vala" - bstr = _tmp3_; -#line 288 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = astr; + bstr = _tmp1_; #line 288 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = bstr; + _tmp2_ = astr; #line 288 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = g_utf8_collate (_tmp4_, _tmp5_); + _tmp3_ = bstr; #line 288 "/home/jens/Source/shotwell/src/util/string.vala" - _result_ = _tmp6_; + _result_ = g_utf8_collate (_tmp2_, _tmp3_); #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = _result_; + _tmp5_ = _result_; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp8_ != 0) { -#line 2146 "string.c" - gint _tmp9_; + if (_tmp5_ != 0) { +#line 1914 "string.c" + gint _tmp6_; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = _result_; + _tmp6_ = _result_; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = _tmp9_; -#line 2152 "string.c" + _tmp4_ = _tmp6_; +#line 1920 "string.c" } else { - GCompareFunc _tmp10_; - const gchar* _tmp11_; - const gchar* _tmp12_; - gint _tmp13_; -#line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = g_strcmp0; + GCompareFunc _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp11_ = astr; + _tmp7_ = g_strcmp0; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp12_ = bstr; + _tmp8_ = astr; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp13_ = _tmp10_ (_tmp11_, _tmp12_); + _tmp9_ = bstr; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = _tmp13_; -#line 2168 "string.c" + _tmp4_ = _tmp7_ (_tmp8_, _tmp9_); +#line 1933 "string.c" } #line 290 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp7_; + result = _tmp4_; #line 290 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (bstr); #line 290 "/home/jens/Source/shotwell/src/util/string.vala" _g_free0 (astr); #line 290 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2178 "string.c" +#line 1943 "string.c" } -gint string_precollated_compare (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey) { +gint +string_precollated_compare (const gchar* astr, + const gchar* akey, + const gchar* bstr, + const gchar* bkey) +{ gint result = 0; gint _result_ = 0; GCompareFunc _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; - gint _tmp3_; - gint _tmp4_ = 0; - gint _tmp5_; + gint _tmp1_ = 0; + gint _tmp2_; #line 294 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (astr != NULL, 0); #line 294 "/home/jens/Source/shotwell/src/util/string.vala" @@ -2199,75 +1966,54 @@ gint string_precollated_compare (const gchar* astr, const gchar* akey, const gch #line 295 "/home/jens/Source/shotwell/src/util/string.vala" _tmp0_ = g_strcmp0; #line 295 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = akey; -#line 295 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = bkey; -#line 295 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = _tmp0_ (_tmp1_, _tmp2_); -#line 295 "/home/jens/Source/shotwell/src/util/string.vala" - _result_ = _tmp3_; + _result_ = _tmp0_ (akey, bkey); #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp5_ = _result_; + _tmp2_ = _result_; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - if (_tmp5_ != 0) { -#line 2213 "string.c" - gint _tmp6_; + if (_tmp2_ != 0) { +#line 1974 "string.c" + gint _tmp3_; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp6_ = _result_; + _tmp3_ = _result_; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = _tmp6_; -#line 2219 "string.c" + _tmp1_ = _tmp3_; +#line 1980 "string.c" } else { - GCompareFunc _tmp7_; - const gchar* _tmp8_; - const gchar* _tmp9_; - gint _tmp10_; -#line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp7_ = g_strcmp0; + GCompareFunc _tmp4_; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp8_ = astr; -#line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp9_ = bstr; + _tmp4_ = g_strcmp0; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp10_ = _tmp7_ (_tmp8_, _tmp9_); -#line 297 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = _tmp10_; -#line 2235 "string.c" + _tmp1_ = _tmp4_ (astr, bstr); +#line 1987 "string.c" } #line 297 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp4_; + result = _tmp1_; #line 297 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2241 "string.c" +#line 1993 "string.c" } -gboolean string_collated_equals (void* a, void* b) { +gboolean +string_collated_equals (void* a, + void* b) +{ gboolean result = FALSE; - void* _tmp0_; - void* _tmp1_; - gint _tmp2_; -#line 302 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = a; #line 302 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = b; -#line 302 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = string_collated_compare (_tmp0_, _tmp1_); -#line 302 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp2_ == 0; + result = string_collated_compare (a, b) == 0; #line 302 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2260 "string.c" +#line 2006 "string.c" } -gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey) { +gboolean +string_precollated_equals (const gchar* astr, + const gchar* akey, + const gchar* bstr, + const gchar* bkey) +{ gboolean result = FALSE; - const gchar* _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gint _tmp4_; #line 306 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (astr != NULL, FALSE); #line 306 "/home/jens/Source/shotwell/src/util/string.vala" @@ -2277,20 +2023,10 @@ gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const #line 306 "/home/jens/Source/shotwell/src/util/string.vala" g_return_val_if_fail (bkey != NULL, FALSE); #line 307 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp0_ = astr; -#line 307 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp1_ = akey; -#line 307 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp2_ = bstr; -#line 307 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp3_ = bkey; -#line 307 "/home/jens/Source/shotwell/src/util/string.vala" - _tmp4_ = string_precollated_compare (_tmp0_, _tmp1_, _tmp2_, _tmp3_); -#line 307 "/home/jens/Source/shotwell/src/util/string.vala" - result = _tmp4_ == 0; + result = string_precollated_compare (astr, akey, bstr, bkey) == 0; #line 307 "/home/jens/Source/shotwell/src/util/string.vala" return result; -#line 2293 "string.c" +#line 2029 "string.c" } |