[GRASS-SVN] r32600 - in grass/trunk: display/d.info include
lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 6 23:22:40 EDT 2008
Author: glynn
Date: 2008-08-06 23:22:40 -0400 (Wed, 06 Aug 2008)
New Revision: 32600
Modified:
grass/trunk/display/d.info/main.c
grass/trunk/include/raster.h
grass/trunk/lib/raster/raster.c
Log:
Remove R__open_quiet, R_stabilize
Change R_get_num_colors prototype to match R_screen_{left,rite,bot,top}
Modified: grass/trunk/display/d.info/main.c
===================================================================
--- grass/trunk/display/d.info/main.c 2008-08-07 03:18:28 UTC (rev 32599)
+++ grass/trunk/display/d.info/main.c 2008-08-07 03:22:40 UTC (rev 32600)
@@ -85,13 +85,9 @@
if (dflag->answer)
fprintf(stdout, "dimensions: %d %d\n", r - l, b - t);
- if (cflag->answer) {
- int colors;
+ if (cflag->answer)
+ fprintf(stdout, "colors: %d\n", R_get_num_colors());
- R_get_num_colors(&colors);
- fprintf(stdout, "colors: %d\n", colors);
- }
-
if (fflag->answer) {
D_get_screen_window(&t, &b, &l, &r);
fprintf(stdout, "frame: %d %d %d %d\n", l, r, t, b);
Modified: grass/trunk/include/raster.h
===================================================================
--- grass/trunk/include/raster.h 2008-08-07 03:18:28 UTC (rev 32599)
+++ grass/trunk/include/raster.h 2008-08-07 03:22:40 UTC (rev 32600)
@@ -3,15 +3,13 @@
void R_flush(void);
int R_open_driver(void);
-void R__open_quiet(void);
-void R_stabilize(void);
void R_close_driver(void);
int R_screen_left(void);
int R_screen_rite(void);
int R_screen_bot(void);
int R_screen_top(void);
-void R_get_num_colors(int *);
+int R_get_num_colors(void);
void R_standard_color(int);
void R_RGB_color(unsigned char, unsigned char, unsigned char);
Modified: grass/trunk/lib/raster/raster.c
===================================================================
--- grass/trunk/lib/raster/raster.c 2008-08-07 03:18:28 UTC (rev 32599)
+++ grass/trunk/lib/raster/raster.c 2008-08-07 03:22:40 UTC (rev 32600)
@@ -59,26 +59,18 @@
return 0;
}
-void R__open_quiet(void)
+void R_flush(void)
{
-}
-
-void R_stabilize(void)
-{
COM_Respond();
}
void R_close_driver(void)
{
- R_stabilize();
+ COM_Respond();
COM_Client_Close();
+ COM_Graph_close();
}
-void R_flush(void)
-{
- R_stabilize();
-}
-
/*!
* \brief screen left edge
*
@@ -152,9 +144,13 @@
return t;
}
-void R_get_num_colors(int *n)
+int R_get_num_colors(void)
{
- COM_Number_of_colors(n);
+ int c;
+
+ COM_Number_of_colors(&c);
+
+ return c;
}
/*!
More information about the grass-commit
mailing list