<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">Makefile.am</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+4</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">Makefile.in</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+77</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-61</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr><td><tt><a href="#file3">config.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+1</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-5</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt>drivers/<a href="#file4"><span id="addedalt" style="background-color:#ccf7cc;" >io_glib.c</span></a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+85</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 136fc24d17ef</td></tr>
<tr><td><tt>       /<a href="#file5"><span id="added" style="background-color:#ddffdd;" >io_osx.m</span></a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+132</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt>       /<a href="#file6"><span id="removedalt" style="background-color:#f7cccc;" >net_glib.c</span></a></tt></td><td></td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-72</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 removed</td></tr>
<tr><td><tt>       /<a href="#file7"><span id="removed" style="background-color:#ffdddd;" >net_osx.m</span></a></tt></td><td></td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-78</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 removed</td></tr>
<tr class="alt" style=";" ><td><tt>       /<a href="#file8"><span id="addedalt" style="background-color:#ccf7cc;" >serial_unix.c</span></a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+188</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 136fc24d17ef</td></tr>
<tr><td><tt><a href="#file9">gdbserver.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+4</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-4</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file10"><span id="addedalt" style="background-color:#ccf7cc;" >ioutil.c</span></a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+54</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 136fc24d17ef</td></tr>
<tr><td><tt><a href="#file11"><span id="added" style="background-color:#ddffdd;" >ioutil.h</span></a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+67</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file12">main.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+1</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr><td><tt><a href="#file13"><span id="removed" style="background-color:#ffdddd;" >netutil.c</span></a></tt></td><td></td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-54</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 removed</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file14"><span id="removedalt" style="background-color:#f7cccc;" >netutil.h</span></a></tt></td><td></td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-58</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 removed</td></tr>
<tr><td><tt><a href="#file15">serial.h</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+34</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-5</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr class="alt" style=";" ><td><tt>sh4/<a href="#file16">scif.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+41</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-8</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">18c164e8aec4 -> 136fc24d17ef</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+688</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-348</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >5 added + 4 removed + 7 modified, total 16 files</small><br />
<div class="tasklist" style="padding:4px;border:1px dashed #000000;margin-top:1em;" ><ul>
<li><a href="#task1">TODO: hostname lookup */</a></li>
</ul></div>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Create a host attachment for the SCIF serial port. By default, uses /dev/console
Add general fd listening to netutil, and rename to ioutil
Add SCIF update on port read/write - fixes KOS timing problems but needs to
   be redone properly.
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.am</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.am
+++ lxdream/src/Makefile.am
@@ -44,7 +44,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         gettext.h mem.c mem.h sdram.c mmio.h watch.c \
         asic.c asic.h clock.h serial.h \
         syscall.c syscall.h bios.c dcload.c gdbserver.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >netutil.c net</span>util.h lxpaths.c lxpaths.h \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ioutil.c io</span>util.h lxpaths.c lxpaths.h \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         gdrom/ide.c gdrom/ide.h gdrom/packet.h gdrom/gdimage.c \
        gdrom/gdrom.c gdrom/gdrom.h gdrom/nrg.c gdrom/cdi.c gdrom/gdi.c \
        gdrom/edc_ecc.c gdrom/ecc.h gdrom/edc_crctable.h gdrom/edc_encoder.h \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -69,6 +69,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      display.c display.h dckeysyms.h \
        drivers/audio_null.c drivers/video_null.c drivers/cd_mmc.c \
        drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     drivers/serial_unix.c \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
        hotkeys.c hotkeys.h
 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -101,14 +102,14 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \
         gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
         gtkui/gtk_ctrl.c gtkui/gtk_gd.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_glib.c drivers/video_gtk.c
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_glib.c drivers/video_gtk.c
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > endif
 
 if GUI_COCOA
 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
        cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
        cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_osx.m drivers/video_osx.m \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_osx.m drivers/video_osx.m \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    drivers/mac_keymap.h drivers/mac_keymap.txt
 else
 lxdream_SOURCES += paths_unix.c
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.in</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/Makefile.in
+++ lxdream/src/Makefile.in
@@ -55,12 +55,12 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_GTK_TRUE@       gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \
 @GUI_GTK_TRUE@        gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
 @GUI_GTK_TRUE@        gtkui/gtk_ctrl.c gtkui/gtk_gd.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@GUI_GTK_TRUE@        drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_glib.c drivers/video_gtk.c
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@GUI_GTK_TRUE@        drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_glib.c drivers/video_gtk.c
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 @GUI_COCOA_TRUE@am__append_5 = cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
 @GUI_COCOA_TRUE@       cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
 @GUI_COCOA_TRUE@       cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@GUI_COCOA_TRUE@   drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_osx.m drivers/video_osx.m \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@GUI_COCOA_TRUE@     drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_osx.m drivers/video_osx.m \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_COCOA_TRUE@   drivers/mac_keymap.h drivers/mac_keymap.txt
 
 @GUI_COCOA_FALSE@am__append_6 = paths_unix.c
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -141,8 +141,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > am__lxdream_SOURCES_DIST = main.c version.c config.c config.h \
        lxdream.h dream.h gui.h cpu.h hook.h gettext.h mem.c mem.h \
        sdram.c mmio.h watch.c asic.c asic.h clock.h serial.h \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   syscall.c syscall.h bios.c dcload.c gdbserver.c netutil.c \
-       netutil.h lxpaths.c lxpaths.h gdrom/ide.c gdrom/ide.h \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     syscall.c syscall.h bios.c dcload.c gdbserver.c ioutil.c \
+       ioutil.h lxpaths.c lxpaths.h gdrom/ide.c gdrom/ide.h \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    gdrom/packet.h gdrom/gdimage.c gdrom/gdrom.c gdrom/gdrom.h \
        gdrom/nrg.c gdrom/cdi.c gdrom/gdi.c gdrom/edc_ecc.c \
        gdrom/ecc.h gdrom/edc_crctable.h gdrom/edc_encoder.h \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -166,9 +166,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      vmu/vmulist.c vmu/vmulist.h display.c display.h dckeysyms.h \
        drivers/audio_null.c drivers/video_null.c drivers/cd_mmc.c \
        drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in \
