[GRASS-SVN] r64384 - grass/trunk/display/d.colortable

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 1 02:54:37 PST 2015


Author: martinl
Date: 2015-02-01 02:54:37 -0800 (Sun, 01 Feb 2015)
New Revision: 64384

Modified:
   grass/trunk/display/d.colortable/d.colortable.html
   grass/trunk/display/d.colortable/main.c
Log:
d.colortable: fix manual page syntax
              add keyword
              remove ununsed variable


Modified: grass/trunk/display/d.colortable/d.colortable.html
===================================================================
--- grass/trunk/display/d.colortable/d.colortable.html	2015-02-01 09:45:00 UTC (rev 64383)
+++ grass/trunk/display/d.colortable/d.colortable.html	2015-02-01 10:54:37 UTC (rev 64384)
@@ -1,17 +1,16 @@
 <h2>DESCRIPTION</h2>
 
-The GRASS program <em>d.colortable</em> 
-is used to display the color table associated with a raster map layer in the 
-active frame on the graphics monitor. The <em>map</em> name should be 
-an available raster map layer in the user's current mapset search path 
-and location. 
+<em>d.colortable</em> is used to display the color table associated
+with a raster map in the active frame on the graphics
+monitor. The <b>map</b> name should be an available raster map in the
+user's current mapset search path and location.
 
-<p>If the <em>values</em> of both <em>lines</em> and <em>cols</em> are
-not specified by the user, <em>d.colortable</em> 
-divides the active frame equally among the number of categories 
-present in the named raster map layer. If one option is specified, 
-the other is automatically set to accommodate all categories. 
-If both are specified, as many categories as possible are displayed. 
+<p>If the <em>values</em> of both <b>lines</b> and <b>columns</b> are
+not specified by the user, <em>d.colortable</em> divides the active
+frame equally among the number of categories present in the named
+raster map. If one option is specified, the other is automatically set
+to accommodate all categories.  If both are specified, as many
+categories as possible are displayed.
 
 <p>If the user specifies the name of a map on the command line but does not 
 specify the values of other parameters, parameter default values will be used. 
@@ -19,45 +18,39 @@
 without any program arguments, the program will prompt the user for parameter 
 settings using the standard GRASS parser interface.
 
-
 <h2>EXAMPLE</h2>
 
 The user running the command: 
-<dl>
-<dd>
-<b>d.colortable map=</b><em>soils</em> 
-  <b>color=</b><em>red</em>
-  <b>lines=</b><em>1</em>
-  <b>columns =</b><em>3</em>
-</dl>
-would see the active graphics frame divided into three columns 
-extending the full frame height. The lines dividing the color table 
-associated with the <em>soils</em> map would be displayed in red. 
-The user would see, at most, only three of the colors from the <em>soils</em> 
-color table displayed in the active frame (because the user requested 
-that this frame be divided into three sections).
 
+<div class="code"><pre>
+d.colortable map=soils color=red lines=1 columns=3
+</pre></div>
 
+would see the active graphics frame divided into three columns
+extending the full frame height. The lines dividing the color table
+associated with the <em>soils</em> map would be displayed in red. The
+user would see, at most, only three of the colors from
+the <em>soils</em> color table displayed in the active frame (because
+the user requested that this frame be divided into three sections).
+
 <h2>NOTES</h2>
 
 If the user wishes to display the entire color table associated with 
 a map, the user should either stipulate a number of lines (rows) and 
 columns (cols) sufficient to accommodate the number of categories 
 in the map's color table, or fail to assign values to one or both of 
-<em>lines</em> and/or <em>cols</em>.
+<b>lines</b> and/or <b>columns</b>.
 If the user runs <em>d.colortable</em> using the default number of 
 lines and columns (the full graphics frame), all categories from the 
 map's color table will be displayed. However, if the user requests 
 that the color table associated with a map which has 10 data categories 
 be displayed in a graphics frame with only 3 lines (rows) and 2 columns 
-(a total of six cells), 
+6(a total of six cells), 
 only six of the ten map categories will be displayed. 
 
-<p>The user should run the GRASS program 
-<em><a href="d.erase.html">d.erase</a></em> between 
-runs of <em>d.colortable</em> to avoid confusion. 
+<p>The user should run <em><a href="d.erase.html">d.erase</a></em>
+between runs of <em>d.colortable</em> to avoid confusion.
 
-
 <h2>SEE ALSO</h2>
 
 <em>
@@ -70,4 +63,5 @@
 
 James Westervelt, U.S. Army Construction Engineering Research Laboratory
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/trunk/display/d.colortable/main.c
===================================================================
--- grass/trunk/display/d.colortable/main.c	2015-02-01 09:45:00 UTC (rev 64383)
+++ grass/trunk/display/d.colortable/main.c	2015-02-01 10:54:37 UTC (rev 64384)
@@ -42,7 +42,7 @@
     int cur_dot_row, cur_dot_col;
     int dots_per_line, dots_per_col;
     int atcat;
-    int white, black;
+    int black;
     int atcol, atline;
     int count, offset;
     double t, b, l, r;
@@ -59,6 +59,7 @@
     module = G_define_module();
     G_add_keyword(_("display"));
     G_add_keyword(_("raster"));
+    G_add_keyword(_("color table"));
     module->description =
 	_("Displays the color table associated with a raster map layer.");
 
@@ -175,7 +176,6 @@
     x_box[3] = 0;			y_box[3] = (dots_per_line - 6);
     x_box[4] = (6 - dots_per_col);	y_box[4] = 0;
 
-    white = D_translate_color("white");
     black = D_translate_color("black");
     Rast_set_c_null_value(&atcat, 1);
 



More information about the grass-commit mailing list