Function to check whether two strings are similar at given %
Alright I have a hole in my schedule, so I will give it a review myself.



Let's start with the function case_insensitive_chrcmp


The name mixes two standards for function name, the well-descriptive, but long snake_case and the less descriptive but shorter standard abbreviation naming.
So it would be better if it is either:


case_insensitive_char_compare
chrcasecmp



Since the second function uses the second standard, I would choose chrcasecmp.


Many people do not like one-liners as they actually require more space (or even ironically more lines) than if they were not a function at all.
Also it is a little bit slower (needs to access the routine, push the arguments onto the stack, etc). A good C function should be at least two lines and not more than a person with the old 640x480 monitor can see.
It can be optimized and shortened further using the bitwise XOR operator:


return ch1 == ch2 || (ch1 ^ ' ') == ch2;

Since ' ' translates to 32, which is the sixth bit set and others unset.

And the strpcmp function


I already said that two strlens to find the length of two presumably identical strings is not very efficient as it needs to iterate over both the strings, increment and check against '\0 at every iteration while this could be done in a single loop. This is an optimized function to find lengths of two strings:




int str2len (char* str1, char* str2, size_t * szStr1, size_t * szStr2)
{
    /* Variables */
    char*   p1      = str1;
    char*   p2      = str2;
    size_t  len1    = 0;
    size_t  len2    = 0;

    /* Pre-checking */
    if(str1 == NULL || str2 == NULL || szStr1 == NULL || szStr2 == NULL)
        return(-1);

    /* Processing */
    while(str1[len1] || p2[len2])
    {
        if(str1[len1] != '\0')
            len1++;
        if(str2[len2] != '\0')
            len2++;
    }

    /* Assignment */
    *szStr1 = len1;
    *szStr2 = len2;

    return 0;
}



int cur = 0; is declaration after expression, which turns the code into C89-incompatible. Also the name cur is not very descriptive. While it may mean "current" it is not clear current of what it is. Better name nMatch.
chars = szMax * setting / 100;
Does not define what happens if the result from the division is not a whole number. In most cases the floating point number will be omitted which may or may not be the desired behavior. I should consider using round(), floor() or ceil() on a double
The function checks if a char from str1 with index x matches a char with index x in str2 which makes the code susceptible to this scenario:
"Hello World" and "World" will always return false.
The function should rather search whether a characters are CONTAINED consecutively into the second string instead.