Allowed implicit -and operator with -not, -if and -sub
This commit is contained in:
parent
254d2f8413
commit
1c33c6d1e2
@ -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 Findjob_open_bracket(struct FindjoB *job, int flag)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct ExprnodE *fnode;
|
struct ExprnodE *fnode;
|
||||||
|
|
||||||
if(Findjob_cursor_complete(job, 0)) {
|
ret= Findjob_default_and(job, 0);
|
||||||
job->errn= -2;
|
if(ret <= 0)
|
||||||
sprintf(job->errmsg,"Binary operator expected, opening-bracket found");
|
return(ret);
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
ret= Findjob_new_node(job, &fnode, "-sub", 1);
|
ret= Findjob_new_node(job, &fnode, "-sub", 1);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
return(ret);
|
return(ret);
|
||||||
@ -2936,11 +2948,11 @@ int Findjob_close_bracket(struct FindjoB *job, int flag)
|
|||||||
|
|
||||||
int Findjob_not(struct FindjoB *job, int flag)
|
int Findjob_not(struct FindjoB *job, int flag)
|
||||||
{
|
{
|
||||||
if(Findjob_cursor_complete(job, 0)) {
|
int ret;
|
||||||
job->errn= -2;
|
|
||||||
sprintf(job->errmsg, "Binary operator expected, unary operator found");
|
ret= Findjob_default_and(job, 0);
|
||||||
return(0);
|
if(ret <= 0)
|
||||||
}
|
return(ret);
|
||||||
job->cursor->invert= !job->cursor->invert;
|
job->cursor->invert= !job->cursor->invert;
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
@ -3002,11 +3014,9 @@ int Findjob_if(struct FindjoB *job, int flag)
|
|||||||
int ret;
|
int ret;
|
||||||
struct ExprnodE *fnode;
|
struct ExprnodE *fnode;
|
||||||
|
|
||||||
if(Findjob_cursor_complete(job,0)) {
|
ret= Findjob_default_and(job, 0);
|
||||||
job->errn= -2;
|
if(ret <= 0)
|
||||||
sprintf(job->errmsg,"Binary operator expected, -if-mark found");
|
return(ret);
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
ret= Findjob_new_node(job, &fnode, "-if", 1);
|
ret= Findjob_new_node(job, &fnode, "-if", 1);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
return(ret);
|
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)
|
int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
|
||||||
{
|
{
|
||||||
char regexpr[2*SfileadrL+2];
|
char regexpr[2*SfileadrL+2];
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2009.04.21.173600"
|
#define Xorriso_timestamP "2009.04.21.184214"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user