commit 37881fc5c5bd1047b703f6b3ad5f851c7021b808
parent cda67fed1dee21f57f5b2d1741d40b8092b332a3
Author: William Casarin <jb55@jb55.com>
Date: Wed, 17 Oct 2018 10:05:30 -0700
delete a bunch of stuff
Diffstat:
M | cmdtree.c | | | 37 | ++----------------------------------- |
1 file changed, 2 insertions(+), 35 deletions(-)
diff --git a/cmdtree.c b/cmdtree.c
@@ -182,7 +182,7 @@ draw_command(Drw *drw, int x, int y, struct command *cmd) {
char buf[256];
int lpad = 0;
int pad = 0;
- unsigned int w = 50;
+ unsigned int w;
int invert = 0;
int isprefix = 0;
char *name = cmd->name;
@@ -252,33 +252,6 @@ draw_tree_vertical(Drw *drw, struct command *cmds, int ncmds, int x, int y, int
}
}
-/* static void */
-/* draw_tree_horizontal(Drw *drw, struct command *cmds, int x, int y, int w, int h) { */
-/* int i, dx = x, dy = y; */
-
-/* drw_setscheme(drw, &schemes[SchemeNorm].bg_clr, */
-/* &schemes[SchemeNorm].bg_clr); */
-/* drw_rect(drw, 0, 0, w, h, 1, 1); */
-
-/* int c = '0'; */
-/* for (i = 0; i < 50; ++i, ++c) { */
-/* if (i % 2 == 0) */
-/* snprintf(buf, 512, "item-long-%d", i); */
-/* else if (i % 6 == 0) */
-/* snprintf(buf, 512, "herpderp-%d", i); */
-/* else if (i % 7 == 0) */
-/* snprintf(buf, 512, "ksdfsdjhfsdf-%d", i); */
-/* else */
-/* snprintf(buf, 512, "hi-%d", i); */
-/* if (c > '~') c = '0'; */
-/* sprintf(smallbuf, "%c", c); */
-/* dx = draw_command(drw, dx, dy, cmd) + 20; */
-/* if (dx >= mw) { */
-/* dx = 0; */
-/* dy += bh; */
-/* } */
-/* } */
-/* } */
static void
draw_tree(Drw *drw, int x, int y, int w, int h) {
@@ -287,7 +260,6 @@ draw_tree(Drw *drw, int x, int y, int w, int h) {
struct cmdstack *cmdstack = cmdstack_top();
- /* draw_tree_horizontal(drw, x, y, w, h); */
draw_tree_vertical(drw, cmdstack->children, cmdstack->nchildren, x, y,
w, h);
@@ -369,13 +341,8 @@ int main(void) {
screen = DefaultScreen(display);
root = RootWindow(display, screen);
- // XXXembed
- /* if (!embed || !(parentwin = strtol(embed, NULL, 0))) */
- /* parentwin = root; */
-
parentwin = root;
- /* struct command *cmds = */
- /* test_root_commands(NULL, commands, cmdstack->nchildren); */
+
int res = cmdstack_push_(commands, LENGTH(commands));
assert(res);