Changeset 742 for trunk/dll/comp.c


Ignore:
Timestamp:
Jul 30, 2007, 12:56:30 AM (18 years ago)
Author:
Steven Levine
Message:

Use Win_Error to report container errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r741 r742  
    2424  03 Nov 06 SHL Count thread usage
    2525  22 Mar 07 GKY Use QWL_USER
     26  29 Jul 07 SHL Use Win_Error to report container errors
    2627
    2728***********************************************************************/
     
    429430                           MPFROM2SHORT(1, CMA_FREE | CMA_INVALIDATE));
    430431              }
    431               else {
     432              else {
    432433                pci->pszFileName = xstrdup(NullStr, pszSrcFile, __LINE__);
    433434                //pci->pszFileName = pci->szFileName;
     
    480481                if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\')
    481482                  pciO->pszFileName++;
    482               }
     483              }
    483484              strcpy(pciO->szDispAttr, pci->szDispAttr);
    484485              pciO->attrFile = pci->attrFile;
     
    561562                if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\')
    562563                  pciO->pszFileName++;
    563               }
     564              }
    564565              strcpy(pciO->szDispAttr, pci->szDispAttr);
    565566              pciO->attrFile = pci->attrFile;
     
    997998                               MPFROMLONG(recsNeeded));
    998999        if (!pcilFirst) {
    999           Runtime_Error(pszSrcFile, __LINE__, "CM_ALLOCRECORD %u failed",
    1000                         recsNeeded);
     1000          Win_Error(hwndLeft, cmp->hwnd, pszSrcFile, __LINE__, "CM_ALLOCRECORD %u failed",
     1001                    recsNeeded);
    10011002          recsNeeded = 0;
    10021003        }
     
    10071008                               MPFROMLONG(recsNeeded));
    10081009        if (!pcirFirst) {
    1009           Runtime_Error(pszSrcFile, __LINE__, "CM_ALLOCRECORD %u failed",
    1010                         recsNeeded);
     1010          Win_Error(hwndRight, cmp->hwnd, pszSrcFile, __LINE__, "CM_ALLOCRECORD %u failed",
     1011                    recsNeeded);
    10111012          recsNeeded = 0;
    10121013          pcil = pcilFirst;
     
    10261027          //pcir->pszFileName = pcir->szFileName;
    10271028          // 23 Jul 07 SHL fixme to set pszIcon after pszFileName allocated
    1028           // 23 Jul 07 SHL fixme to set pszLongName after pszFileName allocated
    1029           pcir->pszFileName = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);//29 Jul 07 GKY Temp fix to crash
     1029          // 23 Jul 07 SHL fixme to set pszLongName after pszFileName allocated
     1030          pcir->pszFileName = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);//29 Jul 07 GKY Temp fix to crash
    10301031          pcir->rc.pszIcon = pcir->pszFileName;
    10311032          pcir->rc.hptrIcon = (HPOINTER) 0;
     
    10351036          pcir->pszDispAttr = pcir->szDispAttr;
    10361037          pcil->hwndCnr = hwndLeft;
    1037           //pcil->pszFileName = pcil->szFileName;
    1038           pcil->pszFileName = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);//29 Jul 07 GKY Temp fix to crash
     1038          //pcil->pszFileName = pcil->szFileName;
     1039          pcil->pszFileName = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);//29 Jul 07 GKY Temp fix to crash
    10391040          pcil->rc.pszIcon = pcil->pszFileName;
    10401041          pcil->rc.hptrIcon = (HPOINTER) 0;
     
    10461047            x = stricmp(filesl[l]->fname, filesr[r]->fname);
    10471048            if (!x) {
    1048                 // Same
     1049                // Same
    10491050              sprintf(pcil->pszFileName, "%s%s%s", cmp->leftdir,
    10501051                      (cmp->leftdir[strlen(cmp->leftdir) - 1] == '\\') ?
    10511052                      NullStr : "\\", filesl[l]->fname);
    1052               // pcil->rc.hptrIcon    = hptrFile;
     1053              // pcil->rc.hptrIcon = hptrFile;
    10531054              pcil->pszFileName = pcil->pszFileName + lenl;
    10541055              pcil->attrFile = filesl[l]->attrFile;
     
    10921093              pcir->pszFileName = pcir->pszFileName + lenr;
    10931094              pcir->attrFile = filesr[r]->attrFile;
    1094               // pcir->rc.hptrIcon    = hptrFile;
     1095              // pcir->rc.hptrIcon = hptrFile;
    10951096              y = 0;
    10961097              for (x = 0; x < 6; x++)
     
    11901191              pcil->pszFileName = pcil->pszFileName + lenl;
    11911192              pcil->attrFile = filesl[l]->attrFile;
    1192               // pcil->rc.hptrIcon    = hptrFile;
     1193              // pcil->rc.hptrIcon = hptrFile;
    11931194              y = 0;
    11941195              for (x = 0; x < 6; x++)
     
    12341235              pcir->pszFileName = pcir->pszFileName + lenr;
    12351236              pcir->attrFile = filesr[r]->attrFile;
    1236               // pcir->rc.hptrIcon    = hptrFile;
     1237              // pcir->rc.hptrIcon = hptrFile;
    12371238              y = 0;
    12381239              for (x = 0; x < 6; x++) {
     
    12801281            pcil->pszFileName = pcil->pszFileName + lenl;
    12811282            pcil->attrFile = filesl[l]->attrFile;
    1282             // pcil->rc.hptrIcon    = hptrFile;
     1283            // pcil->rc.hptrIcon = hptrFile;
    12831284            y = 0;
    12841285            for (x = 0; x < 6; x++)
     
    13241325            pcir->pszFileName = pcir->pszFileName + lenr;
    13251326            pcir->attrFile = filesr[r]->attrFile;
    1326             // pcir->rc.hptrIcon    = hptrFile;
     1327            // pcir->rc.hptrIcon = hptrFile;
    13271328            y = 0;
    13281329            for (x = 0; x < 6; x++) {
     
    13861387        if (!WinSendMsg(hwndLeft, CM_INSERTRECORD,
    13871388                        MPFROMP(pcilFirst), MPFROMP(&ri))) {
     1389          Win_Error(hwndLeft, cmp->hwnd, pszSrcFile, __LINE__, "CM_INSERTRECORD");
    13881390          pcil = pcilFirst;
    13891391          while (pcil) {
     
    14041406        if (!WinSendMsg(hwndRight, CM_INSERTRECORD,
    14051407                        MPFROMP(pcirFirst), MPFROMP(&ri))) {
     1408          Win_Error(hwndLeft, cmp->hwnd, pszSrcFile, __LINE__, "CM_INSERTRECORD");
    14061409          WinSendMsg(hwndLeft, CM_REMOVERECORD,
    14071410                     MPVOID, MPFROM2SHORT(0, CMA_FREE | CMA_INVALIDATE));
Note: See TracChangeset for help on using the changeset viewer.