3 ms·
Why do you put spaces between your function names and their arguments? I find it quite jarring, as someone who's spent a good 18 years reading C code :} r
by cyberpunk 3y ago
Why do you put spaces between your function names and their arguments?
I find it quite jarring, as someone who's spent a good 18 years reading C code :}
return lookup_breakpoint (dbg->breakpoints, get_pc (dbg->pid));
vs
return lookup_breakpoint(dbg->breakpoints, get_pc(dbg->pid));
Edit: I tend to lean towards the 'bsd' style, if you have an open or freebsd system, try 'man style' and try their rules on for size.
- valleyer 3y agoIt's GNU style, which some people prefer. https://www.gnu.org/prep/standards/standards.html#Syntactic-Conventions https://www.gnu.org/prep/standards/standards.html#Syntactic-...
- cyberpunk 3y agoDamn, I really have been in my cave for too long! Forgot all about their weird if {}. Thanks!
- darkwater 3y agoOff-topic but I can not avoid a tear of joy reading this: > In the Unix world, “portability” refers to porting to different Unix versions. For a GNU program, this kind of portability is desirable, but not paramount. The primary purpose of GNU software is to run on top of the GNU kernel, compiled with the GNU C compiler, on various types of CPU. So the kinds of portability that are absolutely necessary are quite limited. But it is important to support Linux-based GNU systems, since they are the form of GNU that is popular.