bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why do you want to increment *argc in argcv.c?


From: Sam Roberts
Subject: Why do you want to increment *argc in argcv.c?
Date: Thu, 21 Feb 2002 23:37:33 -0500
User-agent: Mutt/1.3.16i

Hi Sergey.

I don't get it, by doing this, the last time you call
argcv_scan() inside the for loop, it will return with
no token (start == end, and return == strlen(command)),
so then a "" get's appended as the last element of the
vector. So, parsing "-a -b -c", will get you

av[5] = {
   "-a", "-b", "-c", "", NULL
  };

I thought this was a bug, isn't it? Or do you want this?

Commands expecting arguments won't like this, sieve for
instance fails if you call it with multiple scripts, and
this trailing "" shows up as an argument.

Sam

-- 
Sam Roberts <address@hidden> (Vivez sans temps mort!)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]