[GRASS-SVN] r46983 - grass/trunk/lib/htmldriver

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 5 06:13:07 EDT 2011


Author: martinl
Date: 2011-07-05 03:13:07 -0700 (Tue, 05 Jul 2011)
New Revision: 46983

Modified:
   grass/trunk/lib/htmldriver/Driver.c
   grass/trunk/lib/htmldriver/Graph_Set.c
Log:
htmldriver: define driver name
            sync messages


Modified: grass/trunk/lib/htmldriver/Driver.c
===================================================================
--- grass/trunk/lib/htmldriver/Driver.c	2011-07-05 10:12:34 UTC (rev 46982)
+++ grass/trunk/lib/htmldriver/Driver.c	2011-07-05 10:13:07 UTC (rev 46983)
@@ -25,6 +25,7 @@
     if (initialized)
 	return &drv;
 
+    drv.name = "html";
     drv.Box = HTML_Box;
     drv.Erase = NULL;
     drv.Graph_set = HTML_Graph_set;

Modified: grass/trunk/lib/htmldriver/Graph_Set.c
===================================================================
--- grass/trunk/lib/htmldriver/Graph_Set.c	2011-07-05 10:12:34 UTC (rev 46982)
+++ grass/trunk/lib/htmldriver/Graph_Set.c	2011-07-05 10:13:07 UTC (rev 46983)
@@ -15,6 +15,8 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
+#include <grass/glocale.h>
+
 #include "driverlib.h"
 #include "driver.h"
 #include "htmlmap.h"
@@ -92,8 +94,9 @@
     }
 
 
-    G_message("HTMLMAP: collecting to file: %s\n width = %d, height = %d, ",
-	      file_name, screen_width, screen_height);
+    G_verbose_message(_("html: collecting to file '%s'"), file_name);
+    G_verbose_message(_("html: image size %dx%d"),
+		      screen_width, screen_height);
 
     /*
      * check type of map wanted
@@ -102,27 +105,24 @@
     if (NULL == (p = getenv("GRASS_HTMLTYPE"))) {
 	p = "CLIENT";
     }
-
+    
     if (strcmp(p, "APACHE") == 0) {
 	html.type = APACHE;
-	fprintf(stdout, "type = APACHE\n");
-
+	G_verbose_message(_("html: type '%s'"), "apache");
     }
     else if (strcmp(p, "RAW") == 0) {
 	html.type = RAW;
-	fprintf(stdout, "type = RAW\n");
-
+	G_verbose_message(_("html: type '%s'"), "raw");
     }
     else {
 	html.type = CLIENT;
-	fprintf(stdout, "type = CLIENT\n");
+	G_verbose_message(_("html: type '%s'"), "client");
     }
 
-
     /*
      * initialize text memory and list pointers
      */
-
+    
     html.last_text = (char *)G_malloc(INITIAL_TEXT + 1);
     html.last_text[0] = '\0';
     html.last_text_len = INITIAL_TEXT;



More information about the grass-commit mailing list