perf@EFD.LTH.SE (07/03/89)
This is from test.c:
-------------------
/*
* advance - increment our position in the argument list. Check that
* we're not past the end of the argument list. This check is
* supressed if the argument is FALSE. made a macro for efficiency.
*/
#ifndef lint
#define advance(f) (++pos, f && (pos < argc ? 0 : beyond()))
#endif
#if !defined(advance)
static int
advance(f)
int f;
{
++pos;
if (f && pos >= argc)
beyond();
}
#endif
-------------------
Some brain damaged compilers evaluate the conditional expression even
if `f' is FALSE.
So if you get "[: argument expected" that's prabably the problem.
Maybe an #ifdef __GNUC__ or #ifndef BRAIN_DAMAGE should be added to
the code...
--
Per Foreby
System manager at EFD, Lund Institute of Technology (Lund University)
Snail: E-huset, Tekniska Hogskolan i Lund, Box 118, S-221 00 LUND, Sweden.
Email: perf@efd.lth.se Phone: int + 46 46-10 75 98