tech-userlevel archive

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

Re: pkgsrc RC scripts



On Mon, 19 Oct 2009 15:13:14 +1300 (NZDT)
Steven Drake <sdrake%xnet.co.nz@localhost> wrote:

> So heres the code. The first patch to pkg_install passes anything that 
> looks like a variable in pkg_install.conf to the environment of any 
> sub processes.  

+               /* handle "VAR= value" lines! */
+               if (*value == ' ')
+                       value++;

It might perhaps be best to do something such as

while (isspace((int)*value))
        value++;

although that could skip a few unintended characters, or

while (*value == ' ' || *value == '\t')
        value++;

unless we can guarantee that only a single space (and no tab) is
possible...

Thanks,
-- 
Matt


Home | Main Index | Thread Index | Old Index