tag: Replace tags[][] by **tags

This commit is contained in:
Martin Duquesnoy 2008-11-30 03:51:33 +01:00
parent 62c353c0bc
commit 7e1b325322
3 changed files with 7 additions and 7 deletions

View File

@ -484,14 +484,11 @@ init_conf(void)
}
}
seltag = emalloc(screen_count(), sizeof(int));
//tags = emalloc(screen_count(), sizeof(Tag*));
tags = emalloc(screen_count(), sizeof(Tag*));
for(j = 0; j < screen_count(); ++j)
{
//tags[j] = emalloc(conf.ntag, sizeof(Tag));
tags[j] = emalloc(conf.ntag + 1, sizeof(Tag));
seltag[j] = 1;
for(i = 0; i < conf.ntag; ++i)
tags[j][i + 1] = conf.tag[i];

View File

@ -81,6 +81,7 @@ void
quit(void)
{
Client *c;
int i;
/* Set the silent error handler */
XSetErrorHandler(errorhandlerdummy);
@ -95,7 +96,9 @@ quit(void)
client_unmanage(c);
}
for(i = 0; i < screen_count(); ++i)
free(tags[i]);
free(tags);
XftFontClose(dpy, font);
XFreeCursor(dpy, cursor[CurNormal]);
XFreeCursor(dpy, cursor[CurMove]);

View File

@ -248,7 +248,7 @@ XftFont *font;
/* InfoBar */
InfoBar *infobar;
Tag tags[32][MAXTAG];
Tag **tags;
int *seltag;
/* Important Client */