Changeset 773 for trunk/dll/arccnrs.c
- Timestamp:
- Aug 7, 2007, 11:23:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r771 r773 41 41 16 Jun 07 SHL Use DosQueryAppType not DosQAppType 42 42 02 Aug 07 SHL Sync with ARCITEM mods 43 06 Aug 07 SHL Use BldFullPathName and BldQuotedFileName 44 06 Aug 07 SHL Move BldQuotedFileName and BldQuotedFullPathNamehere 45 to be near primary caller 43 46 44 47 ***********************************************************************/ … … 76 79 static PSZ pszSrcFile = __FILE__; 77 80 78 #pragma alloc_text(ARCCNRS,ArcCnrWndProc,ArcObjWndProc,ArcClientWndProc )79 #pragma alloc_text(ARCCNRS,ArcTextProc,FillArcCnr,ArcFilter )81 #pragma alloc_text(ARCCNRS,ArcCnrWndProc,ArcObjWndProc,ArcClientWndProc,BldQuotedFullPathName) 82 #pragma alloc_text(ARCCNRS,ArcTextProc,FillArcCnr,ArcFilter,BldQuotedFileName) 80 83 #pragma alloc_text(ARCCNRS,ArcSort,ArcFrameWndProc,IsArcThere,ArcErrProc) 81 84 #pragma alloc_text(STARTUP,StartArcCnr) 85 86 /** 87 * Build quoted full path name in callers buffer given 88 * directory name and filename 89 * @param pszPathName points to drive/directory if not NULL 90 * @returns pointer to quoted path name in caller's buffer 91 */ 92 93 PSZ BldQuotedFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName) 94 { 95 UINT c = pszPathName ? strlen(pszPathName) : 0; 96 BOOL q = needs_quoting(pszPathName) || 97 needs_quoting(pszFileName); 98 PSZ psz = pszFullPathName; 99 100 if (q) 101 *psz++ = '"'; 102 if (c > 0) { 103 memcpy(psz, pszPathName, c); 104 psz += c; 105 if (*(psz - 1) != '\\') 106 *psz++ = '\\'; 107 } 108 strcpy(psz, pszFileName); 109 if (q) { 110 psz += strlen(psz); 111 *psz++ = '"'; 112 *psz = 0; 113 } 114 return pszFullPathName; 115 } 116 117 /** 118 * Build quoted full path name in callers buffer given a filename 119 * @returns pointer to quoted file name in caller's buffer 120 */ 121 122 PSZ BldQuotedFileName(PSZ pszQuotedFileName, PSZ pszFileName) 123 { 124 BOOL q = needs_quoting(pszFileName); 125 PSZ psz = pszQuotedFileName; 126 127 if (q) 128 *psz++ = '"'; 129 strcpy(psz, pszFileName); 130 if (q) { 131 psz += strlen(psz); 132 *psz++ = '"'; 133 *psz = 0; 134 } 135 return pszQuotedFileName; 136 } 82 137 83 138 static MRESULT EXPENTRY ArcErrProc(HWND hwnd, ULONG msg, MPARAM mp1, … … 85 140 { 86 141 ARCDUMP *ad; 142 CHAR szQuotedArcName[CCHMAXPATH]; 87 143 88 144 switch (msg) { … … 158 214 ad = WinQueryWindowPtr(hwnd, QWL_USER); 159 215 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 160 hwnd, NULL, NULL, "%s %s%s%s", ad->info->test, 161 needs_quoting(ad->arcname) ? "\"" : NullStr, 162 ad->arcname, 163 needs_quoting(ad->arcname) ? "\"" : NullStr); 216 hwnd, NULL, NULL, 217 "%s %s", 218 ad->info->test, 219 BldQuotedFileName(szQuotedArcName, ad->arcname)); 220 // runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 221 // hwnd, NULL, NULL, "%s %s%s%s", ad->info->test, 222 // needs_quoting(ad->arcname) ? "\"" : NullStr, 223 // ad->arcname, 224 // needs_quoting(ad->arcname) ? "\"" : NullStr); 164 225 break; 165 226 } … … 383 444 static VOID EmptyArcCnr(HWND hwnd) 384 445 { 385 #if 0 // fixme to disable or to be configurable446 #if 0 // fixme to be gone or to be configurable 386 447 { 387 448 int state = _heapchk(); … … 409 470 HFILE newstdout; 410 471 CHAR s[CCHMAXPATH * 2], lonename[CCHMAXPATH + 2], 411 *nsize, *osize, *fdate, *fname, *p, *pp, arctemp[33];472 *nsize, *osize, *fdate, *fname, *p, *pp, arctemp[33]; 412 473 BOOL gotstart; 413 474 BOOL gotend; 414 475 BOOL wasquote; 415 BOOL nomove = FALSE; // fixme to be gone?476 BOOL nomove = FALSE; // fixme to be gone? 416 477 INT highest = 0, x, counter = 0, numarcfiles = 0; 417 478 PARCITEM lastpai; … … 484 545 p = GetCmdSpec(TRUE); 485 546 runemf2(SEPARATE | INVISIBLE | MINIMIZED | BACKGROUND | WAIT, 486 hwndCnr, 487 NULL, 488 "DOS_BACKGROUND_EXECUTION=1", 489 "%s /C %s %s%s%s > %s", 490 p, 491 info->list, 492 needs_quoting(arcname) ? "\"" : NullStr, 493 arcname, 494 needs_quoting(arcname) ? "\"" : NullStr, 547 hwndCnr, NULL, "DOS_BACKGROUND_EXECUTION=1", 548 "%s /C %s %s >%s", 549 p, // shell 550 info->list, // list command 551 BldQuotedFileName(s, arcname), 495 552 arctemp); 553 // runemf2(SEPARATE | INVISIBLE | MINIMIZED | BACKGROUND | WAIT, 554 // hwndCnr, 555 // NULL, 556 // "DOS_BACKGROUND_EXECUTION=1", 557 // "%s /C %s %s%s%s > %s", 558 // p, 559 // info->list, 560 // needs_quoting(arcname) ? "\"" : NullStr, 561 // arcname, 562 // needs_quoting(arcname) ? "\"" : NullStr, 563 // arctemp); 496 564 } 497 565 else { … … 519 587 else { 520 588 runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 521 hwndCnr, NULL, NULL, "%s %s%s%s", info->list, 522 needs_quoting(arcname) ? "\"" : NullStr, 523 arcname, 524 needs_quoting(arcname) ? "\"" : NullStr); 589 hwndCnr, NULL, NULL, 590 "%s %s", 591 info->list, 592 BldQuotedFileName(s, arcname)); 593 // runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 594 // hwndCnr, NULL, NULL, "%s %s%s%s", info->list, 595 // needs_quoting(arcname) ? "\"" : NullStr, 596 // arcname, 597 // needs_quoting(arcname) ? "\"" : NullStr); 525 598 oldstdout = fileno(stdout); 526 599 DosError(FERR_DISABLEHARDERR); … … 1215 1288 DIRCNRDATA *dcd; 1216 1289 PSZ psz; 1290 CHAR szQuotedArcName[CCHMAXPATH]; 1291 CHAR szQuotedMemberName[CCHMAXPATH]; 1217 1292 1218 1293 switch (msg) { … … 1312 1387 // saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"%s %s %s\r[%s]",dcd->info->extract,dcd->arcname,membername,construct); 1313 1388 runemf2(SEPARATE | WINDOWED | WAIT | 1314 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) |1315 WAIT,1316 dcd->hwndClient, construct, NULL, "%s %s%s%s %s%s%s",1389 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1390 dcd->hwndClient, construct, NULL, 1391 "%s %s %s", 1317 1392 dcd->info->extract, 1318 needs_quoting(dcd->arcname) ? "\"" : NullStr, 1319 dcd->arcname, 1320 needs_quoting(dcd->arcname) ? "\"" : NullStr, 1321 needs_quoting(membername) ? "\"" : NullStr, 1322 membername, 1323 needs_quoting(membername) ? "\"" : NullStr); 1324 if (*construct && construct[strlen(construct) - 1] != '\\') 1325 strcat(construct, "\\"); 1326 strcat(construct, membername); 1393 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1394 BldQuotedFileName(szQuotedMemberName, membername)); 1395 // runemf2(SEPARATE | WINDOWED | WAIT | 1396 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1397 // WAIT, 1398 // dcd->hwndClient, construct, NULL, "%s %s%s%s %s%s%s", 1399 // dcd->info->extract, 1400 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 1401 // dcd->arcname, 1402 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 1403 // needs_quoting(membername) ? "\"" : NullStr, 1404 // membername, 1405 // needs_quoting(membername) ? "\"" : NullStr); 1406 BldFullPathName(construct, construct, membername); 1407 // if (*construct && construct[strlen(construct) - 1] != '\\') 1408 // strcat(construct, "\\"); 1409 // strcat(construct, membername); 1327 1410 if (IsFile(construct) != -1) { 1328 1411 rename(construct, filename); … … 1439 1522 return 0; 1440 1523 } 1441 runemf2(SEPARATE | WINDOWED | 1442 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) |1443 WAIT,1444 dcd->hwndClient, dcd->workdir, NULL, "%s %s%s%s %s%s%s",1524 runemf2(SEPARATE | WINDOWED | WAIT | 1525 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1526 dcd->hwndClient, dcd->workdir, NULL, 1527 "%s %s %s", 1445 1528 dcd->info->exwdirs ? dcd->info->exwdirs : 1446 1529 dcd->info->extract, 1447 needs_quoting(dcd->arcname) ? "\"" : NullStr, 1448 dcd->arcname, 1449 needs_quoting(dcd->arcname) ? "\"" : NullStr, 1450 needs_quoting(s) ? "\"" : NullStr, 1451 s, 1452 needs_quoting(s) ? "\"" : NullStr); 1453 1454 // printf("%s %d runemf2 returned\n", __FILE__, __LINE__); fflush(stdout); // 10 Mar 07 SHL 1530 BldQuotedFileName(szQuotedArcName, dcd->arcname), 1531 BldQuotedFileName(szQuotedMemberName, s)); 1532 // runemf2(SEPARATE | WINDOWED | 1533 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1534 // WAIT, 1535 // dcd->hwndClient, dcd->workdir, NULL, "%s %s%s%s %s%s%s", 1536 // dcd->info->exwdirs ? dcd->info->exwdirs : 1537 // dcd->info->extract, 1538 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 1539 // dcd->arcname, 1540 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 1541 // needs_quoting(s) ? "\"" : NullStr, 1542 // s, 1543 // needs_quoting(s) ? "\"" : NullStr); 1455 1544 if (!dcd->info->exwdirs) { 1456 1545 p = s; … … 1517 1606 strcpy(szBuffer, ad.command); 1518 1607 strcat(szBuffer, " "); 1519 if (needs_quoting(ad.arcname)) 1520 strcat(szBuffer, "\""); 1521 strcat(szBuffer, ad.arcname); 1522 if (needs_quoting(ad.arcname)) 1523 strcat(szBuffer, "\""); 1524 p = &szBuffer[strlen(szBuffer)]; 1608 1609 BldQuotedFileName(szBuffer + strlen(szBuffer), ad.arcname); 1610 // if (needs_quoting(ad.arcname)) 1611 // strcat(szBuffer, "\""); 1612 // strcat(szBuffer, ad.arcname); 1613 // if (needs_quoting(ad.arcname)) 1614 // strcat(szBuffer, "\""); 1615 1616 p = &szBuffer[strlen(szBuffer)]; // Remeber where archiver name ends 1617 1525 1618 if (ad.mask.szMask) { 1526 1619 strcat(szBuffer, " "); 1527 if (needs_quoting(ad.mask.szMask)) 1528 strcat(szBuffer, "\""); 1529 strcat(szBuffer, ad.mask.szMask); 1530 if (needs_quoting(ad.mask.szMask)) 1531 strcat(szBuffer, "\""); 1620 1621 BldQuotedFileName(szBuffer + strlen(szBuffer), ad.mask.szMask); 1622 // if (needs_quoting(ad.mask.szMask)) 1623 // strcat(szBuffer, "\""); 1624 // strcat(szBuffer, ad.mask.szMask); 1625 // if (needs_quoting(ad.mask.szMask)) 1626 // strcat(szBuffer, "\""); 1532 1627 } 1533 1628 strcat(szBuffer, " "); 1534 1629 x = 0; 1630 1631 // Run commands avoiding command line overflow 1535 1632 while (li->list[x]) { 1536 if (needs_quoting(li->list[x])) 1537 strcat(szBuffer, "\""); 1538 strcat(szBuffer, li->list[x]); 1539 if (!IsFile(li->list[x])) { 1540 if (szBuffer[strlen(szBuffer) - 1] != '\\') 1541 strcat(szBuffer, "\\"); 1542 strcat(szBuffer, "*"); 1543 } 1544 if (needs_quoting(li->list[x])) 1545 strcat(szBuffer, "\""); 1633 1634 if (IsFile(li->list[x])) 1635 BldQuotedFileName(szBuffer + strlen(szBuffer), li->list[x]); 1636 else 1637 BldQuotedFullPathName(szBuffer + strlen(szBuffer), li->list[x], "*"); 1638 1639 // if (needs_quoting(li->list[x])) 1640 // strcat(szBuffer, "\""); 1641 // strcat(szBuffer, li->list[x]); 1642 // if (!IsFile(li->list[x])) { 1643 // if (szBuffer[strlen(szBuffer) - 1] != '\\') 1644 // strcat(szBuffer, "\\"); 1645 // strcat(szBuffer, "*"); 1646 // } 1647 // if (needs_quoting(li->list[x])) 1648 // strcat(szBuffer, "\""); 1649 1546 1650 x++; 1547 1651 if (!li->list[x] || strlen(szBuffer) + … … 1554 1658 } 1555 1659 strcat(szBuffer, " "); 1556 } 1660 } // while 1661 1557 1662 PostMsg(dcd->hwndCnr, UM_RESCAN, MPFROMSHORT(1), MPVOID); 1558 1663 Broadcast(WinQueryAnchorBlock(hwnd), … … 1594 1699 if (!li->list || !li->list[0]) 1595 1700 break; 1596 if (li->type == IDM_DELETE) 1597 sprintf(cl, "%s %s%s%s", dcd->info->delete, 1598 (needs_quoting(dcd->arcname)) ? "\"" : NullStr, 1599 dcd->arcname, 1600 (needs_quoting(dcd->arcname)) ? "\"" : NullStr); 1601 else 1602 sprintf(cl, "%s %s%s%s", dcd->info->create, 1603 (needs_quoting(dcd->arcname)) ? "\"" : NullStr, 1604 dcd->arcname, 1605 (needs_quoting(dcd->arcname)) ? "\"" : NullStr); 1701 strcpy(cl, li->type == IDM_DELETE ? 1702 dcd->info->delete : 1703 dcd->info->create); 1704 strcat(cl, " "); 1705 BldQuotedFileName(cl + strlen(cl), dcd->arcname); 1706 // if (li->type == IDM_DELETE) 1707 // sprintf(cl, "%s %s%s%s", dcd->info->delete, 1708 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr, 1709 // dcd->arcname, 1710 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr); 1711 // else 1712 // sprintf(cl, "%s %s%s%s", dcd->info->create, 1713 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr, 1714 // dcd->arcname, 1715 // (needs_quoting(dcd->arcname)) ? "\"" : NullStr); 1606 1716 endofit = &cl[strlen(cl)]; 1607 1717 z = 0; … … 1610 1720 strlen(cl) + strlen(li->list[x]) < 999; x++) { 1611 1721 strcat(cl, " "); 1612 if (needs_quoting(li->list[x])) 1613 strcat(cl, "\""); 1614 strcat(cl, li->list[x]); 1615 if (needs_quoting(li->list[x])) 1616 strcat(cl, "\""); 1722 BldQuotedFileName(cl + strlen(cl), li->list[x]); 1723 // if (needs_quoting(li->list[x])) 1724 // strcat(cl, "\""); 1725 // strcat(cl, li->list[x]); 1726 // if (needs_quoting(li->list[x])) 1727 // strcat(cl, "\""); 1617 1728 } 1618 1729 z = x; 1619 runemf2(SEPARATE | WINDOWED | 1620 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1621 WAIT, 1730 runemf2(SEPARATE | WINDOWED | WAIT | 1731 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 1622 1732 hwnd, NullStr, NULL, "%s", cl); 1623 1733 *endofit = 0; … … 1670 1780 1671 1781 for (x = 0; li->list[x]; x++) { 1672 sprintf(fullname, "%s%s%s", 1673 li->targetpath, 1674 (li->targetpath[strlen(li->targetpath) - 1] == '\\') ? 1675 NullStr : "\\", li->list[x]); 1782 BldFullPathName(fullname, li->targetpath, li->list[x]); 1783 // sprintf(fullname, "%s%s%s", 1784 // li->targetpath, 1785 // (li->targetpath[strlen(li->targetpath) - 1] == '\\') ? 1786 // NullStr : "\\", li->list[x]); 1676 1787 if (IsFile(fullname) != -1) { 1677 1788 AddToList(li->list[x], &exfiles, &numfiles, &numalloc); … … 1708 1819 if (!li->list || !li->list[0]) 1709 1820 break; 1710 sprintf(cl, "%s %s%s%s", (li->type == IDM_EXTRACT || 1711 ((li->type == IDM_VIEW 1712 || li->type == IDM_VIEWTEXT 1713 || li->type == IDM_VIEWBINARY 1714 || li->type == IDM_VIEWARCHIVE 1715 || li->type == IDM_PRINT 1716 || li->type == IDM_EDIT 1717 || li->type == IDM_EDITTEXT 1718 || li->type == IDM_EDITBINARY 1719 && li->type == IDM_MCIPLAY) 1720 && !li->info->exwdirs)) ? li->info-> 1721 extract : li->info->exwdirs, 1722 needs_quoting(li->arcname) ? "\"" : NullStr, 1723 li->arcname, 1724 needs_quoting(li->arcname) ? "\"" : NullStr); 1821 strcpy(cl, 1822 (li->type == IDM_EXTRACT || 1823 ((li->type == IDM_VIEW || 1824 li->type == IDM_VIEWTEXT || 1825 li->type == IDM_VIEWBINARY || 1826 li->type == IDM_VIEWARCHIVE || 1827 li->type == IDM_PRINT || 1828 li->type == IDM_EDIT || 1829 li->type == IDM_EDITTEXT || 1830 (li->type == IDM_EDITBINARY && 1831 li->type == IDM_MCIPLAY)) && 1832 !li->info->exwdirs)) ? 1833 li->info->extract : 1834 li->info->exwdirs); 1835 strcat(cl, " "); 1836 BldQuotedFileName(cl + strlen(cl), li->arcname); 1837 // sprintf(cl, "%s %s%s%s", (li->type == IDM_EXTRACT || 1838 // ((li->type == IDM_VIEW 1839 // || li->type == IDM_VIEWTEXT 1840 // || li->type == IDM_VIEWBINARY 1841 // || li->type == IDM_VIEWARCHIVE 1842 // || li->type == IDM_PRINT 1843 // || li->type == IDM_EDIT 1844 // || li->type == IDM_EDITTEXT 1845 // || li->type == IDM_EDITBINARY 1846 // && li->type == IDM_MCIPLAY) 1847 // && !li->info->exwdirs)) ? li->info-> 1848 // extract : li->info->exwdirs, 1849 // needs_quoting(li->arcname) ? "\"" : NullStr, 1850 // li->arcname, 1851 // needs_quoting(li->arcname) ? "\"" : NullStr); 1725 1852 endofit = &cl[strlen(cl)]; 1726 1853 z = 0; … … 1729 1856 strlen(cl) + strlen(li->list[x]) < 999; x++) { 1730 1857 strcat(cl, " "); 1731 if (needs_quoting(li->list[x])) 1732 strcat(cl, "\""); 1733 strcat(cl, li->list[x]); 1734 if (needs_quoting(li->list[x])) 1735 strcat(cl, "\""); 1858 BldQuotedFileName(cl + strlen(cl), li->list[x]); 1859 // if (needs_quoting(li->list[x])) 1860 // strcat(cl, "\""); 1861 // strcat(cl, li->list[x]); 1862 // if (needs_quoting(li->list[x])) 1863 // strcat(cl, "\""); 1736 1864 ptr = li->list[x]; 1737 1865 while (*ptr) { … … 1831 1959 } 1832 1960 } 1833 sprintf(cl, "%s%s%s", li->targetpath, 1834 (li->targetpath[strlen(li->targetpath) - 1] == '\\') ? 1835 NullStr : "\\", li->list[x]); 1961 BldFullPathName(cl, li->targetpath, li->list[x]); 1962 // sprintf(cl, "%s%s%s", li->targetpath, 1963 // (li->targetpath[strlen(li->targetpath) - 1] == '\\') ? 1964 // NullStr : "\\", li->list[x]); 1836 1965 temp = li->list[x]; 1837 1966 li->list[x] = xstrdup(cl, pszSrcFile, __LINE__); … … 1953 2082 p++; 1954 2083 } 1955 sprintf(fullname, "%s%s%s", dcd->directory, 1956 (dcd->directory[strlen(dcd->directory) - 1] == '\\') ? 1957 NullStr : "\\", li->list[x]); 2084 BldFullPathName(fullname, dcd->directory, li->list[x]); 2085 // sprintf(fullname, "%s%s%s", dcd->directory, 2086 // (dcd->directory[strlen(dcd->directory) - 1] == '\\') ? 2087 // NullStr : "\\", li->list[x]); 1958 2088 if (IsFile(fullname) != -1) 1959 2089 if (AddToList(fullname, &list2, &numfiles, &numalloced)) … … 1964 2094 p++; 1965 2095 if (*p) { 1966 sprintf(fullname, "%s%s%s", dcd->directory, 1967 (dcd->directory[strlen(dcd->directory) - 1] == 1968 '\\') ? NullStr : "\\", 1969 p); 2096 BldFullPathName(fullname, dcd->directory, p); 2097 // sprintf(fullname, "%s%s%s", dcd->directory, 2098 // (dcd->directory[strlen(dcd->directory) - 1] == 2099 // '\\') ? NullStr : "\\", 2100 // p); 1970 2101 if (IsFile(fullname) != -1) 1971 2102 if (AddToList(fullname, &list2, &numfiles, &numalloced)) … … 2029 2160 { 2030 2161 DIRCNRDATA *dcd = INSTDATA(hwnd); 2162 CHAR szQuotedArcName[CCHMAXPATH]; 2031 2163 2032 2164 switch (msg) { … … 2805 2937 runemf2(SEPARATE | WINDOWED | 2806 2938 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2807 hwnd, dcd->directory, NULL, "%s %s %s%s",2939 hwnd, dcd->directory, NULL, "%s %s", 2808 2940 dcd->info->extract, 2809 needs_quoting(dcd->arcname) ? "\"" : NullStr, 2810 dcd->arcname, 2811 needs_quoting(dcd->arcname) ? "\"" : NullStr); 2941 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 2942 // runemf2(SEPARATE | WINDOWED | 2943 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2944 // hwnd, dcd->directory, NULL, "%s %s%s%s", 2945 // dcd->info->extract, 2946 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 2947 // dcd->arcname, 2948 // needs_quoting(dcd->arcname) ? "\"" : NullStr); 2812 2949 if (SHORT1FROMMP(mp1) == IDM_ARCEXTRACTEXIT) 2813 2950 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 2819 2956 runemf2(SEPARATE | WINDOWED | 2820 2957 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2821 hwnd, dcd->directory, NULL, "%s %s%s%s", 2958 hwnd, dcd->directory, NULL, 2959 "%s %s", 2822 2960 dcd->info->exwdirs, 2823 needs_quoting(dcd->arcname) ? "\"" : NullStr, 2824 dcd->arcname, 2825 needs_quoting(dcd->arcname) ? "\"" : NullStr); 2961 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 2962 // runemf2(SEPARATE | WINDOWED | 2963 // (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2964 // hwnd, dcd->directory, NULL, "%s %s%s%s", 2965 // dcd->info->exwdirs, 2966 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 2967 // dcd->arcname, 2968 // needs_quoting(dcd->arcname) ? "\"" : NullStr); 2826 2969 if (SHORT1FROMMP(mp1) == IDM_ARCEXTRACTWDIRSEXIT) 2827 2970 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 2891 3034 if (dcd->info->test) 2892 3035 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 2893 hwnd, NULL, NULL, "%s %s%s%s", dcd->info->test, 2894 needs_quoting(dcd->arcname) ? "\"" : NullStr, 2895 dcd->arcname, 2896 needs_quoting(dcd->arcname) ? "\"" : NullStr); 3036 hwnd, NULL, NULL, 3037 "%s %s",dcd->info->test, 3038 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 3039 // runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 3040 // hwnd, NULL, NULL, "%s %s%s%s",dcd->info->test, 3041 // needs_quoting(dcd->arcname) ? "\"" : NullStr, 3042 // dcd->arcname, 3043 // needs_quoting(dcd->arcname) ? "\"" : NullStr); 2897 3044 break; 2898 3045 … … 2926 3073 2927 3074 for (x = 0; li->list && li->list[x]; x++) { 2928 sprintf(s, "%s%s%s", dcd->workdir, 2929 (dcd->workdir[strlen(dcd->workdir) - 1] == '\\') ? 2930 NullStr : "\\", li->list[x]); 3075 BldFullPathName(s, dcd->workdir, li->list[x]); 3076 // sprintf(s, "%s%s%s", dcd->workdir, 3077 // (dcd->workdir[strlen(dcd->workdir) - 1] == '\\') ? 3078 // NullStr : "\\", li->list[x]); 2931 3079 if (IsFile(s) != 1) { 2932 3080 free(li->list[x]); … … 3048 3196 if (mp2) { 3049 3197 3050 PDRAGITEM pDItem; /* Pointer to DRAGITEM */3051 PDRAGINFO pDInfo; /* Pointer to DRAGINFO */3198 PDRAGITEM pDItem; /* Pointer to DRAGITEM */ 3199 PDRAGINFO pDInfo; /* Pointer to DRAGINFO */ 3052 3200 PARCITEM pci; 3053 3201 … … 3073 3221 DRM_OS2FILE, /* mechanisms and data */ 3074 3222 NULL) && !(pDItem->fsControl & DC_PREPARE)) { 3075 DrgFreeDraginfo(pDInfo); /* Free DRAGINFO 3223 DrgFreeDraginfo(pDInfo); /* Free DRAGINFO */ 3076 3224 return MRFROM2SHORT(DOR_DROP, /* Return okay to drop */ 3077 3225 fCopyDefault ? DO_COPY : DO_MOVE);
Note:
See TracChangeset
for help on using the changeset viewer.