GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
segment/get.c
Go to the documentation of this file.
1
15
#include <string.h>
16
#include <grass/segment.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
41
int
segment_get
(SEGMENT * SEG,
void
*buf,
int
row,
int
col)
42
{
43
int
index, n, i;
44
45
segment_address
(SEG, row, col, &n, &index);
46
if
((i =
segment_pagein
(SEG, n)) < 0)
47
return
-1;
48
49
memcpy(buf, &SEG->scb[i].buf[index], SEG->len);
50
51
return
1;
52
}
lib
segment
get.c
Generated on Sun Sep 9 2012 18:55:31 for GRASS Programmer's Manual by
1.8.1.2