<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 20, 2014 at 2:33 PM, Kevin Harwell <span dir="ltr"><<a href="mailto:kharwell@digium.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=kharwell@digium.com&cc=&bcc=&su=&body=','_blank','location=yes,menubar=yes,resizable=yes,width=800,height=600');return false;">kharwell@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
For a task I have been working on in Asterisk I have found myself<br>
needing to parse URIs. Luckily, Asterisk is already using such a<br>
library [1], albeit limitedly. As the library also may not be installed<br>
on every system Asterisk uses #ifdef to work around this.<br>
<br>
So instead of having a bunch of #ifdefs sprinkled throughout the code I<br>
was thinking of locating the parsing code in a central place. Perhaps<br>
http.c? A new file?<br>
<br><br></blockquote><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the third party library is installed it will use that to parse and<br>
place the data in the structure, otherwise it will fall back and use<br>
some basic parsing code to do it.<br>
<br>
Thoughts?<br>
<br>
[1] <a href="http://uriparser.sourceforge.net/doc/html/index.html" target="_blank">http://uriparser.sourceforge.net/doc/html/index.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div>Might want to always use the code rather than as a fallback. That way there's no chance of the behavior changing based on whether the library is installed or not at compile time. Maybe its own file under main?</div>
<div><br></div><div> </div></div></div></div>