-       sh4/sh4stat.in hotkeys.c hotkeys.h plugin.c plugin.h \
-       sh4/sh4x86.c xlat/x86/x86op.h xlat/x86/ia32abi.h \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     drivers/serial_unix.c sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in \
+       sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c hotkeys.h plugin.c \
+       plugin.h sh4/sh4x86.c xlat/x86/x86op.h xlat/x86/ia32abi.h \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    xlat/x86/amd64abi.h sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c \
        x86dasm/x86dasm.c x86dasm/x86dasm.h x86dasm/i386-dis.c \
        x86dasm/dis-init.c x86dasm/dis-buf.c x86dasm/ansidecl.h \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -176,10 +176,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      x86dasm/sysdep.h gtkui/gtkui.c gtkui/gtkui.h gtkui/gtk_win.c \
        gtkui/gtkcb.c gtkui/gtk_cfg.c gtkui/gtk_mmio.c \
        gtkui/gtk_debug.c gtkui/gtk_dump.c gtkui/gtk_ctrl.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   gtkui/gtk_gd.c drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_glib.c drivers/video_gtk.c \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     gtkui/gtk_gd.c drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_glib.c drivers/video_gtk.c \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
        cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m drivers/<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_osx.m \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m drivers/<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_osx.m \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    drivers/video_osx.m drivers/mac_keymap.h \
        drivers/mac_keymap.txt paths_unix.c drivers/video_gdk.c \
        drivers/video_glx.c drivers/video_glx.h drivers/video_nsgl.m \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -205,7 +205,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_GTK_TRUE@       lxdream-gtk_dump.$(OBJEXT) \
 @GUI_GTK_TRUE@ lxdream-gtk_ctrl.$(OBJEXT) \
 @GUI_GTK_TRUE@ lxdream-gtk_gd.$(OBJEXT) \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@GUI_GTK_TRUE@     lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_glib.$(OBJEXT) \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@GUI_GTK_TRUE@       lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_glib.$(OBJEXT) \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_GTK_TRUE@     lxdream-video_gtk.$(OBJEXT)
 @GUI_COCOA_TRUE@am__objects_4 = lxdream-cocoaui.$(OBJEXT) \
 @GUI_COCOA_TRUE@       lxdream-cocoa_cfg.$(OBJEXT) \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -214,7 +214,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_COCOA_TRUE@     lxdream-cocoa_prefs.$(OBJEXT) \
 @GUI_COCOA_TRUE@       lxdream-cocoa_ctrl.$(OBJEXT) \
 @GUI_COCOA_TRUE@       lxdream-paths_osx.$(OBJEXT) \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@GUI_COCOA_TRUE@   lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_osx.$(OBJEXT) \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@GUI_COCOA_TRUE@     lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_osx.$(OBJEXT) \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @GUI_COCOA_TRUE@   lxdream-video_osx.$(OBJEXT)
 @GUI_COCOA_FALSE@am__objects_5 = lxdream-paths_unix.$(OBJEXT)
 @VIDEO_OSMESA_TRUE@am__objects_6 = lxdream-video_gdk.$(OBJEXT)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -236,7 +236,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      lxdream-sdram.$(OBJEXT) lxdream-watch.$(OBJEXT) \
        lxdream-asic.$(OBJEXT) lxdream-syscall.$(OBJEXT) \
        lxdream-bios.$(OBJEXT) lxdream-dcload.$(OBJEXT) \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   lxdream-gdbserver.$(OBJEXT) lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>util.$(OBJEXT) \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     lxdream-gdbserver.$(OBJEXT) lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>util.$(OBJEXT) \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    lxdream-lxpaths.$(OBJEXT) lxdream-ide.$(OBJEXT) \
        lxdream-gdimage.$(OBJEXT) lxdream-gdrom.$(OBJEXT) \
        lxdream-nrg.$(OBJEXT) lxdream-cdi.$(OBJEXT) \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -266,13 +266,14 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      lxdream-vmulist.$(OBJEXT) lxdream-display.$(OBJEXT) \
        lxdream-audio_null.$(OBJEXT) lxdream-video_null.$(OBJEXT) \
        lxdream-cd_mmc.$(OBJEXT) lxdream-video_gl.$(OBJEXT) \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   lxdream-gl_fbo.$(OBJEXT) lxdream-hotkeys.$(OBJEXT) \
-       $(am__objects_1) $(am__objects_2) $(am__objects_3) \
-       $(am__objects_4) $(am__objects_5) $(am__objects_6) \
-       $(am__objects_7) $(am__objects_8) $(am__objects_9) \
-       $(am__objects_10) $(am__objects_11) $(am__objects_12) \
-       $(am__objects_13) $(am__objects_14) $(am__objects_15) \
-       $(am__objects_16) $(am__objects_17) $(am__objects_18)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     lxdream-gl_fbo.$(OBJEXT) lxdream-serial_unix.$(OBJEXT) \
+       lxdream-hotkeys.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+       $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+       $(am__objects_6) $(am__objects_7) $(am__objects_8) \
+       $(am__objects_9) $(am__objects_10) $(am__objects_11) \
+       $(am__objects_12) $(am__objects_13) $(am__objects_14) \
+       $(am__objects_15) $(am__objects_16) $(am__objects_17) \
+       $(am__objects_18)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream_OBJECTS = $(am_lxdream_OBJECTS)
 lxdream_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -542,7 +543,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream_SOURCES = main.c version.c config.c config.h lxdream.h dream.h \
        gui.h cpu.h hook.h gettext.h mem.c mem.h sdram.c mmio.h \
        watch.c asic.c asic.h clock.h serial.h syscall.c syscall.h \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   bios.c dcload.c gdbserver.c <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >netutil.c net</span>util.h lxpaths.c \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     bios.c dcload.c gdbserver.c <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ioutil.c io</span>util.h lxpaths.c \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    lxpaths.h gdrom/ide.c gdrom/ide.h gdrom/packet.h \
        gdrom/gdimage.c gdrom/gdrom.c gdrom/gdrom.h gdrom/nrg.c \
        gdrom/cdi.c gdrom/gdi.c gdrom/edc_ecc.c gdrom/ecc.h \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -567,14 +568,14 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >      vmu/vmulist.c vmu/vmulist.h display.c display.h dckeysyms.h \
        drivers/audio_null.c drivers/video_null.c drivers/cd_mmc.c \
        drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-   sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in \
