The GNU coding standards document says:
It is also important for function definitions to start the name of the function in column one. This helps people to search for function definitions, and may also help certain tools recognize them. Thus, using Standard C syntax, the format is this:
static char *
concat (char *s1, char *s2)
{
...
}
Are tools that benefit from this convention, currently in significantly widespread use?
Note that I'm not asking whether this convention is better than others in terms of readability or aesthetics - that's largely a matter of opinion - only whether tools that benefit from it, are still used.
grep may use this convention:
$ grep '^concat (' *.c
And similarly for other regex-based tools, including every serious editor on Unix.
i think that citing grep is enough . Having the function name alone in a row allow to easy locate it without using complex regex. Anyway tool like cscope can perform this job for every formatting convention you would use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With