[GRASS-SVN] r52461 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 27 01:04:47 PDT 2012
Author: lucadelu
Date: 2012-07-27 01:04:47 -0700 (Fri, 27 Jul 2012)
New Revision: 52461
Modified:
grass/trunk/lib/gis/parser_rest.c
Log:
fix comment change // to /*
Modified: grass/trunk/lib/gis/parser_rest.c
===================================================================
--- grass/trunk/lib/gis/parser_rest.c 2012-07-27 06:37:16 UTC (rev 52460)
+++ grass/trunk/lib/gis/parser_rest.c 2012-07-27 08:04:47 UTC (rev 52461)
@@ -5,10 +5,13 @@
#include "parser_local_proto.h"
#include "string.h"
-// static void print_escaped_for_html(FILE * f, const char *str);
-// static void print_escaped_for_html_options(FILE * f, const char *str);
/*!
+static void print_escaped_for_html(FILE * f, const char *str);
+static void print_escaped_for_html_options(FILE * f, const char *str);
+*/
+
+/*!
\brief Print module usage description in HTML format.
*/
void G__usage_rest(void)
@@ -43,7 +46,7 @@
fprintf(stdout," :alt: GRASS logo\n\n");
fprintf(stdout,"%s\n----\n", _("NAME"));
- fprintf(stdout, "**%s**", st->pgm_name); //TODO fix bold + emphase now only bold
+ fprintf(stdout, "**%s**", st->pgm_name); /*! TODO fix bold + emphase now only bold */
if (st->module_info.label || st->module_info.description)
fprintf(stdout, " - ");
@@ -200,14 +203,14 @@
if (opt->options) {
fprintf(stdout, " %s: *", _("Options"));
-// print_escaped_for_html_options(stdout, opt->options);
+ /*! print_escaped_for_html_options(stdout, opt->options); */
fprintf(stdout, "%s", opt->options);
fprintf(stdout, "*\n");
}
if (opt->def) {
fprintf(stdout, " %s: *", _("Default"));
-// print_escaped_for_html(stdout, opt->def);
+ /*! print_escaped_for_html(stdout, opt->def); */
fprintf(stdout,"%s", opt->def);
fprintf(stdout, "*\n");
}
@@ -218,10 +221,10 @@
while (opt->opts[i]) {
if (opt->descs[i]) {
fprintf(stdout, " **");
-// print_escaped_for_html(stdout, opt->opts[i]);
+ /*! print_escaped_for_html(stdout, opt->opts[i]); */
fprintf(stdout,"%s", opt->opts[i]);
fprintf(stdout, "**: ");
-// print_escaped_for_html(stdout, opt->descs[i]);
+ /*! print_escaped_for_html(stdout, opt->descs[i]); */
fprintf(stdout, "%s\n", opt->descs[i]);
}
i++;
@@ -239,40 +242,41 @@
/*!
* \brief Format text for HTML output
- */
+
#define do_escape(c,escaped) case c: fputs(escaped,f);break
-// void print_escaped_for_html(FILE * f, const char *str)
-// {
-// const char *s;
-//
-// for (s = str; *s; s++) {
-// switch (*s) {
-// do_escape('&', "&");
-// do_escape('<', "<");
-// do_escape('>', ">");
-// do_escape('\n', "<br>");
-// do_escape('\t', " ");
-// default:
-// fputc(*s, f);
-// }
-// }
-// }
-//
-// void print_escaped_for_html_options(FILE * f, const char *str)
-// {
-// const char *s;
-//
-// for (s = str; *s; s++) {
-// switch (*s) {
-// do_escape('&', "&");
-// do_escape('<', "<");
-// do_escape('>', ">");
-// do_escape('\n', "<br>");
-// do_escape('\t', " ");
-// do_escape(',', ", ");
-// default:
-// fputc(*s, f);
-// }
-// }
-// }
+ void print_escaped_for_html(FILE * f, const char *str)
+ {
+ const char *s;
+
+ for (s = str; *s; s++) {
+ switch (*s) {
+ do_escape('&', "&");
+ do_escape('<', "<");
+ do_escape('>', ">");
+ do_escape('\n', "<br>");
+ do_escape('\t', " ");
+ default:
+ fputc(*s, f);
+ }
+ }
+ }
+
+ void print_escaped_for_html_options(FILE * f, const char *str)
+ {
+ const char *s;
+
+ for (s = str; *s; s++) {
+ switch (*s) {
+ do_escape('&', "&");
+ do_escape('<', "<");
+ do_escape('>', ">");
+ do_escape('\n', "<br>");
+ do_escape('\t', " ");
+ do_escape(',', ", ");
+ default:
+ fputc(*s, f);
+ }
+ }
+ }
+*/
#undef do_escape
More information about the grass-commit
mailing list