source: cpp/frams/mhandlers/stdouthandler.cpp @ 372

Last change on this file since 372 was 372, checked in by sz, 9 years ago

Renamed some classes and functions to make their purpose more obvious:

All MessageHandlers? must now be given the explicit "Enable" argument if you want them to automatically become active. This makes side effects clearly visible.

  • Property svn:eol-style set to native
File size: 619 bytes
[286]1// This file is a part of Framsticks SDK.
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
[372]5#include "stdouthandler.h"
[109]6#ifdef SHP
7#include <FBaseSys.h> //AppLog
9#include <stdio.h>
[372]12void MessageHandlerToStdout::handle(const char *o, const char *m, const char *bl, int w)
[244]14        if (w < -1) w = -1; else if (w>3) w = 3;
[109]15#ifdef SHP
[372]16        AppLog(HMSG_FORMAT "\n",HMSG_LEVEL[w+1],o,m,bl);
[244]18        if (file)
[372]19                file->printf(HMSG_FORMAT "\n", HMSG_LEVEL[w + 1], o, m, bl);
[244]20        else
[372]21                printf(HMSG_FORMAT "\n", HMSG_LEVEL[w + 1], o, m, bl);
Note: See TracBrowser for help on using the repository browser.