[GRASS-SVN] r63758 - in grass/trunk/display: d.colortable d.font d.geodesic d.grid d.histogram d.labels d.linegraph d.mon d.path d.rast d.rast.num d.rhumbline d.thematic.area d.vect.chart
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 25 07:09:08 PST 2014
Author: martinl
Date: 2014-12-25 07:09:08 -0800 (Thu, 25 Dec 2014)
New Revision: 63758
Modified:
grass/trunk/display/d.colortable/main.c
grass/trunk/display/d.font/main.c
grass/trunk/display/d.geodesic/main.c
grass/trunk/display/d.grid/main.c
grass/trunk/display/d.histogram/main.c
grass/trunk/display/d.labels/main.c
grass/trunk/display/d.linegraph/main.c
grass/trunk/display/d.mon/start.c
grass/trunk/display/d.path/main.c
grass/trunk/display/d.rast.num/main.c
grass/trunk/display/d.rast/main.c
grass/trunk/display/d.rhumbline/main.c
grass/trunk/display/d.thematic.area/main.c
grass/trunk/display/d.vect.chart/main.c
Log:
update display modules to r63747 (no need to check return code of D_open_driver()) - part 2
Modified: grass/trunk/display/d.colortable/main.c
===================================================================
--- grass/trunk/display/d.colortable/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.colortable/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -134,9 +134,8 @@
G_fatal_error(_("Color file for <%s> not available"), map_name);
if (Rast_read_fp_range(map_name, "", &fp_range) == -1)
G_fatal_error(_("Range file for <%s> not available"), map_name);
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+
+ D_open_driver();
D_setup_unity(0);
D_get_src(&t, &b, &l, &r);
Modified: grass/trunk/display/d.font/main.c
===================================================================
--- grass/trunk/display/d.font/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.font/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -81,9 +81,7 @@
exit(EXIT_FAILURE);
/* load the font */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
if (flag1->answer) { /* List font names */
print_font_list(stdout, 0);
Modified: grass/trunk/display/d.geodesic/main.c
===================================================================
--- grass/trunk/display/d.geodesic/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.geodesic/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -84,9 +84,7 @@
G_fatal_error(_("%s - illegal longitude"), parm.coor->answers[3]);
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
line_color = D_translate_color(parm.lcolor->answer);
if (!line_color)
Modified: grass/trunk/display/d.grid/main.c
===================================================================
--- grass/trunk/display/d.grid/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.grid/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -249,9 +249,7 @@
}
/* Setup driver and check important information */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
/* Parse and select grid color */
colorg = D_parse_color(opt1->answer, FALSE);
Modified: grass/trunk/display/d.histogram/main.c
===================================================================
--- grass/trunk/display/d.histogram/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.histogram/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -180,9 +180,7 @@
/* set up the graphics driver and initialize its color-table */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
D_setup_unity(0); /* 0 = don't clear frame */
D_get_src(&t, &b, &l, &r);
Modified: grass/trunk/display/d.labels/main.c
===================================================================
--- grass/trunk/display/d.labels/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.labels/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -113,9 +113,7 @@
if (infile == NULL)
G_fatal_error(_("Unable to open label file <%s>"), label_name);
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
D_setup(0);
Modified: grass/trunk/display/d.linegraph/main.c
===================================================================
--- grass/trunk/display/d.linegraph/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.linegraph/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -264,9 +264,7 @@
}
/* get coordinates of current screen window, in pixels */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
D_setup_unity(0);
D_get_src(&t, &b, &l, &r);
Modified: grass/trunk/display/d.mon/start.c
===================================================================
--- grass/trunk/display/d.mon/start.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.mon/start.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -22,9 +22,8 @@
G_add_error_handler(error_handler, (char *)name);
if (!output) {
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
+
output_name = D_get_file();
if (!output_name)
return;
Modified: grass/trunk/display/d.path/main.c
===================================================================
--- grass/trunk/display/d.path/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.path/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -150,9 +150,7 @@
G_fatal_error(_("%s - illegal y value"), coor_opt->answers[3]);
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
color = G_standard_color_rgb(BLACK);
if (G_str_to_color(color_opt->answer, &r, &g, &b)) {
Modified: grass/trunk/display/d.rast/main.c
===================================================================
--- grass/trunk/display/d.rast/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.rast/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -93,9 +93,7 @@
overlay = !flag_n->answer;
invert = flag_i->answer;
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
fp = Rast_map_is_fp(name, "");
if (vallist->answer) {
Modified: grass/trunk/display/d.rast.num/main.c
===================================================================
--- grass/trunk/display/d.rast.num/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.rast.num/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -217,9 +217,7 @@
/* Setup driver and check important information */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
if (opt.font->answer)
D_font(opt.font->answer);
Modified: grass/trunk/display/d.rhumbline/main.c
===================================================================
--- grass/trunk/display/d.rhumbline/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.rhumbline/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -84,9 +84,7 @@
G_fatal_error(_("%s - illegal longitude"), parm.coor->answers[3]);
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
line_color = D_translate_color(parm.lcolor->answer);
if (!line_color)
Modified: grass/trunk/display/d.thematic.area/main.c
===================================================================
--- grass/trunk/display/d.thematic.area/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.thematic.area/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -362,9 +362,7 @@
if (!nodraw_flag->answer) {
/* Now's let's prepare the actual plotting */
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
D_setup(0);
Modified: grass/trunk/display/d.vect.chart/main.c
===================================================================
--- grass/trunk/display/d.vect.chart/main.c 2014-12-25 15:04:14 UTC (rev 63757)
+++ grass/trunk/display/d.vect.chart/main.c 2014-12-25 15:09:08 UTC (rev 63758)
@@ -244,9 +244,7 @@
if (ctype_opt->answer[0] == 'b')
ctype = CTYPE_BAR;
- if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
- "Use d.mon to select graphics device."));
+ D_open_driver();
/* should we plot the maximum reference on bar plots? */
if (max_reference_opt->answer != NULL) {
More information about the grass-commit
mailing list