-       sh4/sh4stat.in hotkeys.c hotkeys.h $(am__append_1) \
-       $(am__append_2) $(am__append_4) $(am__append_5) \
-       $(am__append_6) $(am__append_7) $(am__append_8) \
-       $(am__append_9) $(am__append_10) $(am__append_17) \
-       $(am__append_19) $(am__append_21) $(am__append_23) \
-       $(am__append_25) $(am__append_27) $(am__append_28) \
-       $(am__append_29) $(am__append_30)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+     drivers/serial_unix.c sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in \
+       sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c hotkeys.h \
+       $(am__append_1) $(am__append_2) $(am__append_4) \
+       $(am__append_5) $(am__append_6) $(am__append_7) \
+       $(am__append_8) $(am__append_9) $(am__append_10) \
+       $(am__append_17) $(am__append_19) $(am__append_21) \
+       $(am__append_23) $(am__append_25) $(am__append_27) \
+       $(am__append_28) $(am__append_29) $(am__append_30)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
 @BUILD_SH4X86_TRUE@test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
 @BUILD_SH4X86_TRUE@test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -798,6 +799,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-ide.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-input_lirc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-intc.Po@am__quote@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-io_glib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-io_osx.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-ioutil.Po@am__quote@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-joy_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-kbd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-lightgun.Po@am__quote@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -809,9 +813,6 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-mmu.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-mmux86.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-mouse.Po@am__quote@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-net_glib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-net_osx.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-netutil.Po@am__quote@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-nrg.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-osx_iokit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-paths_osx.Po@am__quote@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -825,6 +826,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-scene.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-scif.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sdram.Po@am__quote@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-serial_unix.Po@am__quote@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4core.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-sh4dasm.Po@am__quote@
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1090,19 +1092,19 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-gdbserver.obj `if test -f 'gdbserver.c'; then $(CYGPATH_W) 'gdbserver.c'; else $(CYGPATH_W) '$(srcdir)/gdbserver.c'; fi`
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-netutil.o: netutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-netutil.o -MD -MP -MF "$(DEPDIR)/lxdream-netutil.Tpo" -c -o lxdream-netutil.o `test -f 'netutil.c' || echo '$(srcdir)/'`netutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-netutil.Tpo" "$(DEPDIR)/lxdream-netutil.Po"; else rm -f "$(DEPDIR)/lxdream-netutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='netutil.c' object='lxdream-netutil.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-ioutil.o: ioutil.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-ioutil.o -MD -MP -MF "$(DEPDIR)/lxdream-ioutil.Tpo" -c -o lxdream-ioutil.o `test -f 'ioutil.c' || echo '$(srcdir)/'`ioutil.c; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-ioutil.Tpo" "$(DEPDIR)/lxdream-ioutil.Po"; else rm -f "$(DEPDIR)/lxdream-ioutil.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ioutil.c' object='lxdream-ioutil.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepCC_FALSE@      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >netutil.o `test -f 'netutil.c' || echo '$(srcdir)/'`net</span>util.c
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepCC_FALSE@        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >ioutil.o `test -f 'ioutil.c' || echo '$(srcdir)/'`io</span>util.c
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-netutil.obj: netutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-netutil.obj -MD -MP -MF "$(DEPDIR)/lxdream-netutil.Tpo" -c -o lxdream-netutil.obj `if test -f 'netutil.c'; then $(CYGPATH_W) 'netutil.c'; else $(CYGPATH_W) '$(srcdir)/netutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-netutil.Tpo" "$(DEPDIR)/lxdream-netutil.Po"; else rm -f "$(DEPDIR)/lxdream-netutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='netutil.c' object='lxdream-netutil.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-ioutil.obj: ioutil.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-ioutil.obj -MD -MP -MF "$(DEPDIR)/lxdream-ioutil.Tpo" -c -o lxdream-ioutil.obj `if test -f 'ioutil.c'; then $(CYGPATH_W) 'ioutil.c'; else $(CYGPATH_W) '$(srcdir)/ioutil.c'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-ioutil.Tpo" "$(DEPDIR)/lxdream-ioutil.Po"; else rm -f "$(DEPDIR)/lxdream-ioutil.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ioutil.c' object='lxdream-ioutil.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepCC_FALSE@      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-netutil.obj `if test -f 'netutil.c'; then $(CYGPATH_W) 'netutil.c'; else $(CYGPATH_W) '$(srcdir)/netutil.c'; fi`
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepCC_FALSE@        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-ioutil.obj `if test -f 'ioutil.c'; then $(CYGPATH_W) 'ioutil.c'; else $(CYGPATH_W) '$(srcdir)/ioutil.c'; fi`
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 lxdream-lxpaths.o: lxpaths.c
 @am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-lxpaths.o -MD -MP -MF "$(DEPDIR)/lxdream-lxpaths.Tpo" -c -o lxdream-lxpaths.o `test -f 'lxpaths.c' || echo '$(srcdir)/'`lxpaths.c; \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1930,6 +1932,20 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-gl_fbo.obj `if test -f 'drivers/gl_fbo.c'; then $(CYGPATH_W) 'drivers/gl_fbo.c'; else $(CYGPATH_W) '$(srcdir)/drivers/gl_fbo.c'; fi`
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-serial_unix.o: drivers/serial_unix.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-serial_unix.o -MD -MP -MF "$(DEPDIR)/lxdream-serial_unix.Tpo" -c -o lxdream-serial_unix.o `test -f 'drivers/serial_unix.c' || echo '$(srcdir)/'`drivers/serial_unix.c; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-serial_unix.Tpo" "$(DEPDIR)/lxdream-serial_unix.Po"; else rm -f "$(DEPDIR)/lxdream-serial_unix.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/serial_unix.c' object='lxdream-serial_unix.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-serial_unix.o `test -f 'drivers/serial_unix.c' || echo '$(srcdir)/'`drivers/serial_unix.c
+
+lxdream-serial_unix.obj: drivers/serial_unix.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-serial_unix.obj -MD -MP -MF "$(DEPDIR)/lxdream-serial_unix.Tpo" -c -o lxdream-serial_unix.obj `if test -f 'drivers/serial_unix.c'; then $(CYGPATH_W) 'drivers/serial_unix.c'; else $(CYGPATH_W) '$(srcdir)/drivers/serial_unix.c'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-serial_unix.Tpo" "$(DEPDIR)/lxdream-serial_unix.Po"; else rm -f "$(DEPDIR)/lxdream-serial_unix.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/serial_unix.c' object='lxdream-serial_unix.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-serial_unix.obj `if test -f 'drivers/serial_unix.c'; then $(CYGPATH_W) 'drivers/serial_unix.c'; else $(CYGPATH_W) '$(srcdir)/drivers/serial_unix.c'; fi`
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > lxdream-hotkeys.o: hotkeys.c
 @am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-hotkeys.o -MD -MP -MF "$(DEPDIR)/lxdream-hotkeys.Tpo" -c -o lxdream-hotkeys.o `test -f 'hotkeys.c' || echo '$(srcdir)/'`hotkeys.c; \
 @am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-hotkeys.Tpo" "$(DEPDIR)/lxdream-hotkeys.Po"; else rm -f "$(DEPDIR)/lxdream-hotkeys.Tpo"; exit 1; fi
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2182,19 +2198,19 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-gtk_gd.obj `if test -f 'gtkui/gtk_gd.c'; then $(CYGPATH_W) 'gtkui/gtk_gd.c'; else $(CYGPATH_W) '$(srcdir)/gtkui/gtk_gd.c'; fi`
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-net_glib.o: drivers/net_glib.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-net_glib.o -MD -MP -MF "$(DEPDIR)/lxdream-net_glib.Tpo" -c -o lxdream-net_glib.o `test -f 'drivers/net_glib.c' || echo '$(srcdir)/'`drivers/net_glib.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-net_glib.Tpo" "$(DEPDIR)/lxdream-net_glib.Po"; else rm -f "$(DEPDIR)/lxdream-net_glib.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/net_glib.c' object='lxdream-net_glib.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-io_glib.o: drivers/io_glib.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-io_glib.o -MD -MP -MF "$(DEPDIR)/lxdream-io_glib.Tpo" -c -o lxdream-io_glib.o `test -f 'drivers/io_glib.c' || echo '$(srcdir)/'`drivers/io_glib.c; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-io_glib.Tpo" "$(DEPDIR)/lxdream-io_glib.Po"; else rm -f "$(DEPDIR)/lxdream-io_glib.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/io_glib.c' object='lxdream-io_glib.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepCC_FALSE@      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net_glib.o `test -f 'drivers/net_glib.c' || echo '$(srcdir)/'`drivers/net</span>_glib.c
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepCC_FALSE@        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io_glib.o `test -f 'drivers/io_glib.c' || echo '$(srcdir)/'`drivers/io</span>_glib.c
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-net_glib.obj: drivers/net_glib.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-net_glib.obj -MD -MP -MF "$(DEPDIR)/lxdream-net_glib.Tpo" -c -o lxdream-net_glib.obj `if test -f 'drivers/net_glib.c'; then $(CYGPATH_W) 'drivers/net_glib.c'; else $(CYGPATH_W) '$(srcdir)/drivers/net_glib.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-net_glib.Tpo" "$(DEPDIR)/lxdream-net_glib.Po"; else rm -f "$(DEPDIR)/lxdream-net_glib.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/net_glib.c' object='lxdream-net_glib.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-io_glib.obj: drivers/io_glib.c
+@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-io_glib.obj -MD -MP -MF "$(DEPDIR)/lxdream-io_glib.Tpo" -c -o lxdream-io_glib.obj `if test -f 'drivers/io_glib.c'; then $(CYGPATH_W) 'drivers/io_glib.c'; else $(CYGPATH_W) '$(srcdir)/drivers/io_glib.c'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lxdream-io_glib.Tpo" "$(DEPDIR)/lxdream-io_glib.Po"; else rm -f "$(DEPDIR)/lxdream-io_glib.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='drivers/io_glib.c' object='lxdream-io_glib.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepCC_FALSE@      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-net_glib.obj `if test -f 'drivers/net_glib.c'; then $(CYGPATH_W) 'drivers/net_glib.c'; else $(CYGPATH_W) '$(srcdir)/drivers/net_glib.c'; fi`
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepCC_FALSE@        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-io_glib.obj `if test -f 'drivers/io_glib.c'; then $(CYGPATH_W) 'drivers/io_glib.c'; else $(CYGPATH_W) '$(srcdir)/drivers/io_glib.c'; fi`
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 lxdream-video_gtk.o: drivers/video_gtk.c
 @am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-video_gtk.o -MD -MP -MF "$(DEPDIR)/lxdream-video_gtk.Tpo" -c -o lxdream-video_gtk.o `test -f 'drivers/video_gtk.c' || echo '$(srcdir)/'`drivers/video_gtk.c; \
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2658,19 +2674,19 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepOBJC_FALSE@  DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepOBJC_FALSE@        $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o lxdream-paths_osx.obj `if test -f 'cocoaui/paths_osx.m'; then $(CYGPATH_W) 'cocoaui/paths_osx.m'; else $(CYGPATH_W) '$(srcdir)/cocoaui/paths_osx.m'; fi`
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-net_osx.o: drivers/net_osx.m
-@am__fastdepOBJC_TRUE@ if $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT lxdream-net_osx.o -MD -MP -MF "$(DEPDIR)/lxdream-net_osx.Tpo" -c -o lxdream-net_osx.o `test -f 'drivers/net_osx.m' || echo '$(srcdir)/'`drivers/net_osx.m; \
-@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/lxdream-net_osx.Tpo" "$(DEPDIR)/lxdream-net_osx.Po"; else rm -f "$(DEPDIR)/lxdream-net_osx.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepOBJC_FALSE@    source='drivers/net_osx.m' object='lxdream-net_osx.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-io_osx.o: drivers/io_osx.m
+@am__fastdepOBJC_TRUE@ if $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT lxdream-io_osx.o -MD -MP -MF "$(DEPDIR)/lxdream-io_osx.Tpo" -c -o lxdream-io_osx.o `test -f 'drivers/io_osx.m' || echo '$(srcdir)/'`drivers/io_osx.m; \
+@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/lxdream-io_osx.Tpo" "$(DEPDIR)/lxdream-io_osx.Po"; else rm -f "$(DEPDIR)/lxdream-io_osx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@    source='drivers/io_osx.m' object='lxdream-io_osx.o' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepOBJC_FALSE@        DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepOBJC_FALSE@    $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o lxdream-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net_osx.o `test -f 'drivers/net_osx.m' || echo '$(srcdir)/'`drivers/net</span>_osx.m
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepOBJC_FALSE@      $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o lxdream-<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io_osx.o `test -f 'drivers/io_osx.m' || echo '$(srcdir)/'`drivers/io</span>_osx.m
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-lxdream-net_osx.obj: drivers/net_osx.m
-@am__fastdepOBJC_TRUE@ if $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT lxdream-net_osx.obj -MD -MP -MF "$(DEPDIR)/lxdream-net_osx.Tpo" -c -o lxdream-net_osx.obj `if test -f 'drivers/net_osx.m'; then $(CYGPATH_W) 'drivers/net_osx.m'; else $(CYGPATH_W) '$(srcdir)/drivers/net_osx.m'; fi`; \
-@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/lxdream-net_osx.Tpo" "$(DEPDIR)/lxdream-net_osx.Po"; else rm -f "$(DEPDIR)/lxdream-net_osx.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepOBJC_FALSE@    source='drivers/net_osx.m' object='lxdream-net_osx.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+lxdream-io_osx.obj: drivers/io_osx.m
+@am__fastdepOBJC_TRUE@ if $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT lxdream-io_osx.obj -MD -MP -MF "$(DEPDIR)/lxdream-io_osx.Tpo" -c -o lxdream-io_osx.obj `if test -f 'drivers/io_osx.m'; then $(CYGPATH_W) 'drivers/io_osx.m'; else $(CYGPATH_W) '$(srcdir)/drivers/io_osx.m'; fi`; \
+@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/lxdream-io_osx.Tpo" "$(DEPDIR)/lxdream-io_osx.Po"; else rm -f "$(DEPDIR)/lxdream-io_osx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@    source='drivers/io_osx.m' object='lxdream-io_osx.obj' libtool=no @AMDEPBACKSLASH@
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > @AMDEP_TRUE@@am__fastdepOBJC_FALSE@        DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-@am__fastdepOBJC_FALSE@    $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o lxdream-net_osx.obj `if test -f 'drivers/net_osx.m'; then $(CYGPATH_W) 'drivers/net_osx.m'; else $(CYGPATH_W) '$(srcdir)/drivers/net_osx.m'; fi`
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+@am__fastdepOBJC_FALSE@      $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o lxdream-io_osx.obj `if test -f 'drivers/io_osx.m'; then $(CYGPATH_W) 'drivers/io_osx.m'; else $(CYGPATH_W) '$(srcdir)/drivers/io_osx.m'; fi`
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 lxdream-video_osx.o: drivers/video_osx.m
 @am__fastdepOBJC_TRUE@ if $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT lxdream-video_osx.o -MD -MP -MF "$(DEPDIR)/lxdream-video_osx.Tpo" -c -o lxdream-video_osx.o `test -f 'drivers/video_osx.m' || echo '$(srcdir)/'`drivers/video_osx.m; \
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>config.c</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/config.c
+++ lxdream/src/config.c
@@ -33,6 +33,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define MAX_ROOT_GROUPS 16
 
 extern struct lxdream_config_group hotkeys_group;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+extern struct lxdream_config_group serial_group;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 gboolean lxdream_load_config_file( const gchar *filename );
 gboolean lxdream_save_config_file( const gchar *filename );
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -53,11 +54,6 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "quick state", NULL, CONFIG_TYPE_INTEGER, "0" },
         { NULL, CONFIG_TYPE_NONE }} };
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-static struct lxdream_config_group serial_group =
-    { "serial", NULL, NULL, NULL,
-       {{ "device", N_("Serial device"), CONFIG_TYPE_FILE, "/dev/ttyS1" },
-        { NULL, CONFIG_TYPE_NONE }} };
-
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /**
  * Dummy group for controllers (handled specially)
  */
</pre></div>
<hr /><a name="file4" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/src/drivers</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>io_glib.c</b></big> <small id="info" style="color: #888888;" >added at 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/io_glib.c
+++ lxdream/src/drivers/io_glib.c
@@ -0,0 +1,85 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * $Id$
+ *
+ * Glib-based networking support functions. Currently this is just for activity callbacks.
+ *
+ * Copyright (c) 2009 Nathan Keynes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <assert.h>
+#include <glib.h>
+#include <stdlib.h>
+#include "ioutil.h"
+
+struct io_glib_cbinfo {
+    io_callback_t callback;
+    guint sourceid;
+    void * cbdata;
+    void (*cbdealloc)(void *);
+};
+
+static gboolean io_glib_callback( GIOChannel *source, GIOCondition cond, gpointer data )
+{
+    struct io_glib_cbinfo *cbinfo = (struct io_glib_cbinfo *)data;
+    return cbinfo->callback( g_io_channel_unix_get_fd(source), cbinfo->cbdata);
+}
+
+static void io_glib_release( void *data )
+{
+    struct io_glib_cbinfo *cbinfo = (struct io_glib_cbinfo *)data;
+    if( cbinfo->cbdealloc ) {
+        cbinfo->cbdealloc( cbinfo->cbdata );
+    }
+    free(cbinfo);
+}
+
+/**
+ * Register a TCP server socket listener on an already open (and listening) 
+ * socket. The socket must not have been previously registered.
+ * @return TRUE on success, FALSE on failure.
+ * 
+ * Defined in netutil.h
+ */ 
+io_listener_t io_register_tcp_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void*) )
+{
+    return io_register_listener( fd, callback, data, dealloc );
+}
+
+io_listener_t io_register_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void *) )
+{
+    struct io_glib_cbinfo *cbinfo = malloc( sizeof(struct io_glib_cbinfo) );
+    assert(cbinfo != NULL);
+    
+    cbinfo->callback = callback;
+    cbinfo->cbdata = data;
+    cbinfo->cbdealloc = dealloc;
+
+    /**
+     * Note magic here: the watch creates an event source which holds a 
+     * reference to the channel. We unref the channel so that the channel then
+     * is automatically released when the event source goes away.
+     */
+    GIOChannel *chan = g_io_channel_unix_new(fd);
+    g_io_channel_set_encoding( chan, NULL, NULL );
+    g_io_channel_set_buffered(chan, FALSE);
+    cbinfo->sourceid = g_io_add_watch_full( chan, 0, G_IO_IN, io_glib_callback, cbinfo, io_glib_release );
+    g_io_channel_unref( chan );
+    return cbinfo;
+}
+
+
+void io_unregister_listener( io_listener_t data )
+{
+    struct io_glib_cbinfo *cbinfo = (struct io_glib_cbinfo *)data;
+    g_source_remove(cbinfo->sourceid);
+}
</pre></div>
<hr /><a name="file5" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/src/drivers</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>io_osx.m</b></big> <small id="info" style="color: #888888;" >added at 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/io_osx.m
+++ lxdream/src/drivers/io_osx.m
@@ -0,0 +1,132 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * $Id$
+ *
+ * OS X networking support functions. Currently this is just for activity callbacks.
+ *
+ * Copyright (c) 2009 Nathan Keynes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <CoreFoundation/CoreFoundation.h>
+#include "ioutil.h"
+
+struct io_osx_cbinfo {
+    int fd;
+    io_callback_t callback;
+    void * cbdata;
+    void (*cbdealloc)(void *);
+    void *fdRef;
+    CFRunLoopSourceRef sourceRef;
+
+    struct io_osx_cbinfo *next;
+};
+
+static struct io_osx_cbinfo *cbinfo_list = NULL;
+
+void io_unregister_callback( struct io_osx_cbinfo *cbinfo )
+{
+    CFRunLoopRemoveSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
+    CFRelease(cbinfo->sourceRef);
+    cbinfo->sourceRef = NULL;
+    CFRelease(cbinfo->fdRef); /* Note this implicitly releases the cbinfo itself as well */
+}
+
+static void io_osx_net_callback( CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *unused, void *data )
+{
+    struct io_osx_cbinfo *cbinfo = (struct io_osx_cbinfo *)data;
+    if(!cbinfo->callback( CFSocketGetNative(s), cbinfo->cbdata) ) {
+        io_unregister_callback(cbinfo);
+    }
+}
+
+static void io_osx_fd_callback( CFFileDescriptorRef f, CFOptionFlags type, void *data )
+{
+    struct io_osx_cbinfo *cbinfo = (struct io_osx_cbinfo *)data;
+    if(!cbinfo->callback( CFFileDescriptorGetNativeDescriptor(f), cbinfo->cbdata) ) {
+        io_unregister_callback(cbinfo);
+    }
+}
+
+static void io_osx_release( const void *data )
+{
+    struct io_osx_cbinfo *cbinfo = (struct io_osx_cbinfo *)data;
+    if( cbinfo->cbdealloc != NULL ) {
+        cbinfo->cbdealloc(cbinfo->cbdata);
+    }
+    free( cbinfo );
+}
+
+/**
+ * Register a TCP server socket listener on an already open (and listening) 
+ * socket. The socket must not have been previously registered.
+ * @return TRUE on success, FALSE on failure.
+ * 
+ * Defined in netutil.h
+ */ 
+io_listener_t io_register_tcp_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void*) )
+{
+    CFSocketContext socketContext;
+    struct io_osx_cbinfo *cbinfo = malloc( sizeof(struct io_osx_cbinfo) );
+    assert(cbinfo != NULL);
+    
+    cbinfo->callback = callback;
+    cbinfo->cbdata = data;
+    cbinfo->cbdealloc = dealloc;
+    socketContext.version = 0;
+    socketContext.info = cbinfo;
+    socketContext.retain = NULL;
+    socketContext.release = io_osx_release;
+    socketContext.copyDescription = NULL;
+    
+    CFSocketRef ref = CFSocketCreateWithNative( kCFAllocatorDefault, fd, kCFSocketReadCallBack,
+            io_osx_net_callback, &socketContext );
+    cbinfo->fdRef = ref;
+    cbinfo->sourceRef = CFSocketCreateRunLoopSource( kCFAllocatorDefault, ref, 0 );
+    CFRunLoopAddSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
+
+    return cbinfo;
+}
+
+/**
+ * Register a file descriptor listener on an already open (and listening)
+ * file descriptor. The file descriptor must not have been previously registered.
+ * @return TRUE on success, FALSE on failure.
+ *
+ */
+io_listener_t io_register_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void *) )
+{
+    CFFileDescriptorContext fdContext;
+    struct io_osx_cbinfo *cbinfo = malloc( sizeof(struct io_osx_cbinfo) );
+    assert(cbinfo != NULL);
+
+    cbinfo->callback = callback;
+    cbinfo->cbdata = data;
+    cbinfo->cbdealloc = dealloc;
+    fdContext.version = 0;
+    fdContext.retain = NULL;
+    fdContext.info = cbinfo;
+    fdContext.release = io_osx_release;
+    fdContext.copyDescription = NULL;
+
+    CFFileDescriptorRef ref = CFFileDescriptorCreate( kCFAllocatorDefault, fd, FALSE,
+            io_osx_fd_callback, &fdContext);
+    cbinfo->fdRef = ref;
+    cbinfo->sourceRef = CFFileDescriptorCreateRunLoopSource( kCFAllocatorDefault, ref, 0 );
+    CFRunLoopAddSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
+    return cbinfo;
+}
+
+void io_unregister_listener( io_listener_t data )
+{
+    struct io_osx_cbinfo *cbinfo = (struct io_osx_cbinfo *)data;
+    io_unregister_callback(cbinfo);
+}
</pre></div>
<hr /><a name="file6" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="removed" class="pathname" style="font-family:monospace; float:right; background-color:#ffdddd;" >lxdream/src/drivers</span><br />
<div id="removed" class="fileheader" style="margin-bottom:.5em; background-color:#ffdddd;" ><big><b>net_glib.c</b></big> <small id="info" style="color: #888888;" >removed after 18c164e8aec4</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/net_glib.c
+++ lxdream/src/drivers/net_glib.c
@@ -1,72 +0,0 @@
</small></pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/**
- * $Id$
- *
- * Glib-based networking support functions. Currently this is just for activity callbacks.
- *
- * Copyright (c) 2009 Nathan Keynes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <assert.h>
-#include <glib.h>
-#include <stdlib.h>
-#include "netutil.h"
-
-struct net_glib_cbinfo {
-    net_callback_t callback;
-    void * cbdata;
-    void (*cbdealloc)(void *);
-};
-
-static gboolean net_glib_callback( GIOChannel *source, GIOCondition cond, gpointer data )
-{
-    struct net_glib_cbinfo *cbinfo = (struct net_glib_cbinfo *)data;
-    return cbinfo->callback( g_io_channel_unix_get_fd(source), cbinfo->cbdata);
-}
-
-static void net_glib_release( void *data )
-{
-    struct net_glib_cbinfo *cbinfo = (struct net_glib_cbinfo *)data;
-    if( cbinfo->cbdealloc ) {
-        cbinfo->cbdealloc( cbinfo->cbdata );
-    }
-    free(cbinfo);
-}
-
-/**
- * Register a TCP server socket listener on an already open (and listening) 
- * socket. The socket must not have been previously registered.
- * @return TRUE on success, FALSE on failure.
- * 
- * Defined in netutil.h
- */ 
-gboolean net_register_tcp_listener( int fd, net_callback_t callback, void *data, void (*dealloc)(void*) )
-{
-    struct net_glib_cbinfo *cbinfo = malloc( sizeof(struct net_glib_cbinfo) );
-    assert(cbinfo != NULL);
-    
-    cbinfo->callback = callback;
-    cbinfo->cbdata = data;
-    cbinfo->cbdealloc = dealloc;
-
-    /**
-     * Note magic here: the watch creates an event source which holds a 
-     * reference to the channel. We unref the channel so that the channel then
-     * is automatically released when the event source goes away.
-     */
-    GIOChannel *chan = g_io_channel_unix_new(fd);
-    g_io_channel_set_encoding( chan, NULL, NULL );
-    g_io_channel_set_buffered(chan, FALSE);
-    g_io_add_watch_full( chan, 0, G_IO_IN, net_glib_callback, cbinfo, net_glib_release );
-    g_io_channel_unref( chan );
-    return TRUE;
-}
</pre></div>
<hr /><a name="file7" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="removed" class="pathname" style="font-family:monospace; float:right; background-color:#ffdddd;" >lxdream/src/drivers</span><br />
<div id="removed" class="fileheader" style="margin-bottom:.5em; background-color:#ffdddd;" ><big><b>net_osx.m</b></big> <small id="info" style="color: #888888;" >removed after 18c164e8aec4</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/net_osx.m
+++ lxdream/src/drivers/net_osx.m
@@ -1,78 +0,0 @@
</small></pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/**
- * $Id$
- *
- * OS X networking support functions. Currently this is just for activity callbacks.
- *
- * Copyright (c) 2009 Nathan Keynes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <CoreFoundation/CoreFoundation.h>
-#include "netutil.h"
-
-struct net_osx_cbinfo {
-    net_callback_t callback;
-    void * cbdata;
-    void (*cbdealloc)(void *);
-    CFSocketRef sockRef;
-    CFRunLoopSourceRef sourceRef;
-};
-
-static void net_osx_callback( CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *unused, void *data )
-{
-    struct net_osx_cbinfo *cbinfo = (struct net_osx_cbinfo *)data;
-    if(!cbinfo->callback( CFSocketGetNative(s), cbinfo->cbdata) ) {
-        CFRunLoopRemoveSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
-        CFRelease(cbinfo->sourceRef);
-        cbinfo->sourceRef = NULL;
-        CFRelease(cbinfo->sockRef);
-    }
-}
-
-static void net_osx_release( const void *data )
-{
-    struct net_osx_cbinfo *cbinfo = (struct net_osx_cbinfo *)data;
-    if( cbinfo->cbdealloc != NULL ) {
-        cbinfo->cbdealloc(cbinfo->cbdata);
-    }
-    free( cbinfo );
-}
-
-/**
- * Register a TCP server socket listener on an already open (and listening) 
- * socket. The socket must not have been previously registered.
- * @return TRUE on success, FALSE on failure.
- * 
- * Defined in netutil.h
- */ 
-gboolean net_register_tcp_listener( int fd, net_callback_t callback, void *data, void (*dealloc)(void*) )
-{
-    CFSocketContext socketContext;
-    struct net_osx_cbinfo *cbinfo = malloc( sizeof(struct net_osx_cbinfo) );
-    assert(cbinfo != NULL);
-    
-    cbinfo->callback = callback;
-    cbinfo->cbdata = data;
-    cbinfo->cbdealloc = dealloc;
-    socketContext.version = 0;
-    socketContext.info = cbinfo;
-    socketContext.retain = NULL;
-    socketContext.release = net_osx_release;
-    socketContext.copyDescription = NULL;
-    
-    cbinfo->sockRef = CFSocketCreateWithNative( kCFAllocatorDefault, fd, kCFSocketReadCallBack, 
-            net_osx_callback, &socketContext );
-    cbinfo->sourceRef = CFSocketCreateRunLoopSource( kCFAllocatorDefault, cbinfo->sockRef, 0 );
-    CFRunLoopAddSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
-
-    return TRUE;
-}
</pre></div>
<hr /><a name="file8" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/src/drivers</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>serial_unix.c</b></big> <small id="info" style="color: #888888;" >added at 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/serial_unix.c
+++ lxdream/src/drivers/serial_unix.c
@@ -0,0 +1,188 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * $Id$
+ *
+ * Host driver for a serial port attachment, that can be hooked to a character
+ * device, fifo or named pipe.
+ *
+ * Copyright (c) 2009 Nathan Keynes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include "lxdream.h"
+#include "config.h"
+#include "ioutil.h"
+#include "serial.h"
+
+
+typedef struct serial_fd_device {
+    struct serial_device dev;
+    FILE *in;
+    FILE *out;
+    gboolean closeOnDestroy;
+    io_listener_t listener;
+} *serial_fd_device_t;
+
+static void serial_fd_device_attach(serial_device_t dev);
+static void serial_fd_device_detach(serial_device_t dev);
+static void serial_fd_device_destroy(serial_device_t dev);
+static void serial_fd_device_set_line_speed(struct serial_device *dev, uint32_t bps);
+static void serial_fd_device_set_line_params(struct serial_device *dev, int flags);
+static void serial_fd_device_receive_data(struct serial_device *dev, uint8_t value);
+static gboolean serial_fd_device_transmit_data( int fd, void *dev);
+
+static gboolean serial_config_changed(void *data, struct lxdream_config_group *group, unsigned item,
+                                      const gchar *oldval, const gchar *newval);
+
+struct lxdream_config_group serial_group =
+    { "serial", serial_config_changed, NULL, NULL,
+       {{ "device", N_("Serial device"), CONFIG_TYPE_FILE, "/dev/console" },
+        { NULL, CONFIG_TYPE_NONE }} };
+
+void serial_init()
+{
+    const gchar *name = serial_group.params[0].value;
+    if( name != NULL ) {
+        serial_device_t dev = serial_fd_device_new_filename(name);
+        if( dev != NULL ) {
+            serial_attach_device( dev );
+        }
+    }
+}
+
+static gboolean serial_config_changed(void *data, struct lxdream_config_group *group, unsigned item,
+                                      const gchar *oldval, const gchar *newval)
+{
+    if( item == 0 ) {
+        serial_destroy_device(serial_detach_device());
+        serial_device_t dev = serial_fd_device_new_filename(newval);
+        if( dev != NULL ) {
+            serial_attach_device( dev );
+        }
+    }
+}
+
+
+
+serial_device_t serial_fd_device_new_filename( const gchar *filename )
+{
+    FILE *out = fopen( filename, "w+" );
+    FILE *in;
+    struct stat st;
+
+    if( out == NULL ) {
+        return NULL;
+    }
+
+    if( fstat( fileno(out), &st ) != 0 ) {
+        fclose(out);
+        return NULL;
+    }
+
+    if( S_ISCHR(st.st_mode) || S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode) ) {
+        in = out;
+    } else {
+        in = NULL;
+    }
+
+    return (serial_device_t)serial_fd_device_new_file(in, out, TRUE);
+}
+
+serial_device_t serial_fd_device_new_console()
+{
+    return serial_fd_device_new_file( stdin, stdout, FALSE );
+}
+
+serial_device_t serial_fd_device_new_file( FILE *in, FILE *out, gboolean closeOnDestroy )
+{
+    if( in != NULL )
+        fcntl( fileno(in), F_SETFL, O_NONBLOCK );
+
+    serial_fd_device_t dev = (serial_fd_device_t)malloc(sizeof(struct serial_fd_device));
+    if( dev == NULL ) {
+        if( closeOnDestroy ) {
+            if( in != NULL )
+                fclose(in);
+            if( out != NULL && out != in )
+                fclose(out);
+        }
+        return NULL;
+    }
+
+    dev->dev.attach = serial_fd_device_attach;
+    dev->dev.detach = serial_fd_device_detach;
+    dev->dev.destroy = serial_fd_device_destroy;
+    dev->dev.set_line_speed = serial_fd_device_set_line_speed;
+    dev->dev.set_line_params = serial_fd_device_set_line_params;
+    dev->dev.receive_data = serial_fd_device_receive_data;
+    dev->in = in;
+    dev->out = out;
+    dev->closeOnDestroy = closeOnDestroy;
+    return (serial_device_t)dev;
+}
+
+static void serial_fd_device_attach(serial_device_t dev)
+{
+    serial_fd_device_t fddev = (serial_fd_device_t)dev;
+    if( fddev->in != NULL )
+        fddev->listener = io_register_listener( fileno(fddev->in), serial_fd_device_transmit_data, fddev, NULL );
+}
+
+static void serial_fd_device_detach(serial_device_t dev)
+{
+    serial_fd_device_t fddev = (serial_fd_device_t)dev;
+    if( fddev->in != NULL )
+        io_unregister_listener( fddev->listener );
+}
+
+static void serial_fd_device_destroy(serial_device_t dev)
+{
+    serial_fd_device_t fddev = (serial_fd_device_t)dev;
+    if( fddev->closeOnDestroy ) {
+        if( fddev->in != NULL )
+            fclose(fddev->in);
+        if( fddev->out != NULL && fddev->out != fddev->in )
+            fclose(fddev->out);
+    }
+    fddev->in = NULL;
+    fddev->out = NULL;
+    free(fddev);
+}
+static void serial_fd_device_set_line_speed(struct serial_device *dev, uint32_t bps)
+{
+    /* Do nothing for now */
+}
+static void serial_fd_device_set_line_params(struct serial_device *dev, int flags)
+{
+    /* Do nothing for now */
+}
+static void serial_fd_device_receive_data(struct serial_device *dev, uint8_t value)
+{
+    serial_fd_device_t fddev = (serial_fd_device_t)dev;
+    if( fddev->out != NULL )
+        fputc( value, fddev->out );
+}
+
+static gboolean serial_fd_device_transmit_data( int fd, void *dev )
+{
+    serial_fd_device_t fddev = (serial_fd_device_t)dev;
+    char buf[4096];
+    size_t len = fread(buf, 1, sizeof(buf), fddev->in);
+    if( len > 0 ) {
+        serial_transmit_data(buf, len);
+    }
+    return TRUE;
+}
</pre></div>
<hr /><a name="file9" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>gdbserver.c</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/gdbserver.c
+++ lxdream/src/gdbserver.c
@@ -27,7 +27,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include <arpa/inet.h>
 #include "lxdream.h"
 #include "dreamcast.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>util.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>util.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "cpu.h"
 
 #define DEFAULT_BUFFER_SIZE 1024
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -495,7 +495,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         chan_serv->buf = malloc(1024);
         chan_serv->buf_size = 1024;
         chan_serv->buf_posn = 0;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_register_tcp_listener( conn_fd, gdb_server_data_callback, chan_serv, gdb_server_free );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_register_tcp_listener( conn_fd, gdb_server_data_callback, chan_serv, gdb_server_free );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         INFO( "GDB connected from %s", chan_serv->peer_name );
     }
     return TRUE;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -514,7 +514,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 gboolean gdb_init_server( const char *interface, int port, cpu_desc_t cpu, gboolean mmu )
 {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    int fd = <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_create_server_socket( interface, port );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    int fd = <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_create_server_socket( interface, port );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     if( fd == -1 ) {
         return FALSE;
     }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -523,7 +523,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     server->cpu = cpu;
     server->mmu = mmu;
     server->fd = fd;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    gboolean result = <span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >net</span>_register_tcp_listener( fd, gdb_server_connect_callback, server, gdb_server_free );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    gboolean result = <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >io</span>_register_tcp_listener( fd, gdb_server_connect_callback, server, gdb_server_free );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     INFO( "%s GDB server running on port %d", cpu->name, port );
     return result;
 }
</pre></div>
<hr /><a name="file10" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/src</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>ioutil.c</b></big> <small id="info" style="color: #888888;" >added at 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/ioutil.c
+++ lxdream/src/ioutil.c
@@ -0,0 +1,54 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * $Id$
+ * 
+ * Network support functions
+ *
+ * Copyright (c) 2009 Nathan Keynes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <string.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include "ioutil.h"
+
+int io_create_server_socket(const char *interface, int port )
+{
+    struct sockaddr_in sin;
+    int fd = socket(AF_INET, SOCK_STREAM, 0);
+    if( fd == -1 ) {
+        ERROR( "Failed to create TCP socket!" );
+        return -1;
+    }
+    
+    sin.sin_family = AF_INET;
+    sin.sin_addr.s_addr = 0;
+    sin.sin_port = htons(port);
+    
+    if( interface != NULL ) {
+        if( !inet_aton(interface, &sin.sin_addr) ) {
<a name="task1" />+            /* <span class="task" style="background-color:#ffff00;" >TODO</span>: hostname lookup */
+        }
+    }
+
+    if( bind( fd, (struct sockaddr *)&sin, sizeof(sin) ) != 0 ||
+            listen(fd, 5) != 0 ) {
+        close(fd);
+        ERROR( "Failed to bind port %d (%s)", port, strerror(errno) );
+        return -1;
+    }
+    return fd;
+}
+
</pre></div>
<hr /><a name="file11" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/src</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>ioutil.h</b></big> <small id="info" style="color: #888888;" >added at 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/ioutil.h
+++ lxdream/src/ioutil.h
@@ -0,0 +1,67 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * $Id$
+ * 
+ * GDB RDP server stub - SH4 + ARM
+ *
+ * Copyright (c) 2009 Nathan Keynes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef lxdream_netutil_H
+#define lxdream_netutil_H 1
+
+#include <netinet/in.h>
+#include "lxdream.h"
+
+typedef void *io_listener_t;
+
+/**
+ * Construct a server socket listening on the given interface and port. If port
+ * is 0, a dynamic port will be bound instead. 
+ * This method does not register a listener.
+ * @return newly created socket fd, or -1 on failure.
+ */ 
+int io_create_server_socket(const char *interface, int port );
+
+/**
+ * Callback invoked when data is available from the remote peer, or when the peer
+ * connects/disconnects.
+ * 
+ * @param fd     file descriptor of the connected socket
+ * @param data   data supplied when the callback was registered
+ * @return TRUE to maintain the connection, FALSE to immediately disconnected + close.
+ */
+typedef gboolean (*io_callback_t)( int fd, void *data );
+
+/**
+ * Register a TCP server socket listener on an already open (and listening) 
+ * socket. The socket must not have been previously registered.
+ * @return NULL on failure, otherwise an io listener handle.
+ * 
+ * Note: Implementation is platform specific
+ */ 
+io_listener_t io_register_tcp_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void*) );
+
+/**
+ * Register an I/O listener on an open file descriptor. The fd must not have
+ * been previously registered.
+ * @return TRUE on success, FALSE on failure.
+ */
+io_listener_t io_register_listener( int fd, io_callback_t callback, void *data, void (*dealloc)(void *) );
+
+/**
+ * Unregister a socket that was previously registered with the system. This
+ * does not close the socket, but will remove any callbacks associated with the socket.
+ */ 
+void io_unregister_listener( io_listener_t handle );
+
+#endif /* !lxdream_netutil_H */
</pre></div>
<hr /><a name="file12" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>main.c</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/main.c
+++ lxdream/src/main.c
@@ -249,6 +249,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
     
     hotkeys_init();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    serial_init();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
     maple_reattach_all();
     INFO( "%s! ready...", APP_NAME );
</pre></div>
<hr /><a name="file13" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="removed" class="pathname" style="font-family:monospace; float:right; background-color:#ffdddd;" >lxdream/src</span><br />
<div id="removed" class="fileheader" style="margin-bottom:.5em; background-color:#ffdddd;" ><big><b>netutil.c</b></big> <small id="info" style="color: #888888;" >removed after 18c164e8aec4</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/netutil.c
+++ lxdream/src/netutil.c
@@ -1,54 +0,0 @@
</small></pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/**
- * $Id$
- * 
- * Network support functions
- *
- * Copyright (c) 2009 Nathan Keynes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include "netutil.h"
-
-int net_create_server_socket(const char *interface, int port )
-{
-    struct sockaddr_in sin;
-    int fd = socket(AF_INET, SOCK_STREAM, 0);
-    if( fd == -1 ) {
-        ERROR( "Failed to create TCP socket!" );
-        return -1;
-    }
-    
-    sin.sin_family = AF_INET;
-    sin.sin_addr.s_addr = 0;
-    sin.sin_port = htons(port);
-    
-    if( interface != NULL ) {
-        if( !inet_aton(interface, &sin.sin_addr) ) {
-            /* TODO: hostname lookup */
-        }
-    }
-
-    if( bind( fd, (struct sockaddr *)&sin, sizeof(sin) ) != 0 ||
-            listen(fd, 5) != 0 ) {
-        close(fd);
-        ERROR( "Failed to bind port %d (%s)", port, strerror(errno) );
-        return -1;
-    }
-    return fd;
-}
-
</pre></div>
<hr /><a name="file14" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="removed" class="pathname" style="font-family:monospace; float:right; background-color:#ffdddd;" >lxdream/src</span><br />
<div id="removed" class="fileheader" style="margin-bottom:.5em; background-color:#ffdddd;" ><big><b>netutil.h</b></big> <small id="info" style="color: #888888;" >removed after 18c164e8aec4</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/netutil.h
+++ lxdream/src/netutil.h
@@ -1,58 +0,0 @@
</small></pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/**
- * $Id$
- * 
- * GDB RDP server stub - SH4 + ARM
- *
- * Copyright (c) 2009 Nathan Keynes.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef lxdream_netutil_H
-#define lxdream_netutil_H 1
-
-#include <netinet/in.h>
-#include "lxdream.h"
-
-/**
- * Construct a server socket listening on the given interface and port. If port
- * is 0, a dynamic port will be bound instead. 
- * This method does not register a listener.
- * @return newly created socket fd, or -1 on failure.
- */ 
-int net_create_server_socket(const char *interface, int port );
-
-/**
- * Callback invoked when data is available from the remote peer, or when the peer
- * connects/disconnects.
- * 
- * @param fd     file descriptor of the connected socket
- * @param data   data supplied when the callback was registered
- * @return TRUE to maintain the connection, FALSE to immediately disconnected + close.
- */
-typedef gboolean (*net_callback_t)( int fd, void *data );
-
-/**
- * Register a TCP server socket listener on an already open (and listening) 
- * socket. The socket must not have been previously registered.
- * @return TRUE on success, FALSE on failure.
- * 
- * Note: Implementation is platform specific
- */ 
-gboolean net_register_tcp_listener( int fd, net_callback_t callback, void *data, void (*dealloc)(void*) );
-
-/**
- * Unregister a socket that was previously registered with the system. This
- * does not close the socket, but will remove any callbacks associated with the socket.
- */ 
-gboolean net_unregister_listener( int fd );
-
-#endif /* !lxdream_netutil_H */
</pre></div>
<hr /><a name="file15" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>serial.h</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/serial.h
+++ lxdream/src/serial.h
@@ -20,6 +20,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #include <stdint.h>
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "lxdream.h"
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #ifdef __cplusplus
 extern "C" {
 #endif
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -33,17 +35,44 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define SERIAL_2STOPBITS   0x08
 
 typedef struct serial_device {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    void (*set_line_speed)(uint32_t bps);
-    void (*set_line_params)(int flags);
-    void (*receive_data)(uint8_t value);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    void (*attach)(struct serial_device *dev);
+    void (*detach)(struct serial_device *dev);
+    void (*destroy)(struct serial_device *dev);
+    void (*set_line_speed)(struct serial_device *dev, uint32_t bps);
+    void (*set_line_params)(struct serial_device *dev, int flags);
+    void (*receive_data)(struct serial_device *dev, uint8_t value);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > } *serial_device_t;
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void serial_attach_device( serial_device_t dev );
-void serial_detach_device( );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+serial_device_t serial_attach_device( serial_device_t dev );
+serial_device_t serial_detach_device( );
+serial_device_t serial_get_device( );
+
+/**
+ * Destroy a serial device.
+ */
+void serial_destroy_device( serial_device_t dev );
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 void serial_transmit_data( char *data, int length );
 void serial_transmit_break( void );
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/**
+ * Create a serial device on a host device identified by the given
+ * file (ie /dev/tty). If filename identifies a regular file, it is opened
+ * for output only.
+ */
+serial_device_t serial_fd_device_new_filename( const gchar *filename );
+
+/**
+ * Create a serial device on the host console (stdin/stdout).
+ */
+serial_device_t serial_fd_device_new_console();
+
+/**
+ * Create a serial device on a pair of file streams (in and out)
+ */
+serial_device_t serial_fd_device_new_file( FILE *in, FILE *out, gboolean closeOnDestroy );
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #ifdef __cplusplus
 }
 #endif
</pre></div>
<hr /><a name="file16" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>scif.c</b></big> <small id="info" style="color: #888888;" >18c164e8aec4 -> 136fc24d17ef</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/scif.c
+++ lxdream/src/sh4/scif.c
@@ -28,7 +28,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "serial.h"
 
 void SCIF_set_break(void);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void SCIF_run_to(uint32_t nanosecs);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /************************* External serial interface ************************/
 
 /**
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -55,17 +55,41 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > serial_data_block_t serial_recvq_head = NULL, serial_recvq_tail = NULL;
 serial_device_t serial_device = NULL;
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void serial_attach_device( serial_device_t dev ) 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+serial_device_t serial_get_device( )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    return serial_device;
+}
+
+serial_device_t serial_attach_device( serial_device_t dev ) 
+{
+    serial_device_t olddev = serial_device;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     if( serial_device != NULL )
         serial_detach_device();
     serial_device = dev;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( serial_device != NULL && serial_device->attach != NULL )
+        serial_device->attach(serial_device);
+    return olddev;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >void</span> serial_detach_device( void )
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >serial_device_t</span> serial_detach_device( void )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    serial_device_t dev = serial_device;
+    if( serial_device != NULL && serial_device->detach != NULL ) {
+        serial_device->detach(serial_device);
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     serial_device = NULL;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    return dev;
+}
+
+void serial_destroy_device( serial_device_t dev )
+{
+    if( dev != NULL ) {
+        if( serial_device == dev )
+            serial_detach_device();
+        if( dev->destroy )
+            dev->destroy(dev);
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 /**
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -174,6 +198,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 uint32_t SCIF_tick_period = 0;
 uint32_t SCIF_tick_remainder = 0;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+uint32_t SCIF_slice_cycle = 0;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 void SCIF_save_state( FILE *f ) 
 {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -445,7 +470,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         int baudrate = sh4_peripheral_freq / (32 * mult * (bbr+1) );
 
         if( serial_device != NULL && serial_device->set_line_speed != NULL )
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-            serial_device->set_line_speed( baudrate );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+            serial_device->set_line_speed( <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >serial_device, </span>baudrate );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
         SCIF_tick_period = sh4_peripheral_period * (32 * mult * (bbr+1));
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -457,6 +482,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 MMIO_REGION_READ_FN( SCIF, reg )
 {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    SCIF_run_to(sh4r.slice_cycle);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     reg &= 0xFFF;
     switch( reg ) {
     case SCFRDR2: /* Receive data */
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -470,6 +496,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 MMIO_REGION_WRITE_FN( SCIF, reg, val )
 {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    SCIF_run_to(sh4r.slice_cycle);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     uint32_t tmp;
     reg &= 0xFFF;
     switch( reg ) {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -482,7 +509,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >          */
         val &= 0x007B;
         if( serial_device != NULL ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-            serial_device->set_line_params( val );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+            serial_device->set_line_params( <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >serial_device, </span>val );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         }
         tmp = MMIO_READ( SCIF, SCSMR2 );
         if( (tmp & 0x03) != (val & 0x03) ) {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -597,7 +624,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             int val = SCIF_sendq_dequeue();
             if( val != -1 && serial_device != NULL && 
                     serial_device->receive_data != NULL ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-                serial_device->receive_data( val );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+                serial_device->receive_data( <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >serial_device, </span>val );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             }
         }
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -632,11 +659,17 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     SCIF_update_line_speed();
 }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-void SCIF_run_slice( uint32_t nanosecs ) 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+void SCIF_run_to( uint32_t nanosecs )
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    SCIF_tick_remainder += nanosecs;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    SCIF_tick_remainder += nanosecs<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" > - SCIF_slice_cycle</span>;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     while( SCIF_tick_remainder >= SCIF_tick_period ) {
         SCIF_tick_remainder -= SCIF_tick_period;
         SCIF_clock_tick();
     }
 }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+
+void SCIF_run_slice( uint32_t nanosecs )
+{
+    SCIF_run_to(nanosecs);
+    SCIF_slice_cycle = 0;
+}
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>