+ char *p;
+ char *q;
+
+ /* Ignore old_name, and get our actual location from the OS. */
+ if (!GetModuleFileName (NULL, in_filename, MAX_PATH))
+ abort ();
+ dostounix_filename (in_filename);
+ strcpy (out_filename, in_filename);
+
+ /* Change the base of the output filename to match the requested name. */
+ if ((p = strrchr (out_filename, '/')) == NULL)
+ abort ();
+ /* The filenames have already been expanded, and will be in Unix
+ format, so it is safe to expect an absolute name. */
+ if ((q = strrchr (new_name, '/')) == NULL)
+ abort ();
+ strcpy (p, q);