tGetDocIndex() function added, to return the URL of the locally-installed HTML documentation - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit a0831a1eb64a537baf102ef17d48d4001730b4bf
(DIR) parent 595f93c2d9494c8687cde117f26f0d2ad609b169
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Mon, 25 Feb 2002 18:43:19 +0000
GetDocIndex() function added, to return the URL of the locally-installed
HTML documentation
Diffstat:
M src/dopewars.c | 20 ++++++++++++++++++++
M src/dopewars.h | 1 +
2 files changed, 21 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/dopewars.c b/src/dopewars.c
t@@ -2249,6 +2249,26 @@ gboolean SetConfigValue(int GlobalIndex, int StructIndex,
return TRUE;
}
+/*
+ * Returns the URL of the index file for the local HTML documentation.
+ */
+gchar *GetDocIndex(void)
+{
+ static gchar *indexfile = "index.html";
+ gchar *path;
+#ifdef CYGWIN
+ gchar *bindir;
+
+ bindir = GetBinaryDir();
+ path = g_strdup_printf("file://%s\\%s", bindir, indexfile);
+ g_free(bindir);
+#else
+ path = g_strdup_printf("file://%s/doc/%s-%s/%s", DATADIR, PACKAGE,
+ VERSION, indexfile);
+#endif
+ return path;
+}
+
/*
* Sets up data - such as the location of the high score file - to
* hard-coded internal values, and then processes the global and
(DIR) diff --git a/src/dopewars.h b/src/dopewars.h
t@@ -421,4 +421,5 @@ void CloseLog(void);
gboolean IsConnectedPlayer(Player *play);
void BackupConfig(void);
void WriteConfigFile(void);
+gchar *GetDocIndex(void);
#endif