[GRASS-SVN] r60621 - grass/trunk/general/g.parser
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 31 01:38:15 PDT 2014
Author: hcho
Date: 2014-05-31 01:38:15 -0700 (Sat, 31 May 2014)
New Revision: 60621
Modified:
grass/trunk/general/g.parser/main.c
Log:
g.parser: -n added to usage; fixed usage
Modified: grass/trunk/general/g.parser/main.c
===================================================================
--- grass/trunk/general/g.parser/main.c 2014-05-31 02:11:14 UTC (rev 60620)
+++ grass/trunk/general/g.parser/main.c 2014-05-31 08:38:15 UTC (rev 60621)
@@ -29,11 +29,14 @@
int main(int argc, char *argv[])
{
+ char *progname;
struct context ctx;
const char *filename;
int standard_output;
int separator_nul;
+ progname = argv[0];
+
ctx.module = NULL;
ctx.option = NULL;
ctx.flag = NULL;
@@ -67,8 +70,8 @@
if ((argc < 2) || ((strcmp(argv[1], "help") == 0) ||
(strcmp(argv[1], "-help") == 0) ||
(strcmp(argv[1], "--help") == 0))) {
- fprintf(stderr, "%s: %s [-t] [-s] <filename> [<argument> ...]\n",
- _("Usage"), argv[0]);
+ fprintf(stderr, "%s: %s [-t] [-s] [-n] <filename> [<argument> ...]\n",
+ _("Usage"), progname);
exit(EXIT_FAILURE);
}
More information about the grass-commit
mailing list