From e937b1162f7d499e9180d2a955a565518c0b4547 Mon Sep 17 00:00:00 2001 From: Glynn Clements Date: Mon, 22 Jun 2009 05:09:28 +0000 Subject: [PATCH] Remove display_raster.h; merged with display.h Remove unused R__* functions Rename remaining R_* functions to D_* git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38015 15284696-431f-4ddb-bdfa-cd5b030d7da7 --- display/d.barscale/draw_scale.c | 9 +- display/d.barscale/main.c | 5 +- display/d.colors/get_info.c | 1 - display/d.colors/interact.c | 1 - display/d.colors/main.c | 1 - display/d.colortable/main.c | 5 +- display/d.erase/main.c | 7 +- display/d.extract/extract.c | 1 - display/d.extract/main.c | 1 - display/d.font/main.c | 19 ++- display/d.fontlist/main.c | 10 +- display/d.geodesic/main.c | 5 +- display/d.geodesic/plot.c | 5 +- display/d.graph/do_graph.c | 9 +- display/d.graph/main.c | 5 +- display/d.grid/main.c | 5 +- display/d.grid/plot.c | 27 ++-- display/d.his/main.c | 5 +- display/d.histogram/bar.c | 21 ++-- display/d.histogram/draw_slice.c | 3 +- display/d.histogram/main.c | 9 +- display/d.histogram/pie.c | 13 +- display/d.info/main.c | 7 +- display/d.labels/do_labels.c | 27 ++-- display/d.labels/main.c | 9 +- display/d.legend/main.c | 21 ++-- display/d.linegraph/main.c | 39 +++--- display/d.measure/draw_line.c | 2 +- display/d.measure/main.c | 1 - display/d.measure/msurements.c | 1 - display/d.nviz/main.c | 1 - display/d.path/main.c | 5 +- display/d.path/select.c | 1 - display/d.profile/main.c | 11 +- display/d.rast.arrow/main.c | 5 +- display/d.rast.num/main.c | 9 +- display/d.rast/display.c | 1 - display/d.rast/main.c | 6 +- display/d.rgb/main.c | 5 +- display/d.rhumbline/main.c | 5 +- display/d.rhumbline/plot.c | 1 - display/d.text/main.c | 47 ++++--- display/d.thematic.area/area.c | 1 - display/d.thematic.area/main.c | 5 +- display/d.thematic.area/plot1.c | 1 - display/d.title/main.c | 1 - display/d.vect.chart/bar.c | 1 - display/d.vect.chart/main.c | 5 +- display/d.vect.chart/pie.c | 1 - display/d.vect.chart/plot.c | 1 - display/d.vect/area.c | 1 - display/d.vect/attr.c | 7 +- display/d.vect/dir.c | 1 - display/d.vect/label.c | 7 +- display/d.vect/main.c | 5 +- display/d.vect/plot1.c | 1 - display/d.vect/topo.c | 7 +- display/d.vect/utils.c | 3 +- display/d.vect/zcoor.c | 7 +- display/d.what.rast/main.c | 1 - display/d.what.rast/what.c | 1 - display/d.what.vect/main.c | 1 - display/d.what.vect/what.c | 1 - display/d.where/main.c | 5 +- display/d.zoom/box.c | 1 - display/d.zoom/center.c | 1 - display/d.zoom/main.c | 1 - display/d.zoom/pan.c | 1 - display/d.zoom/print.c | 1 - display/d.zoom/quit.c | 1 - display/d.zoom/redraw.c | 1 - display/d.zoom/set.c | 1 - display/d.zoom/zoom.c | 1 - imagery/i.class/add_point.c | 2 +- imagery/i.class/del_point.c | 2 +- imagery/i.class/draw_cell.c | 1 - imagery/i.class/draw_reg.c | 2 +- imagery/i.class/graphics.c | 1 - imagery/i.class/histograms.c | 2 +- imagery/i.class/input.c | 2 +- imagery/i.class/main.c | 2 +- imagery/i.class/mouse.c | 2 +- imagery/i.class/redisplay.c | 2 +- imagery/i.class/title.c | 2 +- imagery/i.class/view.c | 2 +- imagery/i.class/zoom_box.c | 2 +- imagery/i.points/analyze.c | 2 +- imagery/i.points/ask.c | 2 +- imagery/i.points/ask_mag.c | 2 +- imagery/i.points/call.c | 2 +- imagery/i.points/debug.c | 2 +- imagery/i.points/dot.c | 2 +- imagery/i.points/drawcell.c | 1 - imagery/i.points/graphics.c | 1 - imagery/i.points/input.c | 2 +- imagery/i.points/main.c | 2 +- imagery/i.points/mark.c | 2 +- imagery/i.points/mouse.c | 2 +- imagery/i.points/points.c | 2 +- imagery/i.points/title.c | 2 +- imagery/i.points/view.c | 2 +- imagery/i.points/zoom_box.c | 2 +- imagery/i.points/zoom_pnt.c | 2 +- imagery/i.vpoints/analyze.c | 2 +- imagery/i.vpoints/ask.c | 2 +- imagery/i.vpoints/ask_mag.c | 2 +- imagery/i.vpoints/call.c | 2 +- imagery/i.vpoints/debug.c | 2 +- imagery/i.vpoints/dot.c | 2 +- imagery/i.vpoints/drawcell.c | 1 - imagery/i.vpoints/drawvect.c | 1 - imagery/i.vpoints/graphics.c | 1 - imagery/i.vpoints/input.c | 2 +- imagery/i.vpoints/main.c | 2 +- imagery/i.vpoints/mark.c | 2 +- imagery/i.vpoints/mouse.c | 2 +- imagery/i.vpoints/points.c | 2 +- imagery/i.vpoints/setup.c | 1 - imagery/i.vpoints/title.c | 2 +- imagery/i.vpoints/view.c | 2 +- imagery/i.vpoints/zoom_box.c | 2 +- imagery/i.vpoints/zoom_pnt.c | 2 +- include/display.h | 18 +++ include/display_raster.h | 39 ------ lib/display/clip.c | 1 - lib/display/draw2.c | 22 ++-- lib/display/r_raster.c | 205 +++---------------------------- lib/display/raster.c | 14 +-- lib/display/raster2.c | 3 +- lib/display/setup.c | 7 +- lib/display/tran_colr.c | 8 +- lib/display/window.c | 16 +-- raster/r.digit/bnw_line.c | 1 - raster/r.digit/get_area.c | 2 +- raster/r.digit/get_circle.c | 2 +- raster/r.digit/get_label.c | 2 +- raster/r.digit/get_line.c | 2 +- raster/r.digit/get_point.c | 2 +- raster/r.digit/main.c | 2 +- raster/r.his/main.c | 1 - raster/r.le/r.le.setup/main.c | 1 - raster/r.le/r.le.setup/mv_wind.c | 1 - raster/r.le/r.le.setup/sample.c | 1 - raster/r.le/r.le.setup/setup.c | 1 - raster/r.le/r.le.trace/main.c | 1 - raster/r.spread/display.c | 1 - swig/python/Makefile | 1 - vector/v.label/main.c | 5 +- vector/v.what/main.c | 1 - vector/v.what/what.c | 1 - 150 files changed, 305 insertions(+), 590 deletions(-) delete mode 100644 include/display_raster.h diff --git a/display/d.barscale/draw_scale.c b/display/d.barscale/draw_scale.c index de860274f0b..4dc2ae2399f 100644 --- a/display/d.barscale/draw_scale.c +++ b/display/d.barscale/draw_scale.c @@ -6,7 +6,6 @@ #include #include #include -#include #include "options.h" #define NUMSCALES 16 @@ -74,7 +73,7 @@ int draw_scale(int toptext) /* Establish text size */ size = 14; - R_text_size(size, size); + D_text_size(size, size); D_setup_unity(0); D_get_src(&t, &b, &l, &r); @@ -117,7 +116,7 @@ int draw_scale(int toptext) /* actual text width is 81% of size? from d.legend */ D_pos_abs(pl + w / 2 - 7 * .81, pt + 14); - R_text("N"); + D_text("N"); return 0; } @@ -248,11 +247,11 @@ int draw_scale(int toptext) D_pos_abs(x_pos + 25 - draw * 10 + line_len / 2. - strlen(scales[incr].name) * size * 0.81 / 2, y_pos); - R_text(scales[incr].name); + D_text(scales[incr].name); } else { D_pos_abs(x_pos + 35 - draw * 10 + line_len, y_pos + 20); - R_text(scales[incr].name); + D_text(scales[incr].name); } return (0); diff --git a/display/d.barscale/main.c b/display/d.barscale/main.c index 85c3351ce7e..5035a103a7c 100644 --- a/display/d.barscale/main.c +++ b/display/d.barscale/main.c @@ -26,7 +26,6 @@ #include #include -#include #include "options.h" #include @@ -115,7 +114,7 @@ int main(int argc, char **argv) sscanf(opt3->answers[1], "%lf", &north); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); @@ -131,7 +130,7 @@ int main(int argc, char **argv) /* Draw the scale */ draw_scale(top->answer); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.colors/get_info.c b/display/d.colors/get_info.c index 1edb9a1a329..0674759df3a 100644 --- a/display/d.colors/get_info.c +++ b/display/d.colors/get_info.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "colors.h" diff --git a/display/d.colors/interact.c b/display/d.colors/interact.c index dde4d9ce335..50e6ed512a1 100644 --- a/display/d.colors/interact.c +++ b/display/d.colors/interact.c @@ -1,7 +1,6 @@ #include #include #include -#include #include "graphics.h" #include "colors.h" diff --git a/display/d.colors/main.c b/display/d.colors/main.c index 093174fa26b..43384583417 100644 --- a/display/d.colors/main.c +++ b/display/d.colors/main.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "colors.h" int main(int argc, char **argv) diff --git a/display/d.colortable/main.c b/display/d.colortable/main.c index dcb72ab571f..8716d312085 100644 --- a/display/d.colortable/main.c +++ b/display/d.colortable/main.c @@ -25,7 +25,6 @@ #include #include #include -#include #include int main(int argc, char **argv) @@ -133,7 +132,7 @@ int main(int argc, char **argv) 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 (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup_unity(0); @@ -261,7 +260,7 @@ int main(int argc, char **argv) } } - R_close_driver(); + D_close_driver(); return 0; } diff --git a/display/d.erase/main.c b/display/d.erase/main.c index cce8868bd38..5bd87481d1b 100644 --- a/display/d.erase/main.c +++ b/display/d.erase/main.c @@ -15,7 +15,6 @@ #include #include #include -#include #include int main(int argc, char *argv[]) @@ -47,7 +46,7 @@ int main(int argc, char *argv[]) if (G_parser(argc, argv)) exit(1); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup_unity(0); @@ -55,9 +54,9 @@ int main(int argc, char *argv[]) D_erase(color->answer); if (eraseframe->answer) - R_erase(); + D__erase(); - R_close_driver(); + D_close_driver(); exit(0); } diff --git a/display/d.extract/extract.c b/display/d.extract/extract.c index d5ff1c31b68..a5dc42a41e9 100644 --- a/display/d.extract/extract.c +++ b/display/d.extract/extract.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.extract/main.c b/display/d.extract/main.c index ec8c16edc5f..3a82382499f 100644 --- a/display/d.extract/main.c +++ b/display/d.extract/main.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.font/main.c b/display/d.font/main.c index 326507d5601..f2523ca043c 100644 --- a/display/d.font/main.c +++ b/display/d.font/main.c @@ -24,7 +24,6 @@ #include #include #include -#include #include static char **fonts; @@ -82,18 +81,18 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); /* load the font */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); if (flag1->answer) { /* List font names */ print_font_list(stdout, 0); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } if (flag2->answer) { /* List fonts verbosely */ print_font_list(stdout, 1); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } @@ -108,7 +107,7 @@ int main(int argc, char **argv) if (!S_ISREG(info.st_mode)) G_fatal_error(_("Font path %s is not a file"), opt2->answer); else - R_font(opt2->answer); + D_font(opt2->answer); } else if (opt1->answer) { /* Font name from fontcap */ int i = 0; @@ -117,7 +116,7 @@ int main(int argc, char **argv) read_freetype_fonts(0); while (i < num_fonts) { if (strcmp(opt1->answer, fonts[i]) == 0) { - R_font(opt1->answer); + D_font(opt1->answer); break; } i++; @@ -128,10 +127,10 @@ int main(int argc, char **argv) } if (opt3->answer) /* Set character encoding */ - R_encoding(opt3->answer); + D_encoding(opt3->answer); /* add this command to the list */ - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } @@ -143,9 +142,9 @@ static void read_freetype_fonts(int verbose) int i; if (verbose) - R_font_info(&list, &count); + D_font_info(&list, &count); else - R_font_list(&list, &count); + D_font_list(&list, &count); if (max_fonts < num_fonts + count) { max_fonts = num_fonts + count; diff --git a/display/d.fontlist/main.c b/display/d.fontlist/main.c index 8b97462de17..fc80e7c9842 100644 --- a/display/d.fontlist/main.c +++ b/display/d.fontlist/main.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include int main(int argc, char **argv) @@ -49,18 +49,18 @@ int main(int argc, char **argv) if (G_parser(argc, argv)) exit(EXIT_FAILURE); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); if (flagL->answer) - R_font_info(&list, &count); + D_font_info(&list, &count); else - R_font_list(&list, &count); + D_font_list(&list, &count); for (i = 0; i < count; i++) fprintf(stdout, "%s\n", list[i]); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.geodesic/main.c b/display/d.geodesic/main.c index 718fa07c8b1..b3f0b12fb66 100644 --- a/display/d.geodesic/main.c +++ b/display/d.geodesic/main.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "local_proto.h" @@ -92,7 +91,7 @@ int main(int argc, char *argv[]) G_fatal_error(_("%s - illegal longitude"), parm.coor->answers[3]); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); line_color = D_translate_color(parm.lcolor->answer); @@ -114,7 +113,7 @@ int main(int argc, char *argv[]) plot(lon1, lat1, lon2, lat2, line_color, text_color); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.geodesic/plot.c b/display/d.geodesic/plot.c index 4f56334a9c6..e5b220ece96 100644 --- a/display/d.geodesic/plot.c +++ b/display/d.geodesic/plot.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include "local_proto.h" @@ -56,7 +55,7 @@ void plot(double lon1, double lat1, double lon2, double lat2, double t, b, l, r; char buf[100]; - R_text_size(10, 10); + D_text_size(10, 10); distance = G_geodesic_distance(lon1, lat1, lon2, lat2); sprintf(buf, "%.0f miles", METERS_TO_MILES(distance)); @@ -76,6 +75,6 @@ void plot(double lon1, double lat1, double lon2, double lat2, D_use_color(text_color); D_pos_abs(text_x, text_y); - R_text(buf); + D_text(buf); } } diff --git a/display/d.graph/do_graph.c b/display/d.graph/do_graph.c index d3ccc4c379b..8d769c92247 100644 --- a/display/d.graph/do_graph.c +++ b/display/d.graph/do_graph.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -50,7 +49,7 @@ int set_graph_stuff(void) int set_text_size(void) { if (hsize >= 0. && vsize >= 0. && hsize <= 100. && vsize <= 100.) { - R_text_size(hsize * xincr, vsize * yincr); + D_text_size(hsize * xincr, vsize * yincr); G_debug(3, "text size initialized to [%.1f,%.1f]", hsize * xincr, vsize * yincr); } @@ -203,7 +202,7 @@ int do_size(const char *str) if (xper < 0. || yper < 0. || xper > 100. || yper > 100.) return (-1); - R_text_size(xper * xincr, yper * yincr); + D_text_size(xper * xincr, yper * yincr); G_debug(3, "text size set to [%.1f,%.1f]", xper * xincr, yper * yincr); @@ -217,7 +216,7 @@ int do_rotate(const char *str) return (-1); } - R_text_rotation(rotation); + D_text_rotation(rotation); G_debug(3, "rotation set to %.1f degrees", rotation); return (0); @@ -232,7 +231,7 @@ int do_text(const char *str) ; for (; *ptr == ' '; ptr++) ; - R_text(ptr); + D_text(ptr); return 0; } diff --git a/display/d.graph/main.c b/display/d.graph/main.c index e8365f2b6c6..0650d13c2bb 100644 --- a/display/d.graph/main.c +++ b/display/d.graph/main.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "options.h" @@ -96,7 +95,7 @@ int main(int argc, char **argv) infile = stdin; /* open graphics window */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); /* Parse and select color */ @@ -128,7 +127,7 @@ int main(int argc, char **argv) set_text_size(); graphics(infile); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.grid/main.c b/display/d.grid/main.c index 96b8209a788..6a482c7b896 100644 --- a/display/d.grid/main.c +++ b/display/d.grid/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -207,7 +206,7 @@ int main(int argc, char **argv) } /* Setup driver and check important information */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); @@ -245,7 +244,7 @@ int main(int argc, char **argv) plot_border(size, east, north); } - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.grid/plot.c b/display/d.grid/plot.c index 1a385a0ed78..86b58dd9f07 100644 --- a/display/d.grid/plot.c +++ b/display/d.grid/plot.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include @@ -45,8 +44,8 @@ int plot_grid(double grid_size, double east, double north, int do_text, if (do_text) { D_use_color(tcolor); G_format_easting(x, text, G_projection()); - R_text_rotation(270.0); - R_text_size(fontsize, fontsize); + D_text_rotation(270.0); + D_text_size(fontsize, fontsize); /* Positioning - x: 4 pixels to the right of the grid line, + 0.5 rounding factor. @@ -57,11 +56,11 @@ int plot_grid(double grid_size, double east, double north, int do_text, D_get_u_south() - D_get_d_to_u_yconv() * (strlen(text) * fontsize * 0.81) - 7.5); - R_text(text); + D_text(text); } x += grid_size; } - R_text_rotation(0.0); /* reset */ + D_text_rotation(0.0); /* reset */ /* Draw horizontal grids @@ -89,7 +88,7 @@ int plot_grid(double grid_size, double east, double north, int do_text, if (do_text) { D_use_color(tcolor); G_format_northing(y, text, G_projection()); - R_text_size(fontsize, fontsize); + D_text_size(fontsize, fontsize); /* Positioning - x: End of text is 7 pixels left from right edge of screen, +.5 rounding. @@ -101,7 +100,7 @@ int plot_grid(double grid_size, double east, double north, int do_text, - D_get_d_to_u_xconv() * (strlen(text) * fontsize * 0.81 - 7.5), y + D_get_d_to_u_yconv() * 4.5); - R_text(text); + D_text(text); } y += grid_size; } @@ -209,11 +208,11 @@ int plot_geogrid(double size, struct pj_info info_in, struct pj_info info_out, D_use_color(tcolor); G_format_northing(g, text, PROJECTION_LL); - R_text_rotation(font_angle); - R_text_size(fontsize, fontsize); + D_text_rotation(font_angle); + D_text_size(fontsize, fontsize); D_pos_abs(D_get_u_west() + D_get_d_to_u_xconv() * border_off, start_coord - D_get_d_to_u_yconv() * grid_off); - R_text(text); + D_text(text); } } @@ -261,15 +260,15 @@ int plot_geogrid(double size, struct pj_info info_in, struct pj_info info_out, D_use_color(tcolor); G_format_easting(g, text, PROJECTION_LL); - R_text_rotation(font_angle); - R_text_size(fontsize, fontsize); + D_text_rotation(font_angle); + D_text_size(fontsize, fontsize); D_pos_abs(start_coord + D_get_d_to_u_xconv() * (grid_off + 1.5), D_get_u_north() + D_get_d_to_u_yconv() * border_off); - R_text(text); + D_text(text); } } - R_text_rotation(0.0); /* reset */ + D_text_rotation(0.0); /* reset */ return 0; diff --git a/display/d.his/main.c b/display/d.his/main.c index 7e6f65af6a3..49d9ef61249 100644 --- a/display/d.his/main.c +++ b/display/d.his/main.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include "his.h" @@ -111,7 +110,7 @@ int main(int argc, char **argv) /* Do screen initializing stuff */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); /* Prepare the raster cell drawing functions */ @@ -244,7 +243,7 @@ int main(int argc, char **argv) D_cell_draw_end(); /* Close down connection to display driver */ - R_close_driver(); + D_close_driver(); /* Close the raster maps */ Rast_close_cell(hue_file); diff --git a/display/d.histogram/bar.c b/display/d.histogram/bar.c index 28793bd39a0..b4b3533619b 100644 --- a/display/d.histogram/bar.c +++ b/display/d.histogram/bar.c @@ -30,7 +30,6 @@ #include #include -#include #include "bar.h" @@ -317,17 +316,17 @@ int bar(struct stat_list *dist_stats, /* list of distribution statistics */ sprintf(txt, "%d", (int)(i / tic_unit)); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); while ((tr - tl) > XTIC_DIST) { text_width *= 0.75; text_height *= 0.75; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); } D_pos_abs(xoffset + (i - dist_stats->mincat) * xscale - 0.5 * xscale - (tr - tl) / 2, b - XNUMS_Y * (b - t)); - R_text(txt); + D_text(txt); } else if (rem(i, tic_unit) == 0.0) { /* draw a tic-mark */ @@ -348,12 +347,12 @@ int bar(struct stat_list *dist_stats, /* list of distribution statistics */ sprintf(xlabel, "X-AXIS: Cell Values"); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(xlabel, &tt, &tb, &tl, &tr); D_pos_abs(l + (r - l) / 2 - (tr - tl) / 2, b - LABEL_1 * (b - t)); D_use_color(color); - R_text(xlabel); + D_text(xlabel); /* DRAW Y-AXIS TIC-MARKS AND NUMBERS * @@ -393,17 +392,17 @@ int bar(struct stat_list *dist_stats, /* list of distribution statistics */ sprintf(txt, "%d", (int)(i / tic_unit)); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); while ((tt - tb) > YTIC_DIST) { text_width *= 0.75; text_height *= 0.75; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); } D_pos_abs(l + (r - l) * YNUMS_X - (tr - tl) / 2, yoffset - (yscale * i + 0.5 * (tt - tb))); - R_text(txt); + D_text(txt); } else if (rem(i, tic_unit) == 0.0) { /* draw a tic-mark */ @@ -431,12 +430,12 @@ int bar(struct stat_list *dist_stats, /* list of distribution statistics */ text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(ylabel, &tt, &tb, &tl, &tr); D_pos_abs(l + (r - l) / 2 - (tr - tl) / 2, b - LABEL_2 * (b - t)); D_use_color(color); - R_text(ylabel); + D_text(ylabel); /* draw x and y axis lines */ D_use_color(color); diff --git a/display/d.histogram/draw_slice.c b/display/d.histogram/draw_slice.c index 7904d1d236a..b37837d3438 100644 --- a/display/d.histogram/draw_slice.c +++ b/display/d.histogram/draw_slice.c @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -80,7 +79,7 @@ int draw_slice(struct Colors *colors, int fill_flag, DCELL fill_color1, DCELL fi ly = y[0] - (r + 0.03) * (height) * sin(arc / 57.296) + (tb - tt) / 2; D_pos_abs(lx, ly); D_use_color(txt_color); - R_text(txt); + D_text(txt); } return 0; diff --git a/display/d.histogram/main.c b/display/d.histogram/main.c index 42f9b48aa8e..eb751f50088 100644 --- a/display/d.histogram/main.c +++ b/display/d.histogram/main.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "options.h" @@ -185,7 +184,7 @@ int main(int argc, char **argv) /* set up the graphics driver and initialize its color-table */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup_unity(0); /* 0 = don't clear frame */ @@ -199,12 +198,12 @@ int main(int argc, char **argv) sprintf(title, "%s", map_name); text_height = (b - t) * 0.05; text_width = (r - l) * 0.05 * 0.50; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(title, &tt, &tb, &tl, &tr); D_pos_abs(l + (r - l) / 2 - (tr - tl) / 2, t + (b - t) * 0.07); D_use_color(color); - R_text(title); + D_text(title); /* plot the distributrion statistics */ if (style == PIE) @@ -212,7 +211,7 @@ int main(int argc, char **argv) else bar(&dist_stats, &pcolors); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.histogram/pie.c b/display/d.histogram/pie.c index 64697534c2b..426d90be738 100644 --- a/display/d.histogram/pie.c +++ b/display/d.histogram/pie.c @@ -32,7 +32,6 @@ #include #include -#include #include "pie.h" @@ -150,7 +149,7 @@ int pie(struct stat_list *dist_stats, /* list of distribution statistics */ for (i = dist_stats->mincat; i <= dist_stats->maxcat; i++) { text_height = height * 0.7 * TEXT_HEIGHT; text_width = width * 0.7 * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); draw = NO; /* figure color and height of the slice of pie * @@ -346,12 +345,12 @@ int pie(struct stat_list *dist_stats, /* list of distribution statistics */ sprintf(txt, "%d", (int)(i / tic_unit)); text_height = height * TEXT_HEIGHT; text_width = width * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); while ((tr - tl) > XTIC_DIST) { text_width *= 0.95; text_height *= 0.95; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); } D_pos_abs(xoffset @@ -359,7 +358,7 @@ int pie(struct stat_list *dist_stats, /* list of distribution statistics */ - 0.5 * xscale - (tr - tl) / 2, b - XNUMS_Y * height); - R_text(txt); + D_text(txt); } else if (rem(i, tic_unit) == 0.0) { /* draw a tic-mark */ @@ -390,12 +389,12 @@ int pie(struct stat_list *dist_stats, /* list of distribution statistics */ sprintf(xlabel, "Cell Values"); text_height = height * TEXT_HEIGHT; text_width = width * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(xlabel, &tt, &tb, &tl, &tr); D_pos_abs(l + width / 2 - (tr - tl) / 2, b - LABEL * height); D_use_color(color); - R_text(xlabel); + D_text(xlabel); return 0; } diff --git a/display/d.info/main.c b/display/d.info/main.c index 942012e048d..ae5d8610592 100644 --- a/display/d.info/main.c +++ b/display/d.info/main.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -64,12 +63,12 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); if (rflag->answer || dflag->answer || fflag->answer) - R_get_window(&t, &b, &l, &r); + D_get_window(&t, &b, &l, &r); if (rflag->answer) @@ -109,7 +108,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "nsres=%.15g\n", (n-s)/(b-t) ); } - R_close_driver(); + D_close_driver(); return EXIT_SUCCESS; } diff --git a/display/d.labels/do_labels.c b/display/d.labels/do_labels.c index 969c3681057..8713e1db536 100644 --- a/display/d.labels/do_labels.c +++ b/display/d.labels/do_labels.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include "local_proto.h" @@ -185,7 +184,7 @@ int show_it(void) Y0 = north; /* Set font */ - R_font(font); + D_font(font); /* Set text size */ if (fontsize) { @@ -199,7 +198,7 @@ int show_it(void) line_size = text_size * 1.2; - R_text_size(d_text_size, d_text_size); + D_text_size(d_text_size, d_text_size); /* Find extent of all text (assume ref point is upper left) */ T = -1e300; @@ -238,7 +237,7 @@ int show_it(void) Y = north - (line_size * 1.2) - ((n_lines - 1) * line_size); D_pos_abs(X, Y); - R_text_rotation(0.0); /* reset */ + D_text_rotation(0.0); /* reset */ D_get_text_box(line, &t, &b, &l, &r); if (T < t) @@ -339,7 +338,7 @@ int show_it(void) } /* Set font rotation */ - R_text_rotation(rotation); + D_text_rotation(rotation); G_debug(3, " rotation = %.2f", rotation); /**** draw highlighted text background ****/ @@ -373,22 +372,22 @@ int show_it(void) for (j = 1; j <= highlight_width; j++) { /* smear it around. probably a better way (knight's move? rand?) */ D_pos_abs(text_x + Xoffset, text_y + Yoffset + j); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset, text_y + Yoffset - j); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset + j, text_y + Yoffset); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset - j, text_y + Yoffset); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset + j, text_y + Yoffset + j); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset - j, text_y + Yoffset - j); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset + j, text_y + Yoffset - j); - R_text(line); + D_text(line); D_pos_abs(text_x + Xoffset - j, text_y + Yoffset + j); - R_text(line); + D_text(line); } if ((*tptr == '\0') || (*tptr == NL)) @@ -427,7 +426,7 @@ int show_it(void) G_rotate_around_point(X, Y0, &text_x, &text_y, -1 * rotation); D_pos_abs(text_x + Xoffset, text_y + Yoffset); - R_text(line); + D_text(line); if ((*tptr == '\0') || (*tptr == NL)) break; diff --git a/display/d.labels/main.c b/display/d.labels/main.c index 319e54584fe..0e585a40424 100644 --- a/display/d.labels/main.c +++ b/display/d.labels/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "local_proto.h" #include @@ -96,7 +95,7 @@ int main(int argc, char **argv) minreg = atof(minreg_opt->answer); if (reg < minreg) { G_warning(_("Region size is lower than minreg, nothing displayed.")); - R_close_driver(); + D_close_driver(); exit(0); } } @@ -104,7 +103,7 @@ int main(int argc, char **argv) maxreg = atof(maxreg_opt->answer); if (reg > maxreg) { G_warning(_("Region size is greater than maxreg, nothing displayed.")); - R_close_driver(); + D_close_driver(); exit(0); } } @@ -114,7 +113,7 @@ int main(int argc, char **argv) if (infile == NULL) G_fatal_error(_("Unable to open label file <%s>"), label_name); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); @@ -122,7 +121,7 @@ int main(int argc, char **argv) /* Go draw the raster map */ do_labels(infile, !horiz_flag->answer); - R_close_driver(); + D_close_driver(); exit(0); } diff --git a/display/d.legend/main.c b/display/d.legend/main.c index 61fcb2da248..57bfd0bd2ca 100644 --- a/display/d.legend/main.c +++ b/display/d.legend/main.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "local_proto.h" @@ -259,7 +258,7 @@ int main(int argc, char **argv) Rast_set_c_null_value(&null_cell, 1); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); white = D_translate_color(DEFAULT_FG_COLOR); @@ -464,7 +463,7 @@ int main(int argc, char **argv) y0 = ((b - t) - (dots_per_line * lines)) / 2; } - /* R_text_size((int)(dots_per_line*4/5), (int)(dots_per_line*4/5)) ; redundant */ + /* D_text_size((int)(dots_per_line*4/5), (int)(dots_per_line*4/5)) ; redundant */ /* if(Rast_is_c_null_value(&min_ind) && Rast_is_c_null_value(&max_ind)) { min_ind = 1; @@ -656,7 +655,7 @@ int main(int argc, char **argv) if (txsiz < 0) txsiz = 0; /* keep it sane */ - R_text_size(txsiz, txsiz); + D_text_size(txsiz, txsiz); D_use_color(color); ppl = (lleg) / (steps - 1); @@ -671,7 +670,7 @@ int main(int argc, char **argv) } else { /* text width is 0.81 of text height? so even though we set width - to txsiz with R_text_size(), we still have to reduce.. hmmm */ + to txsiz with D_text_size(), we still have to reduce.. hmmm */ if (!k) /* first */ D_pos_abs(x0 - (strlen(buff) * txsiz * .81 / 2), y1 + 4 + txsiz); @@ -684,7 +683,7 @@ int main(int argc, char **argv) y1 + 4 + txsiz); } - R_text(buff); + D_text(buff); } /*for */ @@ -751,7 +750,7 @@ int main(int argc, char **argv) if (dots_per_line < txsiz) txsiz = dots_per_line; - R_text_size(txsiz, txsiz); + D_text_size(txsiz, txsiz); /* Set up box arrays */ @@ -863,7 +862,7 @@ int main(int argc, char **argv) } D_pos_abs((l + 3 + dots_per_line), (cur_dot_row) - 3); - R_text(buff); + D_text(buff); } if (0 == k) @@ -881,14 +880,14 @@ int main(int argc, char **argv) ScaleFactor = ((true_r - true_l) / (MaxLabelLen * txsiz * 0.81)); /* ?? txsiz*.81=actual text width. */ if (ScaleFactor < 1.0) { txsiz = (int)floor(txsiz * ScaleFactor); - R_text_size(txsiz, txsiz); + D_text_size(txsiz, txsiz); } D_use_color(white); D_pos_abs((l + 3 + dots_per_line), (cur_dot_row)); - R_text(buff); + D_text(buff); } } - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.linegraph/main.c b/display/d.linegraph/main.c index c5a0ce50b65..cb7f6e1edba 100644 --- a/display/d.linegraph/main.c +++ b/display/d.linegraph/main.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -254,7 +253,7 @@ int main(int argc, char **argv) } /* get coordinates of current screen window, in pixels */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup_unity(0); D_get_src(&t, &b, &l, &r); @@ -268,7 +267,7 @@ int main(int argc, char **argv) y_line[1] = y_line[2] = b - (ORIGIN_Y * height); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); /* read thru each data file in turn, find max and min values for each, count lines, find x min and max, find overall y min and @@ -340,7 +339,7 @@ int main(int argc, char **argv) for (i = 0; i <= num_y_files; i++) { if ((in[i].fp = fopen(in[i].full_name, "r")) == NULL) { - R_close_driver(); + D_close_driver(); G_fatal_error(_("Unable to open input file <%s>"), in[i].full_name); } } @@ -359,7 +358,7 @@ int main(int argc, char **argv) /* didn't find a number or hit EOF before our time */ if ((err != 1) || (err == EOF)) { - R_close_driver(); + D_close_driver(); G_fatal_error(_("Problem reading X data file at line %d"), line); } @@ -369,7 +368,7 @@ int main(int argc, char **argv) if (line < in[i].num_pnts) { err = fscanf(in[i].fp, "%f", &in[i].value); if ((in[i].num_pnts >= line) && (err != 1)) { - R_close_driver(); + D_close_driver(); G_fatal_error(_("Problem reading <%s> data file at line %d"), in[i].name, line); } @@ -432,17 +431,17 @@ int main(int argc, char **argv) sprintf(txt, "%.2f", (in[0].value)); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); while ((tr - tl) > XTIC_DIST) { text_width *= 0.75; text_height *= 0.75; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); } D_pos_abs((xoffset + (line * xscale - (tr - tl) / 2)), (b - XNUMS_Y * (b - t))); - R_text(txt); + D_text(txt); } else if (rem(line, tic_unit) == 0.0) { @@ -470,12 +469,12 @@ int main(int argc, char **argv) sprintf(xlabel, "X: %s %s", title[0]->answer, tic_name); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH * 1.5; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(xlabel, &tt, &tb, &tl, &tr); D_pos_abs((l + (r - l) / 2 - (tr - tl) / 2), (b - LABEL_1 * (b - t))); D_use_color(title_color); - R_text(xlabel); + D_text(xlabel); /* DRAW Y-AXIS TIC-MARKS AND NUMBERS first, figure tic_every and tic_units for the x-axis of the bar-chart. @@ -514,17 +513,17 @@ int main(int argc, char **argv) sprintf(txt, "%d", (i / tic_unit)); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); while ((tt - tb) > YTIC_DIST) { text_width *= 0.75; text_height *= 0.75; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(txt, &tt, &tb, &tl, &tr); } D_pos_abs(l + (r - l) * YNUMS_X - (tr - tl) / 2, yoffset - (yscale * (i - min_y) + 0.5 * (tt - tb))); - R_text(txt); + D_text(txt); } else if (rem(i, tic_unit) == 0.0) { /* draw a tic-mark */ @@ -543,31 +542,31 @@ int main(int argc, char **argv) sprintf(xlabel, "Y: %s %s", title[1]->answer, tic_name); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH * 1.5; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(xlabel, &tt, &tb, &tl, &tr); D_pos_abs(l + (r - l) / 2 - (tr - tl) / 2, b - LABEL_2 * (b - t)); D_use_color(title_color); - R_text(xlabel); + D_text(xlabel); /* top label */ sprintf(xlabel, title[2]->answer); text_height = (b - t) * TEXT_HEIGHT; text_width = (r - l) * TEXT_WIDTH * 2.0; - R_text_size(text_width, text_height); + D_text_size(text_width, text_height); D_get_text_box(xlabel, &tt, &tb, &tl, &tr); /* - R_move_abs((int)(((r-l)/2)-(tr-tl)/2), + D_move_abs((int)(((r-l)/2)-(tr-tl)/2), (int) (t+ (b-t)*.07) ); */ D_pos_abs(l + (r - l) / 2 - (tr - tl) / 2, t + (b - t) * .07); D_use_color(title_color); - R_text(xlabel); + D_text(xlabel); /* draw x and y axis lines */ D_use_color(title_color); D_polyline_abs(x_line, y_line, 3); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.measure/draw_line.c b/display/d.measure/draw_line.c index fa075c23a28..29211437431 100644 --- a/display/d.measure/draw_line.c +++ b/display/d.measure/draw_line.c @@ -1,5 +1,5 @@ #include -#include +#include #include "local_proto.h" int diff --git a/display/d.measure/main.c b/display/d.measure/main.c index b13034f1441..998b82dcbc8 100644 --- a/display/d.measure/main.c +++ b/display/d.measure/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "local_proto.h" diff --git a/display/d.measure/msurements.c b/display/d.measure/msurements.c index 697cab191a9..07c93f539b4 100644 --- a/display/d.measure/msurements.c +++ b/display/d.measure/msurements.c @@ -1,6 +1,5 @@ #include #include -#include #include "local_proto.h" diff --git a/display/d.nviz/main.c b/display/d.nviz/main.c index a2dec1cbc28..d60ed399d2b 100644 --- a/display/d.nviz/main.c +++ b/display/d.nviz/main.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "local.h" #include diff --git a/display/d.path/main.c b/display/d.path/main.c index 375b58f1a5d..5d1ef8615d6 100644 --- a/display/d.path/main.c +++ b/display/d.path/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -149,7 +148,7 @@ int main(int argc, char **argv) G_fatal_error(_("%s - illegal y value"), coor_opt->answers[3]); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); color = G_standard_color_rgb(BLACK); @@ -192,7 +191,7 @@ int main(int argc, char **argv) coor_path(&Map, &hcolor, bold_f->answer, x1, y1, x2, y2); - R_close_driver(); + D_close_driver(); Vect_close(&Map); diff --git a/display/d.path/select.c b/display/d.path/select.c index 63b7910edbc..264ebd3d933 100644 --- a/display/d.path/select.c +++ b/display/d.path/select.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.profile/main.c b/display/d.profile/main.c index 56603987e0c..cc53e2258cf 100644 --- a/display/d.profile/main.c +++ b/display/d.profile/main.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -101,19 +100,19 @@ static void plot_axes(void) /* set text size for y-axis labels */ scale = fabs(D_get_u_to_d_yconv()); - R_text_size(scale * 0.04, scale * 0.05); + D_text_size(scale * 0.04, scale * 0.05); /* plot y-axis label (bottom) */ sprintf(str, "%.1f", min); D_get_text_box(str, &t, &b, &l, &r); D_pos_abs(-0.02 - (r - l), 0 - (t - b) / 2); - R_text(str); + D_text(str); /* plot y-axis label (top) */ sprintf(str, "%.1f", max); D_get_text_box(str, &t, &b, &l, &r); D_pos_abs(-0.02 - (r - l), 1 - (t - b) / 2); - R_text(str); + D_text(str); } static int get_cell(DCELL *result, int fd, double x, double y) @@ -259,7 +258,7 @@ int main(int argc, char **argv) G_fatal_error(_("At least two points are required")); /* establish connection with graphics driver */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup2(1, 0, 1.05, -0.05, -0.15, 1.05); @@ -314,7 +313,7 @@ int main(int argc, char **argv) D_end(); D_stroke(); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.rast.arrow/main.c b/display/d.rast.arrow/main.c index a92553f5258..e3d3d43f640 100644 --- a/display/d.rast.arrow/main.c +++ b/display/d.rast.arrow/main.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -221,7 +220,7 @@ int main(int argc, char **argv) /* Setup driver and check important information */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); @@ -506,7 +505,7 @@ int main(int argc, char **argv) if (opt7->answer) Rast_close_cell(mag_fd); - R_close_driver(); + D_close_driver(); exit(0); } diff --git a/display/d.rast.num/main.c b/display/d.rast.num/main.c index 819e33c8c68..5aafa7a74af 100644 --- a/display/d.rast.num/main.c +++ b/display/d.rast.num/main.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -192,7 +191,7 @@ int main(int argc, char **argv) /* Setup driver and check important information */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup2(0, 0, t, b, l, r); @@ -244,7 +243,7 @@ int main(int argc, char **argv) Rast_close_cell(layer_fd); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } @@ -288,14 +287,14 @@ int draw_number(int row, int col, double number, int prec, RASTER_MAP_TYPE map_t rite = text_size * len; } - R_text_size(text_size, text_size); + D_text_size(text_size, text_size); D_pos_abs(col, row + 0.7); D_get_text_box(no, &tt, &tb, &tl, &tr); dx = (tr + tl) / 2 - (col + 0.5); D_pos_abs(col - dx, row + 0.7); - R_text(no); + D_text(no); return 0; } diff --git a/display/d.rast/display.c b/display/d.rast/display.c index 59bcdc0ff96..ebba2fb9f96 100644 --- a/display/d.rast/display.c +++ b/display/d.rast/display.c @@ -2,7 +2,6 @@ #include #include -#include #include #include diff --git a/display/d.rast/main.c b/display/d.rast/main.c index 820caeeb1be..0d99be02a03 100644 --- a/display/d.rast/main.c +++ b/display/d.rast/main.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "mask.h" #include "local_proto.h" @@ -101,7 +101,7 @@ int main(int argc, char **argv) overlay = !flag_n->answer; invert = flag_i->answer; - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); fp = Rast_raster_map_is_fp(name, ""); @@ -125,7 +125,7 @@ int main(int argc, char **argv) else display(name, overlay, bg->answer, CELL_TYPE, invert); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.rgb/main.c b/display/d.rgb/main.c index 9f7c5cf00c5..cb0f1be85ab 100644 --- a/display/d.rgb/main.c +++ b/display/d.rgb/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include struct band @@ -79,7 +78,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); /* Do screen initializing stuff */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); @@ -129,7 +128,7 @@ int main(int argc, char **argv) G_percent(window.rows, window.rows, 5); D_cell_draw_end(); - R_close_driver(); + D_close_driver(); /* Close the raster maps */ for (i = 0; i < 3; i++) diff --git a/display/d.rhumbline/main.c b/display/d.rhumbline/main.c index 11f8daa608a..95df7ea1a26 100644 --- a/display/d.rhumbline/main.c +++ b/display/d.rhumbline/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "local_proto.h" @@ -92,7 +91,7 @@ int main(int argc, char *argv[]) G_fatal_error(_("%s - illegal longitude"), parm.coor->answers[3]); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); line_color = D_translate_color(parm.lcolor->answer); @@ -115,7 +114,7 @@ int main(int argc, char *argv[]) plot(lon1, lat1, lon2, lat2, line_color, text_color); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.rhumbline/plot.c b/display/d.rhumbline/plot.c index 810ceaa25e1..0374df4a458 100644 --- a/display/d.rhumbline/plot.c +++ b/display/d.rhumbline/plot.c @@ -2,7 +2,6 @@ #include #include #include -#include #include "local_proto.h" void plot(double lon1, double lat1, double lon2, double lat2, diff --git a/display/d.text/main.c b/display/d.text/main.c index 56411e14f84..dbbe9094c33 100644 --- a/display/d.text/main.c +++ b/display/d.text/main.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include @@ -276,17 +275,17 @@ int main(int argc, char **argv) bold = flag.b->answer; - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); if (opt.font->answer) - R_font(opt.font->answer); + D_font(opt.font->answer); else if (opt.path->answer) - R_font(opt.path->answer); + D_font(opt.path->answer); if (opt.charset->answer) - R_encoding(opt.charset->answer); + D_encoding(opt.charset->answer); D_setup_unity(0); @@ -322,8 +321,8 @@ int main(int argc, char **argv) prev_x = x; prev_y = y; - R_text_size(size, size); - R_text_rotation(rotation * 180.0 / M_PI); + D_text_size(size, size); + D_text_rotation(rotation * 180.0 / M_PI); if (text) { double x2, y2; @@ -335,10 +334,10 @@ int main(int argc, char **argv) draw_text(text, &x2, &y2, size, align, rotation, bold); /* reset */ - R_text_size(5, 5); - R_text_rotation(0.0); + D_text_size(5, 5); + D_text_rotation(0.0); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } @@ -380,9 +379,9 @@ int main(int argc, char **argv) /* font */ if ((ptr = strchr(buf_ptr, ':'))) *ptr = 0; - R_font(buf_ptr); + D_font(buf_ptr); if (ptr) - R_encoding(ptr + 1); + D_encoding(ptr + 1); break; case 'C': /* color */ @@ -401,7 +400,7 @@ int main(int argc, char **argv) d *= (win.b - win.t) / 100.0; #endif size = d + (i ? size : 0); - R_text_size(size, size); + D_text_size(size, size); break; case 'B': /* bold */ @@ -423,7 +422,7 @@ int main(int argc, char **argv) rotation = fmod(d, 2.0 * M_PI); if (rotation < 0.0) rotation += 2.0 * M_PI; - R_text_rotation(rotation * 180.0 / M_PI); + D_text_rotation(rotation * 180.0 / M_PI); break; case 'I': /* linespacing */ @@ -517,10 +516,10 @@ int main(int argc, char **argv) fclose(cmd_fp); /* reset */ - R_text_size(5, 5); - R_text_rotation(0.0); + D_text_size(5, 5); + D_text_rotation(0.0); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } @@ -598,23 +597,23 @@ static void draw_text(char *text, double *x, double *y, double size, char *align /* R_get_text_box() does not work with rotation and returns a little bit * bigger dimension than actual text size */ if (rotation != 0.0) - R_text_rotation(0.0); + D_text_rotation(0.0); D_get_text_box(text, &t, &b, &l, &r); if (rotation != 0.0) - R_text_rotation(rotation * 180.0 / M_PI); + D_text_rotation(rotation * 180.0 / M_PI); w = r - l; h = b - t; if (w > 0) w += 0.2 * size; else - /* R_text() does not draw " ". */ + /* D_text() does not draw " ". */ w = 0.8 * size; if (h > 0) h += 0.2 * size; else - /* R_text() does not draw " ". */ + /* D_text() does not draw " ". */ h = 0.8 * size; c = cos(rotation); @@ -649,13 +648,13 @@ static void draw_text(char *text, double *x, double *y, double size, char *align } D_pos_abs(*x, *y); - R_text(text); + D_text(text); if (bold) { D_pos_abs(*x, *y + 1); - R_text(text); + D_text(text); D_pos_abs(*x + 1, *y); - R_text(text); + D_text(text); } *x += w * c; diff --git a/display/d.thematic.area/area.c b/display/d.thematic.area/area.c index 2a1e972b40a..916a801173f 100644 --- a/display/d.thematic.area/area.c +++ b/display/d.thematic.area/area.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.thematic.area/main.c b/display/d.thematic.area/main.c index 5d49173bb5e..639cbc3c50f 100644 --- a/display/d.thematic.area/main.c +++ b/display/d.thematic.area/main.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -362,7 +361,7 @@ int main(int argc, char **argv) if (!nodraw_flag->answer) { /* Now's let's prepare the actual plotting */ - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); @@ -407,7 +406,7 @@ int main(int argc, char **argv) } /* end window check if */ - R_close_driver(); + D_close_driver(); } /* end of nodraw_flag condition */ diff --git a/display/d.thematic.area/plot1.c b/display/d.thematic.area/plot1.c index 53754569dfe..5c05dcc37e8 100644 --- a/display/d.thematic.area/plot1.c +++ b/display/d.thematic.area/plot1.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "plot.h" #include "local_proto.h" #include diff --git a/display/d.title/main.c b/display/d.title/main.c index f95906253ed..121e3f76f8a 100644 --- a/display/d.title/main.c +++ b/display/d.title/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.vect.chart/bar.c b/display/d.vect.chart/bar.c index 8037a19c60c..a62e5012f30 100644 --- a/display/d.vect.chart/bar.c +++ b/display/d.vect.chart/bar.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include "global.h" diff --git a/display/d.vect.chart/main.c b/display/d.vect.chart/main.c index 2dd7206132e..65af1c18f4f 100644 --- a/display/d.vect.chart/main.c +++ b/display/d.vect.chart/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -249,7 +248,7 @@ int main(int argc, char **argv) if (ctype_opt->answer[0] == 'b') ctype = CTYPE_BAR; - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); /* should we plot the maximum reference on bar plots? */ @@ -272,7 +271,7 @@ int main(int argc, char **argv) sizecol_opt->answer, size, scale, &ocolor, colors, y_center, max_reference); - R_close_driver(); + D_close_driver(); Vect_close(&Map); diff --git a/display/d.vect.chart/pie.c b/display/d.vect.chart/pie.c index a9da0fe0818..143d41177ad 100644 --- a/display/d.vect.chart/pie.c +++ b/display/d.vect.chart/pie.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "global.h" diff --git a/display/d.vect.chart/plot.c b/display/d.vect.chart/plot.c index 576487b2f80..f75f9717bc6 100644 --- a/display/d.vect.chart/plot.c +++ b/display/d.vect.chart/plot.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include diff --git a/display/d.vect/area.c b/display/d.vect/area.c index 3c0f59c4eb5..ddbaaff7c3c 100644 --- a/display/d.vect/area.c +++ b/display/d.vect/area.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.vect/attr.c b/display/d.vect/attr.c index d853522ecd8..63ac1e6a566 100644 --- a/display/d.vect/attr.c +++ b/display/d.vect/attr.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include "local_proto.h" @@ -60,11 +59,11 @@ int attr(struct Map_info *Map, int type, char *attrcol, continue; /* used for both lines and labels */ D_RGB_color(lattr->color.R, lattr->color.G, lattr->color.B); - R_text_size(lattr->size, lattr->size); + D_text_size(lattr->size, lattr->size); if (lattr->font) - R_font(lattr->font); + D_font(lattr->font); if (lattr->enc) - R_encoding(lattr->enc); + D_encoding(lattr->enc); if (chcat) { int found = 0; diff --git a/display/d.vect/dir.c b/display/d.vect/dir.c index 31301267e78..92d32d4e6e9 100644 --- a/display/d.vect/dir.c +++ b/display/d.vect/dir.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "plot.h" diff --git a/display/d.vect/label.c b/display/d.vect/label.c index 7850848b1fd..c5d4bc62275 100644 --- a/display/d.vect/label.c +++ b/display/d.vect/label.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "local_proto.h" #include "plot.h" @@ -34,11 +33,11 @@ int label(struct Map_info *Map, int type, int do_area, continue; /* used for both lines and labels */ D_RGB_color(lattr->color.R, lattr->color.G, lattr->color.B); - R_text_size(lattr->size, lattr->size); + D_text_size(lattr->size, lattr->size); if (lattr->font) - R_font(lattr->font); + D_font(lattr->font); if (lattr->enc) - R_encoding(lattr->enc); + D_encoding(lattr->enc); if (chcat) { int found = 0; diff --git a/display/d.vect/main.c b/display/d.vect/main.c index caeef76e7ef..3c0e8c924f7 100644 --- a/display/d.vect/main.c +++ b/display/d.vect/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -355,7 +354,7 @@ int main(int argc, char **argv) G_get_set_window(&window); - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); /* Read map options */ @@ -675,7 +674,7 @@ int main(int argc, char **argv) } } - R_close_driver(); + D_close_driver(); if (verbose) G_done_msg(" "); diff --git a/display/d.vect/plot1.c b/display/d.vect/plot1.c index eaede6b56b2..209a41062de 100644 --- a/display/d.vect/plot1.c +++ b/display/d.vect/plot1.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "plot.h" #include "local_proto.h" #include diff --git a/display/d.vect/topo.c b/display/d.vect/topo.c index e3f18f4af5d..1404d722701 100644 --- a/display/d.vect/topo.c +++ b/display/d.vect/topo.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "local_proto.h" #include "plot.h" @@ -22,11 +21,11 @@ int topo(struct Map_info *Map, int type, int do_area, LATTR *lattr) Cats = Vect_new_cats_struct(); D_RGB_color(lattr->color.R, lattr->color.G, lattr->color.B); - R_text_size(lattr->size, lattr->size); + D_text_size(lattr->size, lattr->size); if (lattr->font) - R_font(lattr->font); + D_font(lattr->font); if (lattr->enc) - R_encoding(lattr->enc); + D_encoding(lattr->enc); Vect_rewind(Map); diff --git a/display/d.vect/utils.c b/display/d.vect/utils.c index ce359cd3b13..03dbb736ee7 100644 --- a/display/d.vect/utils.c +++ b/display/d.vect/utils.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "local_proto.h" #include "plot.h" @@ -58,7 +57,7 @@ void show_label(double *px, double *py, LATTR *lattr, const char *text) } D_pos_abs(X + Xoffset, Y + Yoffset); - R_text(text); + D_text(text); } void show_label_line(const struct line_pnts *Points, int ltype, LATTR *lattr, const char *text) diff --git a/display/d.vect/zcoor.c b/display/d.vect/zcoor.c index f35e96a689f..c53c76a85c6 100644 --- a/display/d.vect/zcoor.c +++ b/display/d.vect/zcoor.c @@ -4,7 +4,6 @@ #include #include #include -#include #include "local_proto.h" #include "plot.h" @@ -21,11 +20,11 @@ int zcoor(struct Map_info *Map, int type, LATTR *lattr) Cats = Vect_new_cats_struct(); D_RGB_color(lattr->color.R, lattr->color.G, lattr->color.B); - R_text_size(lattr->size, lattr->size); + D_text_size(lattr->size, lattr->size); if (lattr->font) - R_font(lattr->font); + D_font(lattr->font); if (lattr->enc) - R_encoding(lattr->enc); + D_encoding(lattr->enc); Vect_rewind(Map); diff --git a/display/d.what.rast/main.c b/display/d.what.rast/main.c index 1b7244aeb81..aefd97e68c6 100644 --- a/display/d.what.rast/main.c +++ b/display/d.what.rast/main.c @@ -23,7 +23,6 @@ #include #include "what.h" #include -#include #include #include "local_proto.h" diff --git a/display/d.what.rast/what.c b/display/d.what.rast/what.c index 7e07e11e1da..36c6a7ac946 100644 --- a/display/d.what.rast/what.c +++ b/display/d.what.rast/what.c @@ -1,5 +1,4 @@ #include -#include #include #include #include "what.h" diff --git a/display/d.what.vect/main.c b/display/d.what.vect/main.c index b4a00ea3cfa..20f1ecafcbd 100644 --- a/display/d.what.vect/main.c +++ b/display/d.what.vect/main.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "what.h" #include #include diff --git a/display/d.what.vect/what.c b/display/d.what.vect/what.c index 11709f33e54..fb889386975 100644 --- a/display/d.what.vect/what.c +++ b/display/d.what.vect/what.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/display/d.where/main.c b/display/d.where/main.c index 9587ab02a9a..e70d57eeaee 100644 --- a/display/d.where/main.c +++ b/display/d.where/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "local_proto.h" #include @@ -164,11 +163,11 @@ int main(int argc, char **argv) else fp = stdin; - if (R_open_driver() != 0) + if (D_open_driver() != 0) G_fatal_error(_("No graphics device selected")); D_setup(0); where_am_i(coords->answers, fp, have_spheroid, decimal->answer, dcoord->answer); - R_close_driver(); + D_close_driver(); exit(EXIT_SUCCESS); } diff --git a/display/d.zoom/box.c b/display/d.zoom/box.c index f993d46b4d3..8ad77efa6b7 100644 --- a/display/d.zoom/box.c +++ b/display/d.zoom/box.c @@ -3,7 +3,6 @@ #include #include #include -#include #include "local_proto.h" int make_window_box(struct Cell_head *window, double magnify, int full, diff --git a/display/d.zoom/center.c b/display/d.zoom/center.c index e4832ba4ad5..823003e8814 100644 --- a/display/d.zoom/center.c +++ b/display/d.zoom/center.c @@ -1,6 +1,5 @@ #include #include -#include #include #include "local_proto.h" diff --git a/display/d.zoom/main.c b/display/d.zoom/main.c index 693b34ab61e..855e16ad313 100644 --- a/display/d.zoom/main.c +++ b/display/d.zoom/main.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "local_proto.h" diff --git a/display/d.zoom/pan.c b/display/d.zoom/pan.c index d981a305cf5..6c27c8c23aa 100644 --- a/display/d.zoom/pan.c +++ b/display/d.zoom/pan.c @@ -2,7 +2,6 @@ #include #include -#include #include "local_proto.h" #include diff --git a/display/d.zoom/print.c b/display/d.zoom/print.c index e112ad3a356..e27ef6a68f1 100644 --- a/display/d.zoom/print.c +++ b/display/d.zoom/print.c @@ -1,7 +1,6 @@ #include #include #include -#include #include "local_proto.h" static int max(int a, int b) diff --git a/display/d.zoom/quit.c b/display/d.zoom/quit.c index 8c2640ce915..8d6f654d941 100644 --- a/display/d.zoom/quit.c +++ b/display/d.zoom/quit.c @@ -3,7 +3,6 @@ #include #include #include -#include #include "local_proto.h" #include diff --git a/display/d.zoom/redraw.c b/display/d.zoom/redraw.c index ee26a92796f..155676fa135 100644 --- a/display/d.zoom/redraw.c +++ b/display/d.zoom/redraw.c @@ -1,5 +1,4 @@ #include -#include #include #include #include "local_proto.h" diff --git a/display/d.zoom/set.c b/display/d.zoom/set.c index 99f4a8bd76b..fccbc22f114 100644 --- a/display/d.zoom/set.c +++ b/display/d.zoom/set.c @@ -3,7 +3,6 @@ #include #include #include -#include #include "local_proto.h" static double round_to(double in, int sd) diff --git a/display/d.zoom/zoom.c b/display/d.zoom/zoom.c index 71de22f6e1a..3cf3cdd3e8b 100644 --- a/display/d.zoom/zoom.c +++ b/display/d.zoom/zoom.c @@ -1,6 +1,5 @@ #include #include -#include #include "local_proto.h" #include diff --git a/imagery/i.class/add_point.c b/imagery/i.class/add_point.c index 74978547350..b4db56d7751 100644 --- a/imagery/i.class/add_point.c +++ b/imagery/i.class/add_point.c @@ -6,7 +6,7 @@ returns: TRUE (1) point added ok, FALSE (0) could not add, list full *************************************************************/ #include "globals.h" -#include +#include #include diff --git a/imagery/i.class/del_point.c b/imagery/i.class/del_point.c index 5f5e0ce1af1..1fe1ca0a110 100644 --- a/imagery/i.class/del_point.c +++ b/imagery/i.class/del_point.c @@ -1,6 +1,6 @@ #include "globals.h" -#include +#include diff --git a/imagery/i.class/draw_cell.c b/imagery/i.class/draw_cell.c index 204bc98e6ff..a0e825ea376 100644 --- a/imagery/i.class/draw_cell.c +++ b/imagery/i.class/draw_cell.c @@ -2,7 +2,6 @@ #include #include "globals.h" #include -#include #include "local_proto.h" int draw_cell(View * view, int overlay) diff --git a/imagery/i.class/draw_reg.c b/imagery/i.class/draw_reg.c index a5d7e8609c0..56e6d31c476 100644 --- a/imagery/i.class/draw_reg.c +++ b/imagery/i.class/draw_reg.c @@ -1,4 +1,4 @@ -#include +#include #include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.class/graphics.c b/imagery/i.class/graphics.c index 31762b8bb8b..3f2eb9b82a1 100644 --- a/imagery/i.class/graphics.c +++ b/imagery/i.class/graphics.c @@ -1,6 +1,5 @@ #include "globals.h" #include -#include #include "local_proto.h" static View *makeview(double bottom, double top, double left, double right) diff --git a/imagery/i.class/histograms.c b/imagery/i.class/histograms.c index 5dd5258ab59..771dcd4770a 100644 --- a/imagery/i.class/histograms.c +++ b/imagery/i.class/histograms.c @@ -1,6 +1,6 @@ #include #include "globals.h" -#include +#include #include "local_proto.h" #define MU 'l' /* these are the characters that are printed as */ diff --git a/imagery/i.class/input.c b/imagery/i.class/input.c index 33e09e6bcab..826c6ecd333 100644 --- a/imagery/i.class/input.c +++ b/imagery/i.class/input.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include #include "local_proto.h" static int active = 0; diff --git a/imagery/i.class/main.c b/imagery/i.class/main.c index 0eef4ecfe8d..b08cc3abac9 100644 --- a/imagery/i.class/main.c +++ b/imagery/i.class/main.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.class/mouse.c b/imagery/i.class/mouse.c index bcd0bfdf0c8..031462a1a37 100644 --- a/imagery/i.class/mouse.c +++ b/imagery/i.class/mouse.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int first = 1; static int curx, cury; diff --git a/imagery/i.class/redisplay.c b/imagery/i.class/redisplay.c index 035f22d3e9b..7efb690f439 100644 --- a/imagery/i.class/redisplay.c +++ b/imagery/i.class/redisplay.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include #include #include "local_proto.h" diff --git a/imagery/i.class/title.c b/imagery/i.class/title.c index 7e5bce88590..bd62dc9d2d4 100644 --- a/imagery/i.class/title.c +++ b/imagery/i.class/title.c @@ -1,4 +1,4 @@ -#include +#include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.class/view.c b/imagery/i.class/view.c index 7f8ded47ef0..7784fa1836d 100644 --- a/imagery/i.class/view.c +++ b/imagery/i.class/view.c @@ -1,5 +1,5 @@ #include -#include +#include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.class/zoom_box.c b/imagery/i.class/zoom_box.c index c66b070d420..2f79116510e 100644 --- a/imagery/i.class/zoom_box.c +++ b/imagery/i.class/zoom_box.c @@ -1,4 +1,4 @@ -#include +#include #include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.points/analyze.c b/imagery/i.points/analyze.c index 264afd93d50..26554f355cc 100644 --- a/imagery/i.points/analyze.c +++ b/imagery/i.points/analyze.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.points/ask.c b/imagery/i.points/ask.c index 9a4b0010abc..62ad6719b9a 100644 --- a/imagery/i.points/ask.c +++ b/imagery/i.points/ask.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "globals.h" #include "local_proto.h" #define NLINES 18 diff --git a/imagery/i.points/ask_mag.c b/imagery/i.points/ask_mag.c index bc1c18f39f7..b6469c81f77 100644 --- a/imagery/i.points/ask_mag.c +++ b/imagery/i.points/ask_mag.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include struct box { diff --git a/imagery/i.points/call.c b/imagery/i.points/call.c index e343ea752b0..c767724aa81 100644 --- a/imagery/i.points/call.c +++ b/imagery/i.points/call.c @@ -8,7 +8,7 @@ #endif #include "globals.h" #include "local_proto.h" -#include +#include /* * call a subroutine, but as a child process * allowing interrupts for the child diff --git a/imagery/i.points/debug.c b/imagery/i.points/debug.c index 211356dc513..1bb204319b5 100644 --- a/imagery/i.points/debug.c +++ b/imagery/i.points/debug.c @@ -1,7 +1,7 @@ #include "globals.h" #include "local_proto.h" -#include +#include int debug(char *msg) { R_stabilize(); diff --git a/imagery/i.points/dot.c b/imagery/i.points/dot.c index 14c97c87a45..1e6cec81032 100644 --- a/imagery/i.points/dot.c +++ b/imagery/i.points/dot.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include int dot(int x, int y) { double vx[5], vy[5]; diff --git a/imagery/i.points/drawcell.c b/imagery/i.points/drawcell.c index eb75364a5a4..921b99b8c9f 100644 --- a/imagery/i.points/drawcell.c +++ b/imagery/i.points/drawcell.c @@ -2,7 +2,6 @@ #include #include "globals.h" #include -#include #include "local_proto.h" int drawcell(View * view) diff --git a/imagery/i.points/graphics.c b/imagery/i.points/graphics.c index 75d792512a2..5f610049128 100644 --- a/imagery/i.points/graphics.c +++ b/imagery/i.points/graphics.c @@ -1,7 +1,6 @@ #include "globals.h" #include "local_proto.h" #include -#include static View *makeview(double bottom, double top, double left, double right) { diff --git a/imagery/i.points/input.c b/imagery/i.points/input.c index 69b25899efd..6a8d5e593f0 100644 --- a/imagery/i.points/input.c +++ b/imagery/i.points/input.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include static int active = 0; static int replot; diff --git a/imagery/i.points/main.c b/imagery/i.points/main.c index 8862823de87..cfdeaeea092 100644 --- a/imagery/i.points/main.c +++ b/imagery/i.points/main.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include "globals.h" diff --git a/imagery/i.points/mark.c b/imagery/i.points/mark.c index d88f2655d19..2a942645309 100644 --- a/imagery/i.points/mark.c +++ b/imagery/i.points/mark.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include static int get_point2(double *, double *); static int keyboard(void); diff --git a/imagery/i.points/mouse.c b/imagery/i.points/mouse.c index ec08ae3efff..6fc8e4eaa97 100644 --- a/imagery/i.points/mouse.c +++ b/imagery/i.points/mouse.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int first = 1; static int curx, cury; diff --git a/imagery/i.points/points.c b/imagery/i.points/points.c index 1eabb582087..36c3988ba0d 100644 --- a/imagery/i.points/points.c +++ b/imagery/i.points/points.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include int display_points(int in_color) { diff --git a/imagery/i.points/title.c b/imagery/i.points/title.c index ef78139f17f..826d23752df 100644 --- a/imagery/i.points/title.c +++ b/imagery/i.points/title.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include int display_title(View * view) { diff --git a/imagery/i.points/view.c b/imagery/i.points/view.c index 92af06c4e70..70b339f585d 100644 --- a/imagery/i.points/view.c +++ b/imagery/i.points/view.c @@ -1,5 +1,5 @@ #include -#include +#include #include "globals.h" #include "local_proto.h" diff --git a/imagery/i.points/zoom_box.c b/imagery/i.points/zoom_box.c index 85695e03f43..d2f370d21fa 100644 --- a/imagery/i.points/zoom_box.c +++ b/imagery/i.points/zoom_box.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include static int zoom1(int, int); static int zoom2(int, int); diff --git a/imagery/i.points/zoom_pnt.c b/imagery/i.points/zoom_pnt.c index 08dd7c9287c..aad0eda055f 100644 --- a/imagery/i.points/zoom_pnt.c +++ b/imagery/i.points/zoom_pnt.c @@ -1,6 +1,6 @@ #include "globals.h" #include "local_proto.h" -#include +#include static int zoom1(int, int); static int cancel(void); diff --git a/imagery/i.vpoints/analyze.c b/imagery/i.vpoints/analyze.c index 3480ccafca1..ed44c80a71b 100644 --- a/imagery/i.vpoints/analyze.c +++ b/imagery/i.vpoints/analyze.c @@ -3,7 +3,7 @@ #include #include #include "globals.h" -#include +#include #include "crs.h" #define NLINES 18 diff --git a/imagery/i.vpoints/ask.c b/imagery/i.vpoints/ask.c index 83c138490c9..3fdd9d37862 100644 --- a/imagery/i.vpoints/ask.c +++ b/imagery/i.vpoints/ask.c @@ -1,5 +1,5 @@ #include -#include +#include #include "globals.h" #define NLINES 18 diff --git a/imagery/i.vpoints/ask_mag.c b/imagery/i.vpoints/ask_mag.c index 1242a2cbaea..f2f2f4f22e1 100644 --- a/imagery/i.vpoints/ask_mag.c +++ b/imagery/i.vpoints/ask_mag.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include struct box { diff --git a/imagery/i.vpoints/call.c b/imagery/i.vpoints/call.c index dfbab6de50f..d7f7d064a3d 100644 --- a/imagery/i.vpoints/call.c +++ b/imagery/i.vpoints/call.c @@ -8,7 +8,7 @@ #include #endif #include -#include +#include #include "globals.h" /* * call a subroutine, but as a child process diff --git a/imagery/i.vpoints/debug.c b/imagery/i.vpoints/debug.c index f7bfa03632b..f22c7d1d3c7 100644 --- a/imagery/i.vpoints/debug.c +++ b/imagery/i.vpoints/debug.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include int debug(char *msg, ...) { diff --git a/imagery/i.vpoints/dot.c b/imagery/i.vpoints/dot.c index 68186bc1993..d99c28ac40c 100644 --- a/imagery/i.vpoints/dot.c +++ b/imagery/i.vpoints/dot.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include int dot(int x, int y) { diff --git a/imagery/i.vpoints/drawcell.c b/imagery/i.vpoints/drawcell.c index 99112be8376..114bc6043c9 100644 --- a/imagery/i.vpoints/drawcell.c +++ b/imagery/i.vpoints/drawcell.c @@ -1,5 +1,4 @@ #include "globals.h" -#include #include #include diff --git a/imagery/i.vpoints/drawvect.c b/imagery/i.vpoints/drawvect.c index f22f2986c4e..e3ba5991509 100644 --- a/imagery/i.vpoints/drawvect.c +++ b/imagery/i.vpoints/drawvect.c @@ -1,5 +1,4 @@ #include -#include #include #include "vectpoints.h" #include diff --git a/imagery/i.vpoints/graphics.c b/imagery/i.vpoints/graphics.c index 5f2f99f7b5c..0b9e6f88bba 100644 --- a/imagery/i.vpoints/graphics.c +++ b/imagery/i.vpoints/graphics.c @@ -1,6 +1,5 @@ #include "globals.h" #include -#include static View *makeview(double bottom, double top, double left, double right) { diff --git a/imagery/i.vpoints/input.c b/imagery/i.vpoints/input.c index 98d54f478b3..93e3ee7a2ae 100644 --- a/imagery/i.vpoints/input.c +++ b/imagery/i.vpoints/input.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int active = 0; static int replot; diff --git a/imagery/i.vpoints/main.c b/imagery/i.vpoints/main.c index de06c70a0d8..83095e533ae 100644 --- a/imagery/i.vpoints/main.c +++ b/imagery/i.vpoints/main.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "globals.h" diff --git a/imagery/i.vpoints/mark.c b/imagery/i.vpoints/mark.c index ba6f5a179b7..27de7f71b1b 100644 --- a/imagery/i.vpoints/mark.c +++ b/imagery/i.vpoints/mark.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int get_point2(double *, double *); static int keyboard(void); diff --git a/imagery/i.vpoints/mouse.c b/imagery/i.vpoints/mouse.c index ec08ae3efff..6fc8e4eaa97 100644 --- a/imagery/i.vpoints/mouse.c +++ b/imagery/i.vpoints/mouse.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int first = 1; static int curx, cury; diff --git a/imagery/i.vpoints/points.c b/imagery/i.vpoints/points.c index 52702023c6d..832e53a5ffa 100644 --- a/imagery/i.vpoints/points.c +++ b/imagery/i.vpoints/points.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include /* overlay ground control points on the display */ diff --git a/imagery/i.vpoints/setup.c b/imagery/i.vpoints/setup.c index 9212dcca430..f566004cab1 100644 --- a/imagery/i.vpoints/setup.c +++ b/imagery/i.vpoints/setup.c @@ -1,6 +1,5 @@ #include #include -#include #include #include "globals.h" diff --git a/imagery/i.vpoints/title.c b/imagery/i.vpoints/title.c index 63a8a25981b..d3c0ca8c7fc 100644 --- a/imagery/i.vpoints/title.c +++ b/imagery/i.vpoints/title.c @@ -1,6 +1,6 @@ #include #include "globals.h" -#include +#include int display_title(View * view) { diff --git a/imagery/i.vpoints/view.c b/imagery/i.vpoints/view.c index 405bfbb6a8d..c04cff44c64 100644 --- a/imagery/i.vpoints/view.c +++ b/imagery/i.vpoints/view.c @@ -1,6 +1,6 @@ #include "globals.h" #include -#include +#include int Configure_view(View * view, char *name, char *mapset, double ns_res, double ew_res /* original map resolution */ ) diff --git a/imagery/i.vpoints/zoom_box.c b/imagery/i.vpoints/zoom_box.c index 6bb29d0fe6e..e0a73a9f8e2 100644 --- a/imagery/i.vpoints/zoom_box.c +++ b/imagery/i.vpoints/zoom_box.c @@ -1,5 +1,5 @@ #include "globals.h" -#include +#include static int x1, y1, x2, y2; static View *pick_view, *zoom_view, *main_view; diff --git a/imagery/i.vpoints/zoom_pnt.c b/imagery/i.vpoints/zoom_pnt.c index 4c7db05ff74..1c004e55aa7 100644 --- a/imagery/i.vpoints/zoom_pnt.c +++ b/imagery/i.vpoints/zoom_pnt.c @@ -1,6 +1,6 @@ #include #include "globals.h" -#include +#include static View *pick_view, *zoom_view, *main_view; static int target_flag; diff --git a/include/display.h b/include/display.h index c4bc217b671..470a58c8370 100644 --- a/include/display.h +++ b/include/display.h @@ -153,4 +153,22 @@ void D_RGB_color(int, int, int); /* window.c */ void D_erase(const char *); +/* r_raster.c */ + +int D_open_driver(void); +void D_close_driver(void); + +void D_get_window(double *, double *, double *, double *); + +void D__erase(void); + +void D_text_size(double, double); +void D_text_rotation(double); +void D_text(const char *); + +void D_font(const char *); +void D_encoding(const char *); +void D_font_list(char ***, int *); +void D_font_info(char ***, int *); + #endif /* GRASS_DISPLAY_H */ diff --git a/include/display_raster.h b/include/display_raster.h deleted file mode 100644 index d274510b051..00000000000 --- a/include/display_raster.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _GRASS_DISPLAY_RASTER_H -#define _GRASS_DISPLAY_RASTER_H - -void R__line_width(double); -void R__get_text_box(const char *, double *, double *, double *, double *); -void R__pos_abs(double, double); -void R__begin(void); -void R__move(double, double); -void R__cont(double, double); -void R__close(void); -void R__stroke(void); -void R__fill(void); -void R__point(double, double); -void R__RGB_color(int, int, int); -int R__scaled_raster(int, int, - const unsigned char *, - const unsigned char *, - const unsigned char *, const unsigned char *); -void R__begin_scaled_raster(int, int[2][2], double[2][2]); -void R__end_scaled_raster(void); -void R__standard_color(int); - -int R_open_driver(void); -void R_close_driver(void); - -void R_get_window(double *, double *, double *, double *); - -void R_erase(void); - -void R_text_size(double, double); -void R_text_rotation(double); -void R_text(const char *); - -void R_font(const char *); -void R_encoding(const char *); -void R_font_list(char ***, int *); -void R_font_info(char ***, int *); - -#endif diff --git a/lib/display/clip.c b/lib/display/clip.c index 9c9be1979b1..caba591deba 100644 --- a/lib/display/clip.c +++ b/lib/display/clip.c @@ -3,7 +3,6 @@ #include #include -#include #include #include #include "path.h" diff --git a/lib/display/draw2.c b/lib/display/draw2.c index 621f62f6507..74c662edd38 100644 --- a/lib/display/draw2.c +++ b/lib/display/draw2.c @@ -4,8 +4,8 @@ #include #include -#include #include +#include "driver.h" #include "path.h" #include "clip.h" @@ -186,14 +186,14 @@ void D_set_reduction(double e) void D_line_width(double d) { - R__line_width(d > 0 ? d : 0); + COM_Line_width(d > 0 ? d : 0); } void D_get_text_box(const char *text, double *t, double *b, double *l, double *r) { double T, B, L, R; - R__get_text_box(text, &T, &B, &L, &R); + COM_Get_text_box(text, &T, &B, &L, &R); *t = D_d_to_u_row(T); *b = D_d_to_u_row(B); @@ -219,7 +219,7 @@ void D_pos_abs(double x, double y) x = D_u_to_d_col(x); y = D_u_to_d_row(y); - R__pos_abs(x, y); + COM_Pos_abs(x, y); } void D_pos_rel(double x, double y) @@ -266,19 +266,19 @@ static void do_path(int no_pole) p = &eps_path; } - R__begin(); + COM_Begin(); for (i = 0; i < p->count; i++) { struct vertex *v = &p->vertices[i]; switch (v->mode) { case P_MOVE: - R__move(v->x, v->y); + COM_Move(v->x, v->y); break; case P_CONT: - R__cont(v->x, v->y); + COM_Cont(v->x, v->y); break; case P_CLOSE: - R__close(); + COM_Close(); break; } } @@ -317,13 +317,13 @@ void D_close(void) void D_stroke(void) { do_path(0); - R__stroke(); + COM_Stroke(); } void D_fill(void) { do_path(1); - R__fill(); + COM_Fill(); } void D_dots(void) @@ -352,7 +352,7 @@ void D_dots(void) x = D_u_to_d_col(x); y = D_u_to_d_row(y); - R__point(x, y); + COM_Point(x, y); } } diff --git a/lib/display/r_raster.c b/lib/display/r_raster.c index a6523b21fc6..16cd2410dda 100644 --- a/lib/display/r_raster.c +++ b/lib/display/r_raster.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include "driver.h" @@ -34,8 +34,6 @@ extern const struct driver *HTML_Driver(void); extern const struct driver *Cairo_Driver(void); #endif -static void set_window(double, double, double, double); - static void init(void) { const char *fenc = getenv("GRASS_ENCODING"); @@ -44,29 +42,29 @@ static void init(void) const char *text_size = getenv("GRASS_TEXT_SIZE"); const char *frame = getenv("GRASS_FRAME"); - R_font(font ? font : "romans"); + D_font(font ? font : "romans"); if (fenc) - R_encoding(fenc); + D_encoding(fenc); if (line_width) - R__line_width(atof(line_width)); + COM_Line_width(atof(line_width)); if (text_size) { double s = atof(text_size); - R_text_size(s, s); + D_text_size(s, s); } - R_text_rotation(0); + D_text_rotation(0); if (frame) { double t, b, l, r; sscanf(frame, "%lf,%lf,%lf,%lf", &t, &b, &l, &r); - set_window(t, b, l, r); + COM_Set_window(t, b, l, r); } } -int R_open_driver(void) +int D_open_driver(void) { const char *p = getenv("GRASS_RENDER_IMMEDIATE"); const struct driver *drv = @@ -87,7 +85,7 @@ int R_open_driver(void) return 0; } -void R_close_driver(void) +void D_close_driver(void) { const char *cmd = getenv("GRASS_NOTIFY"); @@ -97,86 +95,11 @@ void R_close_driver(void) system(cmd); } -/*! - * \brief select standard color - * - * Selects the - * standard color to be used in subsequent draw commands. The - * color value is best retrieved using D_translate_color. - * See Display_Graphics_Library. - * - * \param index - * \return void - */ - -void R__standard_color(int index) -{ - COM_Standard_color(index); -} - -/*! - * \brief select color - * - * When in - * float mode (see R_color_table_float), this call selects the color - * most closely matched to the red, grn, and blue intensities - * requested. These values must be in the range of 0-255. - * - * \param red - * \param grn - * \param blue - * \return void - */ - -void R__RGB_color(int red, int grn, int blu) -{ - COM_Color_RGB(red, grn, blu); -} - -/*! - * \brief change the width of line - * - * Changes the width of line to be used in subsequent draw commands. - * - * \param width - * \return void - */ - -void R__line_width(double width) -{ - COM_Line_width(width); -} - -/*! - * \brief erase screen - * - * Erases the entire screen to black. - * - * \param void - * \return void - */ - -void R_erase(void) +void D__erase(void) { COM_Erase(); } -/*! - * \brief move current location - * - * Move the current location to the absolute screen coordinate x,y. - * Nothing is drawn on the screen. - * - * \param x - * \param y - * \return void - */ - -void R__pos_abs(double x, double y) -{ - COM_Pos_abs(x, y); -} - /*! * \brief set text size * @@ -187,34 +110,16 @@ void R__pos_abs(double x, double y) * \return void */ -void R_text_size(double width, double height) +void D_text_size(double width, double height) { COM_Text_size(width, height); } -void R_text_rotation(double rotation) +void D_text_rotation(double rotation) { COM_Text_rotation(rotation); } -/*! - * \brief set clipping frame - * - * Subsequent drawing operations will be clipped to the screen frame - * defined by top, bottom, left, right. - * - * \param t top - * \param b bottom - * \param l left - * \param r right - * \return void - */ - -void set_window(double t, double b, double l, double r) -{ - COM_Set_window(t, b, l, r); -} - /*! * \brief get clipping frame * @@ -227,7 +132,7 @@ void set_window(double t, double b, double l, double r) * \return void */ -void R_get_window(double *t, double *b, double *l, double *r) +void D_get_window(double *t, double *b, double *l, double *r) { return COM_Get_window(t, b, l, r); } @@ -242,33 +147,11 @@ void R_get_window(double *t, double *b, double *l, double *r) * \return void */ -void R_text(const char *text) +void D_text(const char *text) { COM_Text(text); } -/*! - * \brief get text extents - * - * The extent of the area enclosing the text - * is returned in the integer pointers top, bottom, left, and - * right. No text is actually drawn. This is useful for capturing the - * text extent so that the text location can be prepared with proper background - * or border. - * - * \param sometext - * \param t top - * \param b bottom - * \param l left - * \param r right - * \return void - */ - -void R__get_text_box(const char *text, double *t, double *b, double *l, double *r) -{ - COM_Get_text_box(text, t, b, l, r); -} - /*! * \brief choose font * @@ -278,75 +161,23 @@ void R__get_text_box(const char *text, double *t, double *b, double *l, double * * \return void */ -void R_font(const char *name) +void D_font(const char *name) { COM_Set_font(name); } -void R_encoding(const char *name) +void D_encoding(const char *name) { COM_Set_encoding(name); } -void R_font_list(char ***list, int *count) +void D_font_list(char ***list, int *count) { COM_Font_list(list, count); } -void R_font_info(char ***list, int *count) +void D_font_info(char ***list, int *count) { COM_Font_info(list, count); } -void R__begin_scaled_raster(int mask, int src[2][2], double dst[2][2]) -{ - COM_begin_raster(mask, src, dst); -} - -int R__scaled_raster(int n, int row, - const unsigned char *red, const unsigned char *grn, - const unsigned char *blu, const unsigned char *nul) -{ - return COM_raster(n, row, red, grn, blu, nul); -} - -void R__end_scaled_raster(void) -{ - COM_end_raster(); -} - -void R__begin(void) -{ - COM_Begin(); -} - -void R__move(double x, double y) -{ - COM_Move(x, y); -} - -void R__cont(double x, double y) -{ - COM_Cont(x, y); -} - -void R__close(void) -{ - COM_Close(); -} - -void R__stroke(void) -{ - COM_Stroke(); -} - -void R__fill(void) -{ - COM_Fill(); -} - -void R__point(double x, double y) -{ - COM_Point(x, y); -} - diff --git a/lib/display/raster.c b/lib/display/raster.c index 74191e50ba5..8ec076367fd 100644 --- a/lib/display/raster.c +++ b/lib/display/raster.c @@ -28,8 +28,8 @@ #include #include -#include #include +#include "driver.h" extern int D__overlay_mode; @@ -110,8 +110,7 @@ static int draw_cell(int A_row, } A_row = - R__scaled_raster(ncols, A_row, red, grn, blu, - D__overlay_mode ? set : NULL); + COM_raster(ncols, A_row, red, grn, blu, D__overlay_mode ? set : NULL); return (A_row < src[1][1]) ? A_row : -1; @@ -137,7 +136,7 @@ void D_cell_draw_begin(void) /* Set up the screen for drawing map */ D_get_a(src); D_get_d(dst); - R__begin_scaled_raster(D__overlay_mode, src, dst); + COM_begin_raster(D__overlay_mode, src, dst); } int D_draw_raster_RGB(int A_row, @@ -184,9 +183,8 @@ int D_draw_raster_RGB(int A_row, b_raster = Rast_incr_void_ptr(b_raster, b_size); } - A_row = - R__scaled_raster(ncols, A_row, r_buf, g_buf, b_buf, - D__overlay_mode ? n_buf : NULL); + A_row = COM_raster(ncols, A_row, r_buf, g_buf, b_buf, + D__overlay_mode ? n_buf : NULL); return (A_row < src[1][1]) ? A_row : -1; @@ -194,5 +192,5 @@ int D_draw_raster_RGB(int A_row, void D_cell_draw_end(void) { - R__end_scaled_raster(); + COM_end_raster(); } diff --git a/lib/display/raster2.c b/lib/display/raster2.c index 624149001ac..44a484581ec 100644 --- a/lib/display/raster2.c +++ b/lib/display/raster2.c @@ -32,7 +32,6 @@ #include #include #include -#include int D__overlay_mode = 0; /* external for now, but to be fixed later */ @@ -139,7 +138,7 @@ int D_color_of_type(const void *raster, int r, g, b; Rast_get_raster_color(raster, &r, &g, &b, colors, data_type); - R__RGB_color((unsigned char)r, (unsigned char)g, (unsigned char)b); + D_RGB_color((unsigned char)r, (unsigned char)g, (unsigned char)b); return 0; } diff --git a/lib/display/setup.c b/lib/display/setup.c index 4300c8570ca..6bc41a2630a 100644 --- a/lib/display/setup.c +++ b/lib/display/setup.c @@ -13,7 +13,6 @@ #include #include #include -#include /*! @@ -41,7 +40,7 @@ void D_setup(int clear) struct Cell_head region; double dt, db, dl, dr; - R_get_window(&dt, &db, &dl, &dr); + D_get_window(&dt, &db, &dl, &dr); G_get_set_window(®ion); if (Rast_set_window(®ion) < 0) @@ -71,7 +70,7 @@ void D_setup_unity(int clear) { double dt, db, dl, dr; - R_get_window(&dt, &db, &dl, &dr); + D_get_window(&dt, &db, &dl, &dr); D_set_src(dt, db, dl, dr); D_set_dst(dt, db, dl, dr); @@ -105,7 +104,7 @@ void D_setup2(int clear, int fit, double st, double sb, double sl, double sr) { double dt, db, dl, dr; - R_get_window(&dt, &db, &dl, &dr); + D_get_window(&dt, &db, &dl, &dr); D_set_src(st, sb, sl, sr); D_set_dst(dt, db, dl, dr); diff --git a/lib/display/tran_colr.c b/lib/display/tran_colr.c index 1450aed1836..a128218bc29 100644 --- a/lib/display/tran_colr.c +++ b/lib/display/tran_colr.c @@ -7,8 +7,8 @@ #include #include #include -#include #include +#include "driver.h" static struct color_rgb *colors; static int ncolors; @@ -146,14 +146,14 @@ int D_use_color(int color) return 0; if (color < G_num_standard_colors()) { - R__standard_color(color); + COM_Standard_color(color); return 1; } if (color < ncolors) { const struct color_rgb *c = &colors[color]; - R__RGB_color(c->r, c->g, c->b); + D_RGB_color(c->r, c->g, c->b); return 1; } @@ -213,6 +213,6 @@ int D_color_number_to_RGB(int color, int *r, int *g, int *b) void D_RGB_color(int red, int grn, int blu) { - R__RGB_color(red, grn, blu); + COM_Color_RGB(red, grn, blu); } diff --git a/lib/display/window.c b/lib/display/window.c index ba04a21b5e5..fbd9ef9dba9 100644 --- a/lib/display/window.c +++ b/lib/display/window.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include "driver.h" void D_erase(const char *color) { @@ -21,12 +21,12 @@ void D_erase(const char *color) D_use_color(colorindex); /* Do the plotting */ - R__begin(); - R__move(l, b); - R__cont(r, b); - R__cont(r, t); - R__cont(l, t); - R__close(); - R__fill(); + COM_Begin(); + COM_Move(l, b); + COM_Cont(r, b); + COM_Cont(r, t); + COM_Cont(l, t); + COM_Close(); + COM_Fill(); } diff --git a/raster/r.digit/bnw_line.c b/raster/r.digit/bnw_line.c index 9f407ad7680..153b7506324 100644 --- a/raster/r.digit/bnw_line.c +++ b/raster/r.digit/bnw_line.c @@ -19,7 +19,6 @@ #include #include -#include int diff --git a/raster/r.digit/get_area.c b/raster/r.digit/get_area.c index f5af45fe6b1..b1b3c02c41f 100644 --- a/raster/r.digit/get_area.c +++ b/raster/r.digit/get_area.c @@ -18,7 +18,7 @@ ***************************************************************************/ #include -#include +#include #include "local_proto.h" diff --git a/raster/r.digit/get_circle.c b/raster/r.digit/get_circle.c index a49df06f35f..041a88126b8 100644 --- a/raster/r.digit/get_circle.c +++ b/raster/r.digit/get_circle.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include "local_proto.h" diff --git a/raster/r.digit/get_label.c b/raster/r.digit/get_label.c index aa874158d4c..86e1c4c182f 100644 --- a/raster/r.digit/get_label.c +++ b/raster/r.digit/get_label.c @@ -18,7 +18,7 @@ ***************************************************************************/ #include -#include +#include #include diff --git a/raster/r.digit/get_line.c b/raster/r.digit/get_line.c index 8c2a05c8c50..31fc8d10ebd 100644 --- a/raster/r.digit/get_line.c +++ b/raster/r.digit/get_line.c @@ -18,7 +18,7 @@ ***************************************************************************/ #include -#include +#include #include "local_proto.h" diff --git a/raster/r.digit/get_point.c b/raster/r.digit/get_point.c index 9c86a466a81..3b63534ce66 100644 --- a/raster/r.digit/get_point.c +++ b/raster/r.digit/get_point.c @@ -18,7 +18,7 @@ ***************************************************************************/ #include -#include +#include #include "local_proto.h" diff --git a/raster/r.digit/main.c b/raster/r.digit/main.c index 9c219d6085d..424867a8598 100644 --- a/raster/r.digit/main.c +++ b/raster/r.digit/main.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "local_proto.h" #include diff --git a/raster/r.his/main.c b/raster/r.his/main.c index e8ab7b3faa6..50ee01cf60f 100644 --- a/raster/r.his/main.c +++ b/raster/r.his/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "his.h" #include diff --git a/raster/r.le/r.le.setup/main.c b/raster/r.le/r.le.setup/main.c index 2680df0a0cb..88bb26796f2 100644 --- a/raster/r.le/r.le.setup/main.c +++ b/raster/r.le/r.le.setup/main.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include "setup.h" diff --git a/raster/r.le/r.le.setup/mv_wind.c b/raster/r.le/r.le.setup/mv_wind.c index 8f4e2da5a99..b696d36b2aa 100644 --- a/raster/r.le/r.le.setup/mv_wind.c +++ b/raster/r.le/r.le.setup/mv_wind.c @@ -20,7 +20,6 @@ * * ************************************************************/ -#include #include #include "setup.h" #include diff --git a/raster/r.le/r.le.setup/sample.c b/raster/r.le/r.le.setup/sample.c index 27fea8f8a87..0eac8d9869a 100644 --- a/raster/r.le/r.le.setup/sample.c +++ b/raster/r.le/r.le.setup/sample.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include "setup.h" diff --git a/raster/r.le/r.le.setup/setup.c b/raster/r.le/r.le.setup/setup.c index 3f4cdbc1678..5a81e83e3c9 100644 --- a/raster/r.le/r.le.setup/setup.c +++ b/raster/r.le/r.le.setup/setup.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "setup.h" #include diff --git a/raster/r.le/r.le.trace/main.c b/raster/r.le/r.le.trace/main.c index e5aab49e589..c030d331214 100644 --- a/raster/r.le/r.le.trace/main.c +++ b/raster/r.le/r.le.trace/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/raster/r.spread/display.c b/raster/r.spread/display.c index b170d0efe5b..e65604c706a 100644 --- a/raster/r.spread/display.c +++ b/raster/r.spread/display.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "cmd_line.h" #include "local_proto.h" diff --git a/swig/python/Makefile b/swig/python/Makefile index 148a2b2df65..82b3858e144 100644 --- a/swig/python/Makefile +++ b/swig/python/Makefile @@ -95,7 +95,6 @@ vector_wrap.c: $(GISBASE)/include/grass/Vect.h vector_wrap.c: $(GISBASE)/include/grass/vect/dig_defines.h vector_wrap.c: $(GISBASE)/include/grass/vect/dig_structs.h display_wrap.c: $(GISBASE)/include/grass/display.h -display_wrap.c: $(GISBASE)/include/grass/display_raster.h stats_wrap.c: $(GISBASE)/include/grass/stats.h dbmi_wrap.c: $(GISBASE)/include/grass/dbmi.h dbmi_wrap.c: $(GISBASE)/include/grass/proto_dbmi.h diff --git a/vector/v.label/main.c b/vector/v.label/main.c index 72609377505..6e65272e2a9 100644 --- a/vector/v.label/main.c +++ b/vector/v.label/main.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -229,14 +228,14 @@ int main(int argc, char **argv) /* figure out space param dynamically from current dispay */ /* don't bother if Space was explicitly given (bypasses xmon req) */ if (Along_flag->answer && !Space->answer) { - if (R_open_driver() != 0) /* connect to the driver */ + if (D_open_driver() != 0) /* connect to the driver */ G_fatal_error(_("No graphics device selected")); /* Read in the map region associated with graphics window */ D_setup(0); space = fontsize / D_get_u_to_d_xconv(); /* in earth units */ - R_close_driver(); + D_close_driver(); } } else diff --git a/vector/v.what/main.c b/vector/v.what/main.c index 89d749144a2..9136d41662d 100644 --- a/vector/v.what/main.c +++ b/vector/v.what/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/vector/v.what/what.c b/vector/v.what/what.c index a7de0b8bdd9..97742f328f9 100644 --- a/vector/v.what/what.c +++ b/vector/v.what/what.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include