Changeset 888
- Timestamp:
- Dec 22, 2007, 11:02:11 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r882 r888 2 2 3 3 3.09(pre) 4 o Make WPURLDEFAULTSETTINGS the fall back for ftp/httprun (Gregg) 4 5 o Update CopyPresParams to copy all types of pres parameters (Gregg) 5 6 o Add "Save as" menu item to internal viewer (Gregg) -
trunk/dll/arccnrs.c
r872 r888 194 194 if (*binview) 195 195 ExecOnList((HWND) 0, binview, WINDOWED | SEPARATE, NULL, list, 196 NULL );196 NULL, pszSrcFile, __LINE__); 197 197 else 198 198 StartMLEEditor(HWND_DESKTOP, 16 + 4 + 1, ad->arcname, hwnd); … … 201 201 if (*viewer) { 202 202 ExecOnList((HWND) 0, viewer, WINDOWED | SEPARATE | 203 204 NULL, list, NULL);203 (fViewChild ? CHILD : 0), 204 NULL, list, NULL, pszSrcFile, __LINE__); 205 205 } 206 206 else … … 213 213 ad = WinQueryWindowPtr(hwnd, QWL_USER); 214 214 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 215 hwnd, NULL, NULL,215 hwnd, pszSrcFile, __LINE__, NULL, NULL, 216 216 "%s %s", 217 217 ad->info->test, 218 218 BldQuotedFileName(szQuotedArcName, ad->arcname)); 219 // runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED,220 // hwnd, NULL, NULL, "%s %s%s%s", ad->info->test,221 // needs_quoting(ad->arcname) ? "\"" : NullStr,222 // ad->arcname,223 // needs_quoting(ad->arcname) ? "\"" : NullStr);224 219 break; 225 220 } … … 544 539 p = GetCmdSpec(TRUE); 545 540 runemf2(SEPARATE | INVISIBLE | MINIMIZED | BACKGROUND | WAIT, 546 hwndCnr, NULL, "DOS_BACKGROUND_EXECUTION=1",541 hwndCnr, pszSrcFile, __LINE__, NULL, "DOS_BACKGROUND_EXECUTION=1", 547 542 "%s /C %s %s >%s", 548 543 p, // shell … … 550 545 BldQuotedFileName(s, arcname), 551 546 arctemp); 552 // runemf2(SEPARATE | INVISIBLE | MINIMIZED | BACKGROUND | WAIT,553 // hwndCnr,554 // NULL,555 // "DOS_BACKGROUND_EXECUTION=1",556 // "%s /C %s %s%s%s > %s",557 // p,558 // info->list,559 // needs_quoting(arcname) ? "\"" : NullStr,560 // arcname,561 // needs_quoting(arcname) ? "\"" : NullStr,562 // arctemp);563 547 } 564 548 else { … … 586 570 else { 587 571 runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 588 hwndCnr, NULL, NULL,572 hwndCnr, pszSrcFile, __LINE__, NULL, NULL, 589 573 "%s %s", 590 574 info->list, 591 575 BldQuotedFileName(s, arcname)); 592 // runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT,593 // hwndCnr, NULL, NULL, "%s %s%s%s", info->list,594 // needs_quoting(arcname) ? "\"" : NullStr,595 // arcname,596 // needs_quoting(arcname) ? "\"" : NullStr);597 576 oldstdout = fileno(stdout); 598 577 DosError(FERR_DISABLEHARDERR); … … 1386 1365 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"%s %s %s\r[%s]",dcd->info->extract,dcd->arcname,membername,construct); 1387 1366 runemf2(SEPARATE | WINDOWED | WAIT | 1388 1389 dcd->hwndClient, construct, NULL,1367 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1368 dcd->hwndClient, pszSrcFile, __LINE__, construct, NULL, 1390 1369 "%s %s %s", 1391 1370 dcd->info->extract, 1392 1371 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1393 1372 BldQuotedFileName(szQuotedMemberName, membername)); 1394 // runemf2(SEPARATE | WINDOWED | WAIT |1395 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) |1396 // WAIT,1397 // dcd->hwndClient, construct, NULL, "%s %s%s%s %s%s%s",1398 // dcd->info->extract,1399 // needs_quoting(dcd->arcname) ? "\"" : NullStr,1400 // dcd->arcname,1401 // needs_quoting(dcd->arcname) ? "\"" : NullStr,1402 // needs_quoting(membername) ? "\"" : NullStr,1403 // membername,1404 // needs_quoting(membername) ? "\"" : NullStr);1405 1373 BldFullPathName(construct, construct, membername); 1406 // if (*construct && construct[strlen(construct) - 1] != '\\')1407 // strcat(construct, "\\");1408 // strcat(construct, membername);1409 1374 if (IsFile(construct) != -1) { 1410 1375 rename(construct, filename); … … 1522 1487 } 1523 1488 runemf2(SEPARATE | WINDOWED | WAIT | 1524 1525 dcd->hwndClient, dcd->workdir, NULL,1489 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1490 dcd->hwndClient, pszSrcFile, __LINE__, dcd->workdir, NULL, 1526 1491 "%s %s %s", 1527 1492 dcd->info->exwdirs ? dcd->info->exwdirs : … … 1529 1494 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1530 1495 BldQuotedFileName(szQuotedMemberName, s)); 1531 // runemf2(SEPARATE | WINDOWED |1532 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) |1533 // WAIT,1534 // dcd->hwndClient, dcd->workdir, NULL, "%s %s%s%s %s%s%s",1535 // dcd->info->exwdirs ? dcd->info->exwdirs :1536 // dcd->info->extract,1537 // needs_quoting(dcd->arcname) ? "\"" : NullStr,1538 // dcd->arcname,1539 // needs_quoting(dcd->arcname) ? "\"" : NullStr,1540 // needs_quoting(s) ? "\"" : NullStr,1541 // s,1542 // needs_quoting(s) ? "\"" : NullStr);1543 1496 if (!dcd->info->exwdirs) { 1544 1497 p = s; … … 1607 1560 1608 1561 BldQuotedFileName(szBuffer + strlen(szBuffer), ad.arcname); 1609 // if (needs_quoting(ad.arcname))1610 // strcat(szBuffer, "\"");1611 // strcat(szBuffer, ad.arcname);1612 // if (needs_quoting(ad.arcname))1613 // strcat(szBuffer, "\"");1614 1562 1615 1563 p = &szBuffer[strlen(szBuffer)]; // Remeber where archiver name ends … … 1619 1567 1620 1568 BldQuotedFileName(szBuffer + strlen(szBuffer), ad.mask.szMask); 1621 // if (needs_quoting(ad.mask.szMask))1622 // strcat(szBuffer, "\"");1623 // strcat(szBuffer, ad.mask.szMask);1624 // if (needs_quoting(ad.mask.szMask))1625 // strcat(szBuffer, "\"");1626 1569 } 1627 1570 strcat(szBuffer, " "); … … 1632 1575 1633 1576 if (IsFile(li->list[x])) 1634 1577 BldQuotedFileName(szBuffer + strlen(szBuffer), li->list[x]); 1635 1578 else 1636 BldQuotedFullPathName(szBuffer + strlen(szBuffer), li->list[x], "*"); 1637 1638 // if (needs_quoting(li->list[x])) 1639 // strcat(szBuffer, "\""); 1640 // strcat(szBuffer, li->list[x]); 1641 // if (!IsFile(li->list[x])) { 1642 // if (szBuffer[strlen(szBuffer) - 1] != '\\') 1643 // strcat(szBuffer, "\\"); 1644 // strcat(szBuffer, "*"); 1645 // } 1646 // if (needs_quoting(li->list[x])) 1647 // strcat(szBuffer, "\""); 1579 BldQuotedFullPathName(szBuffer + strlen(szBuffer), li->list[x], "*"); 1648 1580 1649 1581 x++; … … 1651 1583 strlen(li->list[x]) + 5 > 1024) { 1652 1584 runemf2(SEPARATE | WINDOWED | 1653 1654 WAIT,1655 hwnd,NULL, NULL, "%s", szBuffer);1585 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1586 WAIT, hwnd, pszSrcFile, __LINE__, 1587 NULL, NULL, "%s", szBuffer); 1656 1588 *p = 0; 1657 1589 } … … 1703 1635 strcat(cl, " "); 1704 1636 BldQuotedFileName(cl + strlen(cl), dcd->arcname); 1705 // if (li->type == IDM_DELETE)1706 // sprintf(cl, "%s %s%s%s", dcd->info->delete,1707 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr,1708 // dcd->arcname,1709 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr);1710 // else1711 // sprintf(cl, "%s %s%s%s", dcd->info->create,1712 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr,1713 // dcd->arcname,1714 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr);1715 1637 endofit = &cl[strlen(cl)]; 1716 1638 z = 0; 1717 1639 do { 1718 1640 for (x = z; li->list[x] && 1719 1641 strlen(cl) + strlen(li->list[x]) < 999; x++) { 1720 1642 strcat(cl, " "); 1721 1643 BldQuotedFileName(cl + strlen(cl), li->list[x]); 1722 // if (needs_quoting(li->list[x]))1723 // strcat(cl, "\"");1724 // strcat(cl, li->list[x]);1725 // if (needs_quoting(li->list[x]))1726 // strcat(cl, "\"");1727 1644 } 1728 1645 z = x; 1729 1646 runemf2(SEPARATE | WINDOWED | WAIT | 1730 1731 hwnd, NullStr, NULL, "%s", cl);1647 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1648 hwnd, pszSrcFile, __LINE__, NullStr, NULL, "%s", cl); 1732 1649 *endofit = 0; 1733 1650 } while (li->list[x]); … … 1834 1751 strcat(cl, " "); 1835 1752 BldQuotedFileName(cl + strlen(cl), li->arcname); 1836 // sprintf(cl, "%s %s%s%s", (li->type == IDM_EXTRACT || 1837 // ((li->type == IDM_VIEW 1838 // || li->type == IDM_VIEWTEXT 1839 // || li->type == IDM_VIEWBINARY 1840 // || li->type == IDM_VIEWARCHIVE 1841 // || li->type == IDM_PRINT 1842 // || li->type == IDM_EDIT 1843 // || li->type == IDM_EDITTEXT 1844 // || li->type == IDM_EDITBINARY 1845 // && li->type == IDM_MCIPLAY) 1846 // && !li->info->exwdirs)) ? li->info-> 1847 // extract : li->info->exwdirs, 1848 // needs_quoting(li->arcname) ? "\"" : NullStr, 1849 // li->arcname, 1850 // needs_quoting(li->arcname) ? "\"" : NullStr); 1851 endofit = &cl[strlen(cl)]; 1852 z = 0; 1853 do { 1854 for (x = z; li->list[x] && 1753 endofit = &cl[strlen(cl)]; 1754 z = 0; 1755 do { 1756 for (x = z; li->list[x] && 1855 1757 strlen(cl) + strlen(li->list[x]) < 999; x++) { 1856 1758 strcat(cl, " "); 1857 1759 BldQuotedFileName(cl + strlen(cl), li->list[x]); 1858 // if (needs_quoting(li->list[x]))1859 // strcat(cl, "\"");1860 // strcat(cl, li->list[x]);1861 // if (needs_quoting(li->list[x]))1862 // strcat(cl, "\"");1863 1760 ptr = li->list[x]; 1864 1761 while (*ptr) { … … 1870 1767 z = x; 1871 1768 runemf2(SEPARATE | WINDOWED | 1872 1873 WAIT,1874 hwnd,li->targetpath, NULL, "%s", cl);1769 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1770 WAIT, hwnd, pszSrcFile, __LINE__, 1771 li->targetpath, NULL, "%s", cl); 1875 1772 *endofit = 0; 1876 1773 } while (li->list[x]); … … 1930 1827 WINDOWED | SEPARATEKEEP | PROMPT, 1931 1828 li->targetpath, 1932 NULL, GetPString(IDS_EXECARCFILETITLETEXT)); 1829 NULL, GetPString(IDS_EXECARCFILETITLETEXT), 1830 pszSrcFile, __LINE__); 1933 1831 else if (li->type == IDM_VIRUSSCAN) 1934 1832 ExecOnList(hwnd, virus, PROMPT | WINDOWED | SEPARATEKEEP, 1935 1833 li->targetpath, NULL, 1936 GetPString(IDS_VIRUSSCANARCHIVETITLETEXT)); 1834 GetPString(IDS_VIRUSSCANARCHIVETITLETEXT), 1835 pszSrcFile, __LINE__); 1937 1836 else if (li->type == IDM_VIEW || li->type == IDM_VIEWTEXT || 1938 1837 li->type == IDM_VIEWBINARY || li->type == IDM_EDIT || … … 2035 1934 bined), 2036 1935 WINDOWED | SEPARATE, li->targetpath, li->list, 2037 NULL );1936 NULL, pszSrcFile, __LINE__); 2038 1937 } 2039 1938 else { … … 2935 2834 if (dcd->info->extract) 2936 2835 runemf2(SEPARATE | WINDOWED | 2937 2938 hwnd, dcd->directory, NULL, "%s %s",2939 2836 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2837 hwnd, pszSrcFile, __LINE__, 2838 dcd->directory, NULL, "%s %s", dcd->info->extract, 2940 2839 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 2941 // runemf2(SEPARATE | WINDOWED |2942 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED),2943 // hwnd, dcd->directory, NULL, "%s %s%s%s",2944 // dcd->info->extract,2945 // needs_quoting(dcd->arcname) ? "\"" : NullStr,2946 // dcd->arcname,2947 // needs_quoting(dcd->arcname) ? "\"" : NullStr);2948 2840 if (SHORT1FROMMP(mp1) == IDM_ARCEXTRACTEXIT) 2949 2841 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 2954 2846 if (dcd->info->exwdirs) 2955 2847 runemf2(SEPARATE | WINDOWED | 2956 2957 hwnd, dcd->directory, NULL,2958 2848 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2849 hwnd, pszSrcFile, __LINE__, 2850 dcd->directory, NULL, "%s %s", 2959 2851 dcd->info->exwdirs, 2960 2852 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 2961 // runemf2(SEPARATE | WINDOWED |2962 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED),2963 // hwnd, dcd->directory, NULL, "%s %s%s%s",2964 // dcd->info->exwdirs,2965 // needs_quoting(dcd->arcname) ? "\"" : NullStr,2966 // dcd->arcname,2967 // needs_quoting(dcd->arcname) ? "\"" : NullStr);2968 2853 if (SHORT1FROMMP(mp1) == IDM_ARCEXTRACTWDIRSEXIT) 2969 2854 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 3033 2918 if (dcd->info->test) 3034 2919 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 3035 hwnd, NULL, NULL,2920 hwnd, pszSrcFile, __LINE__, NULL, NULL, 3036 2921 "%s %s",dcd->info->test, 3037 2922 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 3038 // runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED,3039 // hwnd, NULL, NULL, "%s %s%s%s",dcd->info->test,3040 // needs_quoting(dcd->arcname) ? "\"" : NullStr,3041 // dcd->arcname,3042 // needs_quoting(dcd->arcname) ? "\"" : NullStr);3043 2923 break; 3044 2924 -
trunk/dll/archive.c
r793 r888 264 264 *p = 0; 265 265 ExecOnList(hwnd, s, WINDOWED | SEPARATEKEEP | MAXIMIZED | PROMPT, 266 NULL, NULL, GetPString(IDS_ARCEXECHELPTEXT)); 266 NULL, NULL, GetPString(IDS_ARCEXECHELPTEXT), 267 pszSrcFile, __LINE__); 267 268 } 268 269 else -
trunk/dll/assoc.c
r834 r888 419 419 info->cl, 420 420 flags, 421 NULL, list, GetPString(IDS_EXECASSOCTITLETEXT)); 421 NULL, list, GetPString(IDS_EXECASSOCTITLETEXT), 422 pszSrcFile, __LINE__); 422 423 if (rc != -1 && dieafter) 423 424 PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID); … … 613 614 case ASS_FIND: 614 615 { 615 CHAR filename[CCHMAXPATH + 9] ;616 CHAR filename[CCHMAXPATH + 9], szfilename[CCHMAXPATH + 9]; 616 617 617 618 *filename = 0; 618 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 619 strcat(filename, " %a"); 620 WinSetDlgItemText(hwnd, ASS_CL, filename); 619 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 620 BldQuotedFileName(szfilename, filename); 621 strcat(szfilename, " %a"); 622 WinSetDlgItemText(hwnd, ASS_CL, szfilename); 621 623 } 622 624 } -
trunk/dll/avv.c
r793 r888 797 797 CmdLineDlgProc, FM3ModHandle, EXEC_FRAME, &ex) == 1) 798 798 runemf2(ex.flags, 799 hwnd, 799 hwnd, pszSrcFile, __LINE__, 800 800 NULL, 801 801 (*ex.environment) ? ex.environment : NULL, -
trunk/dll/collect.c
r872 r888 2300 2300 strcat(li->targetpath, " %a"); 2301 2301 ExecOnList(dcd->hwndParent, li->targetpath, 2302 PROMPT | WINDOWED, NULL, li->list, NULL); 2302 PROMPT | WINDOWED, NULL, li->list, NULL, 2303 pszSrcFile, __LINE__); 2303 2304 FreeList(li->list); 2304 2305 li->list = NULL; -
trunk/dll/command.c
r793 r888 561 561 case CMD_FIND: 562 562 { 563 CHAR filename[CCHMAXPATH + 9] ;563 CHAR filename[CCHMAXPATH + 9], szfilename[CCHMAXPATH + 9]; 564 564 565 565 *filename = 0; 566 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 567 strcat(filename, " %a"); 568 WinSetDlgItemText(hwnd, CMD_CL, filename); 566 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 567 BldQuotedFileName(szfilename, filename); 568 strcat(szfilename, " %a"); 569 WinSetDlgItemText(hwnd, CMD_CL, szfilename); 569 570 } 570 571 } … … 937 938 ExecOnList(hwnd, 938 939 info->cl, 939 flags, NULL, fakelist, GetPString(IDS_EXECCMDTITLETEXT)); 940 flags, NULL, fakelist, GetPString(IDS_EXECCMDTITLETEXT), 941 pszSrcFile, __LINE__); 940 942 } 941 943 } … … 943 945 ExecOnList(hwnd, 944 946 info->cl, 945 flags, NULL, list, GetPString(IDS_EXECCMDTITLETEXT)); 947 flags, NULL, list, GetPString(IDS_EXECCMDTITLETEXT), 948 pszSrcFile, __LINE__); 946 949 } 947 950 FreeList(list); -
trunk/dll/common.c
r844 r888 244 244 case IDM_CHKDSK: 245 245 runemf2(SEPARATE | WINDOWED, 246 hwnd, NULL, NULL, "PMCHKDSK.EXE %c:", toupper(*dv)); 246 hwnd, pszSrcFile, __LINE__, NULL, NULL, 247 "PMCHKDSK.EXE %c:", toupper(*dv)); 247 248 break; 248 249 case IDM_OPTIMIZE: … … 255 256 strcat(FileSystem, "OPT.CMD"); 256 257 runemf2(SEPARATE | WINDOWED, 257 hwnd, 258 hwnd, pszSrcFile, __LINE__, 258 259 NULL, 259 260 NULL, … … 264 265 case IDM_FORMAT: 265 266 runemf2(SEPARATE | WINDOWED, 266 hwnd, NULL, NULL, "PMFORMAT.EXE %c:", toupper(*dv)); 267 hwnd, pszSrcFile, __LINE__, NULL, NULL, 268 "PMFORMAT.EXE %c:", toupper(*dv)); 267 269 break; 268 270 … … 788 790 assign_ignores(s); 789 791 runemf2(WINDOWED | SEPARATE, 790 hwnd, 792 hwnd, pszSrcFile, __LINE__, 791 793 NULL, 792 794 NULL, -
trunk/dll/comp.c
r850 r888 2174 2174 fakelist[2] = NULL; 2175 2175 ExecOnList(hwnd, compare, 2176 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL); 2176 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL, 2177 pszSrcFile, __LINE__); 2177 2178 } 2178 2179 else { -
trunk/dll/datamin.c
r841 r888 429 429 type = SEPARATE | FULLSCREEN; 430 430 } 431 runemf2(type, hwnd, path, NULL, "%s", env); 431 runemf2(type, hwnd, pszSrcFile, __LINE__, 432 path, NULL, "%s", env); 432 433 } 433 434 break; -
trunk/dll/defview.c
r887 r888 16 16 09 Jun 07 SHL ShowMultimedia: Initialize hwnd so that OpenObject might work 17 17 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 18 20 Dec 07 GKY Open jpg files with OS2 object default since image.exe fails 18 19 19 20 ***********************************************************************/ -
trunk/dll/dircnrs.c
r877 r888 1727 1727 dummy[1] = NULL; 1728 1728 ExecOnList(hwnd, 1729 editor, WINDOWED | SEPARATE, NULL, dummy, NULL); 1729 editor, WINDOWED | SEPARATE, NULL, dummy, NULL, 1730 pszSrcFile, __LINE__); 1730 1731 } 1731 1732 else … … 2887 2888 strcat(li->targetpath, " %a"); 2888 2889 ExecOnList(dcd->hwndParent, li->targetpath, 2889 PROMPT | WINDOWED, NULL, li->list, NULL); 2890 PROMPT | WINDOWED, NULL, li->list, NULL, 2891 pszSrcFile, __LINE__); 2890 2892 FreeList(li->list); 2891 2893 li->list = NULL; -
trunk/dll/extract.c
r793 r888 393 393 FM3ModHandle, EXEC_FRAME, MPFROMP(&ex)) && *s) { 394 394 runemf2(ex.flags, 395 hwnd, 395 hwnd, pszSrcFile, __LINE__, 396 396 NULL, (*ex.environment) ? ex.environment : NULL, "%s", s); 397 397 } -
trunk/dll/filter.c
r834 r888 153 153 } 154 154 } 155 } 155 } //while 156 156 fclose(fp); 157 157 } -
trunk/dll/fm3dll.h
r886 r888 65 65 10 Nov 07 GKY Add ThousandSeparator variable for file sizes NLS tseparator. 66 66 22 Nov 07 GKY Use CopyPresParams in CheckMenu to fix presparam inconsistencies in menus 67 17 Dec 07 GKY Add variables for using WPURLDEFAULTSETTINGS as the fall back for ftphttprun 67 68 68 69 ***********************************************************************/ … … 902 903 BOOL ShowSession(HWND hwnd, PID pid); 903 904 INT ExecOnList(HWND hwnd, CHAR * command, INT flags, CHAR * tpath, 904 CHAR ** list, CHAR * prompt); 905 INT runemf2(INT type, HWND hwnd, CHAR * directory, CHAR * environment, 905 CHAR ** list, CHAR * prompt, PCSZ pszCallingFile, UINT uiLineNumber); 906 INT runemf2(INT type, HWND hwnd, PCSZ pszCallingFile, UINT uiLineNumber, 907 CHAR * directory, CHAR * environment, 906 908 CHAR * formatstring, ...); 907 909 HAPP Exec(HWND hwndNotify, BOOL child, char *startdir, char *env, -
trunk/dll/fm3dll.str
r878 r888 588 588 1381 China GB 589 589 0 590 DosStartSession failed to run "%s %s" 591 DosExecPgm failed for %s. 590 DosStartSession failed to run "%s %s"\n called from %s %d. 591 DosExecPgm failed for %s.\n called from %s %d. 592 592 We are all Books of Blood. 593 593 "Is THIS your card?" … … 996 996 Can't find drive %s 997 997 Can't drag root directory 998 DosQAppType failed for %s .999 apptype 0x%x unexpected for %s. 998 DosQAppType failed for %s\n called from %s %d. 999 apptype 0x%x unexpected for %s.\n called from %s %d. 1000 1000 %c:\\DESKTOP 1001 1001 FM/2: Drive info "%c:" -
trunk/dll/init.c
r886 r888 38 38 10 Nov 07 GKY Get thousands separator from country info for file sizes. 39 39 26 Nov 07 GKY Eliminate check of ext path on start up 40 17 Dec 07 GKY Make WPURLDEFAULTSETTINGS the fall back for ftp/httprun 40 41 41 42 ***********************************************************************/ -
trunk/dll/instant.c
r793 r888 144 144 fclose(fp); 145 145 runemf2(WINDOWED | SEPARATE, 146 hwnd, 146 hwnd, pszSrcFile, __LINE__, 147 147 path, NULL, "%s /C \"%s\"", GetCmdSpec(FALSE), s); 148 148 } … … 168 168 if (rc == MBID_YES) 169 169 runemf2(WINDOWED | INVISIBLE | BACKGROUND, 170 hwnd, NULL, NULL, "%s /C HELP BATCH", GetCmdSpec(FALSE)); 170 hwnd, pszSrcFile, __LINE__, NULL, NULL, 171 "%s /C HELP BATCH", GetCmdSpec(FALSE)); 171 172 else if (rc == MBID_CANCEL) 172 173 WinDismissDlg(hwnd, 0); -
trunk/dll/killproc.c
r830 r888 236 236 DosDupHandle(fileno(fp), &oldstdout); 237 237 rc = runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 238 hwnd, NULL, NULL, "%s", "PSTAT.EXE /C"); 238 hwnd, pszSrcFile, __LINE__, NULL, NULL, 239 "%s", "PSTAT.EXE /C"); 239 240 oldstdout = fileno(stdout); 240 241 DosDupHandle(newstdout, &oldstdout); -
trunk/dll/mainwnd.c
r877 r888 1592 1592 WINDOWED | ((fKeepCmdLine) ? 1593 1593 SEPARATEKEEP : SEPARATE), 1594 directory, list, NULL );1594 directory, list, NULL, pszSrcFile, __LINE__); 1595 1595 if (list) 1596 1596 free(list); … … 1960 1960 strcat(li->targetpath, " %a"); 1961 1961 ExecOnList(hwndMain, 1962 li->targetpath, PROMPT | WINDOWED, NULL, li->list, NULL); 1962 li->targetpath, PROMPT | WINDOWED, NULL, li->list, NULL, 1963 pszSrcFile, __LINE__); 1963 1964 FreeList(li->list); 1964 1965 li->list = NULL; … … 4234 4235 CHAR szPath2[CCHMAXPATH]; 4235 4236 runemf2(SEPARATE, 4236 HWND_DESKTOP, NULL, NULL, 4237 HWND_DESKTOP, pszSrcFile, __LINE__, 4238 NULL, NULL, 4237 4239 "%s %s %s", 4238 4240 dircompare, 4239 4241 BldQuotedFileName(szPath1, wa.szCurrentPath1), 4240 4242 BldQuotedFileName(szPath2, wa.szCurrentPath2)); 4241 // CHAR d1[] = "\"";4242 // CHAR d2[] = "\"";4243 // if (!needs_quoting(wa.szCurrentPath1))4244 // *d1 = 0;4245 // if (!needs_quoting(wa.szCurrentPath2))4246 // *d2 = 0;4247 // runemf2(SEPARATE,4248 // HWND_DESKTOP, NULL, NULL,4249 // "%s %s%s%s %s%s%s",4250 // dircompare,4251 // d1, wa.szCurrentPath1, d1, d2, wa.szCurrentPath2, d2);4252 4243 } 4253 4244 } … … 4648 4639 type = SEPARATE | FULLSCREEN; 4649 4640 } 4650 runemf2(type, hwnd, path, NULL, "%s", env); 4641 runemf2(type, hwnd, pszSrcFile, __LINE__, 4642 path, NULL, "%s", env); 4651 4643 } 4652 4644 break; -
trunk/dll/mainwnd2.c
r875 r888 501 501 CHAR szPath2[CCHMAXPATH]; 502 502 runemf2(SEPARATE, 503 HWND_DESKTOP, NULL, NULL, 503 HWND_DESKTOP, pszSrcFile, __LINE__, 504 NULL, NULL, 504 505 "%s %s %s", 505 506 dircompare, 506 507 BldQuotedFileName(szPath1, wa.szCurrentPath1), 507 508 BldQuotedFileName(szPath2, wa.szCurrentPath2)); 508 // CHAR *d1 = "\"", *d2 = "\"";509 // if (!needs_quoting(wa.szCurrentPath1))510 // *d1 = 0;511 // if (!needs_quoting(wa.szCurrentPath2))512 // *d2 = 0;513 // runemf2(SEPARATE,514 // HWND_DESKTOP,515 // NULL,516 // NULL,517 // "%s %s%s%s %s%s%s",518 // dircompare,519 // d1, wa.szCurrentPath1, d1, d2, wa.szCurrentPath2, d2);520 509 } 521 510 } -
trunk/dll/misc.c
r882 r888 913 913 } 914 914 fclose(fp); 915 ret = runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL, 915 ret = runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 916 NULL, NULL, 916 917 "VIEW.EXE \"%s\"", filename); 917 918 } … … 945 946 *cl = 0; 946 947 BldQuotedFileName(cl, filename); 947 // *cl = 0;948 // if (needs_quoting(filename))949 // strcat(cl, "\"");950 // strcat(cl, filename);951 // if (needs_quoting(filename))952 // strcat(cl, "\"");953 948 memset(&ex, 0, sizeof(ex)); 954 949 ex.flags = lastflags; … … 960 955 if (ret == 1) { 961 956 lastflags = ex.flags; 962 return runemf2(ex.flags, hwnd, p ath,957 return runemf2(ex.flags, hwnd, pszSrcFile, __LINE__, path, 963 958 *ex.environment ? ex.environment : NULL, 964 959 "%s", cl) != -1; … … 1485 1480 list[0] = filename; 1486 1481 list[1] = NULL; 1487 ExecOnList(hwnd, binview, WINDOWED | SEPARATE, NULL, list, NULL); 1482 ExecOnList(hwnd, binview, WINDOWED | SEPARATE, NULL, list, NULL, 1483 pszSrcFile, __LINE__); 1488 1484 return; 1489 1485 } … … 1496 1492 ExecOnList(hwnd, viewer, 1497 1493 WINDOWED | SEPARATE | (fViewChild ? CHILD : 0), 1498 NULL, list, NULL );1494 NULL, list, NULL, pszSrcFile, __LINE__); 1499 1495 return; 1500 1496 } … … 1512 1508 list[0] = filename; 1513 1509 list[1] = NULL; 1514 ExecOnList(hwnd, bined, WINDOWED | SEPARATE, NULL, list, NULL); 1510 ExecOnList(hwnd, bined, WINDOWED | SEPARATE, NULL, list, NULL, 1511 pszSrcFile, __LINE__); 1515 1512 return; 1516 1513 } … … 1521 1518 list[0] = filename; 1522 1519 list[1] = NULL; 1523 ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, list, NULL); 1520 ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, list, NULL, 1521 pszSrcFile, __LINE__); 1524 1522 return; 1525 1523 } -
trunk/dll/mle.c
r886 r888 17 17 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 18 18 26 Aug 07 GKY DosSleep(1) in loops changed to (0) 19 17 Dec 07 GKY Make WPURLDEFAULTSETTINGS the fall back for ftp/httprun 19 20 20 21 ***********************************************************************/ … … 178 179 if (ftp && *ftprun) 179 180 runemf2(SEPARATE | WINDOWED, 180 h, ftprund, NULL, "%s %s", ftprun, temp); 181 h, pszSrcFile, __LINE__, 182 ftprund, NULL, "%s %s", ftprun, temp); 181 183 else if (!ftp && *httprun) 182 184 runemf2(SEPARATE | WINDOWED, 183 h, httprund, NULL, "%s %s", httprun, temp); 185 h, pszSrcFile, __LINE__, 186 httprund, NULL, "%s %s", httprun, temp); 184 187 } 185 188 } -
trunk/dll/newview.c
r886 r888 26 26 14 Sep 07 SHL Another attempt to correct the fast viewer text load failure 27 27 10 Oct 07 SHL Correct ReLineThread typo 28 17 Dec 07 GKY Make WPURLDEFAULTSETTINGS the fall back for ftp/httprun 28 29 29 30 ***********************************************************************/ … … 2289 2290 if (*urld->url) 2290 2291 runemf2(SEPARATE | WINDOWED, 2291 hwnd, httprund, NULL, "%s %s", httprun, urld->url); 2292 hwnd, pszSrcFile, __LINE__, 2293 httprund, NULL, "%s %s", httprun, urld->url); 2292 2294 free(urld); 2293 2295 goto NoAdd; … … 2295 2297 if (*urld->url) 2296 2298 runemf2(SEPARATE | WINDOWED, 2297 hwnd, ftprund, NULL, "%s %s", ftprun, urld->url); 2299 hwnd, pszSrcFile, __LINE__, 2300 ftprund, NULL, "%s %s", ftprun, urld->url); 2298 2301 free(urld); 2299 2302 goto NoAdd; … … 3117 3120 dummy[0] = ad->filename; 3118 3121 dummy[1] = NULL; 3119 ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, dummy, NULL); 3122 ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, dummy, NULL, 3123 pszSrcFile, __LINE__); 3120 3124 } 3121 3125 else -
trunk/dll/notebook.c
r878 r888 138 138 case CFGA_FIND: 139 139 { 140 CHAR filename[CCHMAXPATH + 9] ;140 CHAR filename[CCHMAXPATH + 9], szfilename[CCHMAXPATH + 9]; 141 141 USHORT id; 142 142 HWND hwndFocus; … … 148 148 switch (id) { 149 149 case CFGA_VIRUS: 150 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) 151 WinSetDlgItemText(hwnd, id, filename); 150 if (insert_filename(hwnd, filename, 2, FALSE) && *filename){ 151 BldQuotedFileName(szfilename, filename); 152 strcat(szfilename, " %p"); 153 WinSetDlgItemText(hwnd, id, szfilename); 154 } 152 155 break; 153 156 case CFGA_EXTRACTPATH: … … 194 197 *szDefArc = 0; 195 198 PrfWriteProfileString(fmprof, appname, "DefArc", szDefArc); 196 WinQueryDlgItemText(hwnd, CFGA_VIRUS, CCHMAXPATH, virus); 197 virus[CCHMAXPATH - 1] = 0; 198 bstrip(virus); 199 { 200 CHAR szBuf[CCHMAXPATH], buf[10] = "\"%-/"; 201 202 WinQueryDlgItemText(hwnd, CFGA_VIRUS, CCHMAXPATH, szBuf); 203 szBuf[CCHMAXPATH - 1] = 0; 204 bstrip(szBuf); 205 if (!strcspn(szBuf, buf)) 206 BldQuotedFileName(virus, szBuf); 207 else 208 memcpy(virus, szBuf, strlen(szBuf) + 1); 209 if (!strchr(virus, '%') && strlen(virus) > 3) 210 strcat(virus, " %p"); 211 } 199 212 if (!*virus) 200 213 strcpy(virus, "OS2SCAN.EXE %p /SUB /A"); … … 414 427 case CFGV_FIND: 415 428 { 416 CHAR filename[CCHMAXPATH + 9] ;429 CHAR filename[CCHMAXPATH + 9], szfilename[CCHMAXPATH + 9]; 417 430 USHORT id; 418 431 HWND hwndFocus; … … 427 440 case CFGV_VIEWER: 428 441 case CFGV_EDITOR: 429 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 430 strcat(filename, " %a"); 431 WinSetDlgItemText(hwnd, id, filename); 442 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 443 BldQuotedFileName(szfilename, filename); 444 strcat(szfilename, " %a"); 445 WinSetDlgItemText(hwnd, id, szfilename); 432 446 } 433 447 break; 434 448 case CFGV_HTTPRUN: 435 449 case CFGV_FTPRUN: 436 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) 437 WinSetDlgItemText(hwnd, id, filename); 450 if (insert_filename(hwnd, filename, 2, FALSE) && *filename){ 451 BldQuotedFileName(szfilename, filename); 452 WinSetDlgItemText(hwnd, id, szfilename); 453 } 438 454 break; 439 455 default: … … 448 464 449 465 case WM_CLOSE: 450 WinQueryDlgItemText(hwnd, CFGV_VIEWER, CCHMAXPATH, viewer); 451 viewer[CCHMAXPATH - 1] = 0; 452 bstrip(viewer); 453 WinQueryDlgItemText(hwnd, CFGV_EDITOR, CCHMAXPATH, editor); 454 editor[CCHMAXPATH - 1] = 0; 455 bstrip(editor); 456 WinQueryDlgItemText(hwnd, CFGV_BINVIEW, CCHMAXPATH, binview); 457 binview[CCHMAXPATH - 1] = 0; 458 bstrip(binview); 459 WinQueryDlgItemText(hwnd, CFGV_BINED, CCHMAXPATH, bined); 460 bined[CCHMAXPATH - 1] = 0; 461 bstrip(bined); 462 WinQueryDlgItemText(hwnd, CFGV_FTPRUN, CCHMAXPATH, ftprun); 463 ftprun[CCHMAXPATH - 1] = 0; 464 bstrip(ftprun); 465 WinQueryDlgItemText(hwnd, CFGV_HTTPRUN, CCHMAXPATH, httprun); 466 httprun[CCHMAXPATH - 1] = 0; 467 bstrip(httprun); 468 PrfWriteProfileString(fmprof, appname, "Viewer", viewer); 469 PrfWriteProfileString(fmprof, appname, "Editor", editor); 470 PrfWriteProfileString(fmprof, appname, "BinView", binview); 471 PrfWriteProfileString(fmprof, appname, "BinEd", bined); 472 PrfWriteProfileString(fmprof, appname, "FTPRun", ftprun); 473 PrfWriteProfileString(fmprof, appname, "HTTPRun", httprun); 474 fUseNewViewer = WinQueryButtonCheckstate(hwnd, CFGV_USENEWVIEWER); 475 PrfWriteProfileData(fmprof, appname, "UseNewViewer", &fUseNewViewer, 476 sizeof(BOOL)); 477 fGuessType = WinQueryButtonCheckstate(hwnd, CFGV_GUESSTYPE); 478 PrfWriteProfileData(fmprof, appname, "GuessType", &fGuessType, 479 sizeof(BOOL)); 480 fViewChild = WinQueryButtonCheckstate(hwnd, CFGV_VIEWCHILD); 481 PrfWriteProfileData(fmprof, appname, "ViewChild", &fViewChild, 482 sizeof(BOOL)); 483 fCheckMM = WinQueryButtonCheckstate(hwnd, CFGV_CHECKMM); 484 PrfWriteProfileData(fmprof, appname, "CheckMM", &fCheckMM, sizeof(BOOL)); 485 break; 466 { 467 CHAR szBuf[CCHMAXPATH], buf[10] = "\"%-/"; 468 469 WinQueryDlgItemText(hwnd, CFGV_VIEWER, CCHMAXPATH, szBuf); 470 szBuf[CCHMAXPATH - 1] = 0; 471 bstrip(szBuf); 472 if (!strcspn(szBuf, buf)) 473 BldQuotedFileName(viewer, szBuf); 474 else 475 memcpy(viewer, szBuf, strlen(szBuf) + 1); 476 if (!strchr(viewer, '%') && strlen(viewer) > 3) 477 strcat(viewer, " %a"); 478 WinQueryDlgItemText(hwnd, CFGV_EDITOR, CCHMAXPATH, szBuf); 479 szBuf[CCHMAXPATH - 1] = 0; 480 bstrip(szBuf); 481 if (!strcspn(szBuf, buf)) 482 BldQuotedFileName(editor, szBuf); 483 else 484 memcpy(editor, szBuf, strlen(szBuf) + 1); 485 if (!strchr(editor, '%') && strlen(editor) > 3) 486 strcat(editor, " %a"); 487 WinQueryDlgItemText(hwnd, CFGV_BINVIEW, CCHMAXPATH, szBuf); 488 szBuf[CCHMAXPATH - 1] = 0; 489 bstrip(szBuf); 490 if (!strcspn(szBuf, buf)) 491 BldQuotedFileName(binview, szBuf); 492 else 493 memcpy(binview, szBuf, strlen(szBuf) + 1); 494 if (!strchr(binview, '%') && strlen(binview) > 3) 495 strcat(binview, " %a"); 496 WinQueryDlgItemText(hwnd, CFGV_BINED, CCHMAXPATH, szBuf); 497 szBuf[CCHMAXPATH - 1] = 0; 498 bstrip(szBuf); 499 if (!strcspn(szBuf, buf)) 500 BldQuotedFileName(bined, szBuf); 501 else 502 memcpy(bined, szBuf, strlen(szBuf) + 1); 503 if (!strchr(bined, '%') && strlen(bined) > 3) 504 strcat(bined, " %a"); 505 WinQueryDlgItemText(hwnd, CFGV_FTPRUN, CCHMAXPATH, szBuf); 506 szBuf[CCHMAXPATH - 1] = 0; 507 bstrip(szBuf); 508 if (!strchr(szBuf, '"')) 509 BldQuotedFileName(ftprun, szBuf); 510 else 511 memcpy(ftprun, szBuf, strlen(szBuf) + 1); 512 WinQueryDlgItemText(hwnd, CFGV_HTTPRUN, CCHMAXPATH, szBuf); 513 szBuf[CCHMAXPATH - 1] = 0; 514 bstrip(szBuf); 515 if (!strchr(szBuf, '"')) 516 BldQuotedFileName(httprun, szBuf); 517 else 518 memcpy(httprun, szBuf, strlen(szBuf) + 1); 519 PrfWriteProfileString(fmprof, appname, "Viewer", viewer); 520 PrfWriteProfileString(fmprof, appname, "Editor", editor); 521 PrfWriteProfileString(fmprof, appname, "BinView", binview); 522 PrfWriteProfileString(fmprof, appname, "BinEd", bined); 523 524 PrfWriteProfileString(fmprof, appname, "FTPRun", ftprun); 525 PrfWriteProfileString(fmprof, appname, "HTTPRun", httprun); 526 fUseNewViewer = WinQueryButtonCheckstate(hwnd, CFGV_USENEWVIEWER); 527 PrfWriteProfileData(fmprof, appname, "UseNewViewer", &fUseNewViewer, 528 sizeof(BOOL)); 529 fGuessType = WinQueryButtonCheckstate(hwnd, CFGV_GUESSTYPE); 530 PrfWriteProfileData(fmprof, appname, "GuessType", &fGuessType, 531 sizeof(BOOL)); 532 fViewChild = WinQueryButtonCheckstate(hwnd, CFGV_VIEWCHILD); 533 PrfWriteProfileData(fmprof, appname, "ViewChild", &fViewChild, 534 sizeof(BOOL)); 535 fCheckMM = WinQueryButtonCheckstate(hwnd, CFGV_CHECKMM); 536 PrfWriteProfileData(fmprof, appname, "CheckMM", &fCheckMM, sizeof(BOOL)); 537 break; 538 } 486 539 } 487 540 return WinDefDlgProc(hwnd, msg, mp1, mp2); … … 996 1049 case CFGC_FIND: 997 1050 { 998 CHAR filename[CCHMAXPATH + 9] ;1051 CHAR filename[CCHMAXPATH + 9], szfilename[CCHMAXPATH + 9]; 999 1052 USHORT id; 1000 1053 HWND hwndFocus; … … 1007 1060 case CFGC_COMPARE: 1008 1061 case CFGC_DIRCOMPARE: 1009 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 1010 strcat(filename, " %a"); 1011 WinSetDlgItemText(hwnd, id, filename); 1062 if (insert_filename(hwnd, filename, 2, FALSE) && *filename) { 1063 BldQuotedFileName(szfilename, filename); 1064 strcat(szfilename, " %a"); 1065 WinSetDlgItemText(hwnd, id, szfilename); 1012 1066 } 1013 1067 break; … … 1023 1077 1024 1078 case WM_CLOSE: 1025 WinQueryDlgItemText(hwnd, CFGC_DIRCOMPARE, CCHMAXPATH, dircompare); 1026 dircompare[CCHMAXPATH - 1] = 0; 1027 bstrip(dircompare); 1028 PrfWriteProfileString(fmprof, appname, "DirCompare", dircompare); 1029 WinQueryDlgItemText(hwnd, CFGC_COMPARE, CCHMAXPATH, compare); 1030 compare[CCHMAXPATH - 1] = 0; 1031 bstrip(compare); 1032 PrfWriteProfileString(fmprof, appname, "Compare", compare); 1033 break; 1079 { 1080 CHAR szBuf[CCHMAXPATH], buf[10] = "\"%-/"; 1081 1082 WinQueryDlgItemText(hwnd, CFGC_DIRCOMPARE, CCHMAXPATH, szBuf); 1083 szBuf[CCHMAXPATH - 1] = 0; 1084 bstrip(szBuf); 1085 if (!strcspn(szBuf, buf)) 1086 BldQuotedFileName(dircompare, szBuf); 1087 else 1088 memcpy(dircompare, szBuf, strlen(szBuf) + 1); 1089 if (!strchr(dircompare, '%') && strlen(dircompare) > 3) 1090 strcat(dircompare, " %a"); 1091 PrfWriteProfileString(fmprof, appname, "DirCompare", dircompare); 1092 WinQueryDlgItemText(hwnd, CFGC_COMPARE, CCHMAXPATH, szBuf); 1093 szBuf[CCHMAXPATH - 1] = 0; 1094 bstrip(szBuf); 1095 if (!strcspn(szBuf, buf)) 1096 BldQuotedFileName(compare, szBuf); 1097 else 1098 memcpy(compare, szBuf, strlen(szBuf) + 1); 1099 if (!strchr(compare, '%') && strlen(compare) > 3) 1100 strcat(compare, " %a"); 1101 PrfWriteProfileString(fmprof, appname, "Compare", compare); 1102 break; 1103 } 1034 1104 } 1035 1105 return WinDefDlgProc(hwnd, msg, mp1, mp2); -
trunk/dll/remap.c
r793 r888 595 595 case MAP_INFO: 596 596 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 597 hwnd, 597 hwnd, pszSrcFile, __LINE__, 598 598 NULL, NULL, "%s /C NET USE %s", GetCmdSpec(FALSE), d); 599 599 break; -
trunk/dll/seeall.c
r872 r888 466 466 while (list[x]) { 467 467 FILESTATUS3 fsa; 468 // BOOL spaces;469 // if (needs_quoting(list[x])) {470 // spaces = TRUE;471 // strcat(szBuffer, "\"");472 // }473 // else474 // spaces = FALSE;475 // strcat(szBuffer, list[x]);476 468 memset(&fsa, 0, sizeof(fsa)); 477 469 DosError(FERR_DISABLEHARDERR); … … 480 472 BldQuotedFullPathName(szBuffer + strlen(szBuffer), 481 473 list[x], "*"); 482 // if (szBuffer[strlen(szBuffer) - 1] != '\\')483 // strcat(szBuffer, "\\");484 // strcat(szBuffer, "*");485 474 } 486 475 else 487 476 BldQuotedFileName(szBuffer + strlen(szBuffer), list[x]); 488 // if (spaces)489 // strcat(szBuffer, "\"");490 477 x++; 491 478 if (!list[x] || strlen(szBuffer) + strlen(list[x]) + 5 > 1024) { 492 479 runemf2(SEPARATE | WINDOWED | WAIT | 493 480 (fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED)), 494 HWND_DESKTOP, NULL, NULL,495 481 HWND_DESKTOP, pszSrcFile, __LINE__, 482 NULL, NULL, "%s", szBuffer); 496 483 DosSleep(1); // Let archiver get started 497 484 *p = 0; … … 831 818 runemf2(SEPARATE | WINDOWED | 832 819 (fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED)), 833 HWND_DESKTOP, ex.extractdir, NULL, 820 HWND_DESKTOP, pszSrcFile, __LINE__, 821 ex.extractdir, NULL, 834 822 "%s %s %s%s%s", 835 823 ex.command, -
trunk/dll/srchpath.c
r847 r888 62 62 } 63 63 ret = runemf2(SEPARATE | WINDOWED, 64 HWND_DESKTOP, 64 HWND_DESKTOP, pszSrcFile, __LINE__, 65 65 NULL, 66 66 NULL, -
trunk/dll/sysinfo.c
r793 r888 63 63 DosDupHandle(fileno(fp), &oldstdout); 64 64 runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 65 hwnd, NULL, NULL, "%s", "RMVIEW.EXE"); 65 hwnd, pszSrcFile, __LINE__, 66 NULL, NULL, "%s", "RMVIEW.EXE"); 66 67 oldstdout = fileno(stdout); 67 68 DosDupHandle(newstdout, &oldstdout); -
trunk/dll/systemf.c
r793 r888 71 71 72 72 int ExecOnList(HWND hwnd, char *command, int flags, char *tpath, 73 char **list, char *prompt )73 char **list, char *prompt, PCSZ pszCallingFile, UINT uiLineNumber) 74 74 { 75 75 /* executes the command once for all files in list */ … … 591 591 ex.flags = flags; 592 592 ex.flags &= (~PROMPT); 593 return runemf2(ex.flags, hwnd, p ath,593 return runemf2(ex.flags, hwnd, pszCallingFile, uiLineNumber, path, 594 594 (*ex.environment) ? ex.environment : NULL, 595 595 "%s", commandline); … … 599 599 //== runemf2() run requested app, return -1 if problem starting else return app rc == 600 600 601 int runemf2(int type, HWND hwnd, char *pszDirectory, char *pszEnvironment, 601 int runemf2(int type, HWND hwnd, PCSZ pszCallingFile, UINT uiLineNumber, 602 char *pszDirectory, char *pszEnvironment, 602 603 char *formatstring,...) 603 604 { … … 605 606 606 607 * status = runemf2(SEPARATE | WINDOWED, 607 * hwnd, 608 * hwnd, pszCallingFile, __LINE__, 608 609 * NullStr, 609 610 * NULL, … … 613 614 * 614 615 * use (HWND)0 for hwnd if window handle not handy. 616 * pszCallingFile and __LINE__ are used to determine caller for easier error tracking 615 617 */ 616 618 … … 634 636 BOOL useTermQ = FALSE; 635 637 char szTempdir[CCHMAXPATH]; 638 char szTempPgm[CCHMAXPATH], tempcom[1024], temparg[1024], buf[10] = " &|<>"; 639 char *offset, *offsetexe, *offsetcom, *offsetcmd, *offsetbtm, *offsetbat; 640 UINT offsetquote; 636 641 637 642 typedef struct { … … 675 680 *pszPgm = 0; 676 681 va_start(parguments, 677 682 formatstring); 678 683 vsprintf(pszPgm, 679 684 formatstring, 680 685 parguments); 681 686 va_end(parguments); 682 687 offsetexe = strstr(pszPgm, ".exe"); 688 offsetcmd = strstr(pszPgm, ".cmd"); 689 offsetcom = strstr(pszPgm, ".com"); 690 offsetbtm = strstr(pszPgm, ".btm"); 691 offsetbat = strstr(pszPgm, ".bat"); 692 if (offsetexe) 693 offset = offsetexe; 694 else if (offsetcom) 695 offset = offsetcom; 696 else if (offsetcmd) 697 offset = offsetcmd; 698 else if (offsetbtm) 699 offset = offsetbtm; 700 else if (offsetbat) 701 offset = offsetbat; 702 else 703 offset = NULL; 704 offsetquote = strcspn(pszPgm, buf); 705 if (pszPgm[0] != '\"' && offsetquote < offset - pszPgm && offsetquote != NULL){ 706 strcpy(tempcom, pszPgm); 707 tempcom[offset + 4 - pszPgm] = '\0'; 708 strcpy (temparg, &pszPgm[offset + 4 - pszPgm]); 709 pszDirectory = szTempdir; 710 strcpy(pszDirectory, tempcom); 711 offset = strrchr(pszDirectory, '\\'); 712 pszDirectory[offset +1 - pszDirectory] = '\0'; 713 BldQuotedFileName(szTempPgm, tempcom); 714 strcat(szTempPgm, temparg); 715 memcpy(pszPgm, szTempPgm, 1024); 716 //printf("%s\n %s\n%s %s\n %d %d", 717 // pszPgm, szTempPgm, tempcom, temparg, offset, offsetquote); fflush(stdout); 718 } 683 719 if (pszEnvironment) { 684 720 p = &pszEnvironment[strlen(pszEnvironment)] + 1; … … 789 825 Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__, 790 826 GetPString(IDS_DOSQAPPTYPEFAILEDTEXT), 791 pszPgm );827 pszPgm, pszCallingFile, __LINE__); 792 828 DosFreeMem(pszPgm); 793 829 if (pszArgs) … … 801 837 Runtime_Error(pszSrcFile, __LINE__, 802 838 GetPString(IDS_APPTYPEUNEXPECTEDTEXT), 803 ulAppType, pszPgm );839 ulAppType, pszPgm, pszCallingFile, __LINE__); 804 840 if (pszPgm) 805 841 DosFreeMem(pszPgm); … … 813 849 Runtime_Error(pszSrcFile, __LINE__, 814 850 GetPString(IDS_APPTYPEUNEXPECTEDTEXT), 815 ulAppType, pszPgm );851 ulAppType, pszPgm, pszCallingFile, __LINE__); 816 852 if (pszPgm) 817 853 DosFreeMem(pszPgm); … … 834 870 if (ret) { 835 871 Dos_Error(MB_ENTER,ret,hwnd,pszSrcFile,__LINE__, 836 GetPString(IDS_DOSEXECPGMFAILEDTEXT), pszPgm); 872 GetPString(IDS_DOSEXECPGMFAILEDTEXT), pszPgm, 873 pszCallingFile, __LINE__); 837 874 } 838 875 } … … 903 940 } 904 941 905 / * goddamned OS/2 limit */942 // goddamned OS/2 limit 906 943 907 944 if (strlen(pszPgm) + strlen(pszArgs) > 1024) … … 922 959 *pszDirectory) 923 960 switch_to(szSavedir); 924 if (rc) 961 if (rc){ 925 962 Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__, 926 963 GetPString(IDS_DOSQAPPTYPEFAILEDTEXT), 927 pszPgm );964 pszPgm, pszCallingFile, __LINE__); 928 965 DosFreeMem(pszPgm); 929 966 if (pszArgs) … … 937 974 Runtime_Error(pszSrcFile, __LINE__, 938 975 GetPString(IDS_APPTYPEUNEXPECTEDTEXT), 939 pszPgm );976 pszPgm, pszCallingFile, __LINE__); 940 977 DosFreeMem(pszPgm); 941 978 if (pszArgs) … … 1106 1143 if (ret && ret != ERROR_SMG_START_IN_BACKGROUND) { 1107 1144 Dos_Error(MB_CANCEL,ret,hwnd,pszSrcFile,__LINE__, 1108 GetPString(IDS_DOSSTARTSESSIONFAILEDTEXT),pszPgm,pszArgs); 1145 GetPString(IDS_DOSSTARTSESSIONFAILEDTEXT),pszPgm,pszArgs, 1146 pszCallingFile, __LINE__); 1109 1147 } 1110 1148 else if (type & WAIT) { -
trunk/dll/tools.c
r847 r888 791 791 } 792 792 runemf2(SEPARATE | WINDOWED, 793 hwnd, NULL, NULL, "ICONEDIT.EXE %s", filename); 793 hwnd, pszSrcFile, __LINE__, 794 NULL, NULL, "ICONEDIT.EXE %s", filename); 794 795 } 795 796 break; -
trunk/dll/treecnr.c
r877 r888 2411 2411 2412 2412 case IDM_PARTITION: 2413 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL, 2413 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2414 NULL, NULL, 2414 2415 "%s", "MINILVM.EXE"); 2415 2416 break; 2416 2417 2417 2418 case IDM_PARTITIONDF: 2418 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL, 2419 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2420 NULL, NULL, 2419 2421 "%s", "DFSOS2.EXE"); 2420 2422 break; 2421 2423 2422 2424 case IDM_PARTITIONLVMG: 2423 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL, 2425 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2426 NULL, NULL, 2424 2427 "%s", "LVMGUI.CMD"); 2425 2428 break; 2426 2429 2427 2430 case IDM_PARTITIONFD: 2428 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL, 2431 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2432 NULL, NULL, 2429 2433 "%s", "FDISKPM.EXE"); 2430 2434 break; -
trunk/dll/undel.c
r847 r888 90 90 DosDupHandle(fileno(fp), &oldstdout); 91 91 runemf2(SEPARATE | INVISIBLE | WINDOWED | BACKGROUND | WAIT, 92 hwnd, 92 hwnd, pszSrcFile, __LINE__, 93 93 NULL, 94 94 NULL, … … 124 124 if (temp == MBID_YES) 125 125 runemf2(BACKGROUND | INVISIBLE | SEPARATE | WINDOWED, 126 hwnd, 126 hwnd, pszSrcFile, __LINE__, 127 127 NULL, NULL, "%s /C HELP UNDELETE", GetCmdSpec(FALSE)); 128 128 if (temp == MBID_CANCEL) … … 427 427 fclose(fp); 428 428 runemf2(WINDOWED | BACKGROUND | SEPARATE | INVISIBLE, 429 hwnd, 429 hwnd, pszSrcFile, __LINE__, 430 430 NULL, NULL, "%s /C \\FMUNDEL.CMD", GetCmdSpec(FALSE)); 431 431 } -
trunk/dll/viewinf.c
r847 r888 575 575 runemf2(SEPARATE | WINDOWED | MINIMIZED | 576 576 BACKGROUND | INVISIBLE, 577 hwnd, 577 hwnd, pszSrcFile, __LINE__, 578 578 NULL, NULL, "%s /C %s", GetCmdSpec(FALSE), filename); 579 579 } -
trunk/dll/worker.c
r847 r888 412 412 if (!runemf2(SEPARATE | WINDOWED | 413 413 fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED), 414 HWND_DESKTOP, ex.extractdir, NULL,414 HWND_DESKTOP, pszSrcFile, __LINE__, ex.extractdir, NULL, 415 415 "%s %s %s%s%s", 416 416 ex.command, … … 857 857 else { 858 858 runemf2(SEPARATE, 859 HWND_DESKTOP, NULL, NULL, 859 HWND_DESKTOP, pszSrcFile, __LINE__, 860 NULL, NULL, 860 861 "%s %s %s", 861 862 dircompare, 862 863 BldQuotedFileName(szQuotedDirName, wk->li->targetpath), 863 864 BldQuotedFileName(szQuotedFileName, wk->li->list[x])); 864 // CHAR d1[] = "\"";865 // CHAR d2[] = "\"";866 // if (!needs_quoting(wk->li->targetpath))867 // *d1 = 0;868 // if (!needs_quoting(wk->li->list[x]))869 // *d2 = 0;870 // runemf2(SEPARATE,871 // HWND_DESKTOP, NULL, NULL,872 // "%s %s%s%s %s%s%s",873 // dircompare,874 // d1, wk->li->targetpath, d1,875 // d2, wk->li->list[x], d2);876 865 } 877 866 } … … 884 873 ExecOnList(wk->hwndFrame, 885 874 compare, 886 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL); 875 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL, 876 pszSrcFile, __LINE__); 887 877 } 888 878 else { … … 1029 1019 "%a", 1030 1020 WINDOWED | SEPARATE | PROMPT, 1031 NULL, wk->li->list, GetPString(IDS_DOITYOURSELFTEXT)); 1021 NULL, wk->li->list, GetPString(IDS_DOITYOURSELFTEXT), 1022 pszSrcFile, __LINE__); 1032 1023 break; 1033 1024 … … 1081 1072 strcat(szBuffer, " "); 1082 1073 BldQuotedFileName(szBuffer + strlen(szBuffer), wk->li->arcname); 1083 // if (needs_quoting(wk->li->arcname))1084 // strcat(szBuffer, "\"");1085 // strcat(szBuffer, wk->li->arcname);1086 // if (needs_quoting(wk->li->arcname))1087 // strcat(szBuffer, "\"");1088 1074 } 1089 1075 else { … … 1106 1092 } 1107 1093 BldQuotedFileName(szBuffer + strlen(szBuffer), wk->li->list[x]); 1108 // if (needs_quoting(wk->li->list[x]))1109 // strcat(szBuffer, "\"");1110 // strcat(szBuffer, wk->li->list[x]);1111 // if (needs_quoting(wk->li->list[x]))1112 // strcat(szBuffer, "\"");1113 1094 x++; 1114 1095 if (!wk->li->list[x] || strlen(szBuffer) + 1115 1096 strlen(wk->li->list[x]) + 5 > 1024) { 1116 1097 runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED | WAIT, 1117 HWND_DESKTOP, 1098 HWND_DESKTOP, pszSrcFile, __LINE__, 1118 1099 (wk->li->type == IDM_FAKEEXTRACT || 1119 1100 wk->li->type == IDM_FAKEEXTRACTM) ? … … 1235 1216 strcat(szBuffer, " "); 1236 1217 BldQuotedFileName(szBuffer + strlen(szBuffer), ad.arcname); 1237 // if (needs_quoting(ad.arcname))1238 // strcat(szBuffer, "\"");1239 // strcat(szBuffer, ad.arcname);1240 // if (needs_quoting(ad.arcname))1241 // strcat(szBuffer, "\"");1242 1218 p = &szBuffer[strlen(szBuffer)]; 1243 1219 if (ad.mask.szMask) { … … 1249 1225 while (wk->li->list[x]) { 1250 1226 FILESTATUS3 fsa; 1251 // BOOL spaces;1252 // if (needs_quoting(wk->li->list[x])) {1253 // spaces = TRUE;1254 // strcat(szBuffer, "\"");1255 // }1256 // else1257 // spaces = FALSE;1258 // strcat(szBuffer, wk->li->list[x]);1259 1227 memset(&fsa, 0, sizeof(FILESTATUS3)); 1260 1228 DosError(FERR_DISABLEHARDERR); … … 1264 1232 if (fsa.attrFile & FILE_DIRECTORY) { 1265 1233 BldQuotedFullPathName(szBuffer + strlen(szBuffer), wk->li->list[x], "*"); 1266 // if (szBuffer[strlen(szBuffer) - 1] != '\\')1267 // strcat(szBuffer, "\\");1268 // strcat(szBuffer, "*");1269 1234 } 1270 1235 else 1271 1236 BldQuotedFileName(szBuffer + strlen(szBuffer), wk->li->list[x]); 1272 // if (spaces)1273 // strcat(szBuffer, "\"");1274 1237 x++; 1275 1238 if (!wk->li->list[x] || … … 1277 1240 runemf2(SEPARATE | WINDOWED | WAIT | 1278 1241 (fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED)), 1279 HWND_DESKTOP, NULL, NULL,1242 HWND_DESKTOP, pszSrcFile, __LINE__, NULL, NULL, 1280 1243 "%s", szBuffer); 1281 1244 DosSleep(1); … … 1305 1268 ExecOnList((HWND) 0, 1306 1269 binview, 1307 WINDOWED | SEPARATE, NULL, wk->li->list, NULL); 1270 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1271 pszSrcFile, __LINE__); 1308 1272 break; 1309 1273 } … … 1315 1279 WINDOWED | SEPARATE | 1316 1280 ((fViewChild) ? CHILD : 0), 1317 NULL, wk->li->list, NULL); 1281 NULL, wk->li->list, NULL, 1282 pszSrcFile, __LINE__); 1318 1283 else { 1319 1284 … … 1349 1314 ExecOnList((HWND) 0, 1350 1315 bined, 1351 WINDOWED | SEPARATE, NULL, wk->li->list, NULL); 1316 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1317 pszSrcFile, __LINE__); 1352 1318 break; 1353 1319 } … … 1358 1324 ExecOnList((HWND) 0, 1359 1325 editor, 1360 WINDOWED | SEPARATE, NULL, wk->li->list, NULL); 1326 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1327 pszSrcFile, __LINE__); 1361 1328 else { 1362 1329
Note:
See TracChangeset
for help on using the changeset viewer.