Re: [dwm] Updated bottom stack patch

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon, 17 Sep 2007 20:26:36 +0200

On Mon, Sep 17, 2007 at 07:43:34PM +0200, Szabolcs Nagy wrote:
> On 9/17/07, Anselm R. Garbe <arg_AT_suckless.org> 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
Received on Mon Sep 17 2007 - 20:26:36 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:53:38 UTC