-----BEGIN PGP SIGNED MESSAGE-----
Attached is a diff patch that fixes the user home directory problem on
OpenVMS.
In OpenVMS the routine rc_get_home_dir, the user's home directory is
returned in OpenVMS format, which causes some problems in XMAME/XMESS.
Since OpenVMS can handle Unix style directory and file paths, I've added a
little routine to convert the user's home directory from OpenVMS format
into Unix format solving the problem.
I'm still having trouble loading ROM's and BIOS's. Under XMESS I can run
stuff that dosen't require a BIOS like the Atari 2600 no problem, but
anything else it says it can't find the BIOS files or ROMS.
I'm still working on this problem.
===========================================================================
- --- ./xmame-0.77.1/src/unix/sysdep/rc.c Thu Nov 13 00:06:05 2003
+++ rc.c Sat Dec 27 10:09:12 2003
@@ -29,6 +29,13 @@
-Reworked and cleaned up the interface, broke backward compatibility (Hans
de Goede)
*/
+
+/*
+ * Modification For OpenVMS By: Robert Alan Byer
+ * [EMAIL PROTECTED]
+ * December 21, 2003
+ */
+
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
@@ -40,6 +47,12 @@
#include "rc_priv.h"
#include "misc.h"
+#if defined(__DECC) && defined(VMS)
+#include <unixlib.h>
+static char *vms_to_unix_buffer = NULL;
+static int convert_vms_to_unix(char *vms_dir_name);
+#endif
+
/* private variables */
static int rc_requires_arg[] = {0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0 };
@@ -830,9 +843,40 @@
fprintf(stderr, "error: malloc faild for homedir string\n");
return NULL;
}
+
+/*
+ * Convert The OpenVMS Formatted "$HOME" Directory Path Into Unix Format.
+ */
+#if defined(__DECC) && defined(VMS)
+ vms_to_unix_buffer = NULL;
+ decc$from_vms(pw->pw_dir, convert_vms_to_unix, 1);
+ return vms_to_unix_buffer;
+}
+
+/*
+ * Copy The Converted OpenVMS Directory Into Our "vms_to_unix_buffer" For Use.
+ *
+ */
+static int convert_vms_to_unix(char *vms_dir_name)
+{
+ if (vms_to_unix_buffer)
+ {
+ strcpy(vms_to_unix_buffer,vms_dir_name);
+ }
+ else
+ {
+ vms_to_unix_buffer = strdup(vms_dir_name);
+ }
+ return 0;
+}
+
+#else
+
strcpy(s, pw->pw_dir);
return s;
+
}
+#endif
/*
* check and if nescesarry create dir
===========================================================================
+------------------+--------------------------+---------------+
| Robert Alan Byer | [EMAIL PROTECTED] | ICQ #65926579 |
+------------------+--------------------------+---------------+
| Send an E-mail request to obtain a copy of my PGP key. |
+-------------------------------------------------------------+
| "It is by caffeine alone I set my mind in motion. It is by |
| cans of cola the thoughts aquire speed, the hands acquire |
| shakes, the shakes become a warning. It is by caffeine |
| alone I set my mind in motion." |
+-------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
iQEVAwUBP+2mnKVSqzlBVJbBAQG8QQgAsx9yp0NtxFz59MeWOoBt1dP1UzGB7SBb
Nzq8yMO+GEGvTVAbv8ppUT4dsv8Vrs9s0wISydaC92Qj/SaL44QfUmLFeDouOi8d
XZbNji99fX83KGLYBkz2lrf1C1om5M6VI47OyEgiugWADi7oui+PziSIwAfQo+n/
gnTm3UU3oAgE41fge5PK+wfN3ATirXaYhIL1abDAnhLCOPQmNE4XgcviBfSiwthm
tlvdU6y6g9kIUxUNf9pBsN6emFhuMxlaELrROIypwsLMc/owlgkB6FgRaNGYYjiR
OEubM6AaSThs3hOOZa96N8B8o7pyeXDNG+/7oiifeN2B0mPPhDWLjA==
=1MCK
-----END PGP SIGNATURE-----
_______________________________________________
Xmame mailing list
[EMAIL PROTECTED]
http://toybox.twisted.org.uk/mailman/listinfo/xmame