Changeset 1840 for trunk/dll/errutil.c


Ignore:
Timestamp:
Aug 12, 2015, 7:06:11 AM (10 years ago)
Author:
Steven Levine
Message:

Expose GetTidForThread and use

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/errutil.c

    r1722 r1840  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2004, 2014 Steven H. Levine
     9  Copyright (c) 2004, 2015 Steven H. Levine
    1010
    1111  12 Aug 04 SHL Comments
     
    4242  16 Feb 14 GKY Rework readonly check on delete code so it actually works in a logical way
    4343                and so it works with move to trashcan inabled.
     44  09 Nov 13 SHL Use GetTidForThread in DbgMsg and tweak for for editors that understand file:line
    4445
    4546***********************************************************************/
     
    6162#include "notebook.h"                   // fErrorBeepOff
    6263#include "init.h"                       // Data declares
     64#include "misc.h"                       // GetTidForThread
    6365#include "wrappers.h"                   // xmallocz
    6466#include "fm3dll2.h"
     
    8183VOID DbgMsg(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...)
    8284{
    83   PIB *ppib;
    84   TIB *ptib;
    8585  ULONG ultid;
    86   APIRET apiret;
    8786  va_list va;
    8887
     
    106105#endif
    107106
    108   apiret = DosGetInfoBlocks(&ptib, &ppib);
    109   if (apiret)
    110     ultid = 0;
    111   else
    112     ultid = ptib->tib_ptib2->tib2_ultid;
     107  ultid = GetTidForThread();
    113108
    114109  // OK for source file name to be null
    115   fprintf(stderr, "%s %u (%lu)", pszSrcFile ? pszSrcFile : "n/a", uSrcLineNo, ultid);
     110  // 2015-08-08 SHL Use file:line for editors that support it
     111  fprintf(stderr, "%s:%u (%lu)", pszSrcFile ? pszSrcFile : "n/a", uSrcLineNo, ultid);
    116112  // If format null want just file and line
    117113  if (pszFmt) {
Note: See TracChangeset for help on using the changeset viewer.