The thing is, the one time I'm actually using the "n" functionality is with the first strncpy, which only copies up to the beginning of the basename.
All the strncats can be replaced with strcat, however.
So I guess I will need to manually append the end of string character after the strncpy.
Am I right in understanding that strcpy and strcat DO append an end of string character, even though strncpy and strncat do not?
That's what I thought...