Hi, to all.
I am not new to dwm; I am using it since a year or so. 
However, I have not delved in the code till now. My 
initial goal was 
to add a key-binding to allow me to switch to the next/prior tag. I was 
brewing the new 
feature by looking at the dwm code when I found:

  for
(ntags = 0; tags[ntags]; ntags++);

which,  I suppose,  is used to 
initialize the `ntags' variable. However this point is not clear to me 
since
`tags' is statically defined, then it would be possible to 
compute statically `ntags' as

  ntags = sizeof tags / sizeof tags[0] - 
1;

and, as a side effect, knowing statically `ntags' allows to define 
`seltags' as an array without using
`emallocz()'. 
What I am missing?

greets,
gingioerge



Reply via email to