1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
void modified_recursion(char *base_dir, char *modified_dir,
char *base_name, char *modified_name)
{
int length;
//stings for sub-directories
char *temp_base = malloc(MAX_DIR_LENGTH);
char *temp_modified = malloc(MAX_DIR_LENGTH);
length = strlen(base_dir);
strncpy(temp_base, base_dir, length);
length = strlen(modified_dir);
strncpy(temp_modified, modified_dir, length);
//Create a string for the base sub-directory
strncat(temp_base, "/", MAX_DIR_LENGTH);
strncat(temp_base, base_name, MAX_DIR_LENGTH);
strncat(temp_base, "/", MAX_DIR_LENGTH);
//Create a string for the base sub-directory
strncat(temp_modified, "/", MAX_DIR_LENGTH);
strncat(temp_modified, modified_name, MAX_DIR_LENGTH);
strncat(temp_modified, "/", MAX_DIR_LENGTH);
//process the sub-directories....
}
|