Ignore:
Timestamp:
May 2, 2000, 10:53:15 PM (25 years ago)
Author:
sandervl
Message:

added exception stack dump code; GetLocaleInfoA fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/misc.cpp

    r3372 r3483  
    1 /* $Id: misc.cpp,v 1.21 2000-04-13 18:48:02 sandervl Exp $ */
     1/* $Id: misc.cpp,v 1.22 2000-05-02 20:53:13 sandervl Exp $ */
    22
    33/*
     
    304304//******************************************************************************
    305305//******************************************************************************
     306int SYSTEM EXPORT WriteLogNoEOL(char *tekst, ...)
     307{
     308  USHORT  sel = RestoreOS2FS();
     309  va_list argptr;
     310
     311  ODIN_HEAPCHECK();
     312
     313  if(!init)
     314  {
     315    init = TRUE;
     316
     317#ifdef DEFAULT_LOGGING_OFF
     318    if(getenv("WIN32LOG_ENABLED")) {
     319#else
     320    if(!getenv("NOWIN32LOG")) {
     321#endif
     322        char logname[CCHMAXPATH];
     323
     324        sprintf(logname, "odin32_%d.log", loadNr);
     325        flog = fopen(logname, "w");
     326        if(flog == NULL) {//probably running exe on readonly device
     327                sprintf(logname, "%sodin32_%d.log", kernel32Path, loadNr);
     328                flog = fopen(logname, "w");
     329        }
     330    }
     331    else
     332      fLogging = FALSE;
     333  }
     334
     335  if(fLogging && flog && (dwEnableLogging > 0))
     336  {
     337    THDB *thdb = GetThreadTHDB();
     338
     339    va_start(argptr, tekst);
     340    if(thdb) {
     341        thdb->logfile = (DWORD)flog;
     342    }
     343    vfprintf(flog, tekst, argptr);
     344    if(thdb) thdb->logfile = 0;
     345    va_end(argptr);
     346  }
     347  SetFS(sel);
     348  return 1;
     349}
     350//******************************************************************************
     351//******************************************************************************
    306352void SYSTEM DecreaseLogCount()
    307353{
Note: See TracChangeset for help on using the changeset viewer.