Changeset 1780
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1773 r1780 105 105 or gzip.exe on TAR.B/GZ archives. 106 106 06 Apr 14 GKY Removed all BZ/GZ checks 107 28 Jun 14 GKY Fix errors identified with CPPCheck; Fix retry to create workdir code 107 108 108 109 ***********************************************************************/ … … 2489 2490 for (z = 0; z < 99; z++) { 2490 2491 was++; 2491 sprintf(p, "%03x" );2492 sprintf(p, "%03x", was); 2492 2493 rc = DosCreateDir(dcd->workdir, 0); 2493 2494 if (!rc || rc != ERROR_ACCESS_DENIED) … … 2496 2497 } 2497 2498 } 2498 if (rc) 2499 if (rc) { 2499 2500 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); 2500 return 0; 2501 return 0; 2502 } 2501 2503 } 2502 2504 } -
trunk/dll/command.c
r1673 r1780 42 42 03 Jul 11 GKY Fixed problem with creation of duplicate command IDs. 43 43 24 Sep 11 GKY Fixed trap caused by selecting cancel from duplicate hotkey dialog if adding or replacing a command 44 28 Jun 14 GKY Fix errors identified with CPPCheck 44 45 45 46 ***********************************************************************/ … … 400 401 if (!xfgets_bstripcr(flags, sizeof(flags), fp, pszSrcFile, __LINE__)) 401 402 break; 402 flags[3 4] = 0;403 flags[33] = 0; 403 404 if (!pszCmdLine) 404 405 continue; -
trunk/dll/defview.c
r1773 r1780 30 30 02 Jan 12 GKY Completely rework ShowMultimedia to only test and try to open files with known multimedia extensions 31 31 This fixes some traps in GBM.DLL and PMCTLS.DLL; mmioIdentifyFile appears to pretty much be broken. 32 28 Jun 14 GKY Fix errors identified with CPPCheck 32 33 33 34 ***********************************************************************/ … … 105 106 else { 106 107 ULONG cmp; 107 CHAR cmps[ 5];108 CHAR cmps[6]; 108 109 109 110 p = strrchr(filename, '.'); -
trunk/dll/droplist.c
r1673 r1780 22 22 08 Mar 09 GKY Additional strings move to PCSZs 23 23 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 24 28 Jun 14 GKY Fix errors identified with CPPCheck 24 25 25 26 ***********************************************************************/ … … 250 251 { 251 252 PDRAGINFO pDInfo; 252 ULONG numitems ;253 ULONG numitems = 0; 253 254 254 255 pDInfo = mp1; -
trunk/dll/filldir.c
r1778 r1780 105 105 22 Mar 14 GKY Reverted some code from the RemoveCnrItems changes adding a previously 106 106 missing break and comments explaining the code structure. 107 28 Jun 14 GKY Fix errors identified with CPPCheck 107 108 108 109 ***********************************************************************/ … … 300 301 HPOINTER hptr; 301 302 ULONG cmp; 302 CHAR cmps[ 5];303 CHAR cmps[6]; 303 304 304 305 p = strrchr(p, '.'); -
trunk/dll/grep.c
r1707 r1780 43 43 05 Aug 12 GKY Always sort "Find Dups" by filename in the collector. 44 44 08 Feb 14 SHL Support Ignore SVN option 45 28 Jun 14 GKY Fix errors identified with CPPCheck 45 46 46 47 ***********************************************************************/ … … 445 446 WinTerminate(ghab); 446 447 } 447 if (!gh mq || !ghab)448 if (!ghab || !ghmq) 448 449 WinPostMsg(grep.hwndFiles, UM_CONTAINER_FILLED, MPVOID, MPVOID); 449 450 if (grep.dupehead) -
trunk/dll/misc.c
r1736 r1780 71 71 xDosAlloc* wrappers. 72 72 12 Nov 11 GKY Fixed HelpViewer's failure to open help files and subsequent failure with files with spaces. 73 28 Jun 14 GKY Fix errors identified with CPPCheck 73 74 74 75 ***********************************************************************/ … … 2140 2141 CHAR configsys[] = "C:\\CONFIG.SYS"; 2141 2142 static CHAR var[8192], beg[16384], end[16384]; 2142 BOOL warp ;2143 BOOL warp = FALSE; 2143 2144 FILE *fp; 2144 2145 PFN DQELIBPATH = NULL; -
trunk/dll/newview.c
r1673 r1780 198 198 //to the first word that contains the character then prepends <mailto: and appends > 199 199 200 CHAR *mailstr(CHAR *pszSrc, CHAR *pszFindChar, LONG StrLens)200 PSZ mailstr(CHAR *pszSrc, CHAR *pszFindChar, LONG StrLens) 201 201 { 202 202 CHAR *pszCharCounter; 203 203 CHAR *pszTestStr = pszSrc; 204 CHAR szMailTo[ 1024] = "mailto:";204 CHAR szMailTo[SEARCHSTRINGLEN] = "mailto:"; 205 205 //CHAR szMailEnd[] = ">"; 206 206 … … 216 216 strcat(szMailTo, pszSrc); 217 217 // strcat(szMailTo, szMailEnd); 218 pszSrc = szMailTo;218 strcpy(pszSrc, szMailTo); 219 219 return pszSrc; 220 220 } … … 243 243 strcat(szMailTo, pszSrc); 244 244 //strcat(szMailTo, szMailEnd); 245 pszSrc = szMailTo;245 strcpy(pszSrc, szMailTo); 246 246 return pszSrc; 247 247 } … … 262 262 CHAR *p, *e, *pp; 263 263 SHORT count; 264 CHAR szUrlString[SEARCHSTRINGLEN]; 264 265 265 266 WinSetWindowPtr(hwnd, QWL_USER, mp2); … … 301 302 while (p && *p && p < e); 302 303 p = urld->line; 303 if (mailstr(p, "@", e - p)) { 304 pp = mailstr(p, "@", e - p); 305 strcpy(urld->url, pp); 304 if (strchr(p, '@')) { 305 strcpy(szUrlString, urld->line); 306 mailstr(szUrlString, "@", e - p); 307 strcpy(urld->url, szUrlString); 308 if (pp = strchr(urld->url, '>')) 309 *pp = 0; 306 310 WinSendDlgItemMsg(hwnd, URL_LISTBOX, LM_INSERTITEM, 307 311 MPFROM2SHORT(LIT_END, 0), MPFROMP(urld->url)); … … 1400 1404 } // if got sim 1401 1405 } // if got VIEWDATA 1406 if (ad && !ad->stopflag) { 1407 PostMsg(hwnd, UM_CONTAINER_FILLED, MPFROMLONG(firstline), 1408 MPFROMLONG(cursored)); 1409 ad->relining = FALSE; 1410 } 1402 1411 WinDestroyMsgQueue(hmq2); 1403 1412 } … … 1409 1418 # endif 1410 1419 DosPostEventSem(CompactSem); 1411 if (ad && !ad->stopflag) { //Fixme can't post message withou HAB GKY 7-10-081412 PostMsg(hwnd, UM_CONTAINER_FILLED, MPFROMLONG(firstline),1413 MPFROMLONG(cursored));1414 ad->relining = FALSE;1415 }1416 1420 } 1417 1421 … … 2426 2430 SHORT numsels, sSelect = 0, numinserted; 2427 2431 ULONG linenum, size; 2432 CHAR *s = NULL, *p; 2428 2433 2429 2434 if (!ad->hex && ad->lines) { 2430 2435 2431 CHAR *p, *e; 2436 CHAR *e; 2437 CHAR szUrlString[SEARCHSTRINGLEN]; 2432 2438 2433 2439 width = (Rectl.xRight - Rectl.xLeft) / ad->fattrs.lAveCharWidth; … … 2442 2448 width = e - p; 2443 2449 if (!width) 2444 goto NoAdd; 2445 2450 goto NoAdd; 2451 2452 strcpy(szUrlString,ad->lines[whichline]); 2446 2453 if ((ad->httpin && (*httprun || fHttpRunWPSDefault) && 2447 strnstr( ad->lines[whichline], "http://", width)) ||2454 strnstr(szUrlString, "http://", width)) || 2448 2455 (ad->ftpin && (*ftprun || fFtpRunWPSDefault) && 2449 strnstr( ad->lines[whichline], "ftp://", width)) ||2450 (ad->mailin && *mailrun && mailstr( ad->lines[whichline], "@", width))) {2456 strnstr(szUrlString, "ftp://", width)) || 2457 (ad->mailin && *mailrun && mailstr(szUrlString, "@", width))) { 2451 2458 2452 2459 USHORT ret; … … 2456 2463 if (urld) { 2457 2464 urld->size = sizeof(URLDATA); 2458 urld->line = ad->lines[whichline];2465 urld->line = szUrlString; 2459 2466 urld->len = width; 2460 2467 ret = (USHORT) WinDlgBox(HWND_DESKTOP, hwnd, UrlDlgProc, … … 2515 2522 } 2516 2523 free(urld); 2517 goto NoAdd;2518 case 3:2524 goto NoAdd; 2525 case 3: 2519 2526 if (*urld->url){ 2520 2527 runemf2(SEPARATE | WINDOWED, … … 2532 2539 } 2533 2540 } 2534 } 2535 //Move line to selection box at top of viewer 2536 numsels = (SHORT) WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2537 LM_QUERYITEMCOUNT, MPVOID, 2538 MPVOID); 2539 if (numsels > 0) { 2540 for (sSelect = 0; sSelect < numsels; sSelect++) { 2541 linenum = 2542 (ULONG) WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2543 LM_QUERYITEMHANDLE, 2544 MPFROM2SHORT(sSelect, 0), MPVOID); 2545 if (linenum == whichline) 2546 goto NoAdd; 2547 } 2548 } 2549 { 2550 CHAR *s = NULL, *p; 2551 2552 if (!ad->hex && ad->lines) { 2553 s = xmalloc(width + 2, pszSrcFile, __LINE__); 2554 if (!s) 2555 goto NoAdd; 2556 strncpy(s, ad->lines[whichline], width + 1); 2557 s[width + 1] = 0; 2558 p = s; 2559 while (*p) { 2560 if (*p == '\r' || *p == '\n') { 2561 *p = 0; 2562 break; 2563 } 2564 p++; 2565 } 2566 } 2567 else { 2568 2569 register ULONG x; 2570 2571 width = ad->textsize - (whichline * 16); 2572 width = min(width, 16); //standard hexx line length 2573 //use 80 as width * 5 gives inconsistent format on short lines 2574 s = xmalloc(80, pszSrcFile, __LINE__); 2575 if (!s) 2576 goto NoAdd; 2577 sprintf(s, "%08lx ", whichline * 16); 2578 p = s + 9; 2579 for (x = 0; x < width; x++) { 2580 sprintf(p, " %02x", (UCHAR)ad->text[(whichline * 16) + x]); 2581 p += 3; 2582 } 2583 *p = ' '; 2584 p++; 2585 *p = ' '; 2586 p++; 2587 for (x = 0; x < width; x++) { 2588 *p = ad->text[(whichline * 16) + x]; 2589 p++; 2590 } 2591 *p = 0; 2592 } 2593 if (s) { 2594 if (*s) { 2595 ad->dummy = TRUE; 2596 numinserted = (SHORT) WinSendDlgItemMsg(ad->hwndFrame, 2597 NEWVIEW_LISTBOX, 2598 LM_INSERTITEM, 2599 MPFROM2SHORT(LIT_END, 2600 0), 2601 MPFROMP(s)); 2602 ad->dummy = FALSE; 2603 if (numinserted >= 0) 2604 WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2605 LM_SETITEMHANDLE, 2606 MPFROM2SHORT(numinserted, 0), 2607 MPFROMLONG(whichline)); 2608 } 2609 free(s); 2610 } 2611 } 2541 } 2542 //Move line to selection box at top of viewer 2543 numsels = (SHORT) WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2544 LM_QUERYITEMCOUNT, MPVOID, 2545 MPVOID); 2546 if (numsels > 0) { 2547 for (sSelect = 0; sSelect < numsels; sSelect++) { 2548 linenum = 2549 (ULONG) WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2550 LM_QUERYITEMHANDLE, 2551 MPFROM2SHORT(sSelect, 0), MPVOID); 2552 if (linenum == whichline) 2553 goto NoAdd; 2554 } 2555 } 2556 //{ 2557 if (!ad->hex && ad->lines) { 2558 s = xmalloc(width + 2, pszSrcFile, __LINE__); 2559 if (!s) 2560 goto NoAdd; 2561 strncpy(s, ad->lines[whichline], width + 1); 2562 s[width + 1] = 0; 2563 p = s; 2564 while (*p) { 2565 if (*p == '\r' || *p == '\n') { 2566 *p = 0; 2567 break; 2568 } 2569 p++; 2570 } 2571 } 2572 else { 2573 2574 register ULONG x; 2575 2576 width = ad->textsize - (whichline * 16); 2577 width = min(width, 16); //standard hexx line length 2578 //use 80 as width * 5 gives inconsistent format on short lines 2579 s = xmalloc(80, pszSrcFile, __LINE__); 2580 if (!s) 2581 goto NoAdd; 2582 sprintf(s, "%08lx ", whichline * 16); 2583 p = s + 9; 2584 for (x = 0; x < width; x++) { 2585 sprintf(p, " %02x", (UCHAR)ad->text[(whichline * 16) + x]); 2586 p += 3; 2587 } 2588 *p = ' '; 2589 p++; 2590 *p = ' '; 2591 p++; 2592 for (x = 0; x < width; x++) { 2593 *p = ad->text[(whichline * 16) + x]; 2594 p++; 2595 } 2596 *p = 0; 2597 } 2598 if (s) { 2599 if (*s) { 2600 ad->dummy = TRUE; 2601 numinserted = (SHORT) WinSendDlgItemMsg(ad->hwndFrame, 2602 NEWVIEW_LISTBOX, 2603 LM_INSERTITEM, 2604 MPFROM2SHORT(LIT_END, 2605 0), 2606 MPFROMP(s)); 2607 ad->dummy = FALSE; 2608 if (numinserted >= 0) 2609 WinSendDlgItemMsg(ad->hwndFrame, NEWVIEW_LISTBOX, 2610 LM_SETITEMHANDLE, 2611 MPFROM2SHORT(numinserted, 0), 2612 MPFROMLONG(whichline)); 2613 } 2614 free(s); 2615 } 2616 //} 2612 2617 if (!numsels) 2613 2618 WinSendMsg(ad->hwndFrame, WM_UPDATEFRAME, -
trunk/dll/worker.c
r1741 r1780 1206 1206 SEARCH_CUR_DIRECTORY, 1207 1207 (CHAR *) PCSZ_PATH, (CHAR *) PCSZ_FM2PLAYEXE, (PBYTE)fbuf, CCHMAXPATH - 1)) 1208 total += MaxFM2playStrLen;1208 total = MaxFM2playStrLen; 1209 1209 else 1210 1210 total = strlen(fbuf);
Note:
See TracChangeset
for help on using the changeset viewer.
