Previous 199869 Revisions Next

r29653 Tuesday 15th April, 2014 at 11:14:46 UTC by Miodrag Milanović
Small core cleanup (nw)
[src/emu]emu.h emutempl.h machine.c machine.h mame.c mame.h
[src/osd]osdepend.h

trunk/src/osd/osdepend.h
r29652r29653
1414#define __OSDEPEND_H__
1515
1616#include "emucore.h"
17#include "emutempl.h"
1817#include "osdcore.h"
1918#include "unicode.h"
2019
trunk/src/emu/emutempl.h
r29652r29653
1// license:BSD-3-Clause
2// copyright-holders:Aaron Giles
3/***************************************************************************
4
5    emutempl.h
6
7    Core templates for basic non-string types.
8
9***************************************************************************/
10
11#pragma once
12
13#ifndef __EMUTEMPL_H__
14#define __EMUTEMPL_H__
15
16
17//**************************************************************************
18//  TYPE DEFINITIONS
19//**************************************************************************
20
21
22#endif  /* __EMUTEMPL_H__ */
trunk/src/emu/emu.h
r29652r29653
2222
2323// core emulator headers -- must be first
2424#include "emucore.h"
25#include "emutempl.h"
2625#include "eminline.h"
2726#include "profiler.h"
2827
trunk/src/emu/machine.c
r29652r29653
784784
785785
786786//-------------------------------------------------
787//  logerror - printf-style error logging
788//-------------------------------------------------
789
790void CLIB_DECL running_machine::logerror(const char *format, ...)
791{
792   // process only if there is a target
793   if (m_logerror_list.first() != NULL)
794   {
795      va_list arg;
796      va_start(arg, format);
797      vlogerror(format, arg);
798      va_end(arg);
799   }
800}
801
802
803//-------------------------------------------------
804787//  vlogerror - vprintf-style error logging
805788//-------------------------------------------------
806789
trunk/src/emu/machine.h
r29652r29653
251251   void watchdog_enable(bool enable = true);
252252
253253   // misc
254   void CLIB_DECL logerror(const char *format, ...) ATTR_PRINTF(2,3);
255254   void CLIB_DECL vlogerror(const char *format, va_list args);
256255   UINT32 rand();
257256   const char *describe_context();
trunk/src/emu/mame.c
r29652r29653
122122***************************************************************************/
123123
124124/*-------------------------------------------------
125    mame_is_valid_machine - return true if the
126    given machine is valid
127-------------------------------------------------*/
128
129int mame_is_valid_machine(running_machine &machine)
130{
131   return (&machine == global_machine);
132}
133
134/*-------------------------------------------------
135125    mame_execute - run the core emulation
136126-------------------------------------------------*/
137127
r29652r29653
397387{
398388   va_list arg;
399389   va_start(arg, format);
400   vlogerror(format, arg);
401   va_end(arg);
402}
403
404
405/*-------------------------------------------------
406    vlogerror - log to the debugger and any other
407    OSD-defined output streams
408-------------------------------------------------*/
409
410void CLIB_DECL vlogerror(const char *format, va_list arg)
411{
412390   if (global_machine != NULL)
413391      global_machine->vlogerror(format, arg);
392   va_end(arg);
414393}
394
trunk/src/emu/mame.h
r29652r29653
129129
130130// log to the standard error.log file
131131void CLIB_DECL logerror(const char *format, ...) ATTR_PRINTF(1,2);
132void CLIB_DECL vlogerror(const char *format, va_list arg);
133132
134133
135134#endif  /* __MAME_H__ */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team