소스 검색

Remove R__open_quiet, R_stabilize
Change R_get_num_colors prototype to match R_screen_{left,rite,bot,top}


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32600 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 17 년 전
부모
커밋
5e0a0230a6
3개의 변경된 파일12개의 추가작업 그리고 22개의 파일을 삭제
  1. 2 6
      display/d.info/main.c
  2. 1 3
      include/raster.h
  3. 9 13
      lib/raster/raster.c

+ 2 - 6
display/d.info/main.c

@@ -85,12 +85,8 @@ int main(int argc, char *argv[])
     if (dflag->answer)
 	fprintf(stdout, "dimensions: %d %d\n", r - l, b - t);
 
-    if (cflag->answer) {
-	int colors;
-
-	R_get_num_colors(&colors);
-	fprintf(stdout, "colors: %d\n", colors);
-    }
+    if (cflag->answer)
+	fprintf(stdout, "colors: %d\n", R_get_num_colors());
 
     if (fflag->answer) {
 	D_get_screen_window(&t, &b, &l, &r);

+ 1 - 3
include/raster.h

@@ -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);

+ 9 - 13
lib/raster/raster.c

@@ -59,24 +59,16 @@ int R_open_driver(void)
     return 0;
 }
 
-void R__open_quiet(void)
-{
-}
-
-void R_stabilize(void)
+void R_flush(void)
 {
     COM_Respond();
 }
 
 void R_close_driver(void)
 {
-    R_stabilize();
+    COM_Respond();
     COM_Client_Close();
-}
-
-void R_flush(void)
-{
-    R_stabilize();
+    COM_Graph_close();
 }
 
 /*!
@@ -152,9 +144,13 @@ int R_screen_top(void)
     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;
 }
 
 /*!