[GRASS-SVN] r58050 - grass/trunk/vector/v.segment

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 19 02:27:13 PDT 2013


Author: neteler
Date: 2013-10-19 02:27:13 -0700 (Sat, 19 Oct 2013)
New Revision: 58050

Modified:
   grass/trunk/vector/v.segment/main.c
Log:
v.segment: accept stdin as default

Modified: grass/trunk/vector/v.segment/main.c
===================================================================
--- grass/trunk/vector/v.segment/main.c	2013-10-19 07:58:33 UTC (rev 58049)
+++ grass/trunk/vector/v.segment/main.c	2013-10-19 09:27:13 UTC (rev 58050)
@@ -70,6 +70,7 @@
     
     file_opt = G_define_standard_option(G_OPT_F_INPUT);
     file_opt->key = "file";
+    file_opt->required = NO;
     file_opt->label = _("Name of file containing segment rules");
     file_opt->description = _("'-' for standard input");
 
@@ -86,7 +87,7 @@
     Vect_check_input_output_name(in_opt->answer, out_opt->answer,
 				 G_FATAL_EXIT);
 
-    if (strcmp(file_opt->answer, "-")) {
+    if (file_opt->answer && strcmp(file_opt->answer, "-") != 0) {
 	/* open input file */
 	if ((in_file = fopen(file_opt->answer, "r")) == NULL)
 	    G_fatal_error(_("Unable to open input file <%s>"),



More information about the grass-commit mailing list