* See LICENSE file for license details.
*/
#include "dwm.h"
-
#include <stdio.h>
#include <string.h>
#include <X11/Xlocale.h>
}
static unsigned int
-textnw(char *text, unsigned int len)
+textnw(const char *text, unsigned int len)
{
XRectangle r;
drawtext(NULL, !istile, False);
dc.w = 0;
- for(i = 0; i < TLast; i++) {
+ for(i = 0; i < ntags; i++) {
dc.x += dc.w;
dc.w = textw(tags[i]);
if(istile)
dc.x = dc.y = 0;
dc.w = 0;
- for(i = 0; i < TLast; i++) {
+ for(i = 0; i < ntags; i++) {
if(c->tags[i]) {
dc.x += dc.w;
- dc.w = textw(c->tags[i]);
- drawtext(c->tags[i], !istile, True);
+ dc.w = textw(tags[i]);
+ drawtext(tags[i], !istile, True);
}
}
dc.x += dc.w;
}
unsigned int
-textw(char *text)
+textw(const char *text)
{
return textnw(text, strlen(text)) + dc.font.height;
}