<div dir="ltr"><span style="font-size:12.8000001907349px">I've tried update the code to be a little more cleanly separated, and fixed the issue with BOOL. This code really just runs as an exception when a custom baudrate is requested. Otherwise, it pretty much shares the same code. If someone can suggest a better way to organize the code, I'd be happy to implement it.</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">(Sorry for the duplicate email, Nikolay, I forgot to replay all at first)</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 December 2014 at 02:21, Nikolay Sivov <span dir="ltr"><<a href="mailto:nsivov@codeweavers.com" target="_blank">nsivov@codeweavers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 11/29/2014 07:53 PM, Nathan Fearnley wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mac OS X supports a special function call for custom baud rates. I have<br>
implemented this feature to allow non-standard baud rates.<br>
Unfortunately, setting any other parameters using tcsetattr will fail,<br>
because it does not support the higher baud rates. In order to work<br>
around this, when setting other parameters, the baud rate is temporarily<br>
set to 9600, then reset back to custom rate after the changes are complete.<br>
<br>
<br>
</blockquote>
<br></div></div>
I can't comment on functional part, but regarding code structure this should be better separated imho. Maybe it's even better to duplicate whole functions and ifdef them all in case when __APPLE__ is not defined. Also don't use C++ 'bool', use BOOL with TRUE/FALSE defines.<br>
<br>
</blockquote></div><br></div>