summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/textbuf.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
committer ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
commit4e580a77b9da9b78aba1fec8e44b1de5a4a14aaf (patch)
treedf0e1d28daa79b9151088498a933cd1fc37c9c07 /src/emu/debug/textbuf.cpp
parent1cda42b22e591965ee69561fcf52272bd991b3b2 (diff)
parent14d5966a379e9783ba724750a5f84a72af62cadc (diff)
Merge pull request #9 from mamedev/master
Sync to base master
Diffstat (limited to 'src/emu/debug/textbuf.cpp')
-rw-r--r--src/emu/debug/textbuf.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp
index 52fd669a997..e7daf96571a 100644
--- a/src/emu/debug/textbuf.cpp
+++ b/src/emu/debug/textbuf.cpp
@@ -50,7 +50,7 @@ struct text_buffer
currently held in the buffer
-------------------------------------------------*/
-INLINE INT32 buffer_used(text_buffer *text)
+static inline INT32 buffer_used(text_buffer *text)
{
INT32 used = text->bufend - text->bufstart;
if (used < 0)
@@ -64,7 +64,7 @@ INLINE INT32 buffer_used(text_buffer *text)
available in the buffer
-------------------------------------------------*/
-INLINE INT32 buffer_space(text_buffer *text)
+static inline INT32 buffer_space(text_buffer *text)
{
return text->bufsize - buffer_used(text);
}
@@ -88,14 +88,14 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
/* allocate memory for the text buffer object */
text = (text_buffer *)global_alloc(text_buffer);
if (!text)
- return NULL;
+ return nullptr;
/* allocate memory for the buffer itself */
text->buffer = (char *)global_alloc_array(char, bytes);
if (!text->buffer)
{
global_free(text);
- return NULL;
+ return nullptr;
}
/* allocate memory for the lines array */
@@ -104,7 +104,7 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
{
global_free_array(text->buffer);
global_free(text);
- return NULL;
+ return nullptr;
}
/* initialize the buffer description */
@@ -319,6 +319,6 @@ const char *text_buffer_get_seqnum_line(text_buffer *text, UINT32 seqnum)
UINT32 numlines = text_buffer_num_lines(text);
UINT32 index = seqnum - text->linestartseq;
if (index >= numlines)
- return NULL;
+ return nullptr;
return &text->buffer[text->lineoffs[(text->linestart + index) % text->linesize]];
}