ObjFW  Diff

Differences From Artifact [21b0d1d0a2]:

To Artifact [1791ee0081]:


616
617
618
619
620
621
622




623

624
625
626

627
628
629




630

631
632
633

634
635
636
637
638
639
640
		l1 = of_string_utf8_to_unicode(string + i, length - i, &c1);
		l2 = of_string_utf8_to_unicode(str_cstr + j, str_len - j, &c2);

		if (l1 == 0 || l2 == 0 || c1 > 0x10FFFF || c2 > 0x10FFFF)
			@throw [OFInvalidEncodingException newWithClass: isa];

		if (c1 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) {




			tmp = of_unicode_casefolding_table[c1 >> 8][c1 & 0xFF];


			if (tmp != 0)
				c1 = tmp;

		}

		if (c2 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) {




			tmp = of_unicode_casefolding_table[c2 >> 8][c2 & 0xFF];


			if (tmp != 0)
				c2 = tmp;

		}

		if (c1 > c2)
			return OF_ORDERED_DESCENDING;
		if (c1 < c2)
			return OF_ORDERED_ASCENDING;








>
>
>
>
|
>

|
|
>



>
>
>
>
|
>

|
|
>







616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
		l1 = of_string_utf8_to_unicode(string + i, length - i, &c1);
		l2 = of_string_utf8_to_unicode(str_cstr + j, str_len - j, &c2);

		if (l1 == 0 || l2 == 0 || c1 > 0x10FFFF || c2 > 0x10FFFF)
			@throw [OFInvalidEncodingException newWithClass: isa];

		if (c1 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) {
			if (of_unicode_casefolding_table[c1 >> 8] == NULL)
				c1 += of_unicode_lower_table[c1 >> 8]
				    [c1 & 0xFF];
			else {
				tmp = of_unicode_casefolding_table[c1 >> 8]
				    [c1 & 0xFF];

				if (tmp != 0)
					c1 = tmp;
			}
		}

		if (c2 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) {
			if (of_unicode_casefolding_table[c2 >> 8] == NULL)
				c2 += of_unicode_lower_table[c2 >> 8]
				    [c2 & 0xFF];
			else {
				tmp = of_unicode_casefolding_table[c2 >> 8]
				    [c2 & 0xFF];

				if (tmp != 0)
					c2 = tmp;
			}
		}

		if (c1 > c2)
			return OF_ORDERED_DESCENDING;
		if (c1 < c2)
			return OF_ORDERED_ASCENDING;