Re: [GRASS-dev] fseeko() in libiostream

2008-10-08 Thread Glynn Clements
Paul Kelly wrote: +#ifdef HAVE_LARGEFILES + filesize = ftello(in_fp); +#else filesize = ftell(in_fp); +#endif Can we add library functions, G_fseek() and G_ftell(), which use an off_t. The functions would use fseeko/ftello if available, fseek/ftell otherwise, but

Re: [GRASS-dev] fseeko() in libiostream

2008-10-07 Thread Markus Neteler
On Tue, Oct 7, 2008 at 11:53 AM, Paul Kelly [EMAIL PROTECTED] wrote: Are there any really huge files anybody can test it with? For easily create a huge DEM file, do this: SRTM V4 CGIAR Europe: snip fetch_europe.sh - #!/bin/sh # fetch Europe block #

Re: [GRASS-dev] fseeko() in libiostream

2008-10-07 Thread Paul Kelly
On Mon, 6 Oct 2008, Hamish wrote: Paul Kelly wrote: I looked in r.in.xyz which only uses fseek() and ISTR discussion about it handling huge files recently, although perhaps that involved reading from stdin. fwiw the fseek() there is just to grab the filesize so G_percent() can know where

Re: [GRASS-dev] fseeko() in libiostream

2008-10-07 Thread Paul Kelly
On Tue, 7 Oct 2008, Markus Neteler wrote: On Tue, Oct 7, 2008 at 11:53 AM, Paul Kelly [EMAIL PROTECTED] wrote: Are there any really huge files anybody can test it with? For easily create a huge DEM file, do this: Actually, thinking clearly, it's a huge input text points file it needs. So

Re: [GRASS-dev] fseeko() in libiostream

2008-10-07 Thread Glynn Clements
Paul Kelly wrote: +#ifdef HAVE_LARGEFILES + filesize = ftello(in_fp); +#else filesize = ftell(in_fp); +#endif Can we add library functions, G_fseek() and G_ftell(), which use an off_t. The functions would use fseeko/ftello if available, fseek/ftell otherwise, but would

[GRASS-dev] fseeko() in libiostream

2008-10-06 Thread Paul Kelly
In some recent enhancements to the iostream library, include/iostream/ami_stream.h had a call to fseek() changed to fseeko(). This now doesn't compile on Windows; a sample error is: sh-2.04$ make make OBJ.i686-pc-mingw32 make[1]: Entering directory `/c/grass/grass7/lib/iostream' make[1]:

Re: [GRASS-dev] fseeko() in libiostream

2008-10-06 Thread Andrew Danner
Paul Kelly wrote: In some recent enhancements to the iostream library, include/iostream/ami_stream.h had a call to fseek() changed to fseeko(). This now doesn't compile on Windows; a sample error is: sh-2.04$ make make OBJ.i686-pc-mingw32 make[1]: Entering directory

Re: [GRASS-dev] fseeko() in libiostream

2008-10-06 Thread Paul Kelly
On Mon, 6 Oct 2008, Andrew Danner wrote: fseek is not the same as fseeko. int fseek(FILE *stream, long offset, int whence); int fseeko(FILE *stream, off_t offset, int whence); If large file support is enabled, fseeko will convert off_t to a 64 bit type even on a 32-bit OS. I'm not sure if

Re: [GRASS-dev] fseeko() in libiostream

2008-10-06 Thread Hamish
Paul Kelly wrote: I looked in r.in.xyz which only uses fseek() and ISTR discussion about it handling huge files recently, although perhaps that involved reading from stdin. fwiw the fseek() there is just to grab the filesize so G_percent() can know where 100% is. If the fseek() returns