Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1069 r1073 339 339 if (pai->pszFileName && pai->pszFileName != NullStr) { 340 340 psz = pai->pszFileName; 341 pai->pszFileName = N ullStr;341 pai->pszFileName = NULL; 342 342 free(psz); 343 343 } … … 1474 1474 free(s); 1475 1475 if (IsFile(filename) == 1) { 1476 #if 1// 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing1476 #if 0 // 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing 1477 1477 if (fViewChild && fArcStuffVisible) 1478 1478 DosSleep(100); // Allow unzip session to finish closing 14 Mar 07 SHL … … 1857 1857 1858 1858 FILE *fp; 1859 CHAR TempFile[CCHMAXPATH];1859 CHAR szTempFile[CCHMAXPATH]; 1860 1860 1861 1861 if (fUseTmp) 1862 BldFullPathName( TempFile, pTmpDir, "$FM2PLAY.$$$");1862 BldFullPathName(szTempFile, pTmpDir, "$FM2PLAY.$$$"); 1863 1863 else 1864 strcpy( TempFile, "$FM2PLAY.$$$");1865 1866 fp = xfopen( TempFile, "w", pszSrcFile, __LINE__);1864 strcpy(szTempFile, "$FM2PLAY.$$$"); 1865 1866 fp = xfopen(szTempFile, "w", pszSrcFile, __LINE__); 1867 1867 if (fp) { 1868 1868 fprintf(fp, "%s", ";AV/2-built FM2Play listfile\n"); … … 1871 1871 fprintf(fp, ";end\n"); 1872 1872 fclose(fp); 1873 strrev( TempFile);1874 strcat( TempFile, "@/");1875 strrev( TempFile);1876 RunFM2Util("FM2PLAY.EXE", TempFile);1873 strrev(szTempFile); 1874 strcat(szTempFile, "@/"); 1875 strrev(szTempFile); 1876 RunFM2Util("FM2PLAY.EXE", szTempFile); 1877 1877 } 1878 1878 } … … 1988 1988 } 1989 1989 BldFullPathName(fullname, dcd->directory, li->list[x]); 1990 // sprintf(fullname, "%s%s%s", dcd->directory,1991 // (dcd->directory[strlen(dcd->directory) - 1] == '\\') ?1992 // NullStr : "\\", li->list[x]);1993 1990 if (IsFile(fullname) != -1) 1994 1991 if (AddToList(fullname, &list2, &numfiles, &numalloced)) … … 2000 1997 if (*p) { 2001 1998 BldFullPathName(fullname, dcd->directory, p); 2002 // sprintf(fullname, "%s%s%s", dcd->directory,2003 // (dcd->directory[strlen(dcd->directory) - 1] ==2004 // '\\') ? NullStr : "\\",2005 // p);2006 1999 if (IsFile(fullname) != -1) 2007 2000 if (AddToList(fullname, &list2, &numfiles, &numalloced)) … … 2056 2049 free(dcd); 2057 2050 # ifdef FORTIFY 2058 Fortify_LeaveScope();2051 //Fortify_LeaveScope(); 2059 2052 # endif 2060 2053 WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL); … … 3042 3035 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 3043 3036 } 3044 else 3037 else { 3045 3038 free(li); 3046 # ifdef FORTIFY 3047 Fortify_LeaveScope(); 3048 # endif 3039 # ifdef FORTIFY 3040 Fortify_LeaveScope(); 3041 # endif 3042 } 3049 3043 } 3050 3044 } -
trunk/dll/init.c
r1069 r1073 537 537 DosFindClose(search_handle); 538 538 } 539 540 DosForceDelete("$FM2PLAY.$$$"); 539 if (fUseTmp) { 540 CHAR szTempFile[CCHMAXPATH]; 541 542 BldFullPathName(szTempFile, pTmpDir, "$FM2PLAY.$$$"); 543 DosForceDelete(szTempFile); 544 } 545 else 546 DosForceDelete("$FM2PLAY.$$$"); 541 547 542 548 EndNote(); -
trunk/dll/killproc.c
r1063 r1073 37 37 #include "errutil.h" // Dos_Error... 38 38 #include "strutil.h" // GetPString 39 #include "pathutil.h" // BldFullPathName 39 40 #include "fm3dll.h" 40 41 #include "fortify.h" … … 236 237 237 238 WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); 238 strcpy(s, "$PSTAT#$.#$#"); 239 if (fUseTmp) 240 BldFullPathName(s, pTmpDir, "$PSTAT#$.#$#"); 241 else 242 strcpy(s, "$PSTAT#$.#$#"); 239 243 unlinkf("%s", s); 240 244 fp = fopen(s, "w"); … … 303 307 } 304 308 Abort: 305 DosForceDelete("$PSTAT#$.#$#"); 309 if (fUseTmp) { 310 CHAR szTempFile[CCHMAXPATH]; 311 312 BldFullPathName(szTempFile, pTmpDir, "$PSTAT#$.#$#"); 313 DosForceDelete(szTempFile); 314 } 315 else 316 DosForceDelete("$PSTAT#$.#$#"); 306 317 PostMsg(hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID); 307 318 WinDestroyMsgQueue(thmq); -
trunk/dll/sysinfo.c
r907 r1073 24 24 #define INCL_LONGLONG 25 25 26 #include "pathutil.h" // BldFullPathName 26 27 #include "fm3dlg.h" 27 28 #include "fm3dll.h" … … 34 35 { 35 36 HWND hwnd = (HWND) arg; 36 CHAR s[2048], *p ;37 CHAR s[2048], *p, szTempFile[CCHMAXPATH]; 37 38 HAB thab; 38 39 HMQ thmq; … … 48 49 if (!WinIsWindow(thab, hwnd)) 49 50 goto Abort; 50 unlinkf("%s", "$RMVIEW.#$#"); 51 fp = xfopen("$RMVIEW.#$#", "w", pszSrcFile, __LINE__); 51 if (fUseTmp) 52 BldFullPathName(szTempFile, pTmpDir, "$RMVIEW.#$#"); 53 else 54 strcpy(szTempFile, "$RMVIEW.#$#"); 55 unlinkf("%s", szTempFile); 56 fp = xfopen(szTempFile, "w", pszSrcFile, __LINE__); 52 57 if (!fp) 53 58 goto Abort; … … 62 67 runemf2(SEPARATE | INVISIBLE | FULLSCREEN | BACKGROUND | WAIT, 63 68 hwnd, pszSrcFile, __LINE__, 64 NULL, NULL, "%s", "RMVIEW.EXE");69 NULL, NULL, "%s", szTempFile); 65 70 oldstdout = fileno(stdout); 66 71 DosDupHandle(newstdout, &oldstdout); … … 70 75 if (!WinIsWindow(thab, hwnd)) 71 76 goto Abort; 72 fp = xfopen( "$RMVIEW.#$#", "r", pszSrcFile, __LINE__);77 fp = xfopen(szTempFile, "r", pszSrcFile, __LINE__); 73 78 if (fp) { 74 79 xfgets(s, sizeof(s), fp, pszSrcFile, __LINE__); … … 98 103 WinTerminate(thab); 99 104 } 100 DosForceDelete("$RMVIEW.#$#"); 105 if (szTempFile) 106 DosForceDelete(szTempFile); 101 107 } 102 108 -
trunk/dll/undel.c
r1063 r1073 31 31 #include "errutil.h" // Dos_Error... 32 32 #include "strutil.h" // GetPString 33 #include "pathutil.h" // BldFullPathName 33 34 #include "fm3dll.h" 34 35 #include "fortify.h" … … 48 49 { 49 50 HWND hwnd; 50 CHAR s[CCHMAXPATH * 2] ;51 CHAR s[CCHMAXPATH * 2], szTempFile[CCHMAXPATH]; 51 52 CHAR *path; 52 53 HAB thab; … … 72 73 IncrThreadUsage(); 73 74 WinSendDlgItemMsg(hwnd, UNDEL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); 74 unlinkf("%s", "$UDELETE.#$#"); 75 fp = xfopen("$UDELETE.#$#", "w", pszSrcFile, __LINE__); 75 if (fUseTmp) 76 BldFullPathName(szTempFile, pTmpDir, "$UDELETE.#$#"); 77 else 78 strcpy(szTempFile, "$UDELETE.#$#"); 79 unlinkf("%s", szTempFile); 80 fp = xfopen(szTempFile, "w", pszSrcFile, __LINE__); 76 81 if (!fp) { 77 82 Win_Error(NULLHANDLE, hwnd, pszSrcFile, __LINE__, … … 103 108 fclose(fp); 104 109 } 105 fp = xfopen( "$UDELETE.#$#", "r", pszSrcFile, __LINE__);110 fp = xfopen(szTempFile, "r", pszSrcFile, __LINE__); 106 111 if (fp) { 107 112 xfgets(s, sizeof(s), fp, pszSrcFile, __LINE__); // Skip 1st line … … 150 155 ; 151 156 } 152 DosForceDelete( "$UDELETE.#$#");157 DosForceDelete(szTempFile); 153 158 xfree(undelinfo, pszSrcFile, __LINE__); 154 159 if (thmq) {
Note:
See TracChangeset
for help on using the changeset viewer.
