New command -sh_style_result
This commit is contained in:
@ -2480,6 +2480,12 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (xorriso->sh_style_result == 0);
|
||||
sprintf(line, "-sh_style_result %s\n",
|
||||
xorriso->sh_style_result ? "on" : "off");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (xorriso->bsl_interpretation == 0);
|
||||
strcpy(line, "-backslash_codes ");
|
||||
if(xorriso->bsl_interpretation == 0)
|
||||
@ -4119,3 +4125,29 @@ ex:;
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= append to out_text rather than overwrite it
|
||||
bit1= length limit is 10 * SfileadrL rather than 5 *
|
||||
*/
|
||||
char *Xorriso_esc_filepath(struct XorrisO *xorriso,
|
||||
char *in_text, char *out_text, int flag)
|
||||
{
|
||||
int l, w=0, limit= 5 * SfileadrL;
|
||||
char *res;
|
||||
|
||||
if(xorriso->sh_style_result == 0) {
|
||||
res= Text_shellsafe(in_text, out_text, flag);
|
||||
return(res);
|
||||
}
|
||||
if(flag&1)
|
||||
w= strlen(out_text);
|
||||
if(flag & 2)
|
||||
limit= 10 * SfileadrL;
|
||||
l= strlen(in_text);
|
||||
if(w + l >= limit) {
|
||||
strcpy(out_text, "'xorriso: TEXT MUCH TOO LONG ... ");
|
||||
return(out_text);
|
||||
}
|
||||
strcpy(out_text + w, in_text);
|
||||
return(out_text);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user