Dear all,

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.

indent says (also reported in #1630):

indent: ./lib/vector/dglib/misc-template.c:574: Error:Stmt nesting error.
indent: ./lib/vector/dglib/misc-template.c:655: Error:Unmatched 'else'
indent: ./lib/vector/dglib/misc-template.c:684: Error:Stmt nesting error.

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.

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.

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.

Best,
Vaclav

[#1630] https://github.com/OSGeo/grass/issues/1630#issuecomment-1295442400
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to