
/*---------------------------------------------------------------------*/
/* Strings vergleichen (bis zu welchem unsigned character sind sie gleich?)     */
/*---------------------------------------------------------------------*/

int compare (unsigned char *str1, unsigned char *str2, int length)
{
    int     i;

    i = 0;
    while ((str1[i]==str2[i]) && (i<length))
        i++;

    return i;               /* Return how far we got before a difference occurred, or the variable      */
                            /* length, whichever is the smaller                                         */
}

