浏览代码

exit with error if eps file isn't found (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37770 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 16 年之前
父节点
当前提交
de90ae5c63
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      ps/ps.map/r_plt.c

+ 3 - 4
ps/ps.map/r_plt.c

@@ -142,10 +142,9 @@ int read_eps(double e, double n)
 	    G_chop(data);
 	    G_chop(data);
 	    eps = G_store(data);
 	    eps = G_store(data);
 	    /* test if file is accessible */
 	    /* test if file is accessible */
-	    if ((fp = fopen(eps, "r")) == NULL) {
-		fprintf(stderr, "Can't open eps file <%s>\n", eps);
-		return (0);
-	    }
+	    if ((fp = fopen(eps, "r")) == NULL)
+		error(key, data, "Can't open eps file");
+
 	    have_eps = 1;
 	    have_eps = 1;
 	    fclose(fp);
 	    fclose(fp);
 	    continue;
 	    continue;