trunk/src/emu/machine.c
| r29652 | r29653 | |
| 784 | 784 | |
| 785 | 785 | |
| 786 | 786 | //------------------------------------------------- |
| 787 | | // logerror - printf-style error logging |
| 788 | | //------------------------------------------------- |
| 789 | | |
| 790 | | void 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 | | //------------------------------------------------- |
| 804 | 787 | // vlogerror - vprintf-style error logging |
| 805 | 788 | //------------------------------------------------- |
| 806 | 789 | |
trunk/src/emu/mame.c
| r29652 | r29653 | |
| 122 | 122 | ***************************************************************************/ |
| 123 | 123 | |
| 124 | 124 | /*------------------------------------------------- |
| 125 | | mame_is_valid_machine - return true if the |
| 126 | | given machine is valid |
| 127 | | -------------------------------------------------*/ |
| 128 | | |
| 129 | | int mame_is_valid_machine(running_machine &machine) |
| 130 | | { |
| 131 | | return (&machine == global_machine); |
| 132 | | } |
| 133 | | |
| 134 | | /*------------------------------------------------- |
| 135 | 125 | mame_execute - run the core emulation |
| 136 | 126 | -------------------------------------------------*/ |
| 137 | 127 | |
| r29652 | r29653 | |
| 397 | 387 | { |
| 398 | 388 | va_list arg; |
| 399 | 389 | 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 | | |
| 410 | | void CLIB_DECL vlogerror(const char *format, va_list arg) |
| 411 | | { |
| 412 | 390 | if (global_machine != NULL) |
| 413 | 391 | global_machine->vlogerror(format, arg); |
| 392 | va_end(arg); |
| 414 | 393 | } |
| 394 | |