Re: C formatting conventions
Hmm, well I did some alchemy and throwing these lines into my .emacs seems to do the right thing. (setq c-basic-offset 4) (setq c-default-style '((java-mode . java) (awk-mode . awk) (other . linux))) On Fri, Oct 23, 2009 at 6:23 PM, Patrick Hunt ph...@apache.org wrote: not quite that simple I'm afraid ;-) some good friday reading if you haven't seen before http://kerneltrap.org/node/11 perhaps we should use lindent on our code? whoops ... ;-) Patrick Benjamin Reed wrote: i think we follow linux coding conventions. i think i wrote most of the code using the linux emacs style. ben Steve Cheng wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
C formatting conventions
Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
Re: C formatting conventions
Hi Steven, The most important is 4 space indentation (no tabs). Other than that, we really don't have any specific guidelines on c code. Now that you mention it, it would be good to have one. But as of now, we do not have one. Thanks mahadev On 10/23/09 5:01 PM, Steve Cheng steve...@gmail.com wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
Re: C formatting conventions
No gratuitous reformatting. Would be nice to try and keep it looking like the code we already have... Patrick Mahadev Konar wrote: Hi Steven, The most important is 4 space indentation (no tabs). Other than that, we really don't have any specific guidelines on c code. Now that you mention it, it would be good to have one. But as of now, we do not have one. Thanks mahadev On 10/23/09 5:01 PM, Steve Cheng steve...@gmail.com wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
Re: C formatting conventions
i think we follow linux coding conventions. i think i wrote most of the code using the linux emacs style. ben Steve Cheng wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
Re: C formatting conventions
Ben, emacs? If so can you post your .emacs settings to the howtocontribute page? Cuz by default my emacs seems to want to do 2 spaces indent... Patrick Benjamin Reed wrote: i think we follow linux coding conventions. i think i wrote most of the code using the linux emacs style. ben Steve Cheng wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven
Re: C formatting conventions
not quite that simple I'm afraid ;-) some good friday reading if you haven't seen before http://kerneltrap.org/node/11 perhaps we should use lindent on our code? whoops ... ;-) Patrick Benjamin Reed wrote: i think we follow linux coding conventions. i think i wrote most of the code using the linux emacs style. ben Steve Cheng wrote: Hi, What are the C formatting conventions for ZooKeeper? Couldn't find anything on the HowToContribute page. Thank you, Steven