Author: sveinung
Date: Thu Aug 27 12:19:27 2015
New Revision: 29692

URL: http://svn.gna.org/viewcvs/freeciv?rev=29692&view=rev
Log:
freeciv-manual: wiki markup isn't html

Don't use the html file extension on generated wiki markup files.

See patch #6291

Modified:
    trunk/tools/civmanual.c

Modified: trunk/tools/civmanual.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/civmanual.c?rev=29692&r1=29691&r2=29692&view=diff
==============================================================================
--- trunk/tools/civmanual.c     (original)
+++ trunk/tools/civmanual.c     Thu Aug 27 12:19:27 2015
@@ -83,6 +83,7 @@
 
 /* This formats the manual for an HTML wiki. */
 #ifdef MANUAL_USE_HTML
+#define FILE_EXT "html"
 #define HEADER "<html><head><link rel=\"stylesheet\" type=\"text/css\" "\
                "href=\"manual.css\"/><meta http-equiv=\"Content-Type\" "\
                "content=\"text/html; charset=UTF-8\"/></head><body>\n\n"
@@ -93,6 +94,7 @@
 #define SEPARATOR " "
 #define TAIL "</body></html>"
 #else  /* MANUAL_USE_HTML */
+#define FILE_EXT "mediawiki"
 #define HEADER " "
 #define SECTION_BEGIN "==="
 #define SECTION_END "==="
@@ -149,7 +151,7 @@
 }
 
 /**************************************************************************
-  Write a server manual in html format, then quit.
+  Write a server manual in the format chosen at build time, then quit.
 **************************************************************************/
 static bool manual_command(void)
 {
@@ -174,7 +176,8 @@
     int i;
     int ri;
 
-    fc_snprintf(filename, sizeof(filename), "%s%d.html", 
game.server.rulesetdir, manuals + 1);
+    fc_snprintf(filename, sizeof(filename), "%s%d.%s",
+                game.server.rulesetdir, manuals + 1, FILE_EXT);
 
     if (!is_reg_file_for_access(filename, TRUE)
         || !(doc = fc_fopen(filename, "w"))) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to