Windows: the .hp file is <prog>.exe.hp
authorSimon Marlow <simonmar@microsoft.com>
Wed, 28 Feb 2007 12:03:19 +0000 (12:03 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 28 Feb 2007 12:03:19 +0000 (12:03 +0000)
utils/hp2ps/Main.c

index eb50e00..53f010b 100644 (file)
@@ -145,8 +145,12 @@ nextarg: ;
     if (!filter) {
        pathName = copystring(argv[0]);
        DropSuffix(pathName, ".hp");
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
+       DropSuffix(pathName, ".exe");
+        pathName = copystring2(pathName,".exe");
+#endif
        baseName = copystring(Basename(pathName));
-
+        
         hpfp  = Fp(pathName, &hpfile, ".hp", "r"); 
        psfp  = Fp(baseName, &psfile, ".ps", "w");