浏览代码

use array for keywords (to avoid duplicate locales)
G_add_keyword() and G_set_keywords() added to gislib
modules updated


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

Martin Landa 16 年之前
父节点
当前提交
9339a2b67e
共有 100 个文件被更改,包括 198 次插入111 次删除
  1. 2 1
      db/db.columns/main.c
  2. 2 1
      db/db.connect/main.c
  3. 3 1
      db/db.copy/main.c
  4. 2 1
      db/db.createdb/main.c
  5. 2 1
      db/db.databases/main.c
  6. 2 1
      db/db.describe/main.c
  7. 2 1
      db/db.drivers/main.c
  8. 2 1
      db/db.dropdb/main.c
  9. 2 1
      db/db.droptable/main.c
  10. 3 1
      db/db.execute/main.c
  11. 2 1
      db/db.login/main.c
  12. 3 1
      db/db.select/main.c
  13. 2 1
      db/db.tables/main.c
  14. 2 1
      display/d.barscale/main.c
  15. 1 1
      display/d.colorlist/main.c
  16. 1 1
      display/d.colors/main.c
  17. 2 1
      display/d.colortable/main.c
  18. 1 1
      display/d.erase/main.c
  19. 1 1
      display/d.extract/main.c
  20. 1 1
      display/d.font/main.c
  21. 1 1
      display/d.fontlist/main.c
  22. 1 1
      display/d.geodesic/main.c
  23. 2 1
      display/d.graph/main.c
  24. 2 1
      display/d.grid/main.c
  25. 1 1
      display/d.his/main.c
  26. 1 1
      display/d.histogram/main.c
  27. 1 1
      display/d.info/main.c
  28. 1 1
      display/d.labels/main.c
  29. 2 1
      display/d.legend/main.c
  30. 1 1
      display/d.linegraph/main.c
  31. 1 1
      display/d.measure/main.c
  32. 1 1
      display/d.nviz/main.c
  33. 2 1
      display/d.path/main.c
  34. 1 1
      display/d.profile/main.c
  35. 1 1
      display/d.rast.arrow/main.c
  36. 1 1
      display/d.rast.num/main.c
  37. 2 1
      display/d.rast/main.c
  38. 1 1
      display/d.rgb/main.c
  39. 1 1
      display/d.rhumbline/main.c
  40. 1 1
      display/d.text/main.c
  41. 1 1
      display/d.thematic.area/main.c
  42. 1 1
      display/d.title/main.c
  43. 2 1
      display/d.vect.chart/main.c
  44. 2 1
      display/d.vect/main.c
  45. 1 1
      display/d.what.rast/main.c
  46. 1 1
      display/d.what.vect/main.c
  47. 1 1
      display/d.where/main.c
  48. 1 1
      display/d.zoom/main.c
  49. 3 1
      doc/raster/r.example/main.c
  50. 3 1
      doc/vector/v.example/main.c
  51. 1 1
      general/g.access/main.c
  52. 1 1
      general/g.cairocomp/main.c
  53. 2 1
      general/g.copy/main.c
  54. 1 1
      general/g.dirseps/main.c
  55. 1 1
      general/g.filename/main.c
  56. 1 1
      general/g.findetc/main.c
  57. 1 1
      general/g.findfile/main.c
  58. 1 1
      general/g.gisenv/main.c
  59. 2 1
      general/g.gui/main.c
  60. 2 1
      general/g.list/main.c
  61. 2 1
      general/g.mapset/main.c
  62. 2 1
      general/g.mapsets/main.c
  63. 1 1
      general/g.message/main.c
  64. 15 13
      general/g.mkfontcap/main.c
  65. 2 1
      general/g.mlist/main.c
  66. 2 1
      general/g.mremove/main.c
  67. 1 1
      general/g.parser/main.c
  68. 1 1
      general/g.pnmcomp/main.c
  69. 1 1
      general/g.proj/main.c
  70. 1 1
      general/g.region/main.c
  71. 2 1
      general/g.remove/main.c
  72. 2 1
      general/g.rename/main.c
  73. 2 1
      general/g.setproj/main.c
  74. 1 1
      general/g.tempfile/main.c
  75. 3 1
      general/g.transform/main.c
  76. 1 1
      general/g.version/main.c
  77. 3 1
      imagery/i.albedo/main.c
  78. 4 1
      imagery/i.biomass/main.c
  79. 1 1
      imagery/i.cca/main.c
  80. 1 1
      imagery/i.class/main.c
  81. 3 1
      imagery/i.cluster/main.c
  82. 4 1
      imagery/i.eb.eta/main.c
  83. 1 1
      imagery/i.eb.evapfr/main.c
  84. 5 1
      imagery/i.eb.h_SEBAL01/main.c
  85. 4 1
      imagery/i.eb.soilheatflux/main.c
  86. 3 1
      imagery/i.emissivity/main.c
  87. 4 1
      imagery/i.evapo.time_integration/main.c
  88. 2 1
      imagery/i.fft/main.c
  89. 4 1
      imagery/i.gensig/main.c
  90. 4 1
      imagery/i.gensigset/main.c
  91. 1 1
      imagery/i.group/main.c
  92. 4 1
      imagery/i.his.rgb/main.c
  93. 2 1
      imagery/i.ifft/main.c
  94. 4 1
      imagery/i.latlong/main.c
  95. 3 1
      imagery/i.maxlik/main.c
  96. 4 1
      imagery/i.modis.qc/main.c
  97. 3 1
      imagery/i.pca/main.c
  98. 1 1
      imagery/i.points/main.c
  99. 2 1
      imagery/i.rectify/main.c
  100. 0 0
      imagery/i.rgb.his/main.c

