$OpenBSD$
--- Source_Files/shell.cpp.orig	Wed Jan 16 19:35:19 2008
+++ Source_Files/shell.cpp	Sat Apr 26 13:40:39 2008
@@ -176,7 +176,7 @@ static void usage(const char *prg_name)
 #endif
 	  "\t[-s | --nosound]       Do not access the sound card\n"
 	  "\t[-m | --nogamma]       Disable gamma table effects (menu fades)\n"
-#if defined(unix) || defined(__BEOS__) || defined(__WIN32__) || defined(__NetBSD__)
+#if defined(unix) || defined(__BEOS__) || defined(__WIN32__) || defined(__NetBSD__) || defined(__OpenBSD__)
 	  "\nYou can use the ALEPHONE_DATA environment variable to specify\n"
 	  "the data directory.\n"
 #endif
@@ -287,7 +287,7 @@ static void initialize_application(void)
 	// Find data directories, construct search path
 	DirectorySpecifier default_data_dir;
 
-#if defined(unix) || defined(__NetBSD__)
+#if defined(unix) || defined(__NetBSD__) || defined(__OpenBSD__)
 
 	default_data_dir = PKGDATADIR;
 	const char *home = getenv("HOME");
@@ -352,6 +352,9 @@ static void initialize_application(void)
 #endif
 
 	const char *data_env = getenv("ALEPHONE_DATA");
+	/* If the env variable is not set, use the current directory */
+	if (!data_env)
+		data_env = getcwd(NULL, (size_t)0);
 	if (data_env) {
 		// Read colon-separated list of directories
 		string path = data_env;
