Ignore:
Timestamp:
Dec 12, 1999, 3:32:38 PM (26 years ago)
Author:
sandervl
Message:

added support for private logfiles

File:
1 edited

Legend:

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

    r1708 r2061  
    1 /* $Id: misc.cpp,v 1.14 1999-11-11 19:10:09 sandervl Exp $ */
     1/* $Id: misc.cpp,v 1.15 1999-12-12 14:32:38 sandervl Exp $ */
    22
    33/*
     
    2828#include <misc.h>
    2929#include "initterm.h"
     30#include "logging.h"
    3031
    3132/*****************************************************************************
     
    284285}
    285286//******************************************************************************
     287//******************************************************************************
     288int SYSTEM EXPORT WritePrivateLog(void *logfile, char *tekst, ...)
     289{
     290  USHORT  sel = RestoreOS2FS();
     291  va_list argptr;
     292
     293  if(fLogging && logfile)
     294  {
     295    va_start(argptr, tekst);
     296    vfprintf((FILE *)logfile, tekst, argptr);
     297    va_end(argptr);
     298
     299    if(tekst[strlen(tekst)-1] != '\n')
     300      fprintf((FILE *)logfile, "\n");
     301  }
     302
     303  SetFS(sel);
     304  return 1;
     305}
     306//******************************************************************************
    286307//NOTE: No need to save/restore FS, as our FS selectors have already been
    287308//      destroyed and FS == 0x150B.
     
    291312  fclose(flog);
    292313  flog = 0;
     314}
     315//******************************************************************************
     316//Used to open any private logfiles used in kernel32 (for now only in winimagepeldr.cpp)
     317//******************************************************************************
     318void OpenPrivateLogFiles()
     319{
     320  OpenPrivateLogFilePE();
     321}
     322//******************************************************************************
     323//Used to close all private logfiles used in kernel32 (for now only in winimagepeldr.cpp)
     324//******************************************************************************
     325void ClosePrivateLogFiles()
     326{
     327  ClosePrivateLogFilePE();
    293328}
    294329//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.