~ubuntu-branches/ubuntu/karmic/grass/karmic

« back to all changes in this revision

Viewing changes to general/g.version/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-07-13 13:34:03 UTC
  • mfrom: (3.1.15 karmic)
  • Revision ID: james.westby@ubuntu.com-20090713133403-0x81m7hb1q06zu13
Tags: 6.4.0~rc5-2
* Added a grass menu item (Hamish).
* Added a grass.menu.in template with related icon.
* Added a simple x-grass wrapper to allow running grass without a pre-running
  controlling terminal. At least it works within ordinary WMs launchers.
  (closes: #503371)
* Added newlocation.dpatch patch to manage correctly new locations.
  (closes: #533738)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
*               Justin Hickey - Thailand - jhickey hpcc.nectec.or.th
8
8
* PURPOSE:      Output GRASS version number, date and copyright message.
9
9
*             
10
 
* COPYRIGHT:    (C) 2000-2007 by the GRASS Development Team
 
10
* COPYRIGHT:    (C) 2000-2009 by the GRASS Development Team
11
11
*
12
12
*               This program is free software under the GPL (>=v2)
13
13
*               Read the file COPYING that comes with GRASS for details.
26
26
int main(int argc, char *argv[])
27
27
{
28
28
    struct GModule *module;
29
 
    struct Flag *copyright, *build;
 
29
    struct Flag *copyright, *build, *gish_rev;
30
30
 
31
31
    G_gisinit(argv[0]);
32
32
 
42
42
    build->key = 'b';
43
43
    build->description = _("Print the GRASS build information");
44
44
 
 
45
    gish_rev = G_define_flag();
 
46
    gish_rev->key = 'r';
 
47
    gish_rev->description =
 
48
        _("Print the GIS library revision number and time");
 
49
 
45
50
    if (argc > 1 && G_parser(argc, argv))
46
51
        exit(EXIT_FAILURE);
47
52
 
61
66
        fprintf(stdout, "\n");
62
67
    }
63
68
 
 
69
    if (gish_rev->answer) {
 
70
        /* fprintf(stdout, "%s\n%s\n", GIS_H_VERSION, GIS_H_DATE); */
 
71
        char **rev_ver = G_tokenize(GIS_H_VERSION, "$");
 
72
        char **rev_time = G_tokenize(GIS_H_DATE, "$");
 
73
        fprintf(stdout, "%s\n%s\n", rev_ver[1], rev_time[1]);
 
74
        G_free_tokens(rev_ver);
 
75
        G_free_tokens(rev_time);
 
76
    }
 
77
 
64
78
    return (EXIT_SUCCESS);
65
79
}