Shows that primary or token is unknown instead of only showing that
paths must precede expression
---
 find.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/find.c b/find.c
index ad0c731..16150e7 100644
--- a/find.c
+++ b/find.c
@@ -807,8 +807,11 @@ parse(int argc, char **argv)
                        }
                        tok->type = op->type;
                        tok->u.oinfo = op;
-               } else { /* token is neither primary nor operator, must be path 
in the wrong place */
-                       eprintf("paths must precede expression: %s\n", *arg);
+               } else { /* token is neither primary nor operator */
+                       if (!strncmp(*arg, "-", sizeof(char)))
+                               eprintf("unknown primary or operator: %s\n", 
*arg);
+                       else /* must be path in the wrong place */
+                               eprintf("paths must precede expression: %s\n", 
*arg);
                }
                if (tok->type != LPAR && tok->type != RPAR)
                        ntok++; /* won't have parens in rpn */
-- 
2.8.3


Reply via email to