strncpy(str1, str2, str2 - strrchr(str2, '.'))
みたいな場合でも、
strncpy(str1, str2, sizeof(char) * (str2 - strrchr(str2, '.')))
とか書かなきゃならんか?

アホらし。