C++ stream interface updated to be compliant with the latest standard.
Appropriate additions in makefiles now completed.
This commit is contained in:
parent
57e10aa76e
commit
000bacdc15
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_stream.cxx,v 1.1 2004-11-07 18:20:05 dron Exp $ */
|
||||
/* $Id: tif_stream.cxx,v 1.2 2004-11-13 11:19:15 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1996 Sam Leffler
|
||||
@ -27,15 +27,17 @@
|
||||
/*
|
||||
* TIFF Library UNIX-specific Routines.
|
||||
*/
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
#include "tiffiop.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class tiffis_data
|
||||
{
|
||||
public:
|
||||
|
||||
istream *myIS;
|
||||
long myStreamStartPos;
|
||||
istream *myIS;
|
||||
long myStreamStartPos;
|
||||
};
|
||||
|
||||
static tsize_t
|
||||
@ -49,7 +51,7 @@ _tiffisReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
{
|
||||
tiffis_data *data = (tiffis_data *)fd;
|
||||
|
||||
data->myIS->read((char *)buf, size);
|
||||
data->myIS->read((char *)buf, (int)size);
|
||||
|
||||
return data->myIS->gcount();
|
||||
}
|
||||
@ -129,8 +131,8 @@ static toff_t
|
||||
_tiffisSizeProc(thandle_t fd)
|
||||
{
|
||||
tiffis_data *data = (tiffis_data *)fd;
|
||||
int pos = data->myIS->tellg();
|
||||
int len;
|
||||
int pos = data->myIS->tellg();
|
||||
int len;
|
||||
|
||||
data->myIS->seekg(0, ios::end);
|
||||
len = data->myIS->tellg();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tiffio.h,v 1.38 2004-11-07 18:20:05 dron Exp $ */
|
||||
/* $Id: tiffio.h,v 1.39 2004-11-13 11:19:15 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -495,9 +495,9 @@ extern void TIFFSetClientInfo( TIFF *, void *, const char * );
|
||||
#endif
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
# include <iostream.h>
|
||||
extern TIFF* TIFFStreamOpen(const char*, ostream *);
|
||||
extern TIFF* TIFFStreamOpen(const char*, istream *);
|
||||
# include <iostream>
|
||||
extern TIFF* TIFFStreamOpen(const char*, std::ostream *);
|
||||
extern TIFF* TIFFStreamOpen(const char*, std::istream *);
|
||||
#endif
|
||||
|
||||
#endif /* _TIFFIO_ */
|
||||
|
Loading…
Reference in New Issue
Block a user