[GRASS-SVN] r45468 - in grass/branches/develbranch_6: include
lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 26 15:48:43 EST 2011
Author: martinl
Date: 2011-02-26 12:48:43 -0800 (Sat, 26 Feb 2011)
New Revision: 45468
Modified:
grass/branches/develbranch_6/include/gisdefs.h
grass/branches/develbranch_6/lib/gis/seek.c
Log:
G_ftell() and G_fseek(): off_t replaced by int
@TODO: enable LFS
Modified: grass/branches/develbranch_6/include/gisdefs.h
===================================================================
--- grass/branches/develbranch_6/include/gisdefs.h 2011-02-26 20:31:24 UTC (rev 45467)
+++ grass/branches/develbranch_6/include/gisdefs.h 2011-02-26 20:48:43 UTC (rev 45468)
@@ -1081,8 +1081,8 @@
void G_rotate_around_point_int(int, int, int *, int *, double);
/* seek.c */
-off_t G_ftell(FILE *);
-void G_fseek(FILE *, off_t, int);
+int G_ftell(FILE *);
+void G_fseek(FILE *, int, int);
/* sample.c */
DCELL G_get_raster_sample_nearest(
Modified: grass/branches/develbranch_6/lib/gis/seek.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/seek.c 2011-02-26 20:31:24 UTC (rev 45467)
+++ grass/branches/develbranch_6/lib/gis/seek.c 2011-02-26 20:48:43 UTC (rev 45468)
@@ -24,12 +24,12 @@
\return file position
\return -1 on failure
*/
-off_t G_ftell(FILE *fp)
+int G_ftell(FILE *fp)
{
#ifdef HAVE_FSEEKO
return ftello(fp);
#else
- return (off_t) ftell(fp);
+ return (int) ftell(fp);
#endif
}
@@ -45,14 +45,14 @@
\param offset offset
\param whence
*/
-void G_fseek(FILE *fp, off_t offset, int whence)
+void G_fseek(FILE *fp, int offset, int whence)
{
#ifdef HAVE_FSEEKO
if (fseeko(fp, offset, whence) != 0)
G_fatal_error(_("Unable to seek"));
#else
long loff = (long) offset;
- if ((off_t) loff != offset)
+ if ((int) loff != offset)
G_fatal_error(_("Seek offset out of range"));
if (fseek(fp, loff, whence) != 0)
G_fatal_error(_("Unable to seek"));
More information about the grass-commit
mailing list