|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
Segment seek routines. More...
#include <stdio.h>#include <sys/types.h>#include <unistd.h>#include <string.h>#include <errno.h>#include <grass/gis.h>#include "local_proto.h"
Go to the source code of this file.
Macros | |
| #define | SEG_SEEK_FAST(SEG, n, index) ((((off_t)(n)) << (SEG)->sizebits) + (index) + (SEG)->offset) |
| Internal use only. | |
| #define | SEG_SEEK_SLOW(SEG, n, index) ((off_t)(n) * (SEG)->size + (index) + (SEG)->offset) |
Functions | |
| int | seg_seek_fast (const SEGMENT *SEG, int n, int index) |
| int | seg_seek_slow (const SEGMENT *SEG, int n, int index) |
| int | seg_seek (const SEGMENT *SEG, int n, int index) |
Segment seek routines.
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file segment/seek.c.
| #define SEG_SEEK_FAST | ( | SEG, | |
| n, | |||
| index | |||
| ) | ((((off_t)(n)) << (SEG)->sizebits) + (index) + (SEG)->offset) |
Internal use only.
Seek into a segment.
| [in,out] | SEG | segment |
| [in] | n | |
| [in] | index |
Definition at line 34 of file segment/seek.c.
Definition at line 37 of file segment/seek.c.
Definition at line 58 of file segment/seek.c.
References AMI_STREAM< T >::seek().
Definition at line 40 of file segment/seek.c.
References G_fatal_error(), and SEG_SEEK_FAST.
Referenced by seg_setup().
Definition at line 49 of file segment/seek.c.
References G_fatal_error(), and SEG_SEEK_SLOW.
Referenced by seg_setup().