[prev] [index] [next]

CSV Library Design

Some of the design decisions made in developing the interface:
  • precise definition of "field" and numbering from 0
  • the caller must supply an open file descriptor
  • the library will manage its own storage for lines and fields
  • errors are reported (via NULL); must be handled by caller
  • NULL return is also used to indicate normal end-of-input
Some design decisions internal to the library:
  • the library builds line/field buffers dynamically
  • precise parsing algorithm for the input line strings
  • lines are not split into fields until requested