-----BEGIN PGP SIGNED MESSAGE-----

Attached is a patch for OpenVMS for xmame-0.78.1/src/unix/config.c

In OpenVMS, directorys can't begin with a "." so a directory like ".xmame"
is invalid (but you can have a file starting with a "." like ".cvspass")
and will return an error and things won't run :)

The patch just "#ifdef" all the paths for OpenVMS to remove the leading
"." so instead of ".xmame" on OpenVMS we have just "xmame".

===========================================================================

- --- [.xmame-0_78_1.src.unix]config.c  Fri Dec 26 18:29:16 2003
+++ [.xmame.xmame-0_78_1.src.unix]config.c      Thu Jan 15 16:31:33 2004
@@ -275,39 +275,75 @@
                return OSD_NOT_OK;
 
        /* check that the required dirs exist, and create them if necessary */
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s", home_dir, NAME);
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s", home_dir, NAME);
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "cfg");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "cfg");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "mem");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "mem");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "sta");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "sta");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "nvram");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "nvram");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "diff");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "diff");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "rc");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "rc");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "hi");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "hi");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
+#if defined(__DECC) && defined(VMS)
+       snprintf(buffer, BUF_SIZE, "%s/%s/%s", home_dir, NAME, "inp");
+#else
        snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "inp");
+#endif
        if (check_and_create_dir(buffer))
                return OSD_NOT_OK;
 
@@ -322,13 +358,21 @@
                snprintf(buffer, BUF_SIZE, "%s/%src", XMAMEROOT, NAME);
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
+#if defined(__DECC) && defined(VMS)
+               snprintf(buffer, BUF_SIZE, "%s/%s/%src", home_dir, NAME, NAME);
+#else
                snprintf(buffer, BUF_SIZE, "%s/.%s/%src", home_dir, NAME, NAME);
+#endif
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
                snprintf(buffer, BUF_SIZE, "%s/%s-%src", XMAMEROOT, NAME, 
DISPLAY_METHOD);
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
+#if defined(__DECC) && defined(VMS)
+               snprintf(buffer, BUF_SIZE, "%s/%s/%s-%src", home_dir, NAME, NAME,
+#else
                snprintf(buffer, BUF_SIZE, "%s/.%s/%s-%src", home_dir, NAME, NAME,
+#endif
                                DISPLAY_METHOD);
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
@@ -536,7 +580,11 @@
                                drivers[game_index]->name);
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
+#if defined(__DECC) && defined(VMS)
+               snprintf(buffer, BUF_SIZE, "%s/%s/rc/%src", home_dir, NAME,
+#else
                snprintf(buffer, BUF_SIZE, "%s/.%s/rc/%src", home_dir, NAME,
+#endif
                                drivers[game_index]->name);
                if(rc_load(rc, buffer, 1, 1))
                        return OSD_NOT_OK;
@@ -672,15 +720,27 @@
        fprintf(stdout_file, "Config Files are parsed in the following order:\n");
        fprint_columns(stdout_file, XMAMEROOT"/"NAME"rc",
                        "Global configuration config file");
+#if defined(__DECC) && defined(VMS)
+       fprint_columns(stdout_file, "${HOME}/"NAME"/"NAME"rc",
+#else
        fprint_columns(stdout_file, "${HOME}/."NAME"/"NAME"rc",
+#endif
                        "User configuration config file");
        fprint_columns(stdout_file, XMAMEROOT"/"NAME"-"DISPLAY_METHOD"rc",
                        "Global per display method config file");
+#if defined(__DECC) && defined(VMS)
+       fprint_columns(stdout_file, "${HOME}/"NAME"/"NAME"-"DISPLAY_METHOD"rc",
+#else
        fprint_columns(stdout_file, "${HOME}/."NAME"/"NAME"-"DISPLAY_METHOD"rc",
+#endif
                        "User per display method config file");
        fprint_columns(stdout_file, XMAMEROOT"/rc/<game>rc",
                        "Global per game config file");
+#if defined(__DECC) && defined(VMS)
+       fprint_columns(stdout_file, "${HOME}/"NAME"/rc/<game>rc",
+#else
        fprint_columns(stdout_file, "${HOME}/."NAME"/rc/<game>rc",
+#endif
                        "User per game config file");
        /*  fprintf(stdout_file, "\nEnvironment variables:\n\n");
            fprint_columns(stdout_file, "ROMPATH", "Rom search path"); */

===========================================================================


 +------------------+--------------------------+---------------+
 | 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

iQEVAwUBQAhWsqVSqzlBVJbBAQGyzAgA32OsEDVyav1udCof8HcJIbcOydi525wC
4e7TbMLgBbKTStA/exmmzehNfssewF9UL9IiQoFlDPsH0Sr4U2oATACOBNWYU+22
oU1nz3TLLjKj1jNl9TBDFxaPs61DcL8YArB8NZC9ii23a7DSdwylE+8673FhsF6U
t2KlFU5NYGz99fGcKqHHCnpRO7RnB+N8X78nGi3/AxxjdTAWBWi0MVIgQ9a8qfxq
YvRu/DdW+eianZn0uxl73NCbbpGx9LpxnNwi+zFpCCQ8ucsIn855TdudfP4ZEpnZ
YqzQQW/vDayivNIqTjiQ8wWSkFWJaEwFfDra0XRiw4t6owFWG6Smcw==
=CNA5
-----END PGP SIGNATURE-----

_______________________________________________
Xmame mailing list
[EMAIL PROTECTED]
http://toybox.twisted.org.uk/mailman/listinfo/xmame

Reply via email to