GRASS Programmer's Manual
6.4.4(2014)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
pageout.c
Go to the documentation of this file.
1
15
#include <stdio.h>
16
#include <unistd.h>
17
#include <string.h>
18
#include <errno.h>
19
#include <grass/segment.h>
20
21
36
int
segment_pageout
(SEGMENT * SEG,
int
i)
37
{
38
segment_seek
(SEG, SEG->scb[i].n, 0);
39
if
(write(SEG->fd, SEG->scb[i].buf, SEG->size) != SEG->size) {
40
G_warning
(
"segment_pageout: %s"
, strerror(
errno
));
41
return
-1;
42
}
43
SEG->scb[i].dirty = 0;
44
45
return
1;
46
}
segment_seek
int segment_seek(const SEGMENT *SEG, int n, int index)
Definition:
segment/seek.c:37
G_warning
int G_warning(const char *msg,...)
Print a warning message to stderr.
Definition:
lib/gis/error.c:178
segment_pageout
int segment_pageout(SEGMENT *SEG, int i)
Pages segment to disk.
Definition:
pageout.c:36
errno
int errno
lib
segment
pageout.c
Generated on Fri Sep 5 2014 08:29:35 for GRASS Programmer's Manual by
1.8.8