[GRASS-SVN] r42048 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 27 10:44:27 EDT 2010
Author: martinl
Date: 2010-04-27 10:44:25 -0400 (Tue, 27 Apr 2010)
New Revision: 42048
Modified:
grass/trunk/lib/gis/seek.c
Log:
gis/seek.c: doxygen strings added
Modified: grass/trunk/lib/gis/seek.c
===================================================================
--- grass/trunk/lib/gis/seek.c 2010-04-27 13:04:04 UTC (rev 42047)
+++ grass/trunk/lib/gis/seek.c 2010-04-27 14:44:25 UTC (rev 42048)
@@ -1,3 +1,15 @@
+/*!
+ * \file gis/seek,c
+ *
+ * \brief GIS Library - file seek routines
+ *
+ * (C) 2009-2010 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public License
+ * (>=v2). Read the file COPYING that comes with GRASS for details.
+ *
+ * \author Glynn Clements
+ */
#include <stdio.h>
#include <sys/types.h>
@@ -4,6 +16,14 @@
#include <grass/gis.h>
#include <grass/glocale.h>
+/*!
+ \brief Get the current file position of the stream.
+
+ \param fp file descriptor
+
+ \return file position
+ \return -1 on failure
+*/
off_t G_ftell(FILE *fp)
{
#ifdef HAVE_FSEEKO
@@ -13,17 +33,28 @@
#endif
}
+/*!
+ \brief Change the file position of the stream.
+
+ The value of <i>whence</i> must be one of the constants `SEEK_SET',
+ `SEEK_CUR', or `SEEK_END', to indicate whether the <i>offset</i> is
+ relative to the beginning of the file, the current file position, or
+ the end of the file, respectively.
+
+ \param fp file descriptor
+ \param offset offset
+ \param whence
+*/
void G_fseek(FILE *fp, off_t offset, int whence)
{
#ifdef HAVE_FSEEKO
if (fseeko(fp, offset, whence) != 0)
- G_fatal_error(_("unable to seek"));
+ G_fatal_error(_("Unable to seek"));
#else
long loff = (long) offset;
if ((off_t) loff != offset)
- G_fatal_error(_("seek offset out of range"));
+ G_fatal_error(_("Seek offset out of range"));
if (fseek(fp, loff, whence) != 0)
- G_fatal_error(_("unable to seek"));
+ G_fatal_error(_("Unable to seek"));
#endif
}
-
More information about the grass-commit
mailing list