"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/iso_tree.c" between
xorriso-1.4.6.tar.gz and xorriso-1.4.8.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

iso_tree.c  (xorriso-1.4.6):iso_tree.c  (xorriso-1.4.8)
skipping to change at line 1998 skipping to change at line 1998
if(flag&2) if(flag&2)
(*dive_count)--; (*dive_count)--;
if(iter != NULL) if(iter != NULL)
iso_dir_iter_free(iter); iso_dir_iter_free(iter);
return(ret); return(ret);
} }
/* @param flag bit0= a match count !=1 is a FAILURE event /* @param flag bit0= a match count !=1 is a FAILURE event
bit1= with bit0 tolerate 0 matches if pattern is a constant bit1= with bit0 tolerate 0 matches if pattern is a constant
bit2= do not issue debug messages about temporay memory needs bit2= do not issue debug messages about temporay memory needs
bit3= do not add unresolved pattern to filev
*/ */
int Xorriso_expand_pattern(struct XorrisO *xorriso, int Xorriso_expand_pattern(struct XorrisO *xorriso,
int num_patterns, char **patterns, int extra_filec, int num_patterns, char **patterns, int extra_filec,
int *filec, char ***filev, off_t *mem, int flag) int *filec, char ***filev, off_t *mem, int flag)
{ {
int ret, count= 0, abs_adr= 0, i, was_count, was_filec; int ret, count= 0, abs_adr= 0, i, was_count, was_filec;
int nonconst_mismatches= 0, dive_count= 0; int nonconst_mismatches= 0, dive_count= 0;
IsoImage *volume; IsoImage *volume;
IsoDir *dir= NULL, *root_dir; IsoDir *dir= NULL, *root_dir;
IsoNode *iso_node; IsoNode *iso_node;
skipping to change at line 2066 skipping to change at line 2067
ret= 0; goto ex; ret= 0; goto ex;
} }
} }
/* count the matches */ /* count the matches */
was_count= count; was_count= count;
ret= Xorriso_obtain_pattern_files_i(xorriso, "", dir, &count, NULL, 0, ret= Xorriso_obtain_pattern_files_i(xorriso, "", dir, &count, NULL, 0,
mem, &dive_count, 1 | abs_adr); mem, &dive_count, 1 | abs_adr);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
if(was_count==count && strcmp(patterns[i],"*")!=0 && (flag&3)!=1) { if(was_count==count && strcmp(patterns[i],"*")!=0 && (flag&3)!=1 &&
!(flag & 8)) {
count++; count++;
Xorriso_eval_nonmatch(xorriso, patterns[i], &nonconst_mismatches, mem, 0); Xorriso_eval_nonmatch(xorriso, patterns[i], &nonconst_mismatches, mem, 0);
} }
} }
ret= Xorriso_check_matchcount(xorriso, count, nonconst_mismatches, ret= Xorriso_check_matchcount(xorriso, count, nonconst_mismatches,
num_patterns, patterns, (flag&1)|2); num_patterns, patterns, (flag&1)|2);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
count+= extra_filec; count+= extra_filec;
(*mem)+= extra_filec * sizeof(char *); (*mem)+= extra_filec * sizeof(char *);
if(count<=0) if(count<=0)
{ret= 0; goto ex;} {ret= !!(flag & 8); goto ex;}
ret= Xorriso_alloc_pattern_mem(xorriso, *mem, count, filev, !!(flag & 4)); ret= Xorriso_alloc_pattern_mem(xorriso, *mem, count, filev, !!(flag & 4));
if(ret<=0) if(ret<=0)
goto ex; goto ex;
/* now store addresses */ /* now store addresses */
for(i= 0; i<num_patterns; i++) { for(i= 0; i<num_patterns; i++) {
ret= Xorriso_prepare_expansion_pattern(xorriso, patterns[i], 0); ret= Xorriso_prepare_expansion_pattern(xorriso, patterns[i], 0);
if(ret<=0) if(ret<=0)
return(ret); return(ret);
if(ret==2) if(ret==2)
abs_adr= 4; abs_adr= 4;
was_filec= *filec; was_filec= *filec;
ret= Xorriso_obtain_pattern_files_i(xorriso, "", dir, filec, *filev, count, ret= Xorriso_obtain_pattern_files_i(xorriso, "", dir, filec, *filev, count,
mem, &dive_count, abs_adr); mem, &dive_count, abs_adr);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
if(was_filec == *filec && strcmp(patterns[i],"*")!=0) { if(was_filec == *filec && strcmp(patterns[i],"*")!=0 && (flag&3) != 1 &&
!(flag & 8)) {
(*filev)[*filec]= strdup(patterns[i]); (*filev)[*filec]= strdup(patterns[i]);
if((*filev)[*filec]==NULL) { if((*filev)[*filec]==NULL) {
(*mem)= strlen(patterns[i])+1; (*mem)= strlen(patterns[i])+1;
Xorriso_no_pattern_memory(xorriso, *mem, 0); Xorriso_no_pattern_memory(xorriso, *mem, 0);
ret= -1; goto ex; ret= -1; goto ex;
} }
(*filec)++; (*filec)++;
} }
} }
ret= 1; ret= 1;
 End of changes. 4 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)