Author: sveinung Date: Thu Oct 13 12:10:56 2016 New Revision: 34112 URL: http://svn.gna.org/viewcvs/freeciv?rev=34112&view=rev Log: freeciv-manual: split the item separator.
Replace SEPARATOR with ITEM_BEGIN and ITEM_END. Use the div tag to separate the items in the HTML output. See patch #7817 Modified: trunk/tools/civmanual.c Modified: trunk/tools/civmanual.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/civmanual.c?rev=34112&r1=34111&r2=34112&view=diff ============================================================================== --- trunk/tools/civmanual.c (original) +++ trunk/tools/civmanual.c Thu Oct 13 12:10:56 2016 @@ -94,7 +94,8 @@ #define SECTION_END "</h3>" #define IMAGE_BEGIN "<img src=\"" #define IMAGE_END ".png\">" -#define SEPARATOR " " +#define ITEM_BEGIN "<div class='item'>\n" +#define ITEM_END "</div>\n" #define TAIL "</body></html>" #else /* MANUAL_USE_HTML */ #define FILE_EXT "mediawiki" @@ -105,7 +106,8 @@ #define SECTION_END "===" #define IMAGE_BEGIN "[[Image:" #define IMAGE_END ".png]]" -#define SEPARATOR "----\n\n" +#define ITEM_BEGIN "----\n\n" +#define ITEM_END "\n" #define TAIL " " #endif /* MANUAL_USE_HTML */ @@ -244,7 +246,7 @@ char buf[256]; const char *sethelp; - fprintf(doc, SEPARATOR); + fprintf(doc, ITEM_BEGIN); fprintf(doc, "%s%s - %s%s\n\n", SECTION_BEGIN, setting_name(pset), _(setting_short_help(pset)), SECTION_END); sethelp = _(setting_extra_help(pset, TRUE)); @@ -316,6 +318,8 @@ fprintf(doc, _("<p class=\"changed\">Value set to %s</p>\n\n"), setting_value_name(pset, TRUE, buf, sizeof(buf))); } + + fprintf(doc, ITEM_END); } settings_iterate_end; break; @@ -325,7 +329,7 @@ for (i = 0; i < CMD_NUM; i++) { const struct command *cmd = command_by_number(i); - fprintf(doc, SEPARATOR); + fprintf(doc, ITEM_BEGIN); fprintf(doc, "%s%s - %s%s\n\n", SECTION_BEGIN, command_name(cmd), command_short_help(cmd), SECTION_END); if (command_synopsis(cmd)) { @@ -352,6 +356,8 @@ FC_FREE(help); } } + + fprintf(doc, ITEM_END); } break; @@ -546,6 +552,8 @@ TITLE_BEGIN, VERSION_STRING, TITLE_END); unit_type_iterate(putype) { char buf[64000]; + + fprintf(doc, ITEM_BEGIN); fprintf(doc, "%s%s%s\n\n", SECTION_BEGIN, utype_name_translation(putype), SECTION_END); fprintf(doc, @@ -569,7 +577,7 @@ putype->hp); helptext_unit(buf, sizeof(buf), NULL, "", putype); fprintf(doc, "%s", buf); - fprintf(doc, SEPARATOR); + fprintf(doc, ITEM_END); } unit_type_iterate_end; break; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits