From a72b46c3b38827e00e91d288c527b19a2839cd40 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Wed, 9 Oct 2013 22:00:55 -0600
Subject: Find the appropriate location for jedrc on Haiku.


diff --git a/src/keyparse.c b/src/keyparse.c
index 7c46911..c49a200 100644
--- a/src/keyparse.c
+++ b/src/keyparse.c
@@ -31,7 +31,12 @@
 #  define MOST_SYSTEM_INITFILE "/etc/most.conf"
 # endif
 #endif
-  
+
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#include <fs_info.h>
+#endif
+
 /* parses user key definition file */
 
 /* The file is assumed to have a simple format:
@@ -155,6 +160,13 @@ int most_load_user_keymaps (void)
      {
 #ifdef VMS
 	file = "SYS$LOGIN:MOST.RC";
+#elif defined(__HAIKU__)
+	char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH];
+	if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, buffer, sizeof(buffer)) != B_OK)
+	  return -1;
+
+	strcat(buffer, "/mostrc");
+	file = strdup(buffer);
 #else
 	*filebuf = 0;
 	file = getenv ("HOME");
-- 
1.8.3.4


From e39e512ff58d26d0108d91b743c7d690203180ff Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Fri, 11 Oct 2013 00:42:38 -0600
Subject: Change install location for docs and man pages


diff --git a/src/Makefile.in b/src/Makefile.in
index 968105c..b9481dd 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -22,8 +22,8 @@ prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 datarootdir	= @datarootdir@
 BIN_DIR		= $(prefix)/bin
-MAN_DIR		= $(datarootdir)/man
-DOC_DIR		= $(datarootdir)/doc/most
+MAN_DIR		= @mandir@
+DOC_DIR		= @docdir@
 SYS_INITFILE	= @sysconfdir@/most.conf
 MKINSDIR	= ../autoconf/mkinsdir.sh
 
-- 
1.8.3.4

