浏览代码

v.out.ascii: return-type specific warning

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64096 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 年之前
父节点
当前提交
6a0c18ee44
共有 1 个文件被更改,包括 4 次插入1 次删除
  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);