GRASS GIS 7 Programmer's Manual
7.0.3(2016)-r00000
Main Page
Related Pages
Data Structures
Files
File List
Globals
segment/get.c
Go to the documentation of this file.
1
15
#include <string.h>
16
#include "local_proto.h"
17
18
19
/*bugfix: buf: char* vs int* -> wrong pointer arithmetics!!!. Pierre de Mouveaux - 09 april 2000 */
20
/* int Segment_get (SEGMENT *SEG, register int *buf,int row,int col) */
21
22
39
int
Segment_get
(SEGMENT * SEG,
void
*buf, off_t row, off_t col)
40
{
41
int
index, n, i;
42
43
SEG->address(SEG, row, col, &n, &index);
44
if
((i =
seg_pagein
(SEG, n)) < 0)
45
return
-1;
46
47
memcpy(buf, &SEG->scb[i].buf[index], SEG->len);
48
49
return
1;
50
}
Segment_get
int Segment_get(SEGMENT *SEG, void *buf, off_t row, off_t col)
Get value from segment file.
Definition:
segment/get.c:39
seg_pagein
int seg_pagein(SEGMENT *SEG, int n)
Internal use only.
Definition:
pagein.c:37
segment
get.c
Generated on Tue Apr 26 2016 10:15:47 for GRASS GIS 7 Programmer's Manual by
1.8.11