Przeglądaj źródła

simplify error message handling (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50192 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 13 lat temu
rodzic
commit
7a6e68e281
1 zmienionych plików z 3 dodań i 5 usunięć
  1. 3 5
      vector/v.clean/test/topocheck.c

+ 3 - 5
vector/v.clean/test/topocheck.c

@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
     struct line_cats *Cats;
     struct line_cats *Cats;
     int i, atype, with_z;
     int i, atype, with_z;
     int nlines, n;
     int nlines, n;
-    char *mapset, errmsg[200];
+    char *mapset;
     struct GModule *module;
     struct GModule *module;
     struct Option *in_opt, *out_opt;
     struct Option *in_opt, *out_opt;
     struct Flag *poly_f;
     struct Flag *poly_f;
@@ -59,10 +59,8 @@ int main(int argc, char *argv[])
     G_begin_cell_area_calculations();
     G_begin_cell_area_calculations();
 
 
     /* open input vector */
     /* open input vector */
-    if ((mapset = G_find_vector2(in_opt->answer, "")) == NULL) {
-	sprintf(errmsg, "Could not find input map <%s>\n", in_opt->answer);
-	G_fatal_error(errmsg);
-    }
+    if ((mapset = G_find_vector2(in_opt->answer, "")) == NULL)
+	G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);
 
 
     Vect_set_open_level(2);
     Vect_set_open_level(2);
     Vect_open_old(&In, in_opt->answer, mapset);
     Vect_open_old(&In, in_opt->answer, mapset);