All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower case
@ 2009-06-15  7:47 Andre Prendel
  2009-06-23 10:02 ` [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower Jean Delvare
  2009-06-23 12:04 ` Andre Prendel
  0 siblings, 2 replies; 3+ messages in thread
From: Andre Prendel @ 2009-06-15  7:47 UTC (permalink / raw)
  To: lm-sensors

This patch converts HTML code in the generated CGI script to lower
case. This makes us a bit more XHTML compatible.
---

 rrd.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Index: sensors/prog/sensord/rrd.c
=================================--- sensors.orig/prog/sensord/rrd.c	2009-06-09 20:31:13.000000000 +0200
+++ sensors/prog/sensord/rrd.c	2009-06-09 22:05:04.000000000 +0200
@@ -449,16 +449,16 @@
 {
 	int ret = 0, i;
 
-	printf("#!" RRDCGI "\n\n<HTML>\n"
-	       "<HEAD>\n<TITLE>sensord</TITLE>\n</HEAD>\n"
-	       "<BODY>\n<H1>sensord</H1>\n");
+	printf("#!" RRDCGI "\n\n<html>\n"
+	       "<head>\n<title>sensord</title>\n</head>\n"
+	       "<body>\n<h1>sensord</h1>\n");
 
 	for (i = 0; i < ARRAY_SIZE(graphs); i++) {
 		struct gr *graph = &graphs[i];
 
-		printf("<H2>%s</H2>\n", graph->h2);
-		printf("<P>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
-		       "<IMG SRC=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"
+		printf("<h2>%s</h2>\n", graph->h2);
+		printf("<p>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
+		       "<IMG src=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"
 		       "\n\t-a PNG\n\t-h 200 -w 800\n",
 		       sensord_args.cgiDir, graph->image);
 
@@ -473,7 +473,7 @@
 			ret = applyToFeatures(rrdCGI_LINE, graph);
 		if (!ret && sensord_args.doLoad && graph->loadAvg)
 			ret = rrdCGI_LINE(graph, LOADAVG, LOAD_AVERAGE, NULL);
-		printf (">\n</P>\n");
+		printf (">\n</p>\n");
 	}
 	printf("<p>\n<small><b>sensord</b> by "
 	       "<a href=\"mailto:merlin@merlin.org\">Merlin Hughes</a>"
@@ -481,7 +481,7 @@
 	       "<a href=\"http://www.lm-sensors.org/\">lm_sensors</a> "
 	       "crew.</small>\n</p>\n");
 
-	printf("</BODY>\n</HTML>\n");
+	printf("</body>\n</html>\n");
 
 	return ret;
 }

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower
  2009-06-15  7:47 [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower case Andre Prendel
@ 2009-06-23 10:02 ` Jean Delvare
  2009-06-23 12:04 ` Andre Prendel
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2009-06-23 10:02 UTC (permalink / raw)
  To: lm-sensors

On Mon, 15 Jun 2009 09:47:55 +0200, Andre Prendel wrote:
> This patch converts HTML code in the generated CGI script to lower
> case. This makes us a bit more XHTML compatible.
> ---
> 
>  rrd.c |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> Index: sensors/prog/sensord/rrd.c
> =================================> --- sensors.orig/prog/sensord/rrd.c	2009-06-09 20:31:13.000000000 +0200
> +++ sensors/prog/sensord/rrd.c	2009-06-09 22:05:04.000000000 +0200
> @@ -449,16 +449,16 @@
>  {
>  	int ret = 0, i;
>  
> -	printf("#!" RRDCGI "\n\n<HTML>\n"
> -	       "<HEAD>\n<TITLE>sensord</TITLE>\n</HEAD>\n"
> -	       "<BODY>\n<H1>sensord</H1>\n");
> +	printf("#!" RRDCGI "\n\n<html>\n"
> +	       "<head>\n<title>sensord</title>\n</head>\n"
> +	       "<body>\n<h1>sensord</h1>\n");
>  
>  	for (i = 0; i < ARRAY_SIZE(graphs); i++) {
>  		struct gr *graph = &graphs[i];
>  
> -		printf("<H2>%s</H2>\n", graph->h2);
> -		printf("<P>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
> -		       "<IMG SRC=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"
> +		printf("<h2>%s</h2>\n", graph->h2);
> +		printf("<p>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
> +		       "<IMG src=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"

Not sure why you didn't lowercase IMG, WIDTH and HEIGHT here?

>  		       "\n\t-a PNG\n\t-h 200 -w 800\n",
>  		       sensord_args.cgiDir, graph->image);
>  
> @@ -473,7 +473,7 @@
>  			ret = applyToFeatures(rrdCGI_LINE, graph);
>  		if (!ret && sensord_args.doLoad && graph->loadAvg)
>  			ret = rrdCGI_LINE(graph, LOADAVG, LOAD_AVERAGE, NULL);
> -		printf (">\n</P>\n");
> +		printf (">\n</p>\n");
>  	}
>  	printf("<p>\n<small><b>sensord</b> by "
>  	       "<a href=\"mailto:merlin@merlin.org\">Merlin Hughes</a>"
> @@ -481,7 +481,7 @@
>  	       "<a href=\"http://www.lm-sensors.org/\">lm_sensors</a> "
>  	       "crew.</small>\n</p>\n");
>  
> -	printf("</BODY>\n</HTML>\n");
> +	printf("</body>\n</html>\n");
>  
>  	return ret;
>  }

Otherwise it looks good.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower
  2009-06-15  7:47 [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower case Andre Prendel
  2009-06-23 10:02 ` [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower Jean Delvare
@ 2009-06-23 12:04 ` Andre Prendel
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Prendel @ 2009-06-23 12:04 UTC (permalink / raw)
  To: lm-sensors

On Tue, Jun 23, 2009 at 12:02:56PM +0200, Jean Delvare wrote:
> On Mon, 15 Jun 2009 09:47:55 +0200, Andre Prendel wrote:
> > This patch converts HTML code in the generated CGI script to lower
> > case. This makes us a bit more XHTML compatible.
> > ---
> > 
> >  rrd.c |   16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > Index: sensors/prog/sensord/rrd.c
> > =================================> > --- sensors.orig/prog/sensord/rrd.c	2009-06-09 20:31:13.000000000 +0200
> > +++ sensors/prog/sensord/rrd.c	2009-06-09 22:05:04.000000000 +0200
> > @@ -449,16 +449,16 @@
> >  {
> >  	int ret = 0, i;
> >  
> > -	printf("#!" RRDCGI "\n\n<HTML>\n"
> > -	       "<HEAD>\n<TITLE>sensord</TITLE>\n</HEAD>\n"
> > -	       "<BODY>\n<H1>sensord</H1>\n");
> > +	printf("#!" RRDCGI "\n\n<html>\n"
> > +	       "<head>\n<title>sensord</title>\n</head>\n"
> > +	       "<body>\n<h1>sensord</h1>\n");
> >  
> >  	for (i = 0; i < ARRAY_SIZE(graphs); i++) {
> >  		struct gr *graph = &graphs[i];
> >  
> > -		printf("<H2>%s</H2>\n", graph->h2);
> > -		printf("<P>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
> > -		       "<IMG SRC=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"
> > +		printf("<h2>%s</h2>\n", graph->h2);
> > +		printf("<p>\n<RRD::GRAPH %s/%s.png\n\t--imginfo '"
> > +		       "<IMG src=" WWWDIR "/%%s WIDTH=%%lu HEIGHT=%%lu>'"
> 
> Not sure why you didn't lowercase IMG, WIDTH and HEIGHT here?

I'm not sure whether rrdcgi expects only uppercase, because all the
rrdcgi stuff is uppercase. Will check this and send an updated patch.

> >  		       "\n\t-a PNG\n\t-h 200 -w 800\n",
> >  		       sensord_args.cgiDir, graph->image);
> >  
> > @@ -473,7 +473,7 @@
> >  			ret = applyToFeatures(rrdCGI_LINE, graph);
> >  		if (!ret && sensord_args.doLoad && graph->loadAvg)
> >  			ret = rrdCGI_LINE(graph, LOADAVG, LOAD_AVERAGE, NULL);
> > -		printf (">\n</P>\n");
> > +		printf (">\n</p>\n");
> >  	}
> >  	printf("<p>\n<small><b>sensord</b> by "
> >  	       "<a href=\"mailto:merlin@merlin.org\">Merlin Hughes</a>"
> > @@ -481,7 +481,7 @@
> >  	       "<a href=\"http://www.lm-sensors.org/\">lm_sensors</a> "
> >  	       "crew.</small>\n</p>\n");
> >  
> > -	printf("</BODY>\n</HTML>\n");
> > +	printf("</body>\n</html>\n");
> >  
> >  	return ret;
> >  }
> 
> Otherwise it looks good.
> 
> -- 
> Jean Delvare

Thanks,
Andre

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-23 12:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15  7:47 [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower case Andre Prendel
2009-06-23 10:02 ` [lm-sensors] [PATCH 2/5] sensord: Convert CGI script to lower Jean Delvare
2009-06-23 12:04 ` Andre Prendel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.