GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
overwrite.c File Reference

GIS Library - Check for overwrite. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
Include dependency graph for overwrite.c:

Go to the source code of this file.

Functions

int G_check_overwrite (int argc, char **argv)
 Check for overwrite mode. More...
 

Detailed Description

GIS Library - Check for overwrite.

(C) 2001-2008 by the GRASS Development Team

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, Martin Landa <landa.martin gmail.com>
Date
2007-2008

Definition in file overwrite.c.

Function Documentation

int G_check_overwrite ( int  argc,
char **  argv 
)

Check for overwrite mode.

Check variables OVERWRITE, GRASS_OVERWRITE and '–o' flag.

The parser G_parser() checks if the map already exists in current mapset, we can switch out the check and do it in the module after the parser.

Parameters
[in]argcnumber of arguments
[in]argvarray of arguments
Returns
1 if overwrite
0 if not overwrite

Definition at line 37 of file overwrite.c.

References G__getenv(), G__setenv(), and getenv().