<html><body bgcolor="#FFFFFF"><div>Modulo a minor cstyle nit, the fix below looks about right.  (The fix for style is that you have an extra whitespace between "strtok" and the "(" that starts its argument list.)</div><div><br></div><div>Have you tested?<br><br>  -- Garrett D'Amore</div><div><br>On May 17, 2011, at 1:59 PM, "Γιώργος Γεωργίου" <<a href="mailto:paogeorge13@gmail.com">paogeorge13@gmail.com</a>> wrote:<br><br></div><div><span></span></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>Hello to all developers!</div><div>
This is my first touch with an open source project. </div><div><br></div><div>I have a suggestion for solving this problem.</div><div><br></div><div><br></div><div><b>fuction</b>: int do_save_controls(int argc, char **argv)</div>
<div><b>file</b>: <span style="font-family: monospace; font-size: medium; ">/<a href="http://src.illumos.org/source/xref/illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">illumos-gate</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">usr</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr/src" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">src</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">cmd</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">audio</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c#999" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">audioctl</a>/<a href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c" target="_blank" style="color: rgb(32, 32, 98); text-decoration: underline; ">audioctl.c</a></span></div>
<div><br></div><div><br></div><div><br></div><div><span style="font-family: monospace; font-size: medium; "><a href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c" target="_blank" style="color: rgb(32, 32, 98); text-decoration: underline; "></a></span><b>Replace lines</b> </div>
<div><span style="font-family: arial, sans-serif; font-size: medium; "><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a name="12fffb7c393d8e90_1059" href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c#1059" target="_blank" style="color: rgb(136, 136, 136); text-decoration: underline; background-color: rgb(221, 221, 221); padding-right: 0.1em; margin-right: 0.2em; text-align: right; "> 1059 </a>        <b>if</b> (<a href="http://src.illumos.org/source/s?defs=strlen&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">strlen</a>(d-><a href="http://src.illumos.org/source/s?defs=card&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">card</a>.<a href="http://src.illumos.org/source/s?defs=hw_info&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">hw_info</a>)) {
<a name="12fffb7c393d8e90_1060" href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c#1060" target="_blank" style="color: rgb(0, 0, 0); text-decoration: none; background-color: rgb(221, 221, 221); padding-right: 0.1em; margin-right: 0.2em; text-align: right; ">   1060 </a>         (<b>void</b>) <a href="http://src.illumos.org/source/s?defs=fprintf&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fprintf</a>(<a href="http://src.illumos.org/source/s?defs=fp&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fp</a>, <span style="color: green; ">"# HW Info = %s"</span>, d-><a href="http://src.illumos.org/source/s?defs=card&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">card</a>.<a href="http://src.illumos.org/source/s?defs=hw_info&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">hw_info</a>);
<a name="12fffb7c393d8e90_1061" href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c#1061" target="_blank" style="color: rgb(136, 136, 136); text-decoration: none; background-color: rgb(221, 221, 221); padding-right: 0.1em; margin-right: 0.2em; text-align: right; ">   1061 </a>   }
<a name="12fffb7c393d8e90_1062" href="http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c#1062" target="_blank" style="color: rgb(136, 136, 136); text-decoration: none; background-color: rgb(221, 221, 221); padding-right: 0.1em; margin-right: 0.2em; text-align: right; ">   1062 </a>   (<b>void</b>) <a href="http://src.illumos.org/source/s?defs=fprintf&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fprintf</a>(<a href="http://src.illumos.org/source/s?defs=fp&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fp</a>, <span style="color: green; ">"#\n"</span>);
</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><b>with lines below</b></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br>
</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">char *hwInfo;</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-style-span" style="font-family: arial, sans-serif; white-space: normal; "><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><b>if</b> (<a href="http://src.illumos.org/source/s?defs=strlen&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">strlen</a>(d-><a href="http://src.illumos.org/source/s?defs=card&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">card</a>.<a href="http://src.illumos.org/source/s?defs=hw_info&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">hw_info</a>)) {
</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">          hwInfo = strtok (d-><a href="http://src.illumos.org/source/s?defs=card&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">card</a>.<a href="http://src.illumos.org/source/s?defs=hw_info&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">hw_info</a>, "\n");</pre>
<pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">          while (hwInfo != NULL) {          </pre>
<pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">                    (<b>void</b>) <a href="http://src.illumos.org/source/s?defs=fprintf&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fprintf</a>(<a href="http://src.illumos.org/source/s?defs=fp&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fp</a>, <span style="color: green; ">"# HW Info = %s\n"</span>, hwInfo);</pre>
<pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">                    hwInfo = strtok(NULL, "\n");</pre>
<pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">          }</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">}</pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-style-span" style="font-family: arial, sans-serif; white-space: normal; "><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(<b>void</b>) <a href="http://src.illumos.org/source/s?defs=fprintf&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fprintf</a>(<a href="http://src.illumos.org/source/s?defs=fp&project=illumos-gate" target="_blank" style="color: rgb(32, 48, 162); text-decoration: none; ">fp</a>, <span style="color: green; ">"#\n"</span>);</pre>
</span></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><div>                                         </div>
<div>                    </div></span></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><pre style="white-space: pre-wrap; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></pre><div><br></div>
</span></div><span style="font-family: arial, sans-serif; font-size: medium; "></span></span>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Developer mailing list</span><br><span><a href="mailto:Developer@lists.illumos.org">Developer@lists.illumos.org</a></span><br><span><a href="http://lists.illumos.org/m/listinfo/developer">http://lists.illumos.org/m/listinfo/developer</a></span><br></div></blockquote></body></html>