2012-03-12 12:35:35 +01:00
|
|
|
/* $Id: tif_stream.cxx,v 1.11 2010-12-11 23:12:29 faxguy Exp $ */
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 1988-1996 Sam Leffler
|
|
|
|
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and
|
|
|
|
* its documentation for any purpose is hereby granted without fee, provided
|
|
|
|
* that (i) the above copyright notices and this permission notice appear in
|
|
|
|
* all copies of the software and related documentation, and (ii) the names of
|
|
|
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
|
|
* publicity relating to the software without the specific, prior written
|
|
|
|
* permission of Sam Leffler and Silicon Graphics.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
|
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
|
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
|
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
|
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
* OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TIFF Library UNIX-specific Routines.
|
|
|
|
*/
|
|
|
|
#include "tiffiop.h"
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#ifndef __VMS
|
|
|
|
using namespace std;
|
|
|
|
#endif
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
/*
|
|
|
|
ISO C++ uses a 'std::streamsize' type to define counts. This makes
|
|
|
|
it similar to, (but perhaps not the same as) size_t.
|
|
|
|
|
|
|
|
The std::ios::pos_type is used to represent stream positions as used
|
|
|
|
by tellg(), tellp(), seekg(), and seekp(). This makes it similar to
|
|
|
|
(but perhaps not the same as) 'off_t'. The std::ios::streampos type
|
|
|
|
is used for character streams, but is documented to not be an
|
|
|
|
integral type anymore, so it should *not* be assigned to an integral
|
|
|
|
type.
|
|
|
|
|
|
|
|
The std::ios::off_type is used to specify relative offsets needed by
|
|
|
|
the variants of seekg() and seekp() which accept a relative offset
|
|
|
|
argument.
|
|
|
|
|
|
|
|
Useful prototype knowledge:
|
|
|
|
|
|
|
|
Obtain read position
|
|
|
|
ios::pos_type basic_istream::tellg()
|
|
|
|
|
|
|
|
Set read position
|
|
|
|
basic_istream& basic_istream::seekg(ios::pos_type)
|
|
|
|
basic_istream& basic_istream::seekg(ios::off_type, ios_base::seekdir)
|
|
|
|
|
|
|
|
Read data
|
|
|
|
basic_istream& istream::read(char *str, streamsize count)
|
|
|
|
|
|
|
|
Number of characters read in last unformatted read
|
|
|
|
streamsize istream::gcount();
|
|
|
|
|
|
|
|
Obtain write position
|
|
|
|
ios::pos_type basic_ostream::tellp()
|
|
|
|
|
|
|
|
Set write position
|
|
|
|
basic_ostream& basic_ostream::seekp(ios::pos_type)
|
|
|
|
basic_ostream& basic_ostream::seekp(ios::off_type, ios_base::seekdir)
|
|
|
|
|
|
|
|
Write data
|
|
|
|
basic_ostream& ostream::write(const char *str, streamsize count)
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct tiffis_data;
|
|
|
|
struct tiffos_data;
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
static tmsize_t _tiffosReadProc(thandle_t, void*, tmsize_t);
|
|
|
|
static tmsize_t _tiffisReadProc(thandle_t fd, void* buf, tmsize_t size);
|
|
|
|
static tmsize_t _tiffosWriteProc(thandle_t fd, void* buf, tmsize_t size);
|
|
|
|
static tmsize_t _tiffisWriteProc(thandle_t, void*, tmsize_t);
|
|
|
|
static uint64 _tiffosSeekProc(thandle_t fd, uint64 off, int whence);
|
|
|
|
static uint64 _tiffisSeekProc(thandle_t fd, uint64 off, int whence);
|
|
|
|
static uint64 _tiffosSizeProc(thandle_t fd);
|
|
|
|
static uint64 _tiffisSizeProc(thandle_t fd);
|
|
|
|
static int _tiffosCloseProc(thandle_t fd);
|
|
|
|
static int _tiffisCloseProc(thandle_t fd);
|
|
|
|
static int _tiffDummyMapProc(thandle_t , void** base, toff_t* size );
|
|
|
|
static void _tiffDummyUnmapProc(thandle_t , void* base, toff_t size );
|
|
|
|
static TIFF* _tiffStreamOpen(const char* name, const char* mode, void *fd);
|
|
|
|
|
|
|
|
struct tiffis_data
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
istream *stream;
|
|
|
|
ios::pos_type start_pos;
|
2011-03-20 23:45:24 +01:00
|
|
|
};
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
struct tiffos_data
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
ostream *stream;
|
|
|
|
ios::pos_type start_pos;
|
2011-03-20 23:45:24 +01:00
|
|
|
};
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static tmsize_t
|
|
|
|
_tiffosReadProc(thandle_t, void*, tmsize_t)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static tmsize_t
|
|
|
|
_tiffisReadProc(thandle_t fd, void* buf, tmsize_t size)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffis_data *data = reinterpret_cast<tiffis_data *>(fd);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
// Verify that type does not overflow.
|
|
|
|
streamsize request_size = size;
|
|
|
|
if (static_cast<tmsize_t>(request_size) != size)
|
|
|
|
return static_cast<tmsize_t>(-1);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
data->stream->read((char *) buf, request_size);
|
|
|
|
|
|
|
|
return static_cast<tmsize_t>(data->stream->gcount());
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static tmsize_t
|
|
|
|
_tiffosWriteProc(thandle_t fd, void* buf, tmsize_t size)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffos_data *data = reinterpret_cast<tiffos_data *>(fd);
|
|
|
|
ostream *os = data->stream;
|
|
|
|
ios::pos_type pos = os->tellp();
|
|
|
|
|
|
|
|
// Verify that type does not overflow.
|
|
|
|
streamsize request_size = size;
|
|
|
|
if (static_cast<tmsize_t>(request_size) != size)
|
|
|
|
return static_cast<tmsize_t>(-1);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
os->write(reinterpret_cast<const char *>(buf), request_size);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
return static_cast<tmsize_t>(os->tellp() - pos);
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static tmsize_t
|
|
|
|
_tiffisWriteProc(thandle_t, void*, tmsize_t)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static uint64
|
|
|
|
_tiffosSeekProc(thandle_t fd, uint64 off, int whence)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffos_data *data = reinterpret_cast<tiffos_data *>(fd);
|
|
|
|
ostream *os = data->stream;
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
// if the stream has already failed, don't do anything
|
|
|
|
if( os->fail() )
|
2012-03-12 12:35:35 +01:00
|
|
|
return static_cast<uint64>(-1);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
switch(whence) {
|
|
|
|
case SEEK_SET:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Compute 64-bit offset
|
|
|
|
uint64 new_offset = static_cast<uint64>(data->start_pos) + off;
|
|
|
|
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(new_offset);
|
|
|
|
if (static_cast<uint64>(offset) != new_offset)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
os->seekp(offset, ios::beg);
|
2011-03-20 23:45:24 +01:00
|
|
|
break;
|
2012-03-12 12:35:35 +01:00
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
case SEEK_CUR:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(off);
|
|
|
|
if (static_cast<uint64>(offset) != off)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
os->seekp(offset, ios::cur);
|
|
|
|
break;
|
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
case SEEK_END:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(off);
|
|
|
|
if (static_cast<uint64>(offset) != off)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
os->seekp(offset, ios::end);
|
|
|
|
break;
|
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Attempt to workaround problems with seeking past the end of the
|
|
|
|
// stream. ofstream doesn't have a problem with this but
|
|
|
|
// ostrstream/ostringstream does. In that situation, add intermediate
|
|
|
|
// '\0' characters.
|
|
|
|
if( os->fail() ) {
|
|
|
|
#ifdef __VMS
|
|
|
|
int old_state;
|
|
|
|
#else
|
|
|
|
ios::iostate old_state;
|
|
|
|
#endif
|
2012-03-12 12:35:35 +01:00
|
|
|
ios::pos_type origin;
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
old_state = os->rdstate();
|
|
|
|
// reset the fail bit or else tellp() won't work below
|
|
|
|
os->clear(os->rdstate() & ~ios::failbit);
|
|
|
|
switch( whence ) {
|
|
|
|
case SEEK_SET:
|
2012-03-12 12:35:35 +01:00
|
|
|
default:
|
|
|
|
origin = data->start_pos;
|
2011-03-20 23:45:24 +01:00
|
|
|
break;
|
|
|
|
case SEEK_CUR:
|
|
|
|
origin = os->tellp();
|
|
|
|
break;
|
|
|
|
case SEEK_END:
|
|
|
|
os->seekp(0, ios::end);
|
|
|
|
origin = os->tellp();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
// restore original stream state
|
|
|
|
os->clear(old_state);
|
|
|
|
|
|
|
|
// only do something if desired seek position is valid
|
2012-03-12 12:35:35 +01:00
|
|
|
if( (static_cast<uint64>(origin) + off) > static_cast<uint64>(data->start_pos) ) {
|
|
|
|
uint64 num_fill;
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
// clear the fail bit
|
|
|
|
os->clear(os->rdstate() & ~ios::failbit);
|
|
|
|
|
|
|
|
// extend the stream to the expected size
|
|
|
|
os->seekp(0, ios::end);
|
2012-03-12 12:35:35 +01:00
|
|
|
num_fill = (static_cast<uint64>(origin)) + off - os->tellp();
|
|
|
|
for( uint64 i = 0; i < num_fill; i++ )
|
2011-03-20 23:45:24 +01:00
|
|
|
os->put('\0');
|
|
|
|
|
|
|
|
// retry the seek
|
2012-03-12 12:35:35 +01:00
|
|
|
os->seekp(static_cast<ios::off_type>(static_cast<uint64>(origin) + off), ios::beg);
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
return static_cast<uint64>(os->tellp());
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static uint64
|
|
|
|
_tiffisSeekProc(thandle_t fd, uint64 off, int whence)
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffis_data *data = reinterpret_cast<tiffis_data *>(fd);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
switch(whence) {
|
|
|
|
case SEEK_SET:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Compute 64-bit offset
|
|
|
|
uint64 new_offset = static_cast<uint64>(data->start_pos) + off;
|
|
|
|
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(new_offset);
|
|
|
|
if (static_cast<uint64>(offset) != new_offset)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
data->stream->seekg(offset, ios::beg);
|
|
|
|
break;
|
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
case SEEK_CUR:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(off);
|
|
|
|
if (static_cast<uint64>(offset) != off)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
data->stream->seekg(offset, ios::cur);
|
|
|
|
break;
|
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
case SEEK_END:
|
2012-03-12 12:35:35 +01:00
|
|
|
{
|
|
|
|
// Verify that value does not overflow
|
|
|
|
ios::off_type offset = static_cast<ios::off_type>(off);
|
|
|
|
if (static_cast<uint64>(offset) != off)
|
|
|
|
return static_cast<uint64>(-1);
|
|
|
|
|
|
|
|
data->stream->seekg(offset, ios::end);
|
|
|
|
break;
|
|
|
|
}
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
return (uint64) (data->stream->tellg() - data->start_pos);
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static uint64
|
2011-03-20 23:45:24 +01:00
|
|
|
_tiffosSizeProc(thandle_t fd)
|
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffos_data *data = reinterpret_cast<tiffos_data *>(fd);
|
|
|
|
ostream *os = data->stream;
|
|
|
|
ios::pos_type pos = os->tellp();
|
|
|
|
ios::pos_type len;
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
os->seekp(0, ios::end);
|
|
|
|
len = os->tellp();
|
|
|
|
os->seekp(pos);
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
return (uint64) len;
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
static uint64
|
2011-03-20 23:45:24 +01:00
|
|
|
_tiffisSizeProc(thandle_t fd)
|
|
|
|
{
|
2012-03-12 12:35:35 +01:00
|
|
|
tiffis_data *data = reinterpret_cast<tiffis_data *>(fd);
|
|
|
|
ios::pos_type pos = data->stream->tellg();
|
|
|
|
ios::pos_type len;
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
data->stream->seekg(0, ios::end);
|
|
|
|
len = data->stream->tellg();
|
|
|
|
data->stream->seekg(pos);
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
return (uint64) len;
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
_tiffosCloseProc(thandle_t fd)
|
|
|
|
{
|
|
|
|
// Our stream was not allocated by us, so it shouldn't be closed by us.
|
2012-03-12 12:35:35 +01:00
|
|
|
delete reinterpret_cast<tiffos_data *>(fd);
|
2011-03-20 23:45:24 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
_tiffisCloseProc(thandle_t fd)
|
|
|
|
{
|
|
|
|
// Our stream was not allocated by us, so it shouldn't be closed by us.
|
2012-03-12 12:35:35 +01:00
|
|
|
delete reinterpret_cast<tiffis_data *>(fd);
|
2011-03-20 23:45:24 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2012-03-12 12:35:35 +01:00
|
|
|
_tiffDummyMapProc(thandle_t , void** base, toff_t* size )
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-12 12:35:35 +01:00
|
|
|
_tiffDummyUnmapProc(thandle_t , void* base, toff_t size )
|
2011-03-20 23:45:24 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open a TIFF file descriptor for read/writing.
|
|
|
|
*/
|
|
|
|
static TIFF*
|
|
|
|
_tiffStreamOpen(const char* name, const char* mode, void *fd)
|
|
|
|
{
|
|
|
|
TIFF* tif;
|
|
|
|
|
|
|
|
if( strchr(mode, 'w') ) {
|
|
|
|
tiffos_data *data = new tiffos_data;
|
2012-03-12 12:35:35 +01:00
|
|
|
data->stream = reinterpret_cast<ostream *>(fd);
|
|
|
|
data->start_pos = data->stream->tellp();
|
2011-03-20 23:45:24 +01:00
|
|
|
|
|
|
|
// Open for writing.
|
|
|
|
tif = TIFFClientOpen(name, mode,
|
2012-03-12 12:35:35 +01:00
|
|
|
reinterpret_cast<thandle_t>(data),
|
|
|
|
_tiffosReadProc,
|
|
|
|
_tiffosWriteProc,
|
|
|
|
_tiffosSeekProc,
|
|
|
|
_tiffosCloseProc,
|
2011-03-20 23:45:24 +01:00
|
|
|
_tiffosSizeProc,
|
2012-03-12 12:35:35 +01:00
|
|
|
_tiffDummyMapProc,
|
|
|
|
_tiffDummyUnmapProc);
|
2011-03-20 23:45:24 +01:00
|
|
|
} else {
|
|
|
|
tiffis_data *data = new tiffis_data;
|
2012-03-12 12:35:35 +01:00
|
|
|
data->stream = reinterpret_cast<istream *>(fd);
|
|
|
|
data->start_pos = data->stream->tellg();
|
2011-03-20 23:45:24 +01:00
|
|
|
// Open for reading.
|
|
|
|
tif = TIFFClientOpen(name, mode,
|
2012-03-12 12:35:35 +01:00
|
|
|
reinterpret_cast<thandle_t>(data),
|
|
|
|
_tiffisReadProc,
|
|
|
|
_tiffisWriteProc,
|
|
|
|
_tiffisSeekProc,
|
|
|
|
_tiffisCloseProc,
|
2011-03-20 23:45:24 +01:00
|
|
|
_tiffisSizeProc,
|
2012-03-12 12:35:35 +01:00
|
|
|
_tiffDummyMapProc,
|
|
|
|
_tiffDummyUnmapProc);
|
2011-03-20 23:45:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return (tif);
|
|
|
|
}
|
|
|
|
|
2012-03-12 12:35:35 +01:00
|
|
|
} /* extern "C" */
|
|
|
|
|
2011-03-20 23:45:24 +01:00
|
|
|
TIFF*
|
|
|
|
TIFFStreamOpen(const char* name, ostream *os)
|
|
|
|
{
|
|
|
|
// If os is either a ostrstream or ostringstream, and has no data
|
|
|
|
// written to it yet, then tellp() will return -1 which will break us.
|
|
|
|
// We workaround this by writing out a dummy character and
|
|
|
|
// then seek back to the beginning.
|
2012-03-12 12:35:35 +01:00
|
|
|
if( !os->fail() && static_cast<int>(os->tellp()) < 0 ) {
|
2011-03-20 23:45:24 +01:00
|
|
|
*os << '\0';
|
|
|
|
os->seekp(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
// NB: We don't support mapped files with streams so add 'm'
|
|
|
|
return _tiffStreamOpen(name, "wm", os);
|
|
|
|
}
|
|
|
|
|
|
|
|
TIFF*
|
|
|
|
TIFFStreamOpen(const char* name, istream *is)
|
|
|
|
{
|
|
|
|
// NB: We don't support mapped files with streams so add 'm'
|
|
|
|
return _tiffStreamOpen(name, "rm", is);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* vim: set ts=8 sts=8 sw=8 noet: */
|
2012-03-12 12:35:35 +01:00
|
|
|
/*
|
|
|
|
Local Variables:
|
|
|
|
mode: c
|
|
|
|
indent-tabs-mode: true
|
|
|
|
c-basic-offset: 8
|
|
|
|
End:
|
|
|
|
*/
|