+ 2 - 1
db/db.columns/main.c

@@ -89,7 +89,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
     module->description = _("List all columns for a given table.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.connect/main.c

@@ -42,7 +42,8 @@ int main(int argc, char *argv[])
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
     module->description =
 	_("Prints/sets general DB connection for current mapset and exits.");
 

+ 3 - 1
db/db.copy/main.c

@@ -31,7 +31,9 @@ int main(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
+    G_add_keyword(_("SQL"));
     module->label = _("Copy a table.");
     module->description =
 	_("Either 'from_table' (optionally with 'where') can be used "

+ 2 - 1
db/db.createdb/main.c

@@ -68,7 +68,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("SQL"));
     module->description = _("Creates an empty database.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.databases/main.c

@@ -87,7 +87,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("SQL"));
     module->description =
 	_("List all databases for a given driver and location.");
 

+ 2 - 1
db/db.describe/main.c

@@ -122,7 +122,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
     module->description = _("Describes a table in detail.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.drivers/main.c

@@ -71,7 +71,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
     module->description = _("List all database drivers.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.dropdb/main.c

@@ -68,7 +68,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("SQL"));
     module->description = _("Removes a database.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.droptable/main.c

@@ -75,7 +75,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("SQL"));
     module->description = _("Removes a table from database.");
 
     if (G_parser(argc, argv))

+ 3 - 1
db/db.execute/main.c

@@ -103,7 +103,9 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
+    G_add_keyword(_("SQL"));
     module->description = _("Executes any SQL statement.");
 
     input = G_define_standard_option(G_OPT_F_INPUT);

+ 2 - 1
db/db.login/main.c

@@ -40,7 +40,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("database, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("SQL"));
     module->description = _("Sets user/password for driver/database.");
 
     driver = G_define_standard_option(G_OPT_DB_DRIVER);

+ 3 - 1
db/db.select/main.c

@@ -232,7 +232,9 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table, SQL");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
+    G_add_keyword(_("SQL"));
     module->description = _("Selects data from table.");
 
     if (G_parser(argc, argv))

+ 2 - 1
db/db.tables/main.c

@@ -92,7 +92,8 @@ static void parse_command_line(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("database, attribute table");
+    G_add_keyword(_("database"));
+    G_add_keyword(_("attribute table"));
     module->description = _("Lists all tables for a given database.");
 
     if (G_parser(argc, argv))

+ 2 - 1
display/d.barscale/main.c

@@ -49,7 +49,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, cartography");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("cartography"));
     module->description = _("Displays a barscale on the graphics monitor.");
 
     feet = G_define_flag();

+ 1 - 1
display/d.colorlist/main.c

@@ -32,7 +32,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	"Output a list of all available display colors with a configurable "
 	"separator (default is comma).";

+ 1 - 1
display/d.colors/main.c

@@ -37,7 +37,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	"Allows the user to interactively change the color table "
 	"of a raster map layer displayed on the graphics monitor.";

+ 2 - 1
display/d.colortable/main.c

@@ -60,7 +60,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, setup");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("setup"));
     module->description =
 	_("Displays the color table associated with a raster map layer.");
 

+ 1 - 1
display/d.erase/main.c

@@ -26,7 +26,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Erase the contents of the active display frame with user defined color");
 

+ 1 - 1
display/d.extract/main.c

@@ -46,7 +46,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Selects and extracts vectors with mouse into new vector map.");
 

+ 1 - 1
display/d.font/main.c

@@ -42,7 +42,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Selects the font in which text will be displayed "
 	  "on the user's graphics monitor.");

+ 1 - 1
display/d.fontlist/main.c

@@ -35,7 +35,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description = _("Lists the available fonts.");
 
     flagl = G_define_flag();

+ 1 - 1
display/d.geodesic/main.c

@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays a geodesic line, tracing the shortest distance "
 	"between two geographic points along a great circle, in "

+ 2 - 1
display/d.graph/main.c

@@ -54,7 +54,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, cartography");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("cartography"));
     module->description =
 	_("Program for generating and displaying simple graphics on the "
 	  "display monitor.");

+ 2 - 1
display/d.grid/main.c

@@ -48,7 +48,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, cartography");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("cartography"));
     module->description =
 	_("Overlays a user-specified grid "
 	  "in the active display frame on the graphics monitor.");

+ 1 - 1
display/d.his/main.c

@@ -59,7 +59,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays the result obtained by combining "
 	  "hue, intensity, and saturation (his) values "

+ 1 - 1
display/d.histogram/main.c

@@ -81,7 +81,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays a histogram in the form of a pie or bar chart "
 	  "for a user-specified raster map.");

+ 1 - 1
display/d.info/main.c

@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Display information about the active display monitor");
 

+ 1 - 1
display/d.labels/main.c

@@ -40,7 +40,7 @@ int main(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays text labels (created with v.label) "
 	  "to the active frame on the graphics monitor.");

+ 2 - 1
display/d.legend/main.c

@@ -81,7 +81,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, cartography");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("cartography"));
     module->description =
 	_("Displays a legend for a raster map in the active frame "
 	  "of the graphics monitor.");

+ 1 - 1
display/d.linegraph/main.c

@@ -116,7 +116,7 @@ int main(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Generates and displays simple line graphs in the active graphics monitor display frame.");
 

+ 1 - 1
display/d.measure/main.c

@@ -43,7 +43,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Measures the lengths and areas of features drawn "
 	  "by the user in the active display frame on the "

+ 1 - 1
display/d.nviz/main.c

@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description = _("Creates fly-through script to run in NVIZ.");
 
     parm.opt1 = G_define_standard_option(G_OPT_R_INPUT);

+ 2 - 1
display/d.path/main.c

@@ -45,7 +45,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, networking");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("networking"));
     module->description =
 	_("Finds shortest path for selected starting and ending node.");
 

+ 1 - 1
display/d.profile/main.c

@@ -187,7 +187,7 @@ int main(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description = _("Plots profile of a transect.");
 
     /* set up command line */

+ 1 - 1
display/d.rast.arrow/main.c

@@ -92,7 +92,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Draws arrows representing cell aspect direction "
 	  "for a raster map containing aspect data.");

+ 1 - 1
display/d.rast.num/main.c

@@ -68,7 +68,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Overlays cell category values on a raster map layer "
 	  "displayed to the graphics monitor.");

+ 2 - 1
display/d.rast/main.c

@@ -50,7 +50,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, raster");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("raster"));
     module->description =
 	_("Displays and overlays raster map layers "
 	  "in the active display frame on the graphics monitor.");

+ 1 - 1
display/d.rgb/main.c

@@ -49,7 +49,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays three user-specified raster map layers "
 	  "as red, green, and blue overlays in the active graphics frame.");

+ 1 - 1
display/d.rhumbline/main.c

@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays the rhumbline joining two longitude/latitude coordinates.");
 

+ 1 - 1
display/d.text/main.c

@@ -133,7 +133,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Draws text in the active display frame on the graphics monitor using the current font.");
 

+ 1 - 1
display/d.thematic.area/main.c

@@ -73,7 +73,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Displays a thematic vector area map in the active "
 	  "frame on the graphics monitor.");

+ 1 - 1
display/d.title/main.c

@@ -46,7 +46,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Create a TITLE for a raster map in a form suitable "
 	  "for display with d.text.");

