GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71790
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pagein.c File Reference

Segment page-in routines. More...

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <grass/gis.h>
#include "local_proto.h"
Include dependency graph for pagein.c:

Go to the source code of this file.

Functions

int seg_pagein (SEGMENT *SEG, int n)
 Internal use only. More...
 

Detailed Description

Segment page-in routines.

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
GRASS GIS Development Team
Date
2005-2009

Definition in file pagein.c.

Function Documentation

int seg_pagein ( SEGMENT SEG,
int  n 
)

Internal use only.

Segment pagein.

Finds n in the segment file, seg, and selects it as the current segment.

Parameters
[in]SEGsegment
[in]nsegment number
Returns
1 if successful
-1 if unable to seek or read segment file

Definition at line 37 of file pagein.c.

References SEGMENT::scb::age, SEGMENT::scb::buf, aq::cur, SEGMENT::cur, SEGMENT::scb::dirty, SEGMENT::fd, SEGMENT::freeslot, G_debug(), G_warning(), SEGMENT::load_idx, SEGMENT::scb::n, SEGMENT::nfreeslots, aq::older, SEGMENT::oldest, SEGMENT::scb, SEGMENT::seek, seg_pageout(), SEGMENT::size, aq::younger, and SEGMENT::youngest.

Referenced by Segment_get(), and Segment_put().