<div dir="ltr"><div>Dear all,</div><div><br></div><div>GNU indent is confused by code in dglib/misc-template.c and I can't really blame it. I'm confused, too. It is hard to track the structure there.<br></div><div><br></div><div>indent says (also reported in #1630):<br></div><div><br></div><div>indent: ./lib/vector/dglib/misc-template.c:574: Error:Stmt nesting error.<br>
indent: ./lib/vector/dglib/misc-template.c:655: Error:Unmatched 'else'<br>
indent: ./lib/vector/dglib/misc-template.c:684: Error:Stmt nesting error.</div><div><br></div><div>All three seem to be connected to the two uses of DGL_FOREACH_EDGE which are also the only two uses of this macro. There is also plenty of ifdef-else-endif which might be confusing indent.</div><div><br></div><div>Any opinions on how to proceed here? I would like to see the code simplified in the sense that it is easily readable by both humans and machines, but it is not clear to me how to achieve it here.<br></div><div><br></div><div>The misc-template.c is included into "v1" and "v2" file to produce different code through the ifdefs for DGlib graph versions 1 and 2.</div><div><br></div><div>Best,</div><div>Vaclav<br></div><div><br></div><div>[#1630] <a href="https://github.com/OSGeo/grass/issues/1630#issuecomment-1295442400">https://github.com/OSGeo/grass/issues/1630#issuecomment-1295442400</a></div><div><br></div></div>