+ 2 - 1
display/d.vect.chart/main.c

@@ -60,7 +60,8 @@ int main(int argc, char **argv)
     };
 
     module = G_define_module();
-    module->keywords = _("display, cartography");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("cartography"));
     module->description =
 	_("Displays charts of vector data in the active frame "
 	  "on the graphics monitor.");

+ 2 - 1
display/d.vect/main.c

@@ -118,7 +118,8 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display, vector");
+    G_add_keyword(_("display"));
+    G_add_keyword(_("vector"));
     module->description =
 	_("Displays vector data in the active "
 	  "frame on the graphics monitor.");

+ 1 - 1
display/d.what.rast/main.c

@@ -45,7 +45,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Allows the user to interactively query the category contents "
 	  "of multiple raster map layers at user specified locations "

+ 1 - 1
display/d.what.vect/main.c

@@ -53,7 +53,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Allows the user to interactively query a vector map layer "
 	  "at user-selected locations within the current geographic region.");

+ 1 - 1
display/d.where/main.c

@@ -40,7 +40,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Identifies the geographic coordinates associated with "
 	  "point locations given in display coordinates.");

+ 1 - 1
display/d.zoom/main.c

@@ -58,7 +58,7 @@ int main(int argc, char **argv)
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("display");
+    G_add_keyword(_("display"));
     module->description =
 	_("Allows the user to change the current geographic "
 	  "region settings interactively, with a mouse.");

