Changeset 614 for trunk/dll/error.c


Ignore:
Timestamp:
Apr 19, 2007, 4:24:12 AM (18 years ago)
Author:
Steven Levine
Message:

Reformat logged errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/error.c

    r613 r614  
    7878  // Append file name and line number
    7979  sprintf(szMsg + strlen(szMsg),
    80           GetPString(IDS_GENERR1TEXT), pszFileName, ulLineNo, "  ");
     80          GetPString(IDS_GENERR1TEXT), pszFileName, ulLineNo, " ");
    8181
    8282  // Get last PM error for the current thread
     
    9797     */
    9898    psz = szMsg + strlen(szMsg);
    99     sprintf(psz, "#0x%04x  \"", ERRORIDERROR(pErrInfoBlk->idError));
     99    sprintf(psz, "#0x%04x \"", ERRORIDERROR(pErrInfoBlk->idError));
    100100    psz += strlen(psz);
    101101    strcpy(psz, ((PSZ) pErrInfoBlk) + *(PSHORT) pszOffset);
    102102    psz += strlen(psz);
     103    // Chop trailing mush
     104    psz--;
     105    while (*psz == '\r' || *psz == '\n' || *psz == ' ')
     106      *psz-- = 0;
     107    if (*psz)
     108      psz++;
    103109    strcpy(psz, "\"");
    104110    WinFreeErrorInfo(pErrInfoBlk);      // Free resource segment
     
    273279    fputs(pszMsg, stderr);
    274280    fputc('\n', stderr);
     281    fputc('\n', stderr);
    275282    fflush(stderr);
    276283  }
Note: See TracChangeset for help on using the changeset viewer.