GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
segment.h
Go to the documentation of this file.
1
#ifndef GRASS_SEGMENT_H
2
#define GRASS_SEGMENT_H
3
4
#include <
grass/gis.h
>
5
6
#ifdef HAVE_UNISTD_H
7
#include <unistd.h>
8
#endif
9
10
#ifdef HAVE_SYS_TYPES_H
11
#include <sys/types.h>
12
#endif
13
14
struct
aq
{
/* age queue */
15
int
cur
;
/* segment number */
16
struct
aq
*
younger
, *
older
;
/* pointer to next younger and next older */
17
} ;
18
19
typedef
struct
20
{
21
int
open
;
/* open flag */
22
off_t
nrows
;
/* rows in original data */
23
off_t
ncols
;
/* cols in original data */
24
int
len
;
/* bytes per data value */
25
int
srows
;
/* rows in segments */
26
int
scols
;
/* cols in segments */
27
int
srowscols
;
/* rows x cols in segments */
28
int
size
;
/* size in bytes of a segment */
29
int
spr
;
/* segments per row */
30
int
spill
;
/* cols in last segment in row */
31
32
/* fast mode */
33
int
fast_adrs
;
/* toggles fast address mode */
34
off_t
scolbits
;
/* column bitshift */
35
off_t
srowbits
;
/* row bitshift */
36
off_t
segbits
;
/* segment bitshift */
37
int
fast_seek
;
/* toggles fast seek mode */
38
int
lenbits
;
/* data size bitshift */
39
int
sizebits
;
/* segment size bitshift */
40
int (*
address
)();
41
int (*seek)();
42
43
char
*
fname
;
/* segment file name */
44
int
fd
;
/* file descriptor to read/write segment */
45
struct
scb
/* control blocks */
46
{
47
char
*
buf
;
/* data buffer */
48
char
dirty
;
/* dirty flag */
49
struct
aq
*
age
;
/* pointer to position in age queue */
50
int
n
;
/* segment number */
51
} *
scb
;
52
int
*
load_idx
;
/* index of loaded segments */
53
int
nfreeslots
;
/* number of free slots */
54
int
*
freeslot
;
/* array of free slots */
55
struct
aq
*agequeue,
/* queue of age for order of access */
56
*
youngest
,
/* youngest in age queue */
57
*oldest;
/* oldest in age queue */
58
int
nseg
;
/* number of segments in memory */
59
int
cur
;
/* last accessed segment */
60
int
offset
;
/* offset of data past header */
61
62
char
*
cache
;
/* all in memory cache */
63
}
SEGMENT
;
64
65
#include <
grass/defs/segment.h
>
66
67
#endif
/* GRASS_SEGMENT_H */
SEGMENT::fd
int fd
Definition:
segment.h:44
SEGMENT::nseg
int nseg
Definition:
segment.h:58
SEGMENT::offset
int offset
Definition:
segment.h:60
SEGMENT::open
int open
Definition:
segment.h:21
SEGMENT::scb::n
int n
Definition:
segment.h:50
SEGMENT::srowbits
off_t srowbits
Definition:
segment.h:35
SEGMENT::scolbits
off_t scolbits
Definition:
segment.h:34
address
char * address
Definition:
la.h:50
SEGMENT::len
int len
Definition:
segment.h:24
SEGMENT::spill
int spill
Definition:
segment.h:30
SEGMENT::cur
int cur
Definition:
segment.h:59
SEGMENT::size
int size
Definition:
segment.h:28
SEGMENT::lenbits
int lenbits
Definition:
segment.h:38
aq
Definition:
segment.h:14
gis.h
SEGMENT::load_idx
int * load_idx
Definition:
segment.h:52
SEGMENT::scb::age
struct aq * age
Definition:
segment.h:49
SEGMENT::scb::buf
char * buf
Definition:
segment.h:47
SEGMENT::fast_adrs
int fast_adrs
Definition:
segment.h:33
aq::younger
struct aq * younger
Definition:
segment.h:16
aq::older
struct aq * older
Definition:
segment.h:16
SEGMENT::scb
Definition:
segment.h:45
SEGMENT::fname
char * fname
Definition:
segment.h:43
SEGMENT::ncols
off_t ncols
Definition:
segment.h:23
SEGMENT::nrows
off_t nrows
Definition:
segment.h:22
SEGMENT::scb::dirty
char dirty
Definition:
segment.h:48
SEGMENT::segbits
off_t segbits
Definition:
segment.h:36
SEGMENT::sizebits
int sizebits
Definition:
segment.h:39
SEGMENT::cache
char * cache
Definition:
segment.h:62
SEGMENT::srowscols
int srowscols
Definition:
segment.h:27
SEGMENT::srows
int srows
Definition:
segment.h:25
SEGMENT::youngest
struct aq * youngest
Definition:
segment.h:55
SEGMENT::spr
int spr
Definition:
segment.h:29
SEGMENT::scols
int scols
Definition:
segment.h:26
SEGMENT::freeslot
int * freeslot
Definition:
segment.h:54
segment.h
aq::cur
int cur
Definition:
segment.h:15
SEGMENT
Definition:
segment.h:19
SEGMENT::fast_seek
int fast_seek
Definition:
segment.h:37
SEGMENT::nfreeslots
int nfreeslots
Definition:
segment.h:53
include
grass
segment.h
Generated on Mon May 31 2021 05:21:31 for GRASS GIS 7 Programmer's Manual by
1.8.13