[GRASS-SVN] r45935 - in grass/branches/releasebranch_6_4: include
lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 13 07:30:28 EDT 2011
Author: martinl
Date: 2011-04-13 04:30:28 -0700 (Wed, 13 Apr 2011)
New Revision: 45935
Modified:
grass/branches/releasebranch_6_4/include/gisdefs.h
grass/branches/releasebranch_6_4/lib/gis/seek.c
Log:
G_ftell() and G_fseek(): off_t replaced by int
(merge r45468 from devbr6)
Modified: grass/branches/releasebranch_6_4/include/gisdefs.h
===================================================================
--- grass/branches/releasebranch_6_4/include/gisdefs.h 2011-04-13 11:19:03 UTC (rev 45934)
+++ grass/branches/releasebranch_6_4/include/gisdefs.h 2011-04-13 11:30:28 UTC (rev 45935)
@@ -1083,8 +1083,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/releasebranch_6_4/lib/gis/seek.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/seek.c 2011-04-13 11:19:03 UTC (rev 45934)
+++ grass/branches/releasebranch_6_4/lib/gis/seek.c 2011-04-13 11:30:28 UTC (rev 45935)
@@ -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