[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Tentative CSV extension - please advise
From: |
arnold |
Subject: |
Re: [bug-gawk] Tentative CSV extension - please advise |
Date: |
Tue, 15 Mar 2016 07:07:51 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
"Andrew J. Schorr" <address@hidden> wrote:
> > The right way to do this is to extend the extension mechanism with a
> > function
> > pointer that sets the fields. Or more likely to add a fields array pointer
> > to the awk_input_buf_t and a flag indicating that the values should be used.
>
> That will work well in most cases, but do we want to try to support getline
> into a variable where the code may later call split on that variable? If so,
> we
> would need to find a way to extend the split() function as well. Maybe it's
> too
> difficult to do that...
Yes. That's getting too messy. Instead such an extension should simply define
a csvsplit() function.
The big problem is embedded newlines in the fields. Sigh. If not for that
we could deal with this issue much more easily...