trunk/src/emu/device.cpp
| r250188 | r250189 | |
| 14 | 14 | #include "debug/debugcpu.h" |
| 15 | 15 | |
| 16 | 16 | |
| 17 | | |
| 18 | 17 | //************************************************************************** |
| 19 | | // CONSTANTS |
| 20 | | //************************************************************************** |
| 21 | | |
| 22 | | #define TEMP_STRING_POOL_ENTRIES 16 |
| 23 | | #define MAX_STRING_LENGTH 256 |
| 24 | | |
| 25 | | |
| 26 | | |
| 27 | | //************************************************************************** |
| 28 | | // GLOBAL VARIABLES |
| 29 | | //************************************************************************** |
| 30 | | |
| 31 | | static char temp_string_pool[TEMP_STRING_POOL_ENTRIES][MAX_STRING_LENGTH]; |
| 32 | | static int temp_string_pool_index; |
| 33 | | |
| 34 | | |
| 35 | | |
| 36 | | //************************************************************************** |
| 37 | | // INLINE FUNCTIONS |
| 38 | | //************************************************************************** |
| 39 | | |
| 40 | | //------------------------------------------------- |
| 41 | | // get_temp_string_buffer - return a pointer to |
| 42 | | // a temporary string buffer |
| 43 | | //------------------------------------------------- |
| 44 | | |
| 45 | | char *get_temp_string_buffer(void) |
| 46 | | { |
| 47 | | char *string = &temp_string_pool[temp_string_pool_index++ % TEMP_STRING_POOL_ENTRIES][0]; |
| 48 | | string[0] = 0; |
| 49 | | return string; |
| 50 | | } |
| 51 | | |
| 52 | | |
| 53 | | resource_pool &machine_get_pool(running_machine &machine) |
| 54 | | { |
| 55 | | // temporary to get around include dependencies, until CPUs |
| 56 | | // get a proper device class |
| 57 | | return machine.respool(); |
| 58 | | } |
| 59 | | |
| 60 | | |
| 61 | | |
| 62 | | //************************************************************************** |
| 63 | 18 | // LIVE DEVICE MANAGEMENT |
| 64 | 19 | //************************************************************************** |
| 65 | 20 | |