+ 3 - 1
doc/raster/r.example/main.c

@@ -82,7 +82,9 @@ int main(int argc, char *argv[])
 
     /* initialize module */
     module = G_define_module();
-    module->keywords = _("raster, keyword2, keyword3");
+    G_add_keyword(_("raster"));
+    G_add_keyword(_("keyword2"));
+    G_add_keyword(_("keyword3"));
     module->description = _("My first raster module");
 
     /* Define the different options as defined in gis.h */

+ 3 - 1
doc/vector/v.example/main.c

@@ -47,7 +47,9 @@ int main(int argc, char *argv[])
 
     /* initialize module */
     module = G_define_module();
-    module->keywords = _("vector, keyword2, keyword3");
+    G_add_keyword(_("vector"));
+    G_add_keyword(_("keyword2"));
+    G_add_keyword(_("keyword3"));
     module->description = _("My first vector module");
 
     /* Define the different options as defined in gis.h */

+ 1 - 1
general/g.access/main.c

@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 	_("Controls access to the current mapset for other users on the system.");
 

+ 1 - 1
general/g.cairocomp/main.c

@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description = _("Overlays multiple X Pixmaps");
 
     opt.in = G_define_option();

+ 2 - 1
general/g.copy/main.c

@@ -37,7 +37,8 @@ int main(int argc, char *argv[])
     read_list(0);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Copies available data files in the user's current mapset "
 	  "search path and location to the appropriate element "

