GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
segment/put.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_put (SEGMENT *SEG,int *buf,int row,int col) */
21
22
44
int
segment_put
(SEGMENT * SEG,
const
void
*
buf
,
int
row,
int
col)
45
{
46
int
index,
n
, i;
47
48
segment_address
(SEG, row, col, &n, &index);
49
if
((i =
segment_pagein
(SEG, n)) < 0)
50
return
-1;
51
52
SEG->scb[i].dirty = 1;
53
54
memcpy(&SEG->scb[i].buf[index], buf, SEG->len);
55
56
return
1;
57
}
segment_put
int segment_put(SEGMENT *SEG, const void *buf, int row, int col)
Definition:
segment/debug.c:86
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
lib
segment
put.c
Generated on Sat Jan 2 2016 01:46:49 for GRASS Programmer's Manual by
1.8.5