Re: [dwm] [patch] mwfact per tag

From: y i y u s <yiyu.jgl_AT_gmail.com>
Date: Wed, 5 Sep 2007 22:29:21 +0200

> I wanted to use ntags to define the size of
> mwfact[], but can't due to compiler errors. ...

You can't make double mwfact[ntags] because ntags is a variable, what
you can do is:

double *mwfact;
mwfact = emalloc(ntags * sizeof(double));

emalloc is just a wrapper on the standard malloc to print an error
message and exit if something goes wrong.
And about initialization, why not doing it in the setup function in
main.c where everything is initialized?
I hope this tips were useful to you, regards,

-- 
- yiyus || JGL .
Received on Wed Sep 05 2007 - 22:29:22 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:52:32 UTC