Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
4736f5c03e
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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,
 			   region, type, field, clist, (const char *)where,
 			   (const char **)columns, header);
 			   (const char **)columns, header);
 
 
-    if (ret < 1) {
+    if (ret == 0) {
 	if (format == GV_ASCII_FORMAT_POINT) {
 	if (format == GV_ASCII_FORMAT_POINT) {
 	    G_warning(_("No points found, nothing to be exported"));
 	    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"));
 	    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)
     if (ascii != NULL)
 	fclose(ascii);
 	fclose(ascii);