GRASS 8 Programmer's Manual
8.6.0dev(2026)-1878fdfec5
Loading...
Searching...
No Matches
level.c
Go to the documentation of this file.
1
/*!
2
\file lib/vector/Vlib/level.c
3
4
\brief Vector library - level info
5
6
SPDX-FileCopyrightText: 2001-2009 GRASS Development Team
7
SPDX-License-Identifier: GPL-2.0-or-later
8
9
\author Original author CERL, probably Dave Gerdes or Mike Higgins.
10
\author Update to GRASS 5.7 Radim Blazek and David D. Gray.
11
*/
12
13
#include <
grass/vector.h
>
14
#include <
grass/glocale.h
>
15
16
/*!
17
\brief Returns level that Map is opened at
18
19
- 1: no topology
20
- 2: topology support
21
22
\param Map vector map
23
24
\return open level
25
\return -1 on error
26
*/
27
int
Vect_level
(
struct
Map_info
*
Map
)
28
{
29
if
(
Map
->open !=
VECT_OPEN_CODE
) {
30
if
(
Map
->open !=
VECT_CLOSED_CODE
)
31
G_warning
(
"Vect_level(): %s"
,
32
_
(
"Map structure was never initialized"
));
33
else
34
G_warning
(
"Vect_level(): %s"
,
_
(
"Map structure has been closed"
));
35
return
(-1);
36
}
37
return
(
Map
->level);
38
}
AMI_STREAM
Definition
ami_stream.h:153
G_warning
void G_warning(const char *,...) __attribute__((format(printf
VECT_CLOSED_CODE
#define VECT_CLOSED_CODE
Vector map close code.
Definition
dig_defines.h:113
VECT_OPEN_CODE
#define VECT_OPEN_CODE
Vector map open code.
Definition
dig_defines.h:111
glocale.h
_
#define _(str)
Definition
glocale.h:10
Vect_level
int Vect_level(struct Map_info *Map)
Returns level that Map is opened at.
Definition
level.c:27
Map_info
Vector map info.
Definition
dig_structs.h:1231
vector.h
lib
vector
Vlib
level.c
Generated on Wed Sep 9 2026 06:57:45 for GRASS 8 Programmer's Manual by
1.9.8