On Mon, Sep 17, 2007 at 07:43:34PM +0200, Szabolcs Nagy wrote: > On 9/17/07, Anselm R. Garbe <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 17, 2007 at 12:25:40PM +0100, Chris Webb wrote: > > > One question: why do you explicitly declare all dwm.c functions static > > > given that you only have a single source file anyway? > > > > Yeah, that's unnecessary. I remove that - it will also consume > > less disk space then ;) > > i feel static to be nicer > maybe i'm used to library writing where you declare local functions as static > > i looked into the c-faq and interestingly i could not find anything > about this kind of convention > even standard unix tools use both convention in a mixed way (static > and non static)
Afaik not using static makes all variables and functions usable in an extern context. I agree with you if there is more than a single source file to enforce using static whenever possible to reduce name clashes and side effects in a global scope. But with a micromized dwm.c or dmenu.c I can live without explicit static declarations. Regards, -- Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361