I have no code at hand as I did not need it so far, but the sscanf and strtok functions can be used. There's another example of reading a more complicated .csv file at the end this page:

http://manual.zorro-trader.com/export.htm