+ 1 - 1
general/g.dirseps/main.c

@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
     G_no_gisinit();
 
     module = G_define_module();
-    module->keywords = "general";
+    G_add_keyword(_("general"));
     module->label =
 	_("Internal GRASS utility for converting directory separator characters.");
     module->description =

+ 1 - 1
general/g.filename/main.c

@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description = _("Prints GRASS data base file names.");
 
     /* Define the different options */

+ 1 - 1
general/g.findetc/main.c

@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
     struct Option *opt1;
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description = "Searches for GRASS support files.";
 
     G_gisinit(argv[0]);

+ 1 - 1
general/g.findfile/main.c

@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
     struct Flag *n_flag;
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 	_("Searches for GRASS data base files "
 	  "and sets variables for the shell.");

+ 1 - 1
general/g.gisenv/main.c

@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
     G_no_gisinit();
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 	_("Outputs and modifies the user's current GRASS variable settings.");
 

+ 2 - 1
general/g.gui/main.c

@@ -33,7 +33,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, gui");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("gui"));
     module->description =
 	_("Launches a GRASS graphical user interface (GUI) session.");
 

+ 2 - 1
general/g.list/main.c

@@ -41,7 +41,8 @@ int main(int argc, char *argv[])
     read_list(0);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Lists available GRASS data base files "
 	  "of the user-specified data type to standard output.");

+ 2 - 1
general/g.mapset/main.c

@@ -42,7 +42,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, settings");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("settings"));
     module->description = _("Change current mapset.");
 
     mapset_opt = G_define_option();

+ 2 - 1
general/g.mapsets/main.c

@@ -56,7 +56,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, settings");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("settings"));
     module->description =
 	_("Modifies the user's current mapset "
 	  "search path, affecting the user's access to data existing "

+ 1 - 1
general/g.message/main.c

@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->label =
 	_("Prints a message, warning, or fatal error the GRASS way.");
     module->description =

+ 15 - 13
general/g.mkfontcap/main.c

@@ -24,6 +24,7 @@
 
 #include <grass/gis.h>
 #include <grass/fontcap.h>
+#include <grass/glocale.h>
 
 #include "local_proto.h"
 
@@ -66,29 +67,29 @@ int main(int argc, char *argv[])
     G_no_gisinit();
 
     module = G_define_module();
-    module->keywords = "general";
+    G_add_keyword(_("general"));
     module->description =
-	"Generates the font configuration file by scanning various directories "
-	"for fonts";
+	_("Generates the font configuration file by scanning various directories "
+	  "for fonts");
 
     overwrite = G_define_flag();
     overwrite->key = 'o';
     overwrite->description =
-	"Overwrite font configuration file if already existing";
+	_("Overwrite font configuration file if already existing");
 
     tostdout = G_define_flag();
     tostdout->key = 's';
     tostdout->description =
-	"Write font configuration file to standard output instead of "
-	"$GISBASE/etc";
+	_("Write font configuration file to standard output instead of "
+	  "$GISBASE/etc");
 
     extradirs = G_define_option();
     extradirs->key = "extradirs";
     extradirs->type = TYPE_STRING;
     extradirs->required = NO;
     extradirs->description =
-	"Comma-separated list of extra directories to scan for "
-	"Freetype-compatible fonts as well as the defaults (see documentation)";
+	_("Comma-separated list of extra directories to scan for "
+	  "Freetype-compatible fonts as well as the defaults (see documentation)");
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -104,9 +105,9 @@ int main(int argc, char *argv[])
 
 	if (!stat(fontcapfile, &status)) {	/* File exists? */
 	    if (!overwrite->answer)
-		G_fatal_error
-		    ("Fontcap file %s already exists; use -%c flag if you "
-		     "wish to overwrite it", fontcapfile, overwrite->key);
+		G_fatal_error(_("Fontcap file %s already exists; use -%c flag if you "
+				"wish to overwrite it"),
+			      fontcapfile, overwrite->key);
 	}
     }
 
