[GRASS-SVN] r35042 - grass/branches/releasebranch_6_4/display/d.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Dec 26 11:36:17 EST 2008
Author: martinl
Date: 2008-12-26 11:36:17 -0500 (Fri, 26 Dec 2008)
New Revision: 35042
Modified:
grass/branches/releasebranch_6_4/display/d.vect/main.c
grass/branches/releasebranch_6_4/display/d.vect/plot1.c
Log:
d.vect: fix bug for vector maps open at level 1
message standardization
(merge from devbr6, r35040)
Modified: grass/branches/releasebranch_6_4/display/d.vect/main.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.vect/main.c 2008-12-26 16:35:31 UTC (rev 35041)
+++ grass/branches/releasebranch_6_4/display/d.vect/main.c 2008-12-26 16:36:17 UTC (rev 35042)
@@ -463,13 +463,13 @@
has_fcolor = 0;
}
else if (ret == 0) { /* error */
- G_fatal_error(_("Unknown color: [%s]"), fcolor_opt->answer);
+ G_fatal_error(_("Unknown color: '%s'"), fcolor_opt->answer);
}
size = atoi(size_opt->answer);
Symb = S_read(icon_opt->answer);
if (Symb == NULL)
- G_warning(_("Cannot read symbol, cannot display points"));
+ G_warning(_("Unable to read symbol, unable todisplay points"));
else
S_stroke(Symb, size, 0.0, 0);
@@ -676,12 +676,12 @@
D_line_width(default_width);
}
else
- G_warning(_("Cannot display areas, topology not available"));
+ G_warning(_("Unable to display areas, topology not available"));
}
if (display & DISP_SHAPE) {
if (id_flag->answer && level < 2) {
- G_warning(_("Cannot display lines by id, topology not available"));
+ G_warning(_("Unable to display lines by id, topology not available"));
}
else {
stat = plot1(&Map, type, area, Clist,
@@ -723,7 +723,7 @@
if (level >= 2)
stat = topo(&Map, type, area, &lattr);
else
- G_warning(_("Cannot display topology, not available"));
+ G_warning(_("Unable to display topology, not available"));
}
}
Modified: grass/branches/releasebranch_6_4/display/d.vect/plot1.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.vect/plot1.c 2008-12-26 16:35:31 UTC (rev 35041)
+++ grass/branches/releasebranch_6_4/display/d.vect/plot1.c 2008-12-26 16:36:17 UTC (rev 35042)
@@ -280,8 +280,8 @@
line = 0;
while (1) {
+ line++;
if (Vect_level(Map) >= 2) {
- line++;
if (line > nlines)
break;
if (!Vect_line_alive(Map, line))
@@ -290,11 +290,10 @@
}
else {
ltype = Vect_read_next_line(Map, Points, Cats);
- switch (ltype) {
- case -1:
- G_warning(_("Unable to read vector map"));
- return -1;
- case -2: /* EOF */
+ if (ltype == -1) {
+ G_fatal_error(_("Unable to read vector map"));
+ }
+ else if (ltype == -2) { /* EOF */
break;
}
}
@@ -355,12 +354,11 @@
}
if (table_colors_flag) {
-
/* only first category */
- cat = Vect_get_line_cat(Map, line,
- (Clist->field > 0 ? Clist->field :
- (Cats->n_cats >
- 0 ? Cats->field[0] : 1)));
+ Vect_cat_get(Cats,
+ (Clist->field > 0 ? Clist->field :
+ (Cats->n_cats >
+ 0 ? Cats->field[0] : 1)), &cat);
if (cat >= 0) {
G_debug(3, "display element %d, cat %d", line, cat);
@@ -410,7 +408,7 @@
if (cats_color_flag) {
custom_rgb = FALSE;
if (Clist->field > 0) {
- cat = Vect_get_line_cat(Map, line, Clist->field);
+ Vect_cat_get(Cats, Clist->field, &cat);
if (cat >= 0) {
G_debug(3, "display element %d, cat %d", line, cat);
/* fetch color number from category */
@@ -441,13 +439,12 @@
if (nrec_width) {
-
/* only first category */
- cat = Vect_get_line_cat(Map, line,
- (Clist->field > 0 ? Clist->field :
- (Cats->n_cats >
- 0 ? Cats->field[0] : 1)));
-
+ Vect_cat_get(Cats,
+ (Clist->field > 0 ? Clist->field :
+ (Cats->n_cats >
+ 0 ? Cats->field[0] : 1)), &cat);
+
if (cat >= 0) {
G_debug(3, "display element %d, cat %d", line, cat);
More information about the grass-commit
mailing list