Allowed implicit -and operator with -not, -if and -sub

master
Thomas Schmitt 14 years ago
parent 6052e04b72
commit 2499047b82
  1. 54
      xorriso/xorriso.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -2896,16 +2896,28 @@ int Findjob_new_node(struct FindjoB *job, struct ExprnodE **fnode,
}
/* If an operator is expected : use -and */
int Findjob_default_and(struct FindjoB *o, int flag)
{
int ret;
if(Findjob_cursor_complete(o, 0)) {
ret= Findjob_and(o, 0);
if(ret <= 0)
return(ret);
}
return(1);
}
int Findjob_open_bracket(struct FindjoB *job, int flag)
{
int ret;
struct ExprnodE *fnode;
if(Findjob_cursor_complete(job, 0)) {
job->errn= -2;
sprintf(job->errmsg,"Binary operator expected, opening-bracket found");
return(0);
}
ret= Findjob_default_and(job, 0);
if(ret <= 0)
return(ret);
ret= Findjob_new_node(job, &fnode, "-sub", 1);
if(ret <= 0)
return(ret);
@ -2936,11 +2948,11 @@ int Findjob_close_bracket(struct FindjoB *job, int flag)
int Findjob_not(struct FindjoB *job, int flag)
{
if(Findjob_cursor_complete(job, 0)) {
job->errn= -2;
sprintf(job->errmsg, "Binary operator expected, unary operator found");
return(0);
}
int ret;
ret= Findjob_default_and(job, 0);
if(ret <= 0)
return(ret);
job->cursor->invert= !job->cursor->invert;
return(1);
}
@ -3002,11 +3014,9 @@ int Findjob_if(struct FindjoB *job, int flag)
int ret;
struct ExprnodE *fnode;
if(Findjob_cursor_complete(job,0)) {
job->errn= -2;
sprintf(job->errmsg,"Binary operator expected, -if-mark found");
return(0);
}
ret= Findjob_default_and(job, 0);
if(ret <= 0)
return(ret);
ret= Findjob_new_node(job, &fnode, "-if", 1);
if(ret<=0)
return(ret);
@ -3143,20 +3153,6 @@ improper_range:;
}
/* If an operator is expected : use -and */
int Findjob_default_and(struct FindjoB *o, int flag)
{
int ret;
if(Findjob_cursor_complete(o, 0)) {
ret= Findjob_and(o, 0);
if(ret <= 0)
return(ret);
}
return(1);
}
int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
{
char regexpr[2*SfileadrL+2];

@ -1 +1 @@
#define Xorriso_timestamP "2009.04.21.173600"
#define Xorriso_timestamP "2009.04.21.184214"

Loading…
Cancel
Save