@@ -116,7 +117,8 @@ int main(int argc, char *argv[])
     /* Prepare list of directories to search */
     if (extradirs->answer) {
 #ifndef HAVE_FT2BUILD_H
-	G_warning("This GRASS installation was compiled without Freetype support, extradirs parameter ignored");
+	G_warning(_("This GRASS installation was compiled without "
+		    "Freetype support, extradirs parameter ignored"));
 #endif
 	char *str = G_store(extradirs->answer);
 
@@ -142,7 +144,7 @@ int main(int argc, char *argv[])
     else {
 	outstream = fopen(fontcapfile, "w");
 	if (outstream == NULL)
-	    G_fatal_error("Cannot open %s for writing: %s", fontcapfile,
+	    G_fatal_error(_("Cannot open %s for writing: %s"), fontcapfile,
 			  strerror(errno));
     }
 

+ 2 - 1
general/g.mlist/main.c

@@ -62,7 +62,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Lists available GRASS data base files "
 	  "of the user-specified data type to standard output.");

+ 2 - 1
general/g.mremove/main.c

@@ -53,7 +53,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Removes data base element files from "
 	  "the user's current mapset.");

+ 1 - 1
general/g.parser/main.c

@@ -102,7 +102,7 @@ static void parse_module(struct context *ctx, const char *cmd,
     }
 
     if (strcasecmp(cmd, "keywords") == 0) {
-	ctx->module->keywords = translate(strdup(arg));
+	G_set_keywords(translate(strdup(arg)));
 	return;
     }
 

+ 1 - 1
general/g.pnmcomp/main.c

@@ -278,7 +278,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description = "Overlays multiple PPM image files";
 
     opt.in = G_define_option();

+ 1 - 1
general/g.proj/main.c

@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
 				 * (to create a new location) when none exists */
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 #ifdef HAVE_OGR
 	_("Converts co-ordinate system descriptions (i.e. projection "

+ 1 - 1
general/g.region/main.c

@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 	_("Manages the boundary definitions for the " "geographic region.");
 

+ 2 - 1
general/g.remove/main.c

@@ -98,7 +98,8 @@ int main(int argc, char *argv[])
     read_list(0);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Removes data base element files from "
 	  "the user's current mapset.");

+ 2 - 1
general/g.rename/main.c

@@ -40,7 +40,8 @@ int main(int argc, char *argv[])
     read_list(0);
 
     module = G_define_module();
-    module->keywords = _("general, map management");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("map management"));
     module->description =
 	_("Renames data base element files in the user's current mapset.");
 

+ 2 - 1
general/g.setproj/main.c

@@ -75,7 +75,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general, projection");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("projection"));
     module->description =
 	_("Interactively reset the location's projection settings.");
 

+ 1 - 1
general/g.tempfile/main.c

@@ -33,7 +33,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description =
 	"Creates a temporary file and prints the file name.";
 

+ 3 - 1
general/g.transform/main.c

@@ -246,7 +246,9 @@ int main(int argc, char **argv)
 
     /* Get Args */
     module = G_define_module();
-    module->keywords = _("general, transformation, GCP");
+    G_add_keyword(_("general"));
+    G_add_keyword(_("transformation"));
+    G_add_keyword(_("GCP"));
     module->description =
 	_("Computes a coordinate transformation based on the control points.");
 

+ 1 - 1
general/g.version/main.c

@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    G_add_keyword(_("general"));
     module->description = _("Displays version and copyright information.");
 
     copyright = G_define_flag();

+ 3 - 1
imagery/i.albedo/main.c

@@ -84,7 +84,9 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, albedo, surface reflectance");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("albedo"));
+    G_add_keyword(_("surface reflectance"));
     module->description = _("Broad Band Albedo from Surface Reflectance.");
 
     /* Define the different options */

+ 4 - 1
imagery/i.biomass/main.c

