~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to general/manage/lister/vector.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <stdlib.h>
2
2
#include <string.h>
3
3
#include <grass/gis.h>
4
 
#include <grass/Vect.h>
 
4
#include <grass/vector.h>
 
5
#include <grass/glocale.h>
5
6
 
6
7
int main(int argc, char *argv[])
7
8
{
9
10
 
10
11
    G_gisinit(argv[0]);
11
12
 
12
 
    G_list_element("vector", "vector", argc > 1 ? argv[1] : "", lister);
 
13
    if (argc == 1)
 
14
        G_list_element("vector", "vector", "", lister);
 
15
    else {
 
16
        int i;
 
17
 
 
18
        for (i = 1; i < argc; ++i)
 
19
            G_list_element("vector", "vector", argv[i], lister);
 
20
    }
 
21
 
13
22
    exit(0);
14
23
}
15
24
 
19
28
 
20
29
    *title = 0;
21
30
    if (*name) {
22
 
        Vect_open_old_head(&Map, name, mapset);
 
31
        if (Vect_open_old_head(&Map, name, mapset) < 0)
 
32
            G_fatal_error(_("Unable to open vector map <%s>"), name);
23
33
        strcpy(title, Vect_get_map_name(&Map));
24
34
        Vect_close(&Map);
25
35
    }