GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r73103
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
segment/close.c File Reference

Segment closing routine. More...

#include <unistd.h>
#include <fcntl.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "local_proto.h"
Include dependency graph for segment/close.c:

Go to the source code of this file.


int Segment_close (SEGMENT *SEG)
 Free memory allocated to segment, delete temp file. More...

Detailed Description

Segment closing routine.

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

GRASS GIS Development Team

Definition in file segment/close.c.

Function Documentation

int Segment_close ( SEGMENT SEG)

Free memory allocated to segment, delete temp file.

Releases the allocated memory associated with the segment file seg and deletes the temporary file.

1 if successful
-1 if SEGMENT is not available (not open)

Definition at line 33 of file segment/close.c.

References close(), SEGMENT::fd, SEGMENT::fname, NULL, SEGMENT::open, and Segment_release().