@@ -45,7 +45,10 @@ int main(int argc, char *argv[])
     /************************************/ 
     G_gisinit(argv[0]);
     module = G_define_module();
-    module->keywords = _("imagery, biomass, fpar, yield");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("biomass"));
+    G_add_keyword(_("fpar"));
+    G_add_keyword(_("yield"));
     module->description =
 	_("Computes biomass growth, precursor of crop yield calculation");
     

+ 1 - 1
imagery/i.cca/main.c

@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery");
+    G_add_keyword(_("imagery"));
     module->description =
 	_("Canonical components analysis (cca) "
 	  "program for image processing.");

+ 1 - 1
imagery/i.class/main.c

@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery");
+    G_add_keyword(_("imagery"));
     module->label =
 	_("Generates spectral signatures for an image by allowing the user "
 	  "to outline regions of interest.");

+ 3 - 1
imagery/i.cluster/main.c

@@ -72,7 +72,9 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, classification, signatures");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("classification"));
+    G_add_keyword(_("signatures"));
     module->label =
 	_("Generates spectral signatures for land cover "
 	  "types in an image using a clustering algorithm.");

+ 4 - 1
imagery/i.eb.eta/main.c

@@ -40,7 +40,10 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, actual evapotranspiration, energy balance, SEBAL");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("actual evapotranspiration"));
+    G_add_keyword(_("energy balance"));
+    G_add_keyword(_("SEBAL"));
     module->description =
 	_("actual evapotranspiration for diurnal period (Bastiaanssen, 1995)");
     

+ 1 - 1
imagery/i.eb.evapfr/main.c

@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
     /************************************/ 
     G_gisinit(argv[0]);
     module = G_define_module();
-    module->keywords =
+    G_add_keyword(_(""));
 	_("imagery, evaporative fraction, soil moisture, energy balance, SEBAL");
     module->description =
 	_("Computes evaporative fraction (Bastiaanssen, 1995) and "

+ 5 - 1
imagery/i.eb.h_SEBAL01/main.c

@@ -82,7 +82,11 @@ int main(int argc, char *argv[])
 
     module = G_define_module();
     module->description = _("Computes sensible Heat Flux iteration SEBAL 01");
-    module->keywords = _("imagery, evaporative fraction, soil moisture, energy balance, SEBAL");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("evaporative fraction"));
+    G_add_keyword(_("soil moisture"));
+    G_add_keyword(_("energy balance"));
+    G_add_keyword(_("SEBAL"));
 
     /* Define different options */
     input_Rn = G_define_standard_option(G_OPT_R_INPUT);

+ 4 - 1
imagery/i.eb.soilheatflux/main.c

@@ -46,7 +46,10 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, soil heat flux, energy balance, SEBAL");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("soil heat flux"));
+    G_add_keyword(_("energy balance"));
+    G_add_keyword(_("SEBAL"));
     module->description = _("Soil heat flux approximation (Bastiaanssen, 1995)");
     
     /* Define the different options */ 

+ 3 - 1
imagery/i.emissivity/main.c

@@ -41,7 +41,9 @@ int main(int argc, char *argv[])
     /************************************/ 
     G_gisinit(argv[0]);
     module = G_define_module();
-    module->keywords = _("emissivity, land flux, energy balance");
+    G_add_keyword(_("emissivity"));
+    G_add_keyword(_("land flux"));
+    G_add_keyword(_("energy balance"));
     module->description =
 	_("Emissivity from NDVI, generic method for spares land.");
     

+ 4 - 1
imagery/i.evapo.time_integration/main.c

@@ -76,7 +76,10 @@ int main(int argc, char *argv[])
     module->description =_("Computes temporal integration of satellite "
 			   "ET actual (ETa) following the daily ET reference "
 			   "(ETo) from meteorological station(s)");
-    module->keywords = _("imagery, evapotranspiration, temporal, integration");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("evapotranspiration"));
+    G_add_keyword(_("temporal"));
+    G_add_keyword(_("integration"));
 
     /* Define the different options */
     input = G_define_standard_option(G_OPT_R_INPUTS);

