Changeset 341 for trunk/src/cppbase


Ignore:
Timestamp:
Nov 30, 2006, 11:03:06 AM (19 years ago)
Author:
pr
Message:

Remove WarpIN specific messages. Add WriteRaw().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cppbase/bs_logger.cpp

    r312 r341  
    1515
    1616/*
    17  *      This file Copyright (C) 1999-2002 Ulrich M”ller.
     17 *      This file Copyright (C) 1999-2006 Ulrich M”ller.
    1818 *      This program is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published by
     
    354354 *@@changed V0.9.12 (2001-05-31) [umoeller]: added mutex
    355355 *@@changed V0.9.19 (2002-07-01) [umoeller]: added bldlevel to log
     356 *@@changed WarpIN V1.0.14 (2006-11-30) [pr]: removed WarpIN specific header message
    356357 */
    357358
     
    383384    else
    384385        throw BSLoggerExcpt("pcszFilename is NULL.");
    385 
    386     DATETIME dt;
    387     DosGetDateTime(&dt);
    388 
    389     fprintf(_File,
    390             "\n\nWarpIN " BLDLEVEL_VERSION " install log opened\n"
    391             "Date: %04d-%02d-%02d, Time: %02d:%02d:%02d\n"
    392             "--------------------------------\n",
    393             dt.year, dt.month, dt.day,
    394             dt.hours, dt.minutes, dt.seconds);
    395386}
    396387
     
    401392 *@@added V0.9.9 (2001-03-30) [umoeller]
    402393 *@@changed V0.9.12 (2001-05-31) [umoeller]: added mutex
     394 *@@changed WarpIN V1.0.14 (2006-11-30) [pr]: removed "install log closed" message
    403395 */
    404396
     
    411403    if (_File)
    412404    {
    413         fprintf(_File, "\nInstall log closed.\n");
    414405        fclose(_File);
    415406        _File = NULL;
     
    441432
    442433/*
    443  *@@ Write:
    444  *
    445  *      NOTE: This does not append \n for each string.
     434 *@@ WriteV:
     435 *
     436 *      NOTE: This appends \n for each string.
    446437 *
    447438 *@@added V0.9.9 (2001-03-30) [umoeller]
     
    456447    BSLock lock(G_mtxFileLoggers); // V0.9.20 (2002-07-06) [umoeller]
    457448
    458     _Pmpf(("BSFileLogger::Append: got \"%s\"", pcszFormat));
    459 
    460449    DATETIME dt;
    461450    DosGetDateTime(&dt);
     
    473462    }
    474463
    475     int iWritten = vfprintf(_File, pcszFormat, arg_ptr);
     464    vfprintf(_File, pcszFormat, arg_ptr);
    476465    fprintf(_File, "\n");
    477466}
    478467
    479468/*
    480  *@@ Append:
     469 *@@ Write:
    481470 *
    482471 *@@added V0.9.18 (2002-03-08) [umoeller]
     
    492481}
    493482
     483/*
     484 *@@ WriteRawV:
     485 *
     486 *@@added WarpIN V1.0.14 (2006-11-30) [pr]
     487 */
     488
     489void BSFileLogger::WriteRawV(const char *pcszFormat,  // in: format string
     490                             va_list arg_ptr)
     491{
     492    BSLock lock(G_mtxFileLoggers);
     493
     494    vfprintf(_File, pcszFormat, arg_ptr);
     495}
     496
     497/*
     498 *@@ WriteRaw:
     499 *
     500 *@@added WarpIN V1.0.14 (2006-11-30) [pr]
     501 */
     502
     503void BSFileLogger::WriteRaw(const char *pcszFormat,  // in: format string
     504                            ...)                     // in: variable arguments
     505{
     506    va_list arg_ptr;
     507    va_start(arg_ptr, pcszFormat);
     508    WriteRawV(pcszFormat, arg_ptr);
     509    va_end(arg_ptr);
     510}
     511
Note: See TracChangeset for help on using the changeset viewer.