AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
August 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.08.09 12:07 "Error handling & threading", by John Aldridge
2007.08.09 14:30 "Re: Error handling & threading", by Frank Warmerdam
2007.08.10 10:50 "Re: Error handling & threading", by Joris Van Damme
2007.08.10 12:02 "Re: Error handling & threading", by John Aldridge

2007.08.09 12:07 "Error handling & threading", by John Aldridge

In a multi-threaded application, it can be a nuisance that the handlers 
set by TIFFSetErrorHandler[Ext] & TIFFSetWarningHandler[Ext]  are static 
variables.

Would there be any sympathy for adding a pair of such handler function 
pointers to the TIFF structure? I suppose we'd need to add new versions 
of the

   TIFFOpen, TIFFOpenW, TIFFFdOpen, TIFFClientOpen

functions which takes such function pointers as arguments and fill them 
into the returned TIFF structure. The existing open functions could just 
default them to the current TIFFErrorExt and TIFFWarningExt functions.

Then all calls to TIFFErrorExt and TIFFWarningExt in the library could 
be replaced by one of

    tiff->tif_errorProc (...)
    tiff->tif_warningProc (...)

These changes would allow applications to establish per-TIFF strcture 
error policy without upsetting existing code.

-- 
Cheers,
John