On Tue, Jan 18, 2011 at 03:56:45PM -0500, Wietse Venema wrote:

> Something along the lines of:
> 
>     /*
>      * Workaround. The "," was already in use as dnsbl list separator.
>      */
>     for (keep = 0, cp = var_psc_dnsbl_sites; *cp; cp++) {
>         if (*cp == '[') {
>             keep++; 
>         } else if (*cp == ']' && keep > 0) {
>             keep--;
>         } else if (*cp == ',' && keep <= 0) {
>             *cp = ' ';
>         }
>     }
>     dnsbl_site = argv_split(var_psc_dnsbl_sites, ", \t\r\n");

Right, reasonably elegant, but with the split now on just " \t\r\n".

-- 
        Viktor.

Reply via email to