[GRASS-SVN] r51386 - grass/branches/releasebranch_6_4/db/base

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 12 08:36:52 EDT 2012


Author: martinl
Date: 2012-04-12 05:36:52 -0700 (Thu, 12 Apr 2012)
New Revision: 51386

Modified:
   grass/branches/releasebranch_6_4/db/base/execute.c
Log:
db.execute: allow input=-
            (sync with devbr6)


Modified: grass/branches/releasebranch_6_4/db/base/execute.c
===================================================================
--- grass/branches/releasebranch_6_4/db/base/execute.c	2012-04-12 11:08:08 UTC (rev 51385)
+++ grass/branches/releasebranch_6_4/db/base/execute.c	2012-04-12 12:36:52 UTC (rev 51386)
@@ -46,7 +46,7 @@
 
     parse_command_line(argc, argv);
 
-    if (parms.input) {
+    if (parms.input && strcmp(parms.input,"-") != 0) {
 	fd = fopen(parms.input, "r");
 	if (fd == NULL) {
 	    perror(parms.input);
@@ -114,8 +114,9 @@
 
     input = G_define_standard_option(G_OPT_F_INPUT);
     input->required = NO;
-    input->description = _("Name of file containing SQL statements");
+    input->label = _("Name of file containing SQL statements");
     input->guisection = _("Query");
+    input->description = _("If not given or '-' read from standard input");
     
     driver = G_define_standard_option(G_OPT_DRIVER);
     driver->options = db_list_drivers();



More information about the grass-commit mailing list