+ 2 - 1
imagery/i.fft/main.c

@@ -75,7 +75,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, FFT");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("FFT"));
     module->description =
 	_("Fast Fourier Transform (FFT) for image processing.");
 

+ 4 - 1
imagery/i.gensig/main.c

@@ -36,7 +36,10 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, classification, supervised, MLC");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("classification"));
+    G_add_keyword(_("supervised"));
+    G_add_keyword(_("MLC"));
     module->description =
 	_("Generates statistics for i.maxlik from raster map.");
 

+ 4 - 1
imagery/i.gensigset/main.c

@@ -37,7 +37,10 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, classification, supervised, SMAP");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("classification"));
+    G_add_keyword(_("supervised"));
+    G_add_keyword(_("SMAP"));
     module->description =
 	_("Generates statistics for i.smap from raster map.");
 

+ 1 - 1
imagery/i.group/main.c

@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery");
+    G_add_keyword(_("imagery"));
     module->description =
 	_("Creates, edits, and lists groups and subgroups of imagery files.");
 

+ 4 - 1
imagery/i.his.rgb/main.c

@@ -43,7 +43,10 @@ int main(int argc, char **argv)
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("imagery, color transformation, RGB, HIS");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("color transformation"));
+    G_add_keyword(_("RGB"));
+    G_add_keyword(_("HIS"));
     module->description =
 	_("Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to "
 	  "RGB (Red-Green-Blue) color space.");

+ 2 - 1
imagery/i.ifft/main.c

@@ -74,7 +74,8 @@ int main(int argc, char *argv[])
 
     /* Set description */
     module = G_define_module();
-    module->keywords = _("imagery, FFT");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("FFT"));
     module->description =
 	_("Inverse Fast Fourier Transform (IFFT) for image processing.");
 

+ 4 - 1
imagery/i.latlong/main.c

@@ -53,7 +53,10 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, latitude, longitude, projection");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("latitude"));
+    G_add_keyword(_("longitude"));
+    G_add_keyword(_("projection"));
     module->description = _("creates a latitude/longitude map");
     
     /* Define the different options */ 

+ 3 - 1
imagery/i.maxlik/main.c

@@ -57,7 +57,9 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, classification, MLC");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("classification"));
+    G_add_keyword(_("MLC"));
     module->label =
 	_("Classifies the cell spectral reflectances in imagery data.");
     module->description =

+ 4 - 1
imagery/i.modis.qc/main.c

@@ -81,7 +81,10 @@ int main(int argc, char *argv[])
     /************************************/ 
     G_gisinit(argv[0]);
     module = G_define_module();
-    module->keywords = _("QC, Quality Control, surface reflectance, Modis");
+    G_add_keyword(_("QC"));
+    G_add_keyword(_("Quality Control"));
+    G_add_keyword(_("surface reflectance"));
+    G_add_keyword(_("Modis"));
     module->description =
 	_("Extract quality control parameters from Modis QC layers");
 

+ 3 - 1
imagery/i.pca/main.c

@@ -61,7 +61,9 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, image transformation, PCA");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("image transformation"));
+    G_add_keyword(_("PCA"));
     module->description = _("Principal components analysis (pca) program "
 			    "for image processing.");
 

+ 1 - 1
imagery/i.points/main.c

@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery");
+    G_add_keyword(_("imagery"));
     module->description =
 	_("Mark ground control points on image to be rectified.");
 

+ 2 - 1
imagery/i.rectify/main.c

@@ -84,7 +84,8 @@ int main(int argc, char *argv[])
     G_gisinit(argv[0]);
 
     module = G_define_module();
-    module->keywords = _("imagery, rectify");
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("rectify"));
     module->description =
 	_("Rectifies an image by computing a coordinate "
 	  "transformation for each pixel in the image based on the "

+ 0 - 0
imagery/i.rgb.his/main.c


部分文件因为文件数量过多而无法显示