c – My function that combines strverscmp () with strcoll ()

I am writing a file manager that uses the ncurses library in C. It aims to look a bit like the "suckless" community programs.

For short, I needed to write my own comparison function for the qsort () function to sort the files. At first glance, strverscmp () is nice, but I do not like its UTF-8 character handling like the German "Umlaute". Also, do not compare the case insensitively.
strcoll () does the last two things, but no comparison version.
So I wrote this function (I hope my code shows up well, unfortunately, I did not find normal code labels like [code][/code]):

#define UTF8LEN (c) (c <0xC0? 1: 
c <0xE0? two: 
c <0xF0? 3: 
c <0xF8? 4: 
c <0xFC? 5: 6)
/ * is continuation byte? * /
# define ISCB (c) ((without sign) c <0xC0? 1: 0)
# define ISCB2 (c) (c < 0xC0 && c > 0x7F? 1: 0)

# define ISASCII (c) ((characters without sign) c < 127)
#define ISDIGIT(c)   ((c > 47) && (c < 58))
/* tolower */
#define TL(c)        ((c > 64) && (c <91)? c + 32: c)


/ * version comparison combined with strcoll * /
In t
// mycompare (const char * s1, const char * s2)
mycompare (const void * p1, const void * p2)
{
const char * s1, * s2, * str1, * str2;
char u1[7]u2[7];
int c1, c2, r, w;
size_t d1, d2;

w = 0;
s1 = * (char * const *) p1;
s2 = * (char * const *) p2;
str1 = s1;
str2 = s2;

for (;;) {
while (* s1 == * s2) {
if (* s1 == & # 39;  0 & # 39;) {
/ *
* if * s1 == & # 39;  0 & # 39 ;, then * s2 == & # 39;  0 & # 39 ;, also
* (because * s1 == * s2)
*
* If only one of them is & # 39;  0 & # 39 ;, then
* They are no longer the same
* /
returns 0;
}
s1 ++;
s2 ++;
}
if ((* s1 == & # 39;  0 & # 39;) || (* s2 == & # 39;  0 & # 39;)) {
return * s1- * s2;
}
if (! ISASCII (* s1)) {
/ * loop back to start the character UTF-8 * /
while (ISCB (* s1)) {s1--; };
// r = mblen (s1, MB_CUR_MAX);
r = UTF8LEN ((characters without sign) * s1);
memcpy (u1, s1, r);
U1[r] = & # 39;  0 & # 39 ;;
/ * we need to provide u2 if ISASCII (* s2) * /
U2[0] = * s2;
U2[1] = & # 39;  0 & # 39 ;;
w = 1;
}
if (! ISASCII (* s2)) {
/ * loop back to start the character UTF-8 * /
while (ISCB (* s2)) {s2--; };
// r = mblen (s2, MB_CUR_MAX);
r = UTF8LEN ((characters without sign) * s2);
memcpy (u2, s2, r);
U2[r] = & # 39;  0 & # 39 ;;
yes (! w) {
/ *
* as it was ISASCII (* s1), we need
* provide u2
* /
U1[0] = * s1;
U1[1] = & # 39;  0 & # 39 ;;
}
w = 1;
}
yes (w) {
if (ISDIGIT (* s1) || ISDIGIT (* s2)) {
/ *
* Number (longer) = major chain
* but only if it is not in position 0
* (s1-str1 == s2-str2)
* /
return s1-str1? eleven;
}
r = strcoll (u1, u2);
yes (r) {
return r;
}
w = 0;
}
c1 = TL (* s1);
c2 = TL (* s2);
yes (c1! = c2) {
if (ISDIGIT (* s1) && ISDIGIT (* s2)) {
/ * considers the leading zeros * /
if ((* s1 == & # 39; 0 & # 39;) || (* s2 == & # 39; 0 & # 39;)) {
returns c1-c2;
}
while (ISDIGIT (* s1)) {s1 ++; };
while (ISDIGIT (* s2)) {s2 ++; };
d1 = s1-str1;
d2 = s2-str2;
yes (d1! = d2) {
returns d1-d2;
}
} else if (ISDIGIT (* s1) || ISDIGIT (* s2)) {
/ *
* Number (longer) = major chain
* but only if it is not in position 0
* (s1-str1 == s2-str2)
* /
return s1-str1? c2-c1: c1-c2;
}
returns c1-c2;
} else {
s1 ++;
s2 ++;
}
}
}

The function seems to work fine, I have not found any errors yet. Valgrind is happy, too.
However, I did not "learn" the programming, I am (at this moment) only a "self-made" programmer. So I would love for you to give me a clue about whether this feature is good programming or what could be improved.

Thank you!