"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/parse_exec.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.

parse_exec.c  (xorriso-1.4.6):parse_exec.c  (xorriso-1.4.8)
skipping to change at line 81 skipping to change at line 81
@param flag bit0= do not warn of wildcards @param flag bit0= do not warn of wildcards
bit1= these are disk_paths bit1= these are disk_paths
bit2= never expand wildcards bit2= never expand wildcards
bit3= do not expand last argument bit3= do not expand last argument
bit4= ignore last argument bit4= ignore last argument
bit5= demand exactly one match bit5= demand exactly one match
bit6= with bit5 allow 0 matches if pattern is a constant bit6= with bit5 allow 0 matches if pattern is a constant
bit7= silently tolerate empty argument list bit7= silently tolerate empty argument list
bit8= free the eventually allocated sub_vector bit8= free the eventually allocated sub_vector
bit9= always expand wildcards bit9= always expand wildcards
bit10= do not add unresolved pattern to optv
*/ */
int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd, int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd,
int argc, char **argv, int idx, int argc, char **argv, int idx,
int *end_idx, int *optc, char ***optv, int flag) int *end_idx, int *optc, char ***optv, int flag)
{ {
int i, do_expand, nump, was_empty= 0, filec= 0, ret; int i, do_expand, nump, was_empty= 0, filec= 0, ret;
char **filev= NULL, **patterns= NULL; char **filev= NULL, **patterns= NULL;
off_t mem= 0; off_t mem= 0;
if(flag&2) if(flag&2)
skipping to change at line 115 skipping to change at line 116
return(1); return(1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0); return(0);
} }
*end_idx= Xorriso_end_idx(xorriso, argc, argv, idx, *end_idx= Xorriso_end_idx(xorriso, argc, argv, idx,
((flag&1) || do_expand) | (flag&2)); ((flag&1) || do_expand) | (flag&2));
if(*end_idx<0) if(*end_idx<0)
return(*end_idx); return(*end_idx);
if((flag&16) && (*end_idx)>idx) if((flag&16) && (*end_idx)>idx)
(*end_idx)--; (*end_idx)--;
*optc= *end_idx - idx; *optc= *end_idx - idx;
*optv= argv+idx; *optv= NULL;
if(*optc<=0 || !do_expand) if(*optc<=0 || !do_expand) {
if(*optc > 0) {
Xorriso_alloc_meM(*optv, char *, *optc);
for(i= 0; i < *optc; i++) {
Xorriso_alloc_meM((*optv)[i], char, strlen(argv[idx + i]) + 1);
strcpy((*optv)[i], argv[idx + i]);
}
}
return(1); return(1);
}
patterns= calloc(*optc, sizeof(char *)); patterns= calloc(*optc, sizeof(char *));
if(patterns==NULL) { if(patterns==NULL) {
no_memory:; no_memory:;
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"%s : Cannot allocate enough memory for pattern expansion", cmd); "%s : Cannot allocate enough memory for pattern expansion", cmd);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
{ret= -1; goto ex;} {ret= -1; goto ex;}
} }
nump= 0; nump= 0;
if(flag&8) { if(flag&8) {
skipping to change at line 146 skipping to change at line 156
continue; continue;
} }
patterns[nump++]= argv[i + idx]; patterns[nump++]= argv[i + idx];
} }
if(nump<=0) { /* Only empty texts. May the caller get happy with them. */ if(nump<=0) { /* Only empty texts. May the caller get happy with them. */
free(patterns); free(patterns);
return(1); return(1);
} }
if(flag&2) if(flag&2)
ret= Xorriso_expand_disk_pattern(xorriso, nump, patterns, was_empty, ret= Xorriso_expand_disk_pattern(xorriso, nump, patterns, was_empty,
&filec, &filev, &mem, (flag>>5)&3); &filec, &filev, &mem,
((flag >> 5) & 3) | ((!!(flag & 1024)) << 3));
else else
ret= Xorriso_expand_pattern(xorriso, nump, patterns, was_empty, ret= Xorriso_expand_pattern(xorriso, nump, patterns, was_empty,
&filec, &filev, &mem, (flag>>5)&3); &filec, &filev, &mem,
((flag >> 5) & 3) | ((!!(flag & 1024)) << 3));
if(ret<=0) if(ret<=0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
for(i= 0; i<was_empty; i++) { for(i= 0; i<was_empty; i++) {
if(i==was_empty-1 && (flag&8)) if(i==was_empty-1 && (flag&8))
filev[filec++]= strdup(argv[idx + *optc - 1]); filev[filec++]= strdup(argv[idx + *optc - 1]);
else else
filev[filec++]= strdup(""); filev[filec++]= strdup("");
if(filev[filec-1]==NULL) if(filev[filec-1]==NULL)
goto no_memory; goto no_memory;
} }
skipping to change at line 570 skipping to change at line 582
"check_md5","check_md5_r","check_media","check_media_defaults", "check_md5","check_md5_r","check_media","check_media_defaults",
"chgrp","chgrpi","chgrp_r","chgrp_ri","chmod","chmodi", "chgrp","chgrpi","chgrp_r","chgrp_ri","chmod","chmodi",
"chmod_r","chmod_ri","chown","chowni","chown_r","chown_ri", "chmod_r","chmod_ri","chown","chowni","chown_r","chown_ri",
"compare_l","concat","cp_clone","cp_rax","cp_rx","cpr","cpri","cpax","cpx", "compare_l","concat","cp_clone","cp_rax","cp_rx","cpr","cpri","cpax","cpx",
"du","dui","dus","dusi","dux","dusx","external_filter","extract_l", "du","dui","dus","dusi","dux","dusx","external_filter","extract_l",
"file_size_limit","find","findi","finds","findx", "file_size_limit","find","findi","finds","findx",
"getfacl","getfacli","getfacl_r","getfacl_ri", "getfacl","getfacli","getfacl_r","getfacl_ri",
"getfattr","getfattri","getfattr_r","getfattr_ri","hide", "getfattr","getfattri","getfattr_r","getfattr_ri","hide",
"launch_frontend","ls","lsi","lsl","lsli","lsd","lsdi","lsdl","lsdli", "launch_frontend","ls","lsi","lsl","lsli","lsd","lsdi","lsdl","lsdli",
"lsx","lslx","lsdx","lsdlx","map_l","mv","mvi","mkdir","mkdiri", "lsx","lslx","lsdx","lsdlx","map_l","mv","mvi","mkdir","mkdiri",
"not_paths","rm","rmi","rm_r","rm_ri","rmdir","rmdiri","update_l", "not_paths","rm","rmi","rm_r","rm_ri","rmdir","rmdiri",
"update_l","update_li","update_lx","update_lxi",
"setfacl","setfacli","setfacl_list","setfacl_listi", "setfacl","setfacli","setfacl_list","setfacl_listi",
"setfacl_r","setfacl_ri","setfattr","setfattri", "setfacl_r","setfacl_ri","setfattr","setfattri",
"setfattr_list","setfattr_listi","setfattr_r","setfattr_ri", "setfattr_list","setfattr_listi","setfattr_r","setfattr_ri",
"set_filter","set_filter_r","show_stream","show_stream_r", "set_filter","set_filter_r","show_stream","show_stream_r",
"" ""
}; };
Xorriso_alloc_meM(cmd_data, char, cmd_data_size); Xorriso_alloc_meM(cmd_data, char, cmd_data_size);
*count= 0; *count= 0;
skipping to change at line 693 skipping to change at line 706
"file_name_limit", "file_size_limit", "file_name_limit", "file_size_limit",
"not_mgt", "not_paths", "not_leaf", "not_list", "not_mgt", "not_paths", "not_leaf", "not_list",
"quoted_not_list", "follow", "pathspecs", "overwrite", "split_size", "quoted_not_list", "follow", "pathspecs", "overwrite", "split_size",
"* Navigation in ISO image and disk filesystem (1):", "* Navigation in ISO image and disk filesystem (1):",
"cd", "cdx", "pwd", "pwdx", "cd", "cdx", "pwd", "pwdx",
"* Inserting files into ISO image:", "* Inserting files into ISO image:",
"disk_pattern", "add_plainly", "disk_pattern", "add_plainly",
"mkdir", "lns", "add", "path_list", "quoted_path_list", "mkdir", "lns", "add", "path_list", "quoted_path_list",
"map", "map_single", "map_l", "update", "update_r", "update_l", "map", "map_single", "map_l", "update", "update_r",
"update_l", "update_li", "update_lx", "update_lxi",
"cut_out", "cpr", "cut_out", "cpr",
"clone", "cp_clone", "clone", "cp_clone",
"* Navigation in ISO image and disk filesystem (2):", "* Navigation in ISO image and disk filesystem (2):",
"ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx", "ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx",
"getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus", "getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus",
"dux", "dusx", "findx", "dux", "dusx", "findx",
"compare", "compare_r", "compare_l", "show_stream", "show_stream_r", "compare", "compare_r", "compare_l", "show_stream", "show_stream_r",
"* File manipulations:", "* File manipulations:",
skipping to change at line 1913 skipping to change at line 1927
ret= Xorriso_option_uid(xorriso,arg1,0); ret= Xorriso_option_uid(xorriso,arg1,0);
} else if(strcmp(cmd,"unregister_filter")==0) { } else if(strcmp(cmd,"unregister_filter")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_unregister_filter(xorriso, arg1, 0); ret= Xorriso_option_unregister_filter(xorriso, arg1, 0);
} else if(strcmp(cmd,"update")==0) { } else if(strcmp(cmd,"update")==0) {
(*idx)+= 2; (*idx)+= 2;
ret= Xorriso_option_update(xorriso, arg1, arg2, 1); ret= Xorriso_option_update(xorriso, arg1, arg2, 1);
} else if(strcmp(cmd,"update_l")==0) { } else if(strcmp(cmd,"update_l") == 0 || strcmp(cmd,"update_lx") == 0) {
ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 2<<8); ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 2<<8);
} else if(strcmp(cmd,"update_li") == 0) {
ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 5 << 8);
} else if(strcmp(cmd,"update_lxi") == 0) {
ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 4 << 8);
} else if(strcmp(cmd,"update_r")==0) { } else if(strcmp(cmd,"update_r")==0) {
(*idx)+= 2; (*idx)+= 2;
ret= Xorriso_option_update(xorriso, arg1, arg2, 1|8); ret= Xorriso_option_update(xorriso, arg1, arg2, 1|8);
} else if(strcmp(cmd,"use_immed_bit")==0) { } else if(strcmp(cmd,"use_immed_bit")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_use_immed_bit(xorriso, arg1, 0); ret= Xorriso_option_use_immed_bit(xorriso, arg1, 0);
} else if(strcmp(cmd,"use_readline")==0) { } else if(strcmp(cmd,"use_readline")==0) {
(*idx)++; (*idx)++;
 End of changes. 10 change blocks. 
7 lines changed or deleted 27 lines changed or added

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