Jump to content

Talk:Find common directory path: Difference between revisions

m
Rename the function to avoid the implication that it finds the shortest common path (which would be much simpler).
No edit summary
m (Rename the function to avoid the implication that it finds the shortest common path (which would be much simpler).)
Line 6:
#include <stdio.h>
 
static void leastCommonPathlongestSharedPath(const char *fixed, char *moving) {
char *t;
unsigned n = strspn(moving, fixed);
Line 27:
strcpy(tmp, dir_list[0]);
while (dir_list[++i]) {
leastCommonPathlongestSharedPath(dir_list[i], tmp);
}
printf("%s\n", tmp);
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.