Procházet zdrojové kódy

v.out.ascii: fix return code interpretation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63600 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz před 10 roky
rodič
revize
4736f5c03e
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      vector/v.out.ascii/main.c

+ 4 - 1
vector/v.out.ascii/main.c

@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
 			   region, type, field, clist, (const char *)where,
 			   (const char **)columns, header);
 
-    if (ret < 1) {
+    if (ret == 0) {
 	if (format == GV_ASCII_FORMAT_POINT) {
 	    G_warning(_("No points found, nothing to be exported"));
 	}
@@ -159,6 +159,9 @@ int main(int argc, char *argv[])
 	    G_warning(_("No features found, nothing to be exported"));
 	}
     }
+    else if (ret < 0) {
+	G_warning(_("An error occured, nothing to be exported"));
+    }
     
     if (ascii != NULL)
 	fclose(ascii);