GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
GRASS Programmer's Manual
GRASS GIS 6 Programmer's Manual
GRASS wxPython-based GUI
GRASS cluster analysis statistics Library
GRASS DBMI DataBase Management Interface
GRASS Display Library
GRASS Grid3D raster volume Library
GRASS GIS Library
GRASS Numerical math interface
GRASS partial differential equations Library (GPDE)
GRASS Imagery Library
GRASS Nviz Library
GRASS openGL gsurf OGSF Library
GRASS and the PROJ4 projection library
GRASS Python Scripting Library
GRASS Raster Graphics Library
GRASS Segment Library
Directed Graph Library
GRASS Network Analysis Library
GRASS 6 Vector Architecture
GRASS Vedit Library
Todo List
Bug List
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
}
segment_pagein
int segment_pagein(SEGMENT *SEG, int n)
Segment pagein.
Definition:
pagein.c:39
segment_address
int segment_address(const SEGMENT *SEG, int row, int col, int *n, int *index)
Definition:
address.c:31
buf
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
Definition:
g3drange.c:62
n
int n
Definition:
dataquad.c:291
segment_get
int segment_get(SEGMENT *SEG, void *buf, int row, int col)
Get value from segment file.
Definition:
segment/debug.c:48
lib
segment
get.c
Generated on Sat Jan 2 2016 01:46:47 for GRASS Programmer's Manual by
1.8.5