[Geotiff] Two versions of CSVGetField
John Johnson
jdjohnso at google.com
Thu Oct 6 13:11:30 PDT 2005
For some reason libtiff has two versions of CSVGetField.
The one in cpl_csv.c appears to do a teeny bit more than the one in
cpl_csv_incode.c.
The one in cpl_csv.c returns "" when it can't find a matching record. While
the one in cpl_csv_incode.c returns NULL.
There are a bunch of places in the code that do something like
'atoi(CSVGetField(...))' which promptly SEGV's if CSVGetFeild returns NULL.
Which leads me to believe that the code is expecting to call the one that
returns "". But my builds are calling the one that returns NULL.
So my questions are: Why are there two versions? Which is supposed to be
called from which context?
I'm still looking into the specific reasons why the routines are getting
passed somthing that's not in the CSV file (gcs.csv in my case). But it sure
would be nice for my uses to see something like "Unrecognized GCS" instead
of a SEGV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotiff/attachments/20051006/ceec2c27/attachment.html>
More information about the Geotiff
mailing list