Changeset 10300


Ignore:
Timestamp:
Oct 24, 2003, 5:08:11 PM (22 years ago)
Author:
sandervl
Message:

flexible debug logging

Location:
trunk/src/version
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/version/info.c

    r10296 r10300  
    3636#include "winerror.h"
    3737#include "wine/debug.h"
     38
     39#define DBG_LOCALLOG    DBG_info
     40#include "dbglocal.h"
    3841
    3942WINE_DEFAULT_DEBUG_CHANNEL(ver);
  • TabularUnified trunk/src/version/install.c

    r10296 r10300  
    3636#include "lzexpand.h"
    3737#include "wine/debug.h"
     38
     39#define DBG_LOCALLOG    DBG_install
     40#include "dbglocal.h"
    3841
    3942WINE_DEFAULT_DEBUG_CHANNEL(ver);
     
    140143
    141144    /* Print out debugging information */
    142     TRACE("flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)\n",
     145    dprintf(("flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)\n",
    143146          flags, debugstr_a(lpszFilename), debugstr_a(lpszWinDir), debugstr_a(lpszAppDir),
    144147          lpuCurDirLen, lpuCurDirLen ? *lpuCurDirLen : 0,
    145           lpuDestDirLen, lpuDestDirLen ? *lpuDestDirLen : 0 );
     148          lpuDestDirLen, lpuDestDirLen ? *lpuDestDirLen : 0 ));
    146149
    147150    /* Figure out where the file should go; shared files default to the
     
    206209    }
    207210
    208     TRACE("ret = %lu (%s%s%s) curdir=%s destdir=%s\n", retval,
     211    dprintf(("ret = %lu (%s%s%s) curdir=%s destdir=%s\n", retval,
    209212          (retval & VFF_CURNEDEST) ? "VFF_CURNEDEST " : "",
    210213          (retval & VFF_FILEINUSE) ? "VFF_FILEINUSE " : "",
    211214          (retval & VFF_BUFFTOOSMALL) ? "VFF_BUFFTOOSMALL " : "",
    212           debugstr_a(lpszCurDir), debugstr_a(lpszDestDir));
     215          debugstr_a(lpszCurDir), debugstr_a(lpszDestDir)));
    213216
    214217    return retval;
     
    231234
    232235    /* Print out debugging information */
    233     TRACE("flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)\n",
     236    dprintf(("flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)\n",
    234237          flags, debugstr_w(lpszFilename), debugstr_w(lpszWinDir), debugstr_w(lpszAppDir),
    235238          lpuCurDirLen, lpuCurDirLen ? *lpuCurDirLen : 0,
    236           lpuDestDirLen, lpuDestDirLen ? *lpuDestDirLen : 0 );
     239          lpuDestDirLen, lpuDestDirLen ? *lpuDestDirLen : 0 ));
    237240
    238241    /* Figure out where the file should go; shared files default to the
     
    297300    }
    298301
    299     TRACE("ret = %lu (%s%s%s) curdir=%s destdir=%s\n", retval,
     302    dprintf(("ret = %lu (%s%s%s) curdir=%s destdir=%s\n", retval,
    300303          (retval & VFF_CURNEDEST) ? "VFF_CURNEDEST " : "",
    301304          (retval & VFF_FILEINUSE) ? "VFF_FILEINUSE " : "",
    302305          (retval & VFF_BUFFTOOSMALL) ? "VFF_BUFFTOOSMALL " : "",
    303           debugstr_w(lpszCurDir), debugstr_w(lpszDestDir));
     306          debugstr_w(lpszCurDir), debugstr_w(lpszDestDir)));
    304307    return retval;
    305308}
     
    314317    buf=HeapAlloc(GetProcessHeap(), 0, alloclen);
    315318    if(buf == NULL) {
    316         WARN("Memory exausted while fetching version info!\n");
     319        dprintf(("Memory exausted while fetching version info!\n"));
    317320        return NULL;
    318321    }
     
    328331            buf = HeapAlloc(GetProcessHeap(), 0, alloclen);
    329332            if(buf == NULL) {
    330                WARN("Memory exausted while fetching version info!\n");
     333               dprintf(("Memory exausted while fetching version info!\n"));
    331334               return NULL;
    332335            }
     
    336339                *vffi = (VS_FIXEDFILEINFO*)(buf+0x28);
    337340            if ((*vffi)->dwSignature != VS_FFI_SIGNATURE)
    338                 WARN("Bad VS_FIXEDFILEINFO signature 0x%08lx\n",(*vffi)->dwSignature);
     341                dprintf(("Bad VS_FIXEDFILEINFO signature 0x%08lx\n",(*vffi)->dwSignature));
    339342            return buf;
    340343        }
     
    369372    OFSTRUCT    ofs;
    370373
    371     TRACE("(%x,%s,%s,%s,%s,%s,%p,%d)\n",
     374    dprintf(("(%x,%s,%s,%s,%s,%s,%p,%d)\n",
    372375            flags,srcfilename,destfilename,srcdir,destdir,curdir,tmpfile,*tmpfilelen
    373     );
     376    ));
    374377    xret = 0;
    375378    sprintf(srcfn,"%s\\%s",srcdir,srcfilename);
  • TabularUnified trunk/src/version/resource.c

    r10296 r10300  
    4444#include "wine/debug.h"
    4545#include <module.h>
     46
     47#define DBG_LOCALLOG    DBG_resource
     48#include "dbglocal.h"
    4649
    4750WINE_DEFAULT_DEBUG_CHANNEL(ver);
     
    192195    if ( !resTabSize )
    193196    {
    194         TRACE("No resources in NE dll\n" );
     197        dprintf(("No resources in NE dll\n" ));
    195198        return FALSE;
    196199    }
     
    234237        }
    235238    }
    236     TRACE("No typeid entry found for %p\n", typeid );
     239    dprintf(("No typeid entry found for %p\n", typeid ));
    237240    HeapFree( GetProcessHeap(), 0, resTab );
    238241    return FALSE;
     
    257260            if (nameInfo->id == id) goto found_name;
    258261    }
    259     TRACE("No resid entry found for %p\n", typeid );
     262    dprintf(("No resid entry found for %p\n", typeid ));
    260263    HeapFree( GetProcessHeap(), 0, resTab );
    261264    return FALSE;
     
    295298    if ( !resDataDir->Size )
    296299    {
    297         TRACE("No resources in PE dll\n" );
     300        dprintf(("No resources in PE dll\n" ));
    298301        return FALSE;
    299302    }
     
    327330    {
    328331        HeapFree( GetProcessHeap(), 0, sections );
    329         TRACE("Couldn't find resource section\n" );
     332        dprintf(("Couldn't find resource section\n" ));
    330333        return FALSE;
    331334    }
     
    350353    if ( !resPtr )
    351354    {
    352         TRACE("No typeid entry found for %p\n", typeid );
     355        dprintf(("No typeid entry found for %p\n", typeid ));
    353356        goto done;
    354357    }
     
    356359    if ( !resPtr )
    357360    {
    358         TRACE("No resid entry found for %p\n", resid );
     361        dprintf(("No resid entry found for %p\n", resid ));
    359362        goto done;
    360363    }
     
    362365    if ( !resPtr )
    363366    {
    364         TRACE("No default language entry found for %p\n", resid );
     367        dprintf(("No default language entry found for %p\n", resid ));
    365368        goto done;
    366369    }
     
    376379    if ( i == nSections )
    377380    {
    378         TRACE("Couldn't find resource data section\n" );
     381        dprintf(("Couldn't find resource data section\n" ));
    379382        goto done;
    380383    }
     
    404407    DWORD reslen;
    405408
    406     TRACE("(%s,type=0x%lx,id=0x%lx,off=%p)\n",
     409    dprintf(("(%s,type=0x%lx,id=0x%lx,off=%p)\n",
    407410                debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
    408                 lpszResId );
     411                lpszResId ));
    409412
    410413    lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ );
     
    441444    DWORD reslen = dwResLen;
    442445
    443     TRACE("(%s,type=0x%lx,id=0x%lx,off=%ld,len=%ld,data=%p)\n",
     446    dprintf(("(%s,type=0x%lx,id=0x%lx,off=%ld,len=%ld,data=%p)\n",
    444447                debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
    445                 dwFileOffset, dwResLen, lpvData );
     448                dwFileOffset, dwResLen, lpvData ));
    446449
    447450    lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ );
Note: See TracChangeset for help on using the changeset viewer.