+void
+tileh(void) {
+ tilehstack(tilemaster());
+}
+
+void
+tilehstack(unsigned int n) {
+ int i, x, w;
+ Client *c;
+
+ if(n == 0)
+ return;
+
+ x = tx;
+ w = tw / n;
+ if(w < bh)
+ w = tw;
+
+ for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++)
+ if(i > 0) {
+ if(i > 1 && i == n) /* remainder */
+ tileresize(c, x, ty, (tx + tw) - x - 2 * c->border,
+ th - 2 * c->border);
+ else
+ tileresize(c, x, ty, w - 2 * c->border,
+ th - 2 * c->border);
+ if(w != tw)
+ x = c->x + c->w + 2 * c->border;
+ }
+}
+