Menu

#8 compress whitespace around stripped sections

v6.0
open
None
2
2015-02-12
2015-02-12
No

the upstream kernel implementation of unifdef supports an option "-B" which instead of converting stripped lines into whitespace, attempts to compress whitespace around stripped out sections (ie: sections of code which are removed in the output) so that only a single whitespace line is retained.

Essentially, it converts


<blank line="">

ifdef SOMETHING

endif

<blank line="">

into


<blank line="">

and prevents from having to do funky things like

ifdef SOMETHING

<blank line="">

endif

which tends to be ugly if you maintain a single source of unstripped code which then gets processed into configuration used as external sources.

This is a feature which coan doesn't currently have, but I don't think it would take too much work to implement it in a similar way to how unifdef does it.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.