Changeset 910 for trunk/dll/systemf.c
- Timestamp:
- Jan 6, 2008, 10:53:49 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/systemf.c
r909 r910 1349 1349 tempcom[offset + 4 - pszPgm] = '\0'; 1350 1350 strcpy(temparg, &pszPgm[offset + 4 - pszPgm]); 1351 /*if ((offsetexe && !offsetcom && !offsetcmd && !offsetbtm && !offsetbat) || 1352 (offsetcom && !offsetexe && !offsetcmd && !offsetbtm && !offsetbat) || 1353 (offsetcmd && !offsetexe && !offsetcom && !offsetbtm && !offsetbat) || 1354 (offsetbtm && !offsetexe && !offsetcom && !offsetcmd && !offsetbat) || 1355 (offsetbat && !offsetexe && !offsetcom && !offsetcmd && !offsetbtm))*/ 1356 remove_first_occurence_of_character("\"", tempcom); 1357 if (strchr(tempcom, '\"') != strrchr(tempcom, '\"')) 1358 saymsg(MB_OK, HWND_DESKTOP, 1359 NullStr, 1360 GetPString(IDS_QUOTESINARGSTEXT), 1361 pszPgm); 1362 else 1363 remove_first_occurence_of_character("\"", tempcom); 1351 while (strchr(tempcom, '\"')) 1352 remove_first_occurence_of_character("\"", tempcom); 1364 1353 if ((temparg[0] == '\"' && temparg[1] == ' ') || 1365 1354 !strstr(pszPgm, "\\:")|| … … 1371 1360 GetPString(IDS_QUOTESINARGSTEXT), 1372 1361 pszPgm); 1373 if (! strstr(strlwr(tempcom), ".exe")) {1362 if (!offsetexe) { 1374 1363 ret = DosFindFirst(tempcom, &hdirFindHandle, FILE_NORMAL, &FindBuffer, 1375 1364 ulResultBufLen, &ulFindCount, FIL_STANDARD); 1376 BldQuotedFileName(szTempPgm, tempcom); 1377 } 1378 else{ 1379 BldQuotedFileName(szTempPgm, tempcom); 1365 if (ret){ 1366 pszChar = tempcom; 1367 while (pszChar){ 1368 if (*pszChar == ' '){ 1369 *pszChar = '\0'; 1370 strcat(tempcom, ".exe"); 1371 ret = DosQueryAppType(tempcom, &ulAppType); 1372 //printf("%d %s\n", ret, tempcom); fflush(stdout); 1373 if (!ret){ 1374 strcpy(temparg, pszPgm + strlen(tempcom) - 3); 1375 break; 1376 } 1377 } 1378 strcpy(tempcom, pszPgm); 1379 pszChar++; 1380 } 1381 } 1382 } 1383 else 1380 1384 ret = DosQueryAppType(tempcom, &ulAppType); 1381 }1385 BldQuotedFileName(szTempPgm, tempcom); 1382 1386 //printf("%d A", ret); fflush(stdout); 1383 1387 if (ret) { … … 1388 1392 pszPgm); 1389 1393 if (ret == MBID_YES){ 1390 if (temparg[0] != ' ') 1391 strcat(szTempPgm, " "); 1392 strcat(szTempPgm, temparg); 1393 pszQuotedCompletePgm = szTempPgm; 1394 pszQuotedCompletePgm = pszPgm; 1394 1395 } 1395 1396 else{ … … 1491 1492 pszPgm); 1492 1493 if (ret == MBID_YES){ 1493 if (temparg[0] != ' ') 1494 strcat(szTempPgm, " "); 1495 strcat(szTempPgm, temparg); 1496 pszQuotedCompletePgm = szTempPgm; 1494 pszQuotedCompletePgm = pszPgm; 1497 1495 } 1498 1496 else{ … … 1501 1499 } 1502 1500 } 1503 ret = saymsg(MB_YESNO ,1501 ret = saymsg(MB_YESNOCANCEL, 1504 1502 HWND_DESKTOP, 1505 1503 NullStr, 1506 1504 GetPString(IDS_PROGRAMNOTEXE3TEXT), 1507 pszPgm );1505 pszPgm, szTempPgm); 1508 1506 if (ret == MBID_YES){ 1509 1507 if (temparg[0] != ' ') … … 1512 1510 pszQuotedCompletePgm = szTempPgm; 1513 1511 } 1514 else{1512 if (ret == MBID_CANCEL){ 1515 1513 fCancelAction = TRUE; 1516 1514 pszQuotedCompletePgm = pszPgm; 1517 1515 } 1516 else 1517 pszQuotedCompletePgm = pszPgm; 1518 1518 } 1519 1519 return pszQuotedCompletePgm;
Note:
See TracChangeset
for help on using the changeset viewer.