<div dir="ltr">Thanks for the proj_coord(). I meant to look that up, but got interrupted by a poopy diaper.<div><br></div><div>I would be happy to create a draft document for people to comment on. It will be slow going as I only get little bits of time here and there for the next week.</div><div><br></div><div>I do have to say that I don't like removing the math.h from the main file. The cost is small and it frees you to refactor other headers without wide ranging changes each time.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 30, 2018 at 6:00 AM, Kristian Evers <span dir="ltr"><<a href="mailto:kreve@sdfe.dk" target="_blank">kreve@sdfe.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;line-break:after-white-space">
Kurt,
<div><br>
</div>
<div>I think it looks good. I tried compiling the code and again I had the problem with declarations like</div>
<div><br>
</div>
<div><span class="m_-8580915385391752522Apple-tab-span" style="white-space:pre-wrap"></span>XY xy = {0.0, 0.0};</div>
<div><br>
</div>
<div>I’ve fixed those in a fork of your gist. See revision 2 in [0] for a proposed solution that I think</div>
<div>is in line with your ideas</div>
<div><br>
</div>
<div>I like how you’ve separated includes from the standard library on the PROJ internal includes. On</div>
<div>a related note (for those who don’t already know) I have recently introduced the proj_math.h</div>
<div>header which is intended as a PROJ replacement of math.h. proj_math.h’s purpose in life is to</div>
<div>make sure that we can use C99 math functions on systems where they are not available.</div>
<div>proj_math.h includes math.h and defines functions such as isnan() and hypot(). This way they</div>
<div>can be used as you would on a C99-compatible system as long as proj_math.h is included.</div>
<div>See revision 3 in [0].</div>
<div><br>
</div>
<div>Would you be willing to write up a simple style guide for PROJ based on the ideas you have presented in</div>
<div>this thread?</div>
<div>
<div><br>
</div>
<div>/Kristian</div>
<div><br>
</div>
<div>[0] <a href="https://gist.github.com/kbevers/17ec703942646e401b28a0975b28771d/revisions" target="_blank">https://gist.github.com/<wbr>kbevers/<wbr>17ec703942646e401b28a0975b2877<wbr>1d/revisions</a></div><div><div class="h5">
<div><br>
<blockquote type="cite">
<div>On 24 Apr 2018, at 12:05, Mateusz Loskot <<a href="mailto:mateusz@loskot.net" target="_blank">mateusz@loskot.net</a>> wrote:</div>
<br class="m_-8580915385391752522Apple-interchange-newline">
<div>
<div>On 24 April 2018 at 11:45, Thomas Knudsen <<a href="mailto:knudsen.thomas@gmail.com" target="_blank">knudsen.thomas@gmail.com</a>> wrote:<br>
<blockquote type="cite">
<blockquote type="cite">In C too, but since C99.<br>
</blockquote>
<br>
AFAIK this only applies to the "for (int i = 0; i < n; i++)" syntax.<br>
<br>
while (...) {<br>
int i = 123, j = 345;<br>
k = i + j;<br>
}<br>
<br>
has been correct (and imho, preferable) syntax since K&R C<br>
</blockquote>
<br>
AFAIK, it's about compound statement.<br>
C89 requires declaration at the top of blocks, while C99 lifts that:<br>
<br>
$ cat test.c<br>
int main()<br>
{<br>
int i = 0;<br>
while (i < 10)<br>
{<br>
int j = 345;<br>
i = i + j;<br>
}<br>
<br>
{<br>
int z = 0;<br>
z = 1;<br>
}<br>
int x = 1;<br>
}<br>
<br>
$ gcc -std=c89 -pedantic test.c<br>
test.c: In function ‘main’:<br>
test.c:14:5: warning: ISO C90 forbids mixed declarations and code<br>
[-Wdeclaration-after-<wbr>statement]<br>
int x = 1;<br>
^~~<br>
<br>
$ gcc -std=c99 -pedantic test.c<br>
$<br>
<br>
<br>
Best regards,<br>
-- <br>
Mateusz Loskot, <a href="http://mateusz.loskot.net" target="_blank">http://mateusz.loskot.net</a><br>
______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org" target="_blank">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a></div>
</div>
</blockquote>
</div>
<br>
</div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--<div><a href="http://schwehr.org" target="_blank">http://schwehr.org</a></div></div>
</div>