Changeset 1833
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/dll/common.c
r1829 r1833 33 33 14 Sep 09 SHL Blink thread LEDs while threads working 34 34 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 35 12 Jul 15 GKY Fix CN_REALLOCPSZ file name editing code to: 1) Actually reallocate the buffer. 36 2) Point pci->pszDisplayName into the new buffer 3) Eliminate the possibility 37 of updating the container before CN_ENDEDIT is called. 4) Only call RemoveCnrItems 35 13 Jul 15 GKY Fix CN_REALLOCPSZ file name editing code to: 1) Eliminate the possibility of 36 updating the container before CN_ENDEDIT is called. 2) Don't call RemoveCnrItems 38 37 for tree container and collector. 39 38 … … 875 874 } 876 875 else if (mp2) { 877 if ((INT) mp1 == -1) { 878 PCNRITEM pci = (PCNRITEM) mp2; 879 RemoveCnrItems(hwnd, pci, 1, CMA_FREE | CMA_INVALIDATE); 880 } 881 else { 882 Broadcast(WinQueryAnchorBlock(hwnd), 883 dcd->hwndParent, UM_UPDATERECORD, mp2, MPVOID); 884 xfree(mp2, pszSrcFile, __LINE__); 885 } 876 Broadcast(WinQueryAnchorBlock(hwnd), 877 dcd->hwndParent, UM_UPDATERECORD, mp2, MPVOID); 878 xfree(mp2, pszSrcFile, __LINE__); 886 879 } 887 880 }  - 
      
trunk/dll/misc.c
r1829 r1833 72 72 12 Nov 11 GKY Fixed HelpViewer's failure to open help files and subsequent failure with files with spaces. 73 73 28 Jun 14 GKY Fix errors identified with CPPCheck 74 12 Jul 15 GKY Fix CN_REALLOCPSZ file name editing code to: 1) Actually reallocate the buffer. 75 2) Point pci->pszDisplayName into the new buffer 3) Eliminate the possibility 76 of updating the container before CN_ENDEDIT is called. 4) Only call RemoveCnrItems 74 12 Jul 15 GKY Fix CN_REALLOCPSZ file name editing code to: 1) Eliminate the possibility of 75 updating the container before CN_ENDEDIT is called. 2) Don't call RemoveCnrItems 77 76 for tree container and collector. 78 77 … … 979 978 Runtime_Error(pszSrcFile, __LINE__, "bad name"); 980 979 else { 981 DIRCNRDATA *dcd;982 FILEFINDBUF4L ffb;983 HDIR hDir = HDIR_CREATE;984 ULONG nm = 1;985 CHAR *p;986 987 980 if (DosQueryPathInfo(testname, //Why does this return 0 when the file doesn't exist? 988 981 FIL_QUERYFULLNAME, // No new directory creation? … … 993 986 oldname, sizeof(oldname))) 994 987 strcpy(oldname, pci->pszFileName); 995 psz = xrealloc(pci->pszFileName, sizeof(oldname), pszSrcFile, __LINE__);996 if (psz)997 pci->pszFileName = psz;998 else {999 xfree(pci->pszFileName, pszSrcFile, __LINE__);1000 pci->pszFileName = NullStr;1001 return FALSE; // out of memory1002 }1003 if (!dcd) // Point pci->pszDisplayName into the realloc pci->pszFileName1004 dcd = INSTDATA(hwnd);1005 rc = xDosFindFirst(pci->pszFileName,1006 &hDir,1007 FILE_NORMAL | FILE_DIRECTORY |1008 FILE_ARCHIVED | FILE_READONLY |1009 FILE_HIDDEN | FILE_SYSTEM,1010 &ffb, sizeof(ffb), &nm, FIL_QUERYEASIZEL);1011 if (!rc) { // file exists1012 DosFindClose(hDir);1013 if (dcd->type == DIR_FRAME || dcd->type == TREE_FRAME) {1014 p = strrchr(pci->pszFileName, '\\');1015 if (!p) {1016 p = strrchr(pci->pszFileName, ':');1017 if (!p)1018 p = pci->pszFileName;1019 else1020 p++;1021 }1022 else if ((dcd && dcd->type == TREE_FRAME) ||1023 !(ffb.attrFile & FILE_DIRECTORY) || !*(p + 1))1024 p++;1025 if (!*p)1026 p = pci->pszFileName;1027 }1028 else1029 p = pci->pszFileName;1030 pci->pszDisplayName = p;1031 }1032 else1033 return FALSE; // nothing to rename1034 988 WinSetWindowText(hwndMLE, oldname); 1035 989 if (strcmp(oldname, newname)) { … … 1076 1030 free(filename); 1077 1031 } 1078 if (dcd && (dcd->type == TREE_FRAME || dcd->type == COLLECTOR_FRAME))1079 PostMsg(hwnd, UM_FIXEDITNAME, MPFROMLONG(-1), MPFROMP(pci));1080 1032 filename = xstrdup(newname, pszSrcFile, __LINE__); 1081 1033 if (filename) {  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  