Opened 10 years ago

Closed 8 years ago

#5558 closed enhancement (fixed)

Convert mitab from FILE* to VSILFILE*

Reported by: mpd Owned by: warmerdam
Priority: low Milestone:
Component: default Version: unspecified
Severity: minor Keywords: mitab
Cc:

Description

The attached patch converts the main parts of mitab (except for things like the - debugging - Dump methods) to use VSILFILE* instead of FILE*.

The patch is required on Windows which has a hard limit of FILE* handles per process, for users who wish to open large numbers of TAB files at the same time.

The patch is against r27490, on the trunk.

See also ticket:5556, which discusses a related change to the Win32 VSI*L implementation, for performance reasons.

Attachments (1)

mitab-vsilfile.patch (30.5 KB ) - added by mpd 10 years ago.
mitab patch from FILE* to VSILFILE*

Download all attachments as: .zip

Change History (8)

by mpd, 10 years ago

Attachment: mitab-vsilfile.patch added

mitab patch from FILE* to VSILFILE*

comment:1 by Even Rouault, 10 years ago

Milestone: 2.0

I've corrected a few errors :

  • .mif/.mid writing was broken (erroneous use of VSIFPrintfL with a va_list argument)
  • .mif/.mid reading was broken as well (subtle difference of behaviour w.r.t end-of-file flag between CPLReadLine and CPLReadLineL())
  • compilation error somewhere due to a missing replacement of FILE* with VSILFILE* ( compilation with -DDEBUG turn on stricter type enforcing)

I've also added the GDAL_DCAP_VIRTUALIO flag in the driver capabilities.

trunk r27494 "MITAB: convert to use of VSI*L FILE API (based on patch by mpd, #5558)"

comment:2 by Even Rouault, 10 years ago

Submitted to mitab upstream as https://github.com/mapgears/mitab/pull/12

in reply to:  1 ; comment:3 by mpd, 10 years ago

Replying to rouault:

I've corrected a few errors :

Thanks for that. We don't use mitab for MIF/MID (for historical reasons) so missed these.

in reply to:  3 ; comment:4 by Even Rouault, 10 years ago

Replying to mpd:

Replying to rouault:

I've corrected a few errors :

Thanks for that. We don't use mitab for MIF/MID (for historical reasons) so missed these.

But running the autotest suite would have caught it ;-)

in reply to:  4 comment:5 by mpd, 10 years ago

Replying to rouault:

But running the autotest suite would have caught it ;-)

Ha! Fair point: I'll have my butler do it next time ;)

comment:6 by Even Rouault, 9 years ago

Milestone: 2.0

Removing obsolete milestone

comment:7 by Even Rouault, 8 years ago

Resolution: fixed
Status: newclosed

Batch closing of MITAB tickets fixed in GDAL. They were kept open because not merged into MITAB separate repository, but the latter one is inactive, so let's close them definitely.

Note: See TracTickets for help on using tickets.