From 1ae15ca957efa0f7e88ec37f3510b34e5ad0e06c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Dec 2011 14:45:41 +0000 Subject: [PATCH] -LRN: add docdir to installation get path --- src/include/gnunet_os_lib.h | 14 ++++++++++---- src/util/os_installation.c | 5 +++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index ff324e18a..944713606 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h @@ -66,12 +66,12 @@ enum GNUNET_OS_InstallationPathKind GNUNET_OS_IPK_BINDIR, /** - * Return the directory where libraries are installed. (lib/) + * Return the directory where libraries are installed. (lib/gnunet/) */ GNUNET_OS_IPK_LIBDIR, /** - * Return the directory where data is installed (share/) + * Return the directory where data is installed (share/gnunet/) */ GNUNET_OS_IPK_DATADIR, @@ -88,9 +88,15 @@ enum GNUNET_OS_InstallationPathKind GNUNET_OS_IPK_SELF_PREFIX, /** - * Return the prefix of the path with application icons. + * Return the prefix of the path with application icons (share/icons/). */ - GNUNET_OS_IPK_ICONDIR + GNUNET_OS_IPK_ICONDIR, + + /** + * Return the prefix of the path with documentation files, including the + * license (share/doc/gnunet/). + */ + GNUNET_OS_IPK_DOCDIR }; diff --git a/src/util/os_installation.c b/src/util/os_installation.c index a7a6ae915..c5cf1ccb3 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -421,6 +421,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) dirname = DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "icons" DIR_SEPARATOR_STR; break; + case GNUNET_OS_IPK_DOCDIR: + dirname = + DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "doc" DIR_SEPARATOR_STR \ + "gnunet" DIR_SEPARATOR_STR; + break; default: GNUNET_free (execpath); return NULL; -- 2.25.1