I found the logic of this function hard to follow - especially the nested loop.

I think it equivalent to 

    //skip any leading filled in entries.
    while (freeFinder !=rowEnd && *freeFinger)
        freeFinger++; newCount++

    // move any subsequent filled in entries.
    for (filled = freeFinder;filled != rowEnd;filled++)
        if *filled
            *free++ = *filled; *filled = NULL; newCount++;