[GRASS-SVN] r31512 - grass/branches/develbranch_6/vector/v.in.dxf
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 24 12:26:00 EDT 2008
Author: martinl
Date: 2008-05-24 12:26:00 -0400 (Sat, 24 May 2008)
New Revision: 31512
Modified:
grass/branches/develbranch_6/vector/v.in.dxf/main.c
Log:
v.in.dxf: use standard option, minor message cleaning
Modified: grass/branches/develbranch_6/vector/v.in.dxf/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/main.c 2008-05-24 16:08:55 UTC (rev 31511)
+++ grass/branches/develbranch_6/vector/v.in.dxf/main.c 2008-05-24 16:26:00 UTC (rev 31512)
@@ -90,13 +90,8 @@
flag.frame->key = 'f';
flag.frame->description = _("Import polyface meshes as 3D wire frame");
- opt.input = G_define_option();
- opt.input->key = "input";
- opt.input->type = TYPE_STRING;
- opt.input->required = YES;
- opt.input->multiple = NO;
- opt.input->gisprompt = "old_file,file,input";
- opt.input->description = _("DXF input file");
+ opt.input = G_define_standard_option(G_OPT_F_INPUT);
+ opt.input->description = _("Name of input DXF file");
opt.output = G_define_standard_option(G_OPT_V_OUTPUT);
opt.output->required = NO;
@@ -120,7 +115,7 @@
/* open DXF file */
if (!(dxf = dxf_open(opt.input->answer)))
- G_fatal_error(_("Cannot open dxf file <%s>"), opt.input->answer);
+ G_fatal_error(_("Unable to open DXF file <%s>"), opt.input->answer);
if (flag_list) {
num_layers = 0;
@@ -153,21 +148,19 @@
layers = opt.layers->answers;
if (Vect_legal_filename(output) < 0)
- G_fatal_error(_("Use output= option to change vector map name"));
+ G_fatal_error(_("Use '%s' option to change vector map name"),
+ opt.output->key);
/* create vector map */
Map = (struct Map_info *)G_malloc(sizeof(struct Map_info));
if (Vect_open_new(Map, output, 1) < 0)
- G_fatal_error(_("Cannot open new vector map <%s>"), output);
+ G_fatal_error(_("Unable to create vector map <%s>"), output);
Vect_set_map_name(Map, output);
Vect_hist_command(Map);
}
- if (!flag_list)
- G_message (_("Conversion of <%s> to vector map:"), opt.input->answer);
-
/* import */
dxf_to_vect(dxf, Map);
More information about the grass-commit
mailing list