|
@@ -7,7 +7,7 @@
|
|
|
* Justin Hickey - Thailand - jhickey hpcc.nectec.or.th
|
|
|
* PURPOSE: Output GRASS version number, date and copyright message.
|
|
|
*
|
|
|
-* COPYRIGHT: (C) 2000-2007 by the GRASS Development Team
|
|
|
+* COPYRIGHT: (C) 2000-2009 by the GRASS Development Team
|
|
|
*
|
|
|
* This program is free software under the GPL (>=v2)
|
|
|
* Read the file COPYING that comes with GRASS for details.
|
|
@@ -26,7 +26,7 @@
|
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
|
struct GModule *module;
|
|
|
- struct Flag *copyright, *build;
|
|
|
+ struct Flag *copyright, *build, *gish_rev;
|
|
|
|
|
|
G_gisinit(argv[0]);
|
|
|
|
|
@@ -42,6 +42,11 @@ int main(int argc, char *argv[])
|
|
|
build->key = 'b';
|
|
|
build->description = _("Print the GRASS build information");
|
|
|
|
|
|
+ gish_rev = G_define_flag();
|
|
|
+ gish_rev->key = 'r';
|
|
|
+ gish_rev->description =
|
|
|
+ _("Print the GIS library revision number and time");
|
|
|
+
|
|
|
if (G_parser(argc, argv))
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
@@ -61,5 +66,9 @@ int main(int argc, char *argv[])
|
|
|
fprintf(stdout, "\n");
|
|
|
}
|
|
|
|
|
|
+ if (gish_rev->answer)
|
|
|
+ fprintf(stdout, "%s\n%s\n", GIS_H_VERSION, GIS_H_DATE);
|
|
|
+ /* use G_tokenize() if you want to get rid of the '$'s */
|
|
|
+
|
|
|
return (EXIT_SUCCESS);
